summaryrefslogtreecommitdiff
path: root/gtk/gtkstyle.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/gtkstyle.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/gtkstyle.h')
-rw-r--r--gtk/gtkstyle.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/gtk/gtkstyle.h b/gtk/gtkstyle.h
index 4ae3143459..e4f71c6f8d 100644
--- a/gtk/gtkstyle.h
+++ b/gtk/gtkstyle.h
@@ -452,8 +452,12 @@ void gtk_style_apply_default_background (GtkStyle *style,
gint width,
gint height);
-GtkIconSet* gtk_style_lookup_icon_set (GtkStyle *style,
- const gchar *stock_id);
+GtkIconSet* gtk_style_lookup_icon_set (GtkStyle *style,
+ const gchar *stock_id);
+gboolean gtk_style_lookup_color (GtkStyle *style,
+ const gchar *color_name,
+ GdkColor *color);
+
GdkPixbuf* gtk_style_render_icon (GtkStyle *style,
const GtkIconSource *source,
GtkTextDirection direction,
@@ -461,6 +465,7 @@ GdkPixbuf* gtk_style_render_icon (GtkStyle *style,
GtkIconSize size,
GtkWidget *widget,
const gchar *detail);
+
#ifndef GTK_DISABLE_DEPRECATED
void gtk_draw_hline (GtkStyle *style,
GdkWindow *window,
@@ -852,7 +857,7 @@ void gtk_paint_resize_grip (GtkStyle *style,
GType gtk_border_get_type (void) G_GNUC_CONST;
GtkBorder *gtk_border_copy (const GtkBorder *border_);
-void gtk_border_free ( GtkBorder *border_);
+void gtk_border_free (GtkBorder *border_);
/* --- private API --- */
const GValue* _gtk_style_peek_property_value (GtkStyle *style,
@@ -860,8 +865,12 @@ const GValue* _gtk_style_peek_property_value (GtkStyle *style,
GParamSpec *pspec,
GtkRcPropertyParser parser);
-void _gtk_style_init_for_settings (GtkStyle *style,
- GtkSettings *settings);
+void _gtk_style_init_for_settings (GtkStyle *style,
+ GtkSettings *settings);
+
+void _gtk_style_shade (GdkColor *a,
+ GdkColor *b,
+ gdouble k);
/* deprecated */
#ifndef GTK_DISABLE_DEPRECATED