From c09148ca09081cd009cb9a328441b4b43008e352 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Tue, 15 Nov 2011 16:56:59 +0100 Subject: 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. --- gtk/gtkthemingengineprivate.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gtk/gtkthemingengineprivate.h') diff --git a/gtk/gtkthemingengineprivate.h b/gtk/gtkthemingengineprivate.h index caf189ec6b..5191fa05b8 100644 --- a/gtk/gtkthemingengineprivate.h +++ b/gtk/gtkthemingengineprivate.h @@ -21,6 +21,13 @@ #define __GTK_THEMING_ENGINE_PRIVATE_H__ #include +#include "gtkstylecontextprivate.h" + +void _gtk_theming_engine_get (GtkThemingEngine *engine, + GtkStateFlags state, + GtkStylePropertyContext *property_context, + ...) G_GNUC_NULL_TERMINATED; + void _gtk_theming_engine_paint_spinner (cairo_t *cr, gdouble radius, -- cgit v1.2.1