summaryrefslogtreecommitdiff
path: root/gtk/gtkrc.h
diff options
context:
space:
mode:
authorMichael Natterer <mitch@imendio.com>2005-11-23 10:33:58 +0000
committerMichael Natterer <mitch@src.gnome.org>2005-11-23 10:33:58 +0000
commitde3155a4c2c8321b10e561e87e7f8086dd13c26b (patch)
tree4c3b1936922cfb9749b7a668bd799a17826a44ca /gtk/gtkrc.h
parentdfa4870b74be2ade513ffda504cd4fdfede19bb3 (diff)
downloadgtk+-de3155a4c2c8321b10e561e87e7f8086dd13c26b.tar.gz
Added symbolic themable colors. Patch is a merged version of proposals
2005-11-23 Michael Natterer <mitch@imendio.com> Added symbolic themable colors. Patch is a merged version of proposals from Matthias and maemo-gtk. Fixes bug #114355. * configure.in: require glib >= 2.9.1 for refcountable hashtables. * gtk/gtksettings.c: added property "color-scheme" which is a string defining colors like "foreground:black\nbackground:grey". Automatically provide a name->GdkColor hash table mapping for the color scheme. * gtk/gtkrc.[ch]: added list of color hashes that works like the list of icon factories. Append the color scheme hash from GtkSettings if it exists. Extended gtkrc syntax to allow defining and referencing of logical colors. Also allow to modulate colors in gtkrc by using arbitrary expressions of mix(), shade(), lighter() and darker(). Added internal function _gtk_rc_style_get_color_hashes(). * gtk/gtkstyle.[ch]: keep a private list of color hashes around. Get the list from _gtk_rc_style_get_color_hashes(). Export internal function _gtk_style_shade() (used by above color expressions). Added public API gtk_style_lookup_color() which looks up a logical color by name. * gtk/gtk.symbols: add gtk_style_lookup_color * tests/testgtkrc: use symbolic colors for making the scrollbars red.
Diffstat (limited to 'gtk/gtkrc.h')
-rw-r--r--gtk/gtkrc.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/gtk/gtkrc.h b/gtk/gtkrc.h
index 3fb2d0d352..ea6ff22235 100644
--- a/gtk/gtkrc.h
+++ b/gtk/gtkrc.h
@@ -209,6 +209,7 @@ typedef enum {
GTK_RC_TOKEN_STOCK,
GTK_RC_TOKEN_LTR,
GTK_RC_TOKEN_RTL,
+ GTK_RC_TOKEN_COLOR,
GTK_RC_TOKEN_LAST
} GtkRcTokenType;
@@ -237,6 +238,8 @@ const GtkRcProperty* _gtk_rc_style_lookup_rc_property (GtkRcStyle *rc_style,
GQuark type_name,
GQuark property_name);
+GSList * _gtk_rc_style_get_color_hashes (GtkRcStyle *rc_style);
+
const gchar* _gtk_rc_context_get_default_font_name (GtkSettings *settings);
G_END_DECLS