diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2010-12-02 23:41:24 +0100 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2010-12-04 15:39:55 +0100 |
commit | bacb7906f238c716dac395b923e41897428a263a (patch) | |
tree | ff848dff658a36eb0ed331ed40295fd3fc3959e0 /gtk/gtkstylecontext.h | |
parent | 3e8d138ed6310e795c4a9c34cd7e82c232b797ec (diff) | |
download | gtk+-bacb7906f238c716dac395b923e41897428a263a.tar.gz |
Add helper API for getting colors/borders in GtkStyleContext/GtkThemingEngine
Diffstat (limited to 'gtk/gtkstylecontext.h')
-rw-r--r-- | gtk/gtkstylecontext.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gtk/gtkstylecontext.h b/gtk/gtkstylecontext.h index b2dd734d10..be20bf95f6 100644 --- a/gtk/gtkstylecontext.h +++ b/gtk/gtkstylecontext.h @@ -23,6 +23,7 @@ #include <glib-object.h> #include <gtk/gtkstyleprovider.h> #include <gtk/gtkwidgetpath.h> +#include <gtk/gtkborder.h> G_BEGIN_DECLS @@ -420,6 +421,26 @@ void gtk_style_context_push_animatable_region (GtkStyleContext *context, gpointer region_id); void gtk_style_context_pop_animatable_region (GtkStyleContext *context); +/* Some helper functions to retrieve most common properties */ +void gtk_style_context_get_color (GtkStyleContext *context, + GtkStateFlags state, + GdkRGBA *color); +void gtk_style_context_get_background_color (GtkStyleContext *context, + GtkStateFlags state, + GdkRGBA *color); +void gtk_style_context_get_border_color (GtkStyleContext *context, + GtkStateFlags state, + GdkRGBA *color); + +void gtk_style_context_get_border (GtkStyleContext *context, + GtkStateFlags state, + GtkBorder *border); +void gtk_style_context_get_padding (GtkStyleContext *context, + GtkStateFlags state, + GtkBorder *padding); +void gtk_style_context_get_margin (GtkStyleContext *context, + GtkStateFlags state, + GtkBorder *margin); /* Semi-private API */ const GValue * _gtk_style_context_peek_style_property (GtkStyleContext *context, |