summaryrefslogtreecommitdiff
path: root/gtk/gtkstylepropertyprivate.h
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2011-11-15 16:56:59 +0100
committerAlexander Larsson <alexl@redhat.com>2011-11-17 12:27:22 +0100
commitc09148ca09081cd009cb9a328441b4b43008e352 (patch)
treeb4d672b2d49282b99bee74620812b0a93e466b03 /gtk/gtkstylepropertyprivate.h
parente953465e33b4ba9b7c72b6dc3be4fe5db69efe7f (diff)
downloadgtk+-c09148ca09081cd009cb9a328441b4b43008e352.tar.gz
Add GtkStylePropertyContext and use it in when getting style properties
At the toplevel we have _gtk_theming_engine_get, which lets us pass in a property context with (atm) the size to get the property for. Then there is a lot of plumbing to push this down into the lower layers of the style property code until finally hitting the property resolvers. I need this because I will be adding a property resolver for win32 theme parts, and they render differently depending on the size (i.e. they don't scale linearly). The idea is that the code to get the background properties will pass in the final size and we will resolve the theme part specification to that particular size. If the old non-context calls are used we just hardcode a size of 100x100.
Diffstat (limited to 'gtk/gtkstylepropertyprivate.h')
-rw-r--r--gtk/gtkstylepropertyprivate.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/gtk/gtkstylepropertyprivate.h b/gtk/gtkstylepropertyprivate.h
index aef18b8893..07994d5f26 100644
--- a/gtk/gtkstylepropertyprivate.h
+++ b/gtk/gtkstylepropertyprivate.h
@@ -21,6 +21,7 @@
#define __GTK_STYLEPROPERTY_PRIVATE_H__
#include "gtkcssparserprivate.h"
+#include "gtkstylecontextprivate.h"
G_BEGIN_DECLS
@@ -33,7 +34,8 @@ typedef GParameter * (* GtkStyleUnpackFunc) (const GValue
guint *n_params);
typedef void (* GtkStylePackFunc) (GValue *value,
GtkStyleProperties *props,
- GtkStateFlags state);
+ GtkStateFlags state,
+ GtkStylePropertyContext *context);
typedef gboolean (* GtkStyleParseFunc) (GtkCssParser *parser,
GFile *base,
GValue *value);
@@ -82,7 +84,8 @@ void _gtk_style_property_default_value (const GtkStyleProper
void _gtk_style_property_resolve (const GtkStyleProperty *property,
GtkStyleProperties *properties,
GtkStateFlags state,
- GValue *value);
+ GtkStylePropertyContext *context,
+ GValue *orig_value);
gboolean _gtk_style_property_is_shorthand (const GtkStyleProperty *property);
GParameter * _gtk_style_property_unpack (const GtkStyleProperty *property,
@@ -91,6 +94,7 @@ GParameter * _gtk_style_property_unpack (const GtkStyleProper
void _gtk_style_property_pack (const GtkStyleProperty *property,
GtkStyleProperties *props,
GtkStateFlags state,
+ GtkStylePropertyContext *context,
GValue *value);
gboolean _gtk_style_property_parse_value (const GtkStyleProperty *property,