mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-11 03:10:09 +00:00
css: Merge GtkStyleProviderPrivate into GtkStyleProvider
This is just lots of renaming. The interface remains private, so the public API does not change, apart from removing the definition of the Interface object to avoid subclassing.
This commit is contained in:
parent
c8986e66ce
commit
83fb7a649f
@ -324,12 +324,12 @@ gtk_css_animated_style_find_animation (GSList *animations,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GSList *
|
static GSList *
|
||||||
gtk_css_animated_style_create_css_animations (GSList *animations,
|
gtk_css_animated_style_create_css_animations (GSList *animations,
|
||||||
GtkCssStyle *base_style,
|
GtkCssStyle *base_style,
|
||||||
GtkCssStyle *parent_style,
|
GtkCssStyle *parent_style,
|
||||||
gint64 timestamp,
|
gint64 timestamp,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *source)
|
GtkCssStyle *source)
|
||||||
{
|
{
|
||||||
GtkCssValue *durations, *delays, *timing_functions, *animation_names;
|
GtkCssValue *durations, *delays, *timing_functions, *animation_names;
|
||||||
GtkCssValue *iteration_counts, *directions, *play_states, *fill_modes;
|
GtkCssValue *iteration_counts, *directions, *play_states, *fill_modes;
|
||||||
@ -369,7 +369,7 @@ gtk_css_animated_style_create_css_animations (GSList *animation
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
keyframes = _gtk_style_provider_private_get_keyframes (provider, name);
|
keyframes = gtk_style_provider_get_keyframes (provider, name);
|
||||||
if (keyframes == NULL)
|
if (keyframes == NULL)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@ -410,11 +410,11 @@ gtk_css_animated_style_apply_animations (GtkCssAnimatedStyle *style)
|
|||||||
}
|
}
|
||||||
|
|
||||||
GtkCssStyle *
|
GtkCssStyle *
|
||||||
gtk_css_animated_style_new (GtkCssStyle *base_style,
|
gtk_css_animated_style_new (GtkCssStyle *base_style,
|
||||||
GtkCssStyle *parent_style,
|
GtkCssStyle *parent_style,
|
||||||
gint64 timestamp,
|
gint64 timestamp,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *previous_style)
|
GtkCssStyle *previous_style)
|
||||||
{
|
{
|
||||||
GtkCssAnimatedStyle *result;
|
GtkCssAnimatedStyle *result;
|
||||||
GSList *animations;
|
GSList *animations;
|
||||||
|
@ -55,7 +55,7 @@ GType gtk_css_animated_style_get_type (void) G_GNUC_CO
|
|||||||
GtkCssStyle * gtk_css_animated_style_new (GtkCssStyle *base_style,
|
GtkCssStyle * gtk_css_animated_style_new (GtkCssStyle *base_style,
|
||||||
GtkCssStyle *parent_style,
|
GtkCssStyle *parent_style,
|
||||||
gint64 timestamp,
|
gint64 timestamp,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *previous_style);
|
GtkCssStyle *previous_style);
|
||||||
GtkCssStyle * gtk_css_animated_style_new_advance (GtkCssAnimatedStyle *source,
|
GtkCssStyle * gtk_css_animated_style_new_advance (GtkCssAnimatedStyle *source,
|
||||||
GtkCssStyle *base,
|
GtkCssStyle *base,
|
||||||
|
@ -43,11 +43,11 @@ gtk_css_value_array_free (GtkCssValue *value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GtkCssValue *
|
static GtkCssValue *
|
||||||
gtk_css_value_array_compute (GtkCssValue *value,
|
gtk_css_value_array_compute (GtkCssValue *value,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
GtkCssValue *result;
|
GtkCssValue *result;
|
||||||
GtkCssValue *i_value;
|
GtkCssValue *i_value;
|
||||||
|
@ -41,11 +41,11 @@ gtk_css_value_bg_size_free (GtkCssValue *value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GtkCssValue *
|
static GtkCssValue *
|
||||||
gtk_css_value_bg_size_compute (GtkCssValue *value,
|
gtk_css_value_bg_size_compute (GtkCssValue *value,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
GtkCssValue *x, *y;
|
GtkCssValue *x, *y;
|
||||||
|
|
||||||
|
@ -42,11 +42,11 @@ gtk_css_value_border_free (GtkCssValue *value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GtkCssValue *
|
static GtkCssValue *
|
||||||
gtk_css_value_border_compute (GtkCssValue *value,
|
gtk_css_value_border_compute (GtkCssValue *value,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
GtkCssValue *values[4];
|
GtkCssValue *values[4];
|
||||||
GtkCssValue *computed;
|
GtkCssValue *computed;
|
||||||
|
@ -98,11 +98,11 @@ gtk_css_calc_array_add (GPtrArray *array, GtkCssValue *value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GtkCssValue *
|
static GtkCssValue *
|
||||||
gtk_css_value_calc_compute (GtkCssValue *value,
|
gtk_css_value_calc_compute (GtkCssValue *value,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
GtkCssValue *result;
|
GtkCssValue *result;
|
||||||
GPtrArray *array;
|
GPtrArray *array;
|
||||||
|
@ -103,10 +103,10 @@ gtk_css_value_color_free (GtkCssValue *color)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GtkCssValue *
|
static GtkCssValue *
|
||||||
gtk_css_value_color_get_fallback (guint property_id,
|
gtk_css_value_color_get_fallback (guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
static const GdkRGBA transparent = { 0, 0, 0, 0 };
|
static const GdkRGBA transparent = { 0, 0, 0, 0 };
|
||||||
|
|
||||||
@ -143,10 +143,10 @@ gtk_css_value_color_get_fallback (guint property_id,
|
|||||||
}
|
}
|
||||||
|
|
||||||
GtkCssValue *
|
GtkCssValue *
|
||||||
_gtk_css_color_value_resolve (GtkCssValue *color,
|
_gtk_css_color_value_resolve (GtkCssValue *color,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssValue *current,
|
GtkCssValue *current,
|
||||||
GSList *cycle_list)
|
GSList *cycle_list)
|
||||||
{
|
{
|
||||||
GtkCssValue *value;
|
GtkCssValue *value;
|
||||||
|
|
||||||
@ -167,7 +167,7 @@ _gtk_css_color_value_resolve (GtkCssValue *color,
|
|||||||
if (g_slist_find (cycle_list, color))
|
if (g_slist_find (cycle_list, color))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
named = _gtk_style_provider_private_get_color (provider, color->sym_col.name);
|
named = gtk_style_provider_get_color (provider, color->sym_col.name);
|
||||||
if (named == NULL)
|
if (named == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
@ -289,11 +289,11 @@ _gtk_css_color_value_resolve (GtkCssValue *color,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GtkCssValue *
|
static GtkCssValue *
|
||||||
gtk_css_value_color_compute (GtkCssValue *value,
|
gtk_css_value_color_compute (GtkCssValue *value,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
GtkCssValue *resolved, *current;
|
GtkCssValue *resolved, *current;
|
||||||
|
|
||||||
|
@ -43,10 +43,10 @@ GtkCssValue * _gtk_css_color_value_new_current_color (void);
|
|||||||
|
|
||||||
GtkCssValue * _gtk_css_color_value_parse (GtkCssParser *parser);
|
GtkCssValue * _gtk_css_color_value_parse (GtkCssParser *parser);
|
||||||
|
|
||||||
GtkCssValue * _gtk_css_color_value_resolve (GtkCssValue *color,
|
GtkCssValue * _gtk_css_color_value_resolve (GtkCssValue *color,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssValue *current,
|
GtkCssValue *current,
|
||||||
GSList *cycle_list);
|
GSList *cycle_list);
|
||||||
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
@ -37,11 +37,11 @@ gtk_css_value_corner_free (GtkCssValue *value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GtkCssValue *
|
static GtkCssValue *
|
||||||
gtk_css_value_corner_compute (GtkCssValue *corner,
|
gtk_css_value_corner_compute (GtkCssValue *corner,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
GtkCssValue *x, *y;
|
GtkCssValue *x, *y;
|
||||||
|
|
||||||
|
@ -37,10 +37,10 @@ gtk_css_value_dimension_free (GtkCssValue *value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static double
|
static double
|
||||||
get_base_font_size_px (guint property_id,
|
get_base_font_size_px (guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
if (property_id == GTK_CSS_PROPERTY_FONT_SIZE)
|
if (property_id == GTK_CSS_PROPERTY_FONT_SIZE)
|
||||||
{
|
{
|
||||||
@ -60,11 +60,11 @@ get_dpi (GtkCssStyle *style)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GtkCssValue *
|
static GtkCssValue *
|
||||||
gtk_css_value_dimension_compute (GtkCssValue *number,
|
gtk_css_value_dimension_compute (GtkCssValue *number,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
GtkBorderStyle border_style;
|
GtkBorderStyle border_style;
|
||||||
|
|
||||||
|
@ -50,11 +50,11 @@ gtk_css_value_ease_free (GtkCssValue *value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GtkCssValue *
|
static GtkCssValue *
|
||||||
gtk_css_value_ease_compute (GtkCssValue *value,
|
gtk_css_value_ease_compute (GtkCssValue *value,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
return _gtk_css_value_ref (value);
|
return _gtk_css_value_ref (value);
|
||||||
}
|
}
|
||||||
|
@ -43,11 +43,11 @@ gtk_css_value_enum_free (GtkCssValue *value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GtkCssValue *
|
static GtkCssValue *
|
||||||
gtk_css_value_enum_compute (GtkCssValue *value,
|
gtk_css_value_enum_compute (GtkCssValue *value,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
return _gtk_css_value_ref (value);
|
return _gtk_css_value_ref (value);
|
||||||
}
|
}
|
||||||
@ -205,13 +205,13 @@ get_dpi (GtkCssStyle *style)
|
|||||||
#define DEFAULT_FONT_SIZE_PT 10
|
#define DEFAULT_FONT_SIZE_PT 10
|
||||||
|
|
||||||
double
|
double
|
||||||
gtk_css_font_size_get_default_px (GtkStyleProviderPrivate *provider,
|
gtk_css_font_size_get_default_px (GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style)
|
GtkCssStyle *style)
|
||||||
{
|
{
|
||||||
GtkSettings *settings;
|
GtkSettings *settings;
|
||||||
int font_size;
|
int font_size;
|
||||||
|
|
||||||
settings = _gtk_style_provider_private_get_settings (provider);
|
settings = gtk_style_provider_get_settings (provider);
|
||||||
if (settings == NULL)
|
if (settings == NULL)
|
||||||
return DEFAULT_FONT_SIZE_PT * get_dpi (style) / 72.0;
|
return DEFAULT_FONT_SIZE_PT * get_dpi (style) / 72.0;
|
||||||
|
|
||||||
@ -225,11 +225,11 @@ gtk_css_font_size_get_default_px (GtkStyleProviderPrivate *provider,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GtkCssValue *
|
static GtkCssValue *
|
||||||
gtk_css_value_font_size_compute (GtkCssValue *value,
|
gtk_css_value_font_size_compute (GtkCssValue *value,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
double font_size;
|
double font_size;
|
||||||
|
|
||||||
@ -386,11 +386,11 @@ _gtk_css_font_style_value_get (const GtkCssValue *value)
|
|||||||
#define LIGHTER -2
|
#define LIGHTER -2
|
||||||
|
|
||||||
static GtkCssValue *
|
static GtkCssValue *
|
||||||
gtk_css_value_font_weight_compute (GtkCssValue *value,
|
gtk_css_value_font_weight_compute (GtkCssValue *value,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
PangoWeight new_weight;
|
PangoWeight new_weight;
|
||||||
int parent_value;
|
int parent_value;
|
||||||
|
@ -38,8 +38,8 @@ GtkBorderStyle _gtk_css_border_style_value_get (const GtkCssValue *value)
|
|||||||
GtkCssValue * _gtk_css_font_size_value_new (GtkCssFontSize size);
|
GtkCssValue * _gtk_css_font_size_value_new (GtkCssFontSize size);
|
||||||
GtkCssValue * _gtk_css_font_size_value_try_parse (GtkCssParser *parser);
|
GtkCssValue * _gtk_css_font_size_value_try_parse (GtkCssParser *parser);
|
||||||
GtkCssFontSize _gtk_css_font_size_value_get (const GtkCssValue *value);
|
GtkCssFontSize _gtk_css_font_size_value_get (const GtkCssValue *value);
|
||||||
double gtk_css_font_size_get_default_px (GtkStyleProviderPrivate *provider,
|
double gtk_css_font_size_get_default_px (GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style);
|
GtkCssStyle *style);
|
||||||
|
|
||||||
GtkCssValue * _gtk_css_font_style_value_new (PangoStyle style);
|
GtkCssValue * _gtk_css_font_style_value_new (PangoStyle style);
|
||||||
GtkCssValue * _gtk_css_font_style_value_try_parse (GtkCssParser *parser);
|
GtkCssValue * _gtk_css_font_style_value_try_parse (GtkCssParser *parser);
|
||||||
|
@ -300,12 +300,12 @@ gtk_css_value_filter_free (GtkCssValue *value)
|
|||||||
|
|
||||||
/* returns TRUE if dest == src */
|
/* returns TRUE if dest == src */
|
||||||
static gboolean
|
static gboolean
|
||||||
gtk_css_filter_compute (GtkCssFilter *dest,
|
gtk_css_filter_compute (GtkCssFilter *dest,
|
||||||
GtkCssFilter *src,
|
GtkCssFilter *src,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
dest->type = src->type;
|
dest->type = src->type;
|
||||||
|
|
||||||
@ -356,11 +356,11 @@ gtk_css_filter_compute (GtkCssFilter *dest,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GtkCssValue *
|
static GtkCssValue *
|
||||||
gtk_css_value_filter_compute (GtkCssValue *value,
|
gtk_css_value_filter_compute (GtkCssValue *value,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
GtkCssValue *result;
|
GtkCssValue *result;
|
||||||
gboolean changes;
|
gboolean changes;
|
||||||
|
@ -70,18 +70,18 @@ gtk_css_value_icon_theme_free (GtkCssValue *value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GtkCssValue *
|
static GtkCssValue *
|
||||||
gtk_css_value_icon_theme_compute (GtkCssValue *icon_theme,
|
gtk_css_value_icon_theme_compute (GtkCssValue *icon_theme,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
GtkIconTheme *icontheme;
|
GtkIconTheme *icontheme;
|
||||||
|
|
||||||
if (icon_theme->icontheme)
|
if (icon_theme->icontheme)
|
||||||
icontheme = icon_theme->icontheme;
|
icontheme = icon_theme->icontheme;
|
||||||
else
|
else
|
||||||
icontheme = gtk_icon_theme_get_for_display (_gtk_settings_get_display (_gtk_style_provider_private_get_settings (provider)));
|
icontheme = gtk_icon_theme_get_for_display (_gtk_settings_get_display (gtk_style_provider_get_settings (provider)));
|
||||||
|
|
||||||
return gtk_css_icon_theme_value_new (icontheme);
|
return gtk_css_icon_theme_value_new (icontheme);
|
||||||
}
|
}
|
||||||
|
@ -64,11 +64,11 @@ gtk_css_image_real_get_aspect_ratio (GtkCssImage *image)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GtkCssImage *
|
static GtkCssImage *
|
||||||
gtk_css_image_real_compute (GtkCssImage *image,
|
gtk_css_image_real_compute (GtkCssImage *image,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
return g_object_ref (image);
|
return g_object_ref (image);
|
||||||
}
|
}
|
||||||
@ -184,11 +184,11 @@ _gtk_css_image_get_aspect_ratio (GtkCssImage *image)
|
|||||||
}
|
}
|
||||||
|
|
||||||
GtkCssImage *
|
GtkCssImage *
|
||||||
_gtk_css_image_compute (GtkCssImage *image,
|
_gtk_css_image_compute (GtkCssImage *image,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
GtkCssImageClass *klass;
|
GtkCssImageClass *klass;
|
||||||
|
|
||||||
|
@ -474,11 +474,11 @@ gtk_css_image_builtin_print (GtkCssImage *image,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GtkCssImage *
|
static GtkCssImage *
|
||||||
gtk_css_image_builtin_compute (GtkCssImage *image,
|
gtk_css_image_builtin_compute (GtkCssImage *image,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
GtkCssImageBuiltin *result;
|
GtkCssImageBuiltin *result;
|
||||||
|
|
||||||
|
@ -193,11 +193,11 @@ gtk_css_image_cross_fade_print (GtkCssImage *image,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GtkCssImage *
|
static GtkCssImage *
|
||||||
gtk_css_image_cross_fade_compute (GtkCssImage *image,
|
gtk_css_image_cross_fade_compute (GtkCssImage *image,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
GtkCssImageCrossFade *cross_fade = GTK_CSS_IMAGE_CROSS_FADE (image);
|
GtkCssImageCrossFade *cross_fade = GTK_CSS_IMAGE_CROSS_FADE (image);
|
||||||
GtkCssImage *start, *end, *computed;
|
GtkCssImage *start, *end, *computed;
|
||||||
|
@ -131,11 +131,11 @@ gtk_css_image_fallback_dispose (GObject *object)
|
|||||||
|
|
||||||
|
|
||||||
static GtkCssImage *
|
static GtkCssImage *
|
||||||
gtk_css_image_fallback_compute (GtkCssImage *image,
|
gtk_css_image_fallback_compute (GtkCssImage *image,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
GtkCssImageFallback *fallback = GTK_CSS_IMAGE_FALLBACK (image);
|
GtkCssImageFallback *fallback = GTK_CSS_IMAGE_FALLBACK (image);
|
||||||
GtkCssImageFallback *copy;
|
GtkCssImageFallback *copy;
|
||||||
|
@ -152,11 +152,11 @@ gtk_css_image_icon_theme_print (GtkCssImage *image,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GtkCssImage *
|
static GtkCssImage *
|
||||||
gtk_css_image_icon_theme_compute (GtkCssImage *image,
|
gtk_css_image_icon_theme_compute (GtkCssImage *image,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
GtkCssImageIconTheme *icon_theme = GTK_CSS_IMAGE_ICON_THEME (image);
|
GtkCssImageIconTheme *icon_theme = GTK_CSS_IMAGE_ICON_THEME (image);
|
||||||
GtkCssImageIconTheme *copy;
|
GtkCssImageIconTheme *copy;
|
||||||
@ -164,7 +164,7 @@ gtk_css_image_icon_theme_compute (GtkCssImage *image,
|
|||||||
copy = g_object_new (GTK_TYPE_CSS_IMAGE_ICON_THEME, NULL);
|
copy = g_object_new (GTK_TYPE_CSS_IMAGE_ICON_THEME, NULL);
|
||||||
copy->name = g_strdup (icon_theme->name);
|
copy->name = g_strdup (icon_theme->name);
|
||||||
copy->icon_theme = gtk_css_icon_theme_value_get_icon_theme (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_ICON_THEME));
|
copy->icon_theme = gtk_css_icon_theme_value_get_icon_theme (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_ICON_THEME));
|
||||||
copy->scale = _gtk_style_provider_private_get_scale (provider);
|
copy->scale = gtk_style_provider_get_scale (provider);
|
||||||
gtk_icon_theme_lookup_symbolic_colors (style, ©->color, ©->success, ©->warning, ©->error);
|
gtk_icon_theme_lookup_symbolic_colors (style, ©->color, ©->success, ©->warning, ©->error);
|
||||||
|
|
||||||
return GTK_CSS_IMAGE (copy);
|
return GTK_CSS_IMAGE (copy);
|
||||||
|
@ -457,11 +457,11 @@ gtk_css_image_linear_print (GtkCssImage *image,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GtkCssImage *
|
static GtkCssImage *
|
||||||
gtk_css_image_linear_compute (GtkCssImage *image,
|
gtk_css_image_linear_compute (GtkCssImage *image,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
GtkCssImageLinear *linear = GTK_CSS_IMAGE_LINEAR (image);
|
GtkCssImageLinear *linear = GTK_CSS_IMAGE_LINEAR (image);
|
||||||
GtkCssImageLinear *copy;
|
GtkCssImageLinear *copy;
|
||||||
|
@ -58,7 +58,7 @@ struct _GtkCssImageClass
|
|||||||
/* create "computed value" in CSS terms, returns a new reference */
|
/* create "computed value" in CSS terms, returns a new reference */
|
||||||
GtkCssImage *(* compute) (GtkCssImage *image,
|
GtkCssImage *(* compute) (GtkCssImage *image,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style);
|
GtkCssStyle *parent_style);
|
||||||
/* compare two images for equality */
|
/* compare two images for equality */
|
||||||
@ -98,7 +98,7 @@ double _gtk_css_image_get_aspect_ratio (GtkCssImage *
|
|||||||
|
|
||||||
GtkCssImage * _gtk_css_image_compute (GtkCssImage *image,
|
GtkCssImage * _gtk_css_image_compute (GtkCssImage *image,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style);
|
GtkCssStyle *parent_style);
|
||||||
gboolean _gtk_css_image_equal (GtkCssImage *image1,
|
gboolean _gtk_css_image_equal (GtkCssImage *image1,
|
||||||
|
@ -457,11 +457,11 @@ gtk_css_image_radial_print (GtkCssImage *image,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GtkCssImage *
|
static GtkCssImage *
|
||||||
gtk_css_image_radial_compute (GtkCssImage *image,
|
gtk_css_image_radial_compute (GtkCssImage *image,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
GtkCssImageRadial *radial = GTK_CSS_IMAGE_RADIAL (image);
|
GtkCssImageRadial *radial = GTK_CSS_IMAGE_RADIAL (image);
|
||||||
GtkCssImageRadial *copy;
|
GtkCssImageRadial *copy;
|
||||||
|
@ -144,11 +144,11 @@ gtk_css_image_recolor_load (GtkCssImageRecolor *recolor,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GtkCssImage *
|
static GtkCssImage *
|
||||||
gtk_css_image_recolor_compute (GtkCssImage *image,
|
gtk_css_image_recolor_compute (GtkCssImage *image,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
GtkCssImageRecolor *recolor = GTK_CSS_IMAGE_RECOLOR (image);
|
GtkCssImageRecolor *recolor = GTK_CSS_IMAGE_RECOLOR (image);
|
||||||
GtkCssValue *palette;
|
GtkCssValue *palette;
|
||||||
@ -156,7 +156,7 @@ gtk_css_image_recolor_compute (GtkCssImage *image,
|
|||||||
int scale;
|
int scale;
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
|
|
||||||
scale = _gtk_style_provider_private_get_scale (provider);
|
scale = gtk_style_provider_get_scale (provider);
|
||||||
|
|
||||||
if (recolor->palette)
|
if (recolor->palette)
|
||||||
palette = _gtk_css_value_compute (recolor->palette, property_id, provider, style, parent_style);
|
palette = _gtk_css_value_compute (recolor->palette, property_id, provider, style, parent_style);
|
||||||
@ -168,7 +168,7 @@ gtk_css_image_recolor_compute (GtkCssImage *image,
|
|||||||
if (error)
|
if (error)
|
||||||
{
|
{
|
||||||
GtkCssSection *section = gtk_css_style_get_section (style, property_id);
|
GtkCssSection *section = gtk_css_style_get_section (style, property_id);
|
||||||
_gtk_style_provider_private_emit_error (provider, section, error);
|
gtk_style_provider_emit_error (provider, section, error);
|
||||||
g_error_free (error);
|
g_error_free (error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,16 +93,16 @@ gtk_css_image_scaled_dispose (GObject *object)
|
|||||||
|
|
||||||
|
|
||||||
static GtkCssImage *
|
static GtkCssImage *
|
||||||
gtk_css_image_scaled_compute (GtkCssImage *image,
|
gtk_css_image_scaled_compute (GtkCssImage *image,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
GtkCssImageScaled *scaled = GTK_CSS_IMAGE_SCALED (image);
|
GtkCssImageScaled *scaled = GTK_CSS_IMAGE_SCALED (image);
|
||||||
int scale;
|
int scale;
|
||||||
|
|
||||||
scale = _gtk_style_provider_private_get_scale (provider);
|
scale = gtk_style_provider_get_scale (provider);
|
||||||
scale = MAX(MIN (scale, scaled->n_images), 1);
|
scale = MAX(MIN (scale, scaled->n_images), 1);
|
||||||
|
|
||||||
return _gtk_css_image_compute (scaled->images[scale - 1],
|
return _gtk_css_image_compute (scaled->images[scale - 1],
|
||||||
|
@ -125,11 +125,11 @@ gtk_css_image_url_snapshot (GtkCssImage *image,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GtkCssImage *
|
static GtkCssImage *
|
||||||
gtk_css_image_url_compute (GtkCssImage *image,
|
gtk_css_image_url_compute (GtkCssImage *image,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
GtkCssImageUrl *url = GTK_CSS_IMAGE_URL (image);
|
GtkCssImageUrl *url = GTK_CSS_IMAGE_URL (image);
|
||||||
GtkCssImage *copy;
|
GtkCssImage *copy;
|
||||||
@ -139,7 +139,7 @@ gtk_css_image_url_compute (GtkCssImage *image,
|
|||||||
if (error)
|
if (error)
|
||||||
{
|
{
|
||||||
GtkCssSection *section = gtk_css_style_get_section (style, property_id);
|
GtkCssSection *section = gtk_css_style_get_section (style, property_id);
|
||||||
_gtk_style_provider_private_emit_error (provider, section, error);
|
gtk_style_provider_emit_error (provider, section, error);
|
||||||
g_error_free (error);
|
g_error_free (error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,11 +34,11 @@ gtk_css_value_image_free (GtkCssValue *value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GtkCssValue *
|
static GtkCssValue *
|
||||||
gtk_css_value_image_compute (GtkCssValue *value,
|
gtk_css_value_image_compute (GtkCssValue *value,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
GtkCssImage *image, *computed;
|
GtkCssImage *image, *computed;
|
||||||
|
|
||||||
|
@ -34,11 +34,11 @@ gtk_css_value_inherit_free (GtkCssValue *value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GtkCssValue *
|
static GtkCssValue *
|
||||||
gtk_css_value_inherit_compute (GtkCssValue *value,
|
gtk_css_value_inherit_compute (GtkCssValue *value,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
if (parent_style)
|
if (parent_style)
|
||||||
{
|
{
|
||||||
|
@ -38,18 +38,18 @@ gtk_css_value_initial_free (GtkCssValue *value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GtkCssValue *
|
static GtkCssValue *
|
||||||
gtk_css_value_initial_compute (GtkCssValue *value,
|
gtk_css_value_initial_compute (GtkCssValue *value,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
GtkSettings *settings;
|
GtkSettings *settings;
|
||||||
|
|
||||||
switch (property_id)
|
switch (property_id)
|
||||||
{
|
{
|
||||||
case GTK_CSS_PROPERTY_DPI:
|
case GTK_CSS_PROPERTY_DPI:
|
||||||
settings = _gtk_style_provider_private_get_settings (provider);
|
settings = gtk_style_provider_get_settings (provider);
|
||||||
if (settings)
|
if (settings)
|
||||||
{
|
{
|
||||||
GdkScreen *screen = gdk_display_get_default_screen (_gtk_settings_get_display (settings));
|
GdkScreen *screen = gdk_display_get_default_screen (_gtk_settings_get_display (settings));
|
||||||
@ -61,7 +61,7 @@ gtk_css_value_initial_compute (GtkCssValue *value,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case GTK_CSS_PROPERTY_FONT_FAMILY:
|
case GTK_CSS_PROPERTY_FONT_FAMILY:
|
||||||
settings = _gtk_style_provider_private_get_settings (provider);
|
settings = gtk_style_provider_get_settings (provider);
|
||||||
if (settings && gtk_settings_get_font_family (settings) != NULL)
|
if (settings && gtk_settings_get_font_family (settings) != NULL)
|
||||||
return _gtk_css_array_value_new (_gtk_css_string_value_new (gtk_settings_get_font_family (settings)));
|
return _gtk_css_array_value_new (_gtk_css_string_value_new (gtk_settings_get_font_family (settings)));
|
||||||
break;
|
break;
|
||||||
|
@ -435,16 +435,16 @@ _gtk_css_keyframes_print (GtkCssKeyframes *keyframes,
|
|||||||
}
|
}
|
||||||
|
|
||||||
GtkCssKeyframes *
|
GtkCssKeyframes *
|
||||||
_gtk_css_keyframes_compute (GtkCssKeyframes *keyframes,
|
_gtk_css_keyframes_compute (GtkCssKeyframes *keyframes,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
GtkCssKeyframes *resolved;
|
GtkCssKeyframes *resolved;
|
||||||
guint k, p;
|
guint k, p;
|
||||||
|
|
||||||
g_return_val_if_fail (keyframes != NULL, NULL);
|
g_return_val_if_fail (keyframes != NULL, NULL);
|
||||||
g_return_val_if_fail (GTK_IS_STYLE_PROVIDER_PRIVATE (provider), NULL);
|
g_return_val_if_fail (GTK_IS_STYLE_PROVIDER (provider), NULL);
|
||||||
g_return_val_if_fail (GTK_IS_CSS_STYLE (style), NULL);
|
g_return_val_if_fail (GTK_IS_CSS_STYLE (style), NULL);
|
||||||
g_return_val_if_fail (parent_style == NULL || GTK_IS_CSS_STYLE (parent_style), NULL);
|
g_return_val_if_fail (parent_style == NULL || GTK_IS_CSS_STYLE (parent_style), NULL);
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ void _gtk_css_keyframes_print (GtkCssKeyframes
|
|||||||
GString *string);
|
GString *string);
|
||||||
|
|
||||||
GtkCssKeyframes * _gtk_css_keyframes_compute (GtkCssKeyframes *keyframes,
|
GtkCssKeyframes * _gtk_css_keyframes_compute (GtkCssKeyframes *keyframes,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style);
|
GtkCssStyle *parent_style);
|
||||||
|
|
||||||
|
@ -103,10 +103,10 @@ _gtk_css_lookup_set (GtkCssLookup *lookup,
|
|||||||
* an issue, go fix it.
|
* an issue, go fix it.
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
_gtk_css_lookup_resolve (GtkCssLookup *lookup,
|
_gtk_css_lookup_resolve (GtkCssLookup *lookup,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStaticStyle *style,
|
GtkCssStaticStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
guint i;
|
guint i;
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ void _gtk_css_lookup_set (GtkCssLookup
|
|||||||
GtkCssSection *section,
|
GtkCssSection *section,
|
||||||
GtkCssValue *value);
|
GtkCssValue *value);
|
||||||
void _gtk_css_lookup_resolve (GtkCssLookup *lookup,
|
void _gtk_css_lookup_resolve (GtkCssLookup *lookup,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStaticStyle *style,
|
GtkCssStaticStyle *style,
|
||||||
GtkCssStyle *parent_style);
|
GtkCssStyle *parent_style);
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ struct _GtkCssNodeStyleChange {
|
|||||||
static guint cssnode_signals[LAST_SIGNAL] = { 0 };
|
static guint cssnode_signals[LAST_SIGNAL] = { 0 };
|
||||||
static GParamSpec *cssnode_properties[NUM_PROPERTIES];
|
static GParamSpec *cssnode_properties[NUM_PROPERTIES];
|
||||||
|
|
||||||
static GtkStyleProviderPrivate *
|
static GtkStyleProvider *
|
||||||
gtk_css_node_get_style_provider_or_null (GtkCssNode *cssnode)
|
gtk_css_node_get_style_provider_or_null (GtkCssNode *cssnode)
|
||||||
{
|
{
|
||||||
return GTK_CSS_NODE_GET_CLASS (cssnode)->get_style_provider (cssnode);
|
return GTK_CSS_NODE_GET_CLASS (cssnode)->get_style_provider (cssnode);
|
||||||
@ -287,7 +287,7 @@ gtk_css_node_is_last_child (GtkCssNode *node)
|
|||||||
static gboolean
|
static gboolean
|
||||||
may_use_global_parent_cache (GtkCssNode *node)
|
may_use_global_parent_cache (GtkCssNode *node)
|
||||||
{
|
{
|
||||||
GtkStyleProviderPrivate *provider;
|
GtkStyleProvider *provider;
|
||||||
GtkCssNode *parent;
|
GtkCssNode *parent;
|
||||||
|
|
||||||
parent = gtk_css_node_get_parent (node);
|
parent = gtk_css_node_get_parent (node);
|
||||||
@ -500,7 +500,7 @@ gtk_css_node_real_get_widget_path (GtkCssNode *cssnode)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GtkStyleProviderPrivate *
|
static GtkStyleProvider *
|
||||||
gtk_css_node_real_get_style_provider (GtkCssNode *cssnode)
|
gtk_css_node_real_get_style_provider (GtkCssNode *cssnode)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -1386,10 +1386,10 @@ gtk_css_node_get_widget_path (GtkCssNode *cssnode)
|
|||||||
return GTK_CSS_NODE_GET_CLASS (cssnode)->get_widget_path (cssnode);
|
return GTK_CSS_NODE_GET_CLASS (cssnode)->get_widget_path (cssnode);
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkStyleProviderPrivate *
|
GtkStyleProvider *
|
||||||
gtk_css_node_get_style_provider (GtkCssNode *cssnode)
|
gtk_css_node_get_style_provider (GtkCssNode *cssnode)
|
||||||
{
|
{
|
||||||
GtkStyleProviderPrivate *result;
|
GtkStyleProvider *result;
|
||||||
|
|
||||||
result = gtk_css_node_get_style_provider_or_null (cssnode);
|
result = gtk_css_node_get_style_provider_or_null (cssnode);
|
||||||
if (result)
|
if (result)
|
||||||
@ -1398,7 +1398,7 @@ gtk_css_node_get_style_provider (GtkCssNode *cssnode)
|
|||||||
if (cssnode->parent)
|
if (cssnode->parent)
|
||||||
return gtk_css_node_get_style_provider (cssnode->parent);
|
return gtk_css_node_get_style_provider (cssnode->parent);
|
||||||
|
|
||||||
return GTK_STYLE_PROVIDER_PRIVATE (_gtk_settings_get_style_cascade (gtk_settings_get_default (), 1));
|
return GTK_STYLE_PROVIDER (_gtk_settings_get_style_cascade (gtk_settings_get_default (), 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -80,7 +80,7 @@ struct _GtkCssNodeClass
|
|||||||
GtkWidgetPath * (* create_widget_path) (GtkCssNode *cssnode);
|
GtkWidgetPath * (* create_widget_path) (GtkCssNode *cssnode);
|
||||||
const GtkWidgetPath * (* get_widget_path) (GtkCssNode *cssnode);
|
const GtkWidgetPath * (* get_widget_path) (GtkCssNode *cssnode);
|
||||||
/* get style provider to use or NULL to use parent's */
|
/* get style provider to use or NULL to use parent's */
|
||||||
GtkStyleProviderPrivate *(* get_style_provider) (GtkCssNode *cssnode);
|
GtkStyleProvider * (* get_style_provider) (GtkCssNode *cssnode);
|
||||||
/* get frame clock or NULL (only relevant for root node) */
|
/* get frame clock or NULL (only relevant for root node) */
|
||||||
GdkFrameClock * (* get_frame_clock) (GtkCssNode *cssnode);
|
GdkFrameClock * (* get_frame_clock) (GtkCssNode *cssnode);
|
||||||
GtkCssStyle * (* update_style) (GtkCssNode *cssnode,
|
GtkCssStyle * (* update_style) (GtkCssNode *cssnode,
|
||||||
@ -159,7 +159,7 @@ gboolean gtk_css_node_init_matcher (GtkCssNode *
|
|||||||
GtkCssMatcher *matcher);
|
GtkCssMatcher *matcher);
|
||||||
GtkWidgetPath * gtk_css_node_create_widget_path (GtkCssNode *cssnode);
|
GtkWidgetPath * gtk_css_node_create_widget_path (GtkCssNode *cssnode);
|
||||||
const GtkWidgetPath * gtk_css_node_get_widget_path (GtkCssNode *cssnode);
|
const GtkWidgetPath * gtk_css_node_get_widget_path (GtkCssNode *cssnode);
|
||||||
GtkStyleProviderPrivate *gtk_css_node_get_style_provider(GtkCssNode *cssnode);
|
GtkStyleProvider * gtk_css_node_get_style_provider (GtkCssNode *cssnode);
|
||||||
|
|
||||||
void gtk_css_node_print (GtkCssNode *cssnode,
|
void gtk_css_node_print (GtkCssNode *cssnode,
|
||||||
GtkStyleContextPrintFlags flags,
|
GtkStyleContextPrintFlags flags,
|
||||||
|
@ -49,11 +49,11 @@ gtk_css_value_palette_free (GtkCssValue *value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GtkCssValue *
|
static GtkCssValue *
|
||||||
gtk_css_value_palette_compute (GtkCssValue *specified,
|
gtk_css_value_palette_compute (GtkCssValue *specified,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
GHashTableIter iter;
|
GHashTableIter iter;
|
||||||
gpointer name, value;
|
gpointer name, value;
|
||||||
|
@ -100,7 +100,7 @@ gtk_css_path_node_update_style (GtkCssNode *cssnode,
|
|||||||
return GTK_CSS_NODE_CLASS (gtk_css_path_node_parent_class)->update_style (cssnode, change, 0, style);
|
return GTK_CSS_NODE_CLASS (gtk_css_path_node_parent_class)->update_style (cssnode, change, 0, style);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GtkStyleProviderPrivate *
|
static GtkStyleProvider *
|
||||||
gtk_css_path_node_get_style_provider (GtkCssNode *node)
|
gtk_css_path_node_get_style_provider (GtkCssNode *node)
|
||||||
{
|
{
|
||||||
GtkCssPathNode *path_node = GTK_CSS_PATH_NODE (node);
|
GtkCssPathNode *path_node = GTK_CSS_PATH_NODE (node);
|
||||||
|
@ -37,11 +37,11 @@ gtk_css_value_position_free (GtkCssValue *value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GtkCssValue *
|
static GtkCssValue *
|
||||||
gtk_css_value_position_compute (GtkCssValue *position,
|
gtk_css_value_position_compute (GtkCssValue *position,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
GtkCssValue *x, *y;
|
GtkCssValue *x, *y;
|
||||||
|
|
||||||
|
@ -132,11 +132,10 @@ static gboolean gtk_keep_css_sections = FALSE;
|
|||||||
static guint css_provider_signals[LAST_SIGNAL] = { 0 };
|
static guint css_provider_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
static void gtk_css_provider_finalize (GObject *object);
|
static void gtk_css_provider_finalize (GObject *object);
|
||||||
static void gtk_css_style_provider_iface_init (GtkStyleProviderIface *iface);
|
static void gtk_css_style_provider_iface_init (GtkStyleProviderInterface *iface);
|
||||||
static void gtk_css_style_provider_private_iface_init (GtkStyleProviderPrivateInterface *iface);
|
static void gtk_css_style_provider_emit_error (GtkStyleProvider *provider,
|
||||||
static void gtk_css_style_provider_emit_error (GtkStyleProviderPrivate *provider,
|
GtkCssSection *section,
|
||||||
GtkCssSection *section,
|
const GError *error);
|
||||||
const GError *error);
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gtk_css_provider_load_internal (GtkCssProvider *css_provider,
|
gtk_css_provider_load_internal (GtkCssProvider *css_provider,
|
||||||
@ -153,9 +152,7 @@ gtk_css_provider_error_quark (void)
|
|||||||
G_DEFINE_TYPE_EXTENDED (GtkCssProvider, gtk_css_provider, G_TYPE_OBJECT, 0,
|
G_DEFINE_TYPE_EXTENDED (GtkCssProvider, gtk_css_provider, G_TYPE_OBJECT, 0,
|
||||||
G_ADD_PRIVATE (GtkCssProvider)
|
G_ADD_PRIVATE (GtkCssProvider)
|
||||||
G_IMPLEMENT_INTERFACE (GTK_TYPE_STYLE_PROVIDER,
|
G_IMPLEMENT_INTERFACE (GTK_TYPE_STYLE_PROVIDER,
|
||||||
gtk_css_style_provider_iface_init)
|
gtk_css_style_provider_iface_init));
|
||||||
G_IMPLEMENT_INTERFACE (GTK_TYPE_STYLE_PROVIDER_PRIVATE,
|
|
||||||
gtk_css_style_provider_private_iface_init));
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gtk_css_provider_parsing_error (GtkCssProvider *provider,
|
gtk_css_provider_parsing_error (GtkCssProvider *provider,
|
||||||
@ -328,9 +325,9 @@ gtk_css_scanner_destroy (GtkCssScanner *scanner)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gtk_css_style_provider_emit_error (GtkStyleProviderPrivate *provider,
|
gtk_css_style_provider_emit_error (GtkStyleProvider *provider,
|
||||||
GtkCssSection *section,
|
GtkCssSection *section,
|
||||||
const GError *error)
|
const GError *error)
|
||||||
{
|
{
|
||||||
g_signal_emit (provider, css_provider_signals[PARSING_ERROR], 0, section, error);
|
g_signal_emit (provider, css_provider_signals[PARSING_ERROR], 0, section, error);
|
||||||
}
|
}
|
||||||
@ -340,7 +337,7 @@ gtk_css_provider_emit_error (GtkCssProvider *provider,
|
|||||||
GtkCssScanner *scanner,
|
GtkCssScanner *scanner,
|
||||||
const GError *error)
|
const GError *error)
|
||||||
{
|
{
|
||||||
gtk_css_style_provider_emit_error (GTK_STYLE_PROVIDER_PRIVATE (provider),
|
gtk_css_style_provider_emit_error (GTK_STYLE_PROVIDER (provider),
|
||||||
scanner ? scanner->section : NULL,
|
scanner ? scanner->section : NULL,
|
||||||
error);
|
error);
|
||||||
}
|
}
|
||||||
@ -538,14 +535,9 @@ verify_tree_get_change_results (GtkCssProvider *provider,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
gtk_css_style_provider_iface_init (GtkStyleProviderIface *iface)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
static GtkCssValue *
|
static GtkCssValue *
|
||||||
gtk_css_style_provider_get_color (GtkStyleProviderPrivate *provider,
|
gtk_css_style_provider_get_color (GtkStyleProvider *provider,
|
||||||
const char *name)
|
const char *name)
|
||||||
{
|
{
|
||||||
GtkCssProvider *css_provider = GTK_CSS_PROVIDER (provider);
|
GtkCssProvider *css_provider = GTK_CSS_PROVIDER (provider);
|
||||||
|
|
||||||
@ -553,8 +545,8 @@ gtk_css_style_provider_get_color (GtkStyleProviderPrivate *provider,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GtkCssKeyframes *
|
static GtkCssKeyframes *
|
||||||
gtk_css_style_provider_get_keyframes (GtkStyleProviderPrivate *provider,
|
gtk_css_style_provider_get_keyframes (GtkStyleProvider *provider,
|
||||||
const char *name)
|
const char *name)
|
||||||
{
|
{
|
||||||
GtkCssProvider *css_provider = GTK_CSS_PROVIDER (provider);
|
GtkCssProvider *css_provider = GTK_CSS_PROVIDER (provider);
|
||||||
|
|
||||||
@ -562,10 +554,10 @@ gtk_css_style_provider_get_keyframes (GtkStyleProviderPrivate *provider,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gtk_css_style_provider_lookup (GtkStyleProviderPrivate *provider,
|
gtk_css_style_provider_lookup (GtkStyleProvider *provider,
|
||||||
const GtkCssMatcher *matcher,
|
const GtkCssMatcher *matcher,
|
||||||
GtkCssLookup *lookup,
|
GtkCssLookup *lookup,
|
||||||
GtkCssChange *change)
|
GtkCssChange *change)
|
||||||
{
|
{
|
||||||
GtkCssProvider *css_provider;
|
GtkCssProvider *css_provider;
|
||||||
GtkCssProviderPrivate *priv;
|
GtkCssProviderPrivate *priv;
|
||||||
@ -626,7 +618,7 @@ gtk_css_style_provider_lookup (GtkStyleProviderPrivate *provider,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gtk_css_style_provider_private_iface_init (GtkStyleProviderPrivateInterface *iface)
|
gtk_css_style_provider_iface_init (GtkStyleProviderInterface *iface)
|
||||||
{
|
{
|
||||||
iface->get_color = gtk_css_style_provider_get_color;
|
iface->get_color = gtk_css_style_provider_get_color;
|
||||||
iface->get_keyframes = gtk_css_style_provider_get_keyframes;
|
iface->get_keyframes = gtk_css_style_provider_get_keyframes;
|
||||||
@ -1495,7 +1487,7 @@ gtk_css_provider_load_from_data (GtkCssProvider *css_provider,
|
|||||||
|
|
||||||
g_free (free_data);
|
g_free (free_data);
|
||||||
|
|
||||||
_gtk_style_provider_private_changed (GTK_STYLE_PROVIDER_PRIVATE (css_provider));
|
gtk_style_provider_changed (GTK_STYLE_PROVIDER (css_provider));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1517,7 +1509,7 @@ gtk_css_provider_load_from_file (GtkCssProvider *css_provider,
|
|||||||
|
|
||||||
gtk_css_provider_load_internal (css_provider, NULL, file, NULL);
|
gtk_css_provider_load_internal (css_provider, NULL, file, NULL);
|
||||||
|
|
||||||
_gtk_style_provider_private_changed (GTK_STYLE_PROVIDER_PRIVATE (css_provider));
|
gtk_style_provider_changed (GTK_STYLE_PROVIDER (css_provider));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -34,11 +34,11 @@ gtk_css_value_repeat_free (GtkCssValue *value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GtkCssValue *
|
static GtkCssValue *
|
||||||
gtk_css_value_repeat_compute (GtkCssValue *value,
|
gtk_css_value_repeat_compute (GtkCssValue *value,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
return _gtk_css_value_ref (value);
|
return _gtk_css_value_ref (value);
|
||||||
}
|
}
|
||||||
|
@ -34,11 +34,11 @@ gtk_css_value_rgba_free (GtkCssValue *value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GtkCssValue *
|
static GtkCssValue *
|
||||||
gtk_css_value_rgba_compute (GtkCssValue *value,
|
gtk_css_value_rgba_compute (GtkCssValue *value,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
return _gtk_css_value_ref (value);
|
return _gtk_css_value_ref (value);
|
||||||
}
|
}
|
||||||
|
@ -51,11 +51,11 @@ gtk_css_value_shadows_free (GtkCssValue *value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GtkCssValue *
|
static GtkCssValue *
|
||||||
gtk_css_value_shadows_compute (GtkCssValue *value,
|
gtk_css_value_shadows_compute (GtkCssValue *value,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
GtkCssValue *result, *tmp;
|
GtkCssValue *result, *tmp;
|
||||||
guint i, j;
|
guint i, j;
|
||||||
|
@ -65,11 +65,11 @@ gtk_css_value_shadow_free (GtkCssValue *shadow)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GtkCssValue *
|
static GtkCssValue *
|
||||||
gtk_css_value_shadow_compute (GtkCssValue *shadow,
|
gtk_css_value_shadow_compute (GtkCssValue *shadow,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
GtkCssValue *hoffset, *voffset, *radius, *spread, *color;
|
GtkCssValue *hoffset, *voffset, *radius, *spread, *color;
|
||||||
|
|
||||||
|
@ -155,7 +155,7 @@ gtk_css_static_style_get_default (void)
|
|||||||
GtkSettings *settings;
|
GtkSettings *settings;
|
||||||
|
|
||||||
settings = gtk_settings_get_default ();
|
settings = gtk_settings_get_default ();
|
||||||
default_style = gtk_css_static_style_new_compute (GTK_STYLE_PROVIDER_PRIVATE (settings),
|
default_style = gtk_css_static_style_new_compute (GTK_STYLE_PROVIDER (settings),
|
||||||
NULL,
|
NULL,
|
||||||
NULL);
|
NULL);
|
||||||
g_object_set_data_full (G_OBJECT (settings), "gtk-default-style",
|
g_object_set_data_full (G_OBJECT (settings), "gtk-default-style",
|
||||||
@ -166,9 +166,9 @@ gtk_css_static_style_get_default (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
GtkCssStyle *
|
GtkCssStyle *
|
||||||
gtk_css_static_style_new_compute (GtkStyleProviderPrivate *provider,
|
gtk_css_static_style_new_compute (GtkStyleProvider *provider,
|
||||||
const GtkCssMatcher *matcher,
|
const GtkCssMatcher *matcher,
|
||||||
GtkCssStyle *parent)
|
GtkCssStyle *parent)
|
||||||
{
|
{
|
||||||
GtkCssStaticStyle *result;
|
GtkCssStaticStyle *result;
|
||||||
GtkCssLookup *lookup;
|
GtkCssLookup *lookup;
|
||||||
@ -177,10 +177,10 @@ gtk_css_static_style_new_compute (GtkStyleProviderPrivate *provider,
|
|||||||
lookup = _gtk_css_lookup_new (NULL);
|
lookup = _gtk_css_lookup_new (NULL);
|
||||||
|
|
||||||
if (matcher)
|
if (matcher)
|
||||||
_gtk_style_provider_private_lookup (provider,
|
gtk_style_provider_lookup (provider,
|
||||||
matcher,
|
matcher,
|
||||||
lookup,
|
lookup,
|
||||||
&change);
|
&change);
|
||||||
|
|
||||||
result = g_object_new (GTK_TYPE_CSS_STATIC_STYLE, NULL);
|
result = g_object_new (GTK_TYPE_CSS_STATIC_STYLE, NULL);
|
||||||
|
|
||||||
@ -197,12 +197,12 @@ gtk_css_static_style_new_compute (GtkStyleProviderPrivate *provider,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gtk_css_static_style_compute_value (GtkCssStaticStyle *style,
|
gtk_css_static_style_compute_value (GtkCssStaticStyle *style,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *parent_style,
|
GtkCssStyle *parent_style,
|
||||||
guint id,
|
guint id,
|
||||||
GtkCssValue *specified,
|
GtkCssValue *specified,
|
||||||
GtkCssSection *section)
|
GtkCssSection *section)
|
||||||
{
|
{
|
||||||
GtkCssValue *value;
|
GtkCssValue *value;
|
||||||
|
|
||||||
|
@ -53,12 +53,12 @@ struct _GtkCssStaticStyleClass
|
|||||||
GType gtk_css_static_style_get_type (void) G_GNUC_CONST;
|
GType gtk_css_static_style_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
GtkCssStyle * gtk_css_static_style_get_default (void);
|
GtkCssStyle * gtk_css_static_style_get_default (void);
|
||||||
GtkCssStyle * gtk_css_static_style_new_compute (GtkStyleProviderPrivate *provider,
|
GtkCssStyle * gtk_css_static_style_new_compute (GtkStyleProvider *provider,
|
||||||
const GtkCssMatcher *matcher,
|
const GtkCssMatcher *matcher,
|
||||||
GtkCssStyle *parent);
|
GtkCssStyle *parent);
|
||||||
|
|
||||||
void gtk_css_static_style_compute_value (GtkCssStaticStyle *style,
|
void gtk_css_static_style_compute_value (GtkCssStaticStyle *style,
|
||||||
GtkStyleProviderPrivate*provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *parent_style,
|
GtkCssStyle *parent_style,
|
||||||
guint id,
|
guint id,
|
||||||
GtkCssValue *specified,
|
GtkCssValue *specified,
|
||||||
|
@ -34,11 +34,11 @@ gtk_css_value_string_free (GtkCssValue *value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GtkCssValue *
|
static GtkCssValue *
|
||||||
gtk_css_value_string_compute (GtkCssValue *value,
|
gtk_css_value_string_compute (GtkCssValue *value,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
return _gtk_css_value_ref (value);
|
return _gtk_css_value_ref (value);
|
||||||
}
|
}
|
||||||
|
@ -256,12 +256,12 @@ gtk_css_value_transform_free (GtkCssValue *value)
|
|||||||
|
|
||||||
/* returns TRUE if dest == src */
|
/* returns TRUE if dest == src */
|
||||||
static gboolean
|
static gboolean
|
||||||
gtk_css_transform_compute (GtkCssTransform *dest,
|
gtk_css_transform_compute (GtkCssTransform *dest,
|
||||||
GtkCssTransform *src,
|
GtkCssTransform *src,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
dest->type = src->type;
|
dest->type = src->type;
|
||||||
|
|
||||||
@ -311,11 +311,11 @@ gtk_css_transform_compute (GtkCssTransform *dest,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GtkCssValue *
|
static GtkCssValue *
|
||||||
gtk_css_value_transform_compute (GtkCssValue *value,
|
gtk_css_value_transform_compute (GtkCssValue *value,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
GtkCssValue *result;
|
GtkCssValue *result;
|
||||||
gboolean changes;
|
gboolean changes;
|
||||||
|
@ -28,7 +28,6 @@ typedef union _GtkCssMatcher GtkCssMatcher;
|
|||||||
typedef struct _GtkCssNode GtkCssNode;
|
typedef struct _GtkCssNode GtkCssNode;
|
||||||
typedef struct _GtkCssNodeDeclaration GtkCssNodeDeclaration;
|
typedef struct _GtkCssNodeDeclaration GtkCssNodeDeclaration;
|
||||||
typedef struct _GtkCssStyle GtkCssStyle;
|
typedef struct _GtkCssStyle GtkCssStyle;
|
||||||
typedef struct _GtkStyleProviderPrivate GtkStyleProviderPrivate; /* dummy typedef */
|
|
||||||
|
|
||||||
#define GTK_CSS_CHANGE_CLASS (1ULL << 0)
|
#define GTK_CSS_CHANGE_CLASS (1ULL << 0)
|
||||||
#define GTK_CSS_CHANGE_NAME (1ULL << 1)
|
#define GTK_CSS_CHANGE_NAME (1ULL << 1)
|
||||||
|
@ -35,11 +35,11 @@ gtk_css_value_unset_free (GtkCssValue *value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GtkCssValue *
|
static GtkCssValue *
|
||||||
gtk_css_value_unset_compute (GtkCssValue *value,
|
gtk_css_value_unset_compute (GtkCssValue *value,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
GtkCssStyleProperty *property;
|
GtkCssStyleProperty *property;
|
||||||
GtkCssValue *unset_value;
|
GtkCssValue *unset_value;
|
||||||
|
@ -82,11 +82,11 @@ _gtk_css_value_unref (GtkCssValue *value)
|
|||||||
* Returns: the computed value
|
* Returns: the computed value
|
||||||
**/
|
**/
|
||||||
GtkCssValue *
|
GtkCssValue *
|
||||||
_gtk_css_value_compute (GtkCssValue *value,
|
_gtk_css_value_compute (GtkCssValue *value,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
|
|
||||||
gtk_internal_return_val_if_fail (value != NULL, NULL);
|
gtk_internal_return_val_if_fail (value != NULL, NULL);
|
||||||
|
@ -42,7 +42,7 @@ struct _GtkCssValueClass {
|
|||||||
|
|
||||||
GtkCssValue * (* compute) (GtkCssValue *value,
|
GtkCssValue * (* compute) (GtkCssValue *value,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style);
|
GtkCssStyle *parent_style);
|
||||||
gboolean (* equal) (const GtkCssValue *value1,
|
gboolean (* equal) (const GtkCssValue *value1,
|
||||||
@ -66,7 +66,7 @@ void _gtk_css_value_unref (GtkCssValue
|
|||||||
|
|
||||||
GtkCssValue *_gtk_css_value_compute (GtkCssValue *value,
|
GtkCssValue *_gtk_css_value_compute (GtkCssValue *value,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style);
|
GtkCssStyle *parent_style);
|
||||||
gboolean _gtk_css_value_equal (const GtkCssValue *value1,
|
gboolean _gtk_css_value_equal (const GtkCssValue *value1,
|
||||||
|
@ -162,7 +162,7 @@ gtk_css_widget_node_get_widget_path (GtkCssNode *node)
|
|||||||
return gtk_widget_get_path (widget_node->widget);
|
return gtk_widget_get_path (widget_node->widget);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GtkStyleProviderPrivate *
|
static GtkStyleProvider *
|
||||||
gtk_css_widget_node_get_style_provider (GtkCssNode *node)
|
gtk_css_widget_node_get_style_provider (GtkCssNode *node)
|
||||||
{
|
{
|
||||||
GtkCssWidgetNode *widget_node = GTK_CSS_WIDGET_NODE (node);
|
GtkCssWidgetNode *widget_node = GTK_CSS_WIDGET_NODE (node);
|
||||||
@ -178,7 +178,7 @@ gtk_css_widget_node_get_style_provider (GtkCssNode *node)
|
|||||||
|
|
||||||
cascade = _gtk_settings_get_style_cascade (gtk_widget_get_settings (widget_node->widget),
|
cascade = _gtk_settings_get_style_cascade (gtk_widget_get_settings (widget_node->widget),
|
||||||
gtk_widget_get_scale_factor (widget_node->widget));
|
gtk_widget_get_scale_factor (widget_node->widget));
|
||||||
return GTK_STYLE_PROVIDER_PRIVATE (cascade);
|
return GTK_STYLE_PROVIDER (cascade);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GdkFrameClock *
|
static GdkFrameClock *
|
||||||
|
@ -118,11 +118,11 @@ gtk_css_value_win32_compute_size (const GtkCssValue *value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GtkCssValue *
|
static GtkCssValue *
|
||||||
gtk_css_value_win32_size_compute (GtkCssValue *value,
|
gtk_css_value_win32_size_compute (GtkCssValue *value,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GtkStyleProviderPrivate *provider,
|
GtkStyleProvider *provider,
|
||||||
GtkCssStyle *style,
|
GtkCssStyle *style,
|
||||||
GtkCssStyle *parent_style)
|
GtkCssStyle *parent_style)
|
||||||
{
|
{
|
||||||
return _gtk_css_number_value_new (value->scale * gtk_css_value_win32_compute_size (value), GTK_CSS_PX);
|
return _gtk_css_number_value_new (value->scale * gtk_css_value_win32_compute_size (value), GTK_CSS_PX);
|
||||||
}
|
}
|
||||||
|
@ -194,8 +194,7 @@ enum {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* --- prototypes --- */
|
/* --- prototypes --- */
|
||||||
static void gtk_settings_provider_iface_init (GtkStyleProviderIface *iface);
|
static void gtk_settings_provider_iface_init (GtkStyleProviderInterface *iface);
|
||||||
static void gtk_settings_provider_private_init (GtkStyleProviderPrivateInterface *iface);
|
|
||||||
|
|
||||||
static void gtk_settings_finalize (GObject *object);
|
static void gtk_settings_finalize (GObject *object);
|
||||||
static void gtk_settings_get_property (GObject *object,
|
static void gtk_settings_get_property (GObject *object,
|
||||||
@ -245,9 +244,7 @@ static GPtrArray *display_settings;
|
|||||||
G_DEFINE_TYPE_EXTENDED (GtkSettings, gtk_settings, G_TYPE_OBJECT, 0,
|
G_DEFINE_TYPE_EXTENDED (GtkSettings, gtk_settings, G_TYPE_OBJECT, 0,
|
||||||
G_ADD_PRIVATE (GtkSettings)
|
G_ADD_PRIVATE (GtkSettings)
|
||||||
G_IMPLEMENT_INTERFACE (GTK_TYPE_STYLE_PROVIDER,
|
G_IMPLEMENT_INTERFACE (GTK_TYPE_STYLE_PROVIDER,
|
||||||
gtk_settings_provider_iface_init)
|
gtk_settings_provider_iface_init));
|
||||||
G_IMPLEMENT_INTERFACE (GTK_TYPE_STYLE_PROVIDER_PRIVATE,
|
|
||||||
gtk_settings_provider_private_init));
|
|
||||||
|
|
||||||
/* --- functions --- */
|
/* --- functions --- */
|
||||||
static void
|
static void
|
||||||
@ -1072,19 +1069,14 @@ gtk_settings_class_init (GtkSettingsClass *class)
|
|||||||
g_assert (result == PROP_KEYNAV_USE_CARET);
|
g_assert (result == PROP_KEYNAV_USE_CARET);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
gtk_settings_provider_iface_init (GtkStyleProviderIface *iface)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
static GtkSettings *
|
static GtkSettings *
|
||||||
gtk_settings_style_provider_get_settings (GtkStyleProviderPrivate *provider)
|
gtk_settings_style_provider_get_settings (GtkStyleProvider *provider)
|
||||||
{
|
{
|
||||||
return GTK_SETTINGS (provider);
|
return GTK_SETTINGS (provider);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gtk_settings_provider_private_init (GtkStyleProviderPrivateInterface *iface)
|
gtk_settings_provider_iface_init (GtkStyleProviderInterface *iface)
|
||||||
{
|
{
|
||||||
iface->get_settings = gtk_settings_style_provider_get_settings;
|
iface->get_settings = gtk_settings_style_provider_get_settings;
|
||||||
}
|
}
|
||||||
@ -1331,7 +1323,7 @@ gtk_settings_set_property (GObject *object,
|
|||||||
static void
|
static void
|
||||||
settings_invalidate_style (GtkSettings *settings)
|
settings_invalidate_style (GtkSettings *settings)
|
||||||
{
|
{
|
||||||
_gtk_style_provider_private_changed (GTK_STYLE_PROVIDER_PRIVATE (settings));
|
gtk_style_provider_changed (GTK_STYLE_PROVIDER (settings));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -96,13 +96,8 @@ gtk_style_cascade_iter_clear (GtkStyleCascadeIter *iter)
|
|||||||
g_free (iter->cascade_index);
|
g_free (iter->cascade_index);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
gtk_style_cascade_provider_iface_init (GtkStyleProviderIface *iface)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
static GtkSettings *
|
static GtkSettings *
|
||||||
gtk_style_cascade_get_settings (GtkStyleProviderPrivate *provider)
|
gtk_style_cascade_get_settings (GtkStyleProvider *provider)
|
||||||
{
|
{
|
||||||
GtkStyleCascade *cascade = GTK_STYLE_CASCADE (provider);
|
GtkStyleCascade *cascade = GTK_STYLE_CASCADE (provider);
|
||||||
GtkStyleCascadeIter iter;
|
GtkStyleCascadeIter iter;
|
||||||
@ -113,10 +108,10 @@ gtk_style_cascade_get_settings (GtkStyleProviderPrivate *provider)
|
|||||||
item;
|
item;
|
||||||
item = gtk_style_cascade_iter_next (cascade, &iter))
|
item = gtk_style_cascade_iter_next (cascade, &iter))
|
||||||
{
|
{
|
||||||
if (!GTK_IS_STYLE_PROVIDER_PRIVATE (item))
|
if (!GTK_IS_STYLE_PROVIDER (item))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
settings = _gtk_style_provider_private_get_settings (GTK_STYLE_PROVIDER_PRIVATE (item));
|
settings = gtk_style_provider_get_settings (GTK_STYLE_PROVIDER (item));
|
||||||
if (settings)
|
if (settings)
|
||||||
{
|
{
|
||||||
gtk_style_cascade_iter_clear (&iter);
|
gtk_style_cascade_iter_clear (&iter);
|
||||||
@ -129,7 +124,7 @@ gtk_style_cascade_get_settings (GtkStyleProviderPrivate *provider)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GtkCssValue *
|
static GtkCssValue *
|
||||||
gtk_style_cascade_get_color (GtkStyleProviderPrivate *provider,
|
gtk_style_cascade_get_color (GtkStyleProvider *provider,
|
||||||
const char *name)
|
const char *name)
|
||||||
{
|
{
|
||||||
GtkStyleCascade *cascade = GTK_STYLE_CASCADE (provider);
|
GtkStyleCascade *cascade = GTK_STYLE_CASCADE (provider);
|
||||||
@ -141,9 +136,9 @@ gtk_style_cascade_get_color (GtkStyleProviderPrivate *provider,
|
|||||||
item;
|
item;
|
||||||
item = gtk_style_cascade_iter_next (cascade, &iter))
|
item = gtk_style_cascade_iter_next (cascade, &iter))
|
||||||
{
|
{
|
||||||
if (GTK_IS_STYLE_PROVIDER_PRIVATE (item))
|
if (GTK_IS_STYLE_PROVIDER (item))
|
||||||
{
|
{
|
||||||
color = _gtk_style_provider_private_get_color (GTK_STYLE_PROVIDER_PRIVATE (item), name);
|
color = gtk_style_provider_get_color (GTK_STYLE_PROVIDER (item), name);
|
||||||
if (color)
|
if (color)
|
||||||
{
|
{
|
||||||
gtk_style_cascade_iter_clear (&iter);
|
gtk_style_cascade_iter_clear (&iter);
|
||||||
@ -161,7 +156,7 @@ gtk_style_cascade_get_color (GtkStyleProviderPrivate *provider,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
gtk_style_cascade_get_scale (GtkStyleProviderPrivate *provider)
|
gtk_style_cascade_get_scale (GtkStyleProvider *provider)
|
||||||
{
|
{
|
||||||
GtkStyleCascade *cascade = GTK_STYLE_CASCADE (provider);
|
GtkStyleCascade *cascade = GTK_STYLE_CASCADE (provider);
|
||||||
|
|
||||||
@ -169,8 +164,8 @@ gtk_style_cascade_get_scale (GtkStyleProviderPrivate *provider)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GtkCssKeyframes *
|
static GtkCssKeyframes *
|
||||||
gtk_style_cascade_get_keyframes (GtkStyleProviderPrivate *provider,
|
gtk_style_cascade_get_keyframes (GtkStyleProvider *provider,
|
||||||
const char *name)
|
const char *name)
|
||||||
{
|
{
|
||||||
GtkStyleCascade *cascade = GTK_STYLE_CASCADE (provider);
|
GtkStyleCascade *cascade = GTK_STYLE_CASCADE (provider);
|
||||||
GtkStyleCascadeIter iter;
|
GtkStyleCascadeIter iter;
|
||||||
@ -181,10 +176,10 @@ gtk_style_cascade_get_keyframes (GtkStyleProviderPrivate *provider,
|
|||||||
item;
|
item;
|
||||||
item = gtk_style_cascade_iter_next (cascade, &iter))
|
item = gtk_style_cascade_iter_next (cascade, &iter))
|
||||||
{
|
{
|
||||||
if (!GTK_IS_STYLE_PROVIDER_PRIVATE (item))
|
if (!GTK_IS_STYLE_PROVIDER (item))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
keyframes = _gtk_style_provider_private_get_keyframes (GTK_STYLE_PROVIDER_PRIVATE (item), name);
|
keyframes = gtk_style_provider_get_keyframes (GTK_STYLE_PROVIDER (item), name);
|
||||||
if (keyframes)
|
if (keyframes)
|
||||||
{
|
{
|
||||||
gtk_style_cascade_iter_clear (&iter);
|
gtk_style_cascade_iter_clear (&iter);
|
||||||
@ -197,10 +192,10 @@ gtk_style_cascade_get_keyframes (GtkStyleProviderPrivate *provider,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gtk_style_cascade_lookup (GtkStyleProviderPrivate *provider,
|
gtk_style_cascade_lookup (GtkStyleProvider *provider,
|
||||||
const GtkCssMatcher *matcher,
|
const GtkCssMatcher *matcher,
|
||||||
GtkCssLookup *lookup,
|
GtkCssLookup *lookup,
|
||||||
GtkCssChange *change)
|
GtkCssChange *change)
|
||||||
{
|
{
|
||||||
GtkStyleCascade *cascade = GTK_STYLE_CASCADE (provider);
|
GtkStyleCascade *cascade = GTK_STYLE_CASCADE (provider);
|
||||||
GtkStyleCascadeIter iter;
|
GtkStyleCascadeIter iter;
|
||||||
@ -211,10 +206,10 @@ gtk_style_cascade_lookup (GtkStyleProviderPrivate *provider,
|
|||||||
item;
|
item;
|
||||||
item = gtk_style_cascade_iter_next (cascade, &iter))
|
item = gtk_style_cascade_iter_next (cascade, &iter))
|
||||||
{
|
{
|
||||||
GtkStyleProviderPrivate *sp = (GtkStyleProviderPrivate*)item;
|
GtkStyleProvider *sp = (GtkStyleProvider *) item;
|
||||||
if (GTK_IS_STYLE_PROVIDER_PRIVATE (sp))
|
if (GTK_IS_STYLE_PROVIDER (sp))
|
||||||
{
|
{
|
||||||
_gtk_style_provider_private_lookup (sp, matcher, lookup,
|
gtk_style_provider_lookup (sp, matcher, lookup,
|
||||||
change ? &iter_change : NULL);
|
change ? &iter_change : NULL);
|
||||||
if (change)
|
if (change)
|
||||||
*change |= iter_change;
|
*change |= iter_change;
|
||||||
@ -229,7 +224,7 @@ gtk_style_cascade_lookup (GtkStyleProviderPrivate *provider,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gtk_style_cascade_provider_private_iface_init (GtkStyleProviderPrivateInterface *iface)
|
gtk_style_cascade_provider_iface_init (GtkStyleProviderInterface *iface)
|
||||||
{
|
{
|
||||||
iface->get_color = gtk_style_cascade_get_color;
|
iface->get_color = gtk_style_cascade_get_color;
|
||||||
iface->get_settings = gtk_style_cascade_get_settings;
|
iface->get_settings = gtk_style_cascade_get_settings;
|
||||||
@ -240,9 +235,7 @@ gtk_style_cascade_provider_private_iface_init (GtkStyleProviderPrivateInterface
|
|||||||
|
|
||||||
G_DEFINE_TYPE_EXTENDED (GtkStyleCascade, _gtk_style_cascade, G_TYPE_OBJECT, 0,
|
G_DEFINE_TYPE_EXTENDED (GtkStyleCascade, _gtk_style_cascade, G_TYPE_OBJECT, 0,
|
||||||
G_IMPLEMENT_INTERFACE (GTK_TYPE_STYLE_PROVIDER,
|
G_IMPLEMENT_INTERFACE (GTK_TYPE_STYLE_PROVIDER,
|
||||||
gtk_style_cascade_provider_iface_init)
|
gtk_style_cascade_provider_iface_init));
|
||||||
G_IMPLEMENT_INTERFACE (GTK_TYPE_STYLE_PROVIDER_PRIVATE,
|
|
||||||
gtk_style_cascade_provider_private_iface_init));
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gtk_style_cascade_dispose (GObject *object)
|
gtk_style_cascade_dispose (GObject *object)
|
||||||
@ -302,14 +295,14 @@ _gtk_style_cascade_set_parent (GtkStyleCascade *cascade,
|
|||||||
g_object_ref (parent);
|
g_object_ref (parent);
|
||||||
g_signal_connect_swapped (parent,
|
g_signal_connect_swapped (parent,
|
||||||
"-gtk-private-changed",
|
"-gtk-private-changed",
|
||||||
G_CALLBACK (_gtk_style_provider_private_changed),
|
G_CALLBACK (gtk_style_provider_changed),
|
||||||
cascade);
|
cascade);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cascade->parent)
|
if (cascade->parent)
|
||||||
{
|
{
|
||||||
g_signal_handlers_disconnect_by_func (cascade->parent,
|
g_signal_handlers_disconnect_by_func (cascade->parent,
|
||||||
_gtk_style_provider_private_changed,
|
gtk_style_provider_changed,
|
||||||
cascade);
|
cascade);
|
||||||
g_object_unref (cascade->parent);
|
g_object_unref (cascade->parent);
|
||||||
}
|
}
|
||||||
@ -333,7 +326,7 @@ _gtk_style_cascade_add_provider (GtkStyleCascade *cascade,
|
|||||||
data.priority = priority;
|
data.priority = priority;
|
||||||
data.changed_signal_id = g_signal_connect_swapped (provider,
|
data.changed_signal_id = g_signal_connect_swapped (provider,
|
||||||
"-gtk-private-changed",
|
"-gtk-private-changed",
|
||||||
G_CALLBACK (_gtk_style_provider_private_changed),
|
G_CALLBACK (gtk_style_provider_changed),
|
||||||
cascade);
|
cascade);
|
||||||
|
|
||||||
/* ensure it gets removed first */
|
/* ensure it gets removed first */
|
||||||
@ -346,7 +339,7 @@ _gtk_style_cascade_add_provider (GtkStyleCascade *cascade,
|
|||||||
}
|
}
|
||||||
g_array_insert_val (cascade->providers, i, data);
|
g_array_insert_val (cascade->providers, i, data);
|
||||||
|
|
||||||
_gtk_style_provider_private_changed (GTK_STYLE_PROVIDER_PRIVATE (cascade));
|
gtk_style_provider_changed (GTK_STYLE_PROVIDER (cascade));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -366,7 +359,7 @@ _gtk_style_cascade_remove_provider (GtkStyleCascade *cascade,
|
|||||||
{
|
{
|
||||||
g_array_remove_index (cascade->providers, i);
|
g_array_remove_index (cascade->providers, i);
|
||||||
|
|
||||||
_gtk_style_provider_private_changed (GTK_STYLE_PROVIDER_PRIVATE (cascade));
|
gtk_style_provider_changed (GTK_STYLE_PROVIDER (cascade));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -383,7 +376,7 @@ _gtk_style_cascade_set_scale (GtkStyleCascade *cascade,
|
|||||||
|
|
||||||
cascade->scale = scale;
|
cascade->scale = scale;
|
||||||
|
|
||||||
_gtk_style_provider_private_changed (GTK_STYLE_PROVIDER_PRIVATE (cascade));
|
gtk_style_provider_changed (GTK_STYLE_PROVIDER (cascade));
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -409,12 +409,12 @@ gtk_style_context_get_root (GtkStyleContext *context)
|
|||||||
return priv->cssnode;
|
return priv->cssnode;
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkStyleProviderPrivate *
|
GtkStyleProvider *
|
||||||
gtk_style_context_get_style_provider (GtkStyleContext *context)
|
gtk_style_context_get_style_provider (GtkStyleContext *context)
|
||||||
{
|
{
|
||||||
GtkStyleContextPrivate *priv = gtk_style_context_get_instance_private (context);
|
GtkStyleContextPrivate *priv = gtk_style_context_get_instance_private (context);
|
||||||
|
|
||||||
return GTK_STYLE_PROVIDER_PRIVATE (priv->cascade);
|
return GTK_STYLE_PROVIDER (priv->cascade);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
@ -1451,7 +1451,7 @@ _gtk_style_context_resolve_color (GtkStyleContext *context,
|
|||||||
g_return_val_if_fail (result != NULL, FALSE);
|
g_return_val_if_fail (result != NULL, FALSE);
|
||||||
|
|
||||||
val = _gtk_css_color_value_resolve (color,
|
val = _gtk_css_color_value_resolve (color,
|
||||||
GTK_STYLE_PROVIDER_PRIVATE (priv->cascade),
|
GTK_STYLE_PROVIDER (priv->cascade),
|
||||||
_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_COLOR),
|
_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_COLOR),
|
||||||
NULL);
|
NULL);
|
||||||
if (val == NULL)
|
if (val == NULL)
|
||||||
@ -1484,7 +1484,7 @@ gtk_style_context_lookup_color (GtkStyleContext *context,
|
|||||||
g_return_val_if_fail (color_name != NULL, FALSE);
|
g_return_val_if_fail (color_name != NULL, FALSE);
|
||||||
g_return_val_if_fail (color != NULL, FALSE);
|
g_return_val_if_fail (color != NULL, FALSE);
|
||||||
|
|
||||||
value = _gtk_style_provider_private_get_color (GTK_STYLE_PROVIDER_PRIVATE (priv->cascade), color_name);
|
value = gtk_style_provider_get_color (GTK_STYLE_PROVIDER (priv->cascade), color_name);
|
||||||
if (value == NULL)
|
if (value == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ GtkCssNode *gtk_style_context_get_node (GtkStyleContext *c
|
|||||||
void gtk_style_context_set_id (GtkStyleContext *context,
|
void gtk_style_context_set_id (GtkStyleContext *context,
|
||||||
const char *id);
|
const char *id);
|
||||||
const char * gtk_style_context_get_id (GtkStyleContext *context);
|
const char * gtk_style_context_get_id (GtkStyleContext *context);
|
||||||
GtkStyleProviderPrivate *
|
GtkStyleProvider *
|
||||||
gtk_style_context_get_style_provider (GtkStyleContext *context);
|
gtk_style_context_get_style_provider (GtkStyleContext *context);
|
||||||
|
|
||||||
void gtk_style_context_save_named (GtkStyleContext *context,
|
void gtk_style_context_save_named (GtkStyleContext *context,
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include "gtkstyleprovider.h"
|
#include "gtkstyleproviderprivate.h"
|
||||||
|
|
||||||
#include "gtkintl.h"
|
#include "gtkintl.h"
|
||||||
#include "gtkprivate.h"
|
#include "gtkprivate.h"
|
||||||
@ -33,23 +33,135 @@
|
|||||||
* See gtk_style_context_add_provider() and gtk_style_context_add_provider_for_display().
|
* See gtk_style_context_add_provider() and gtk_style_context_add_provider_for_display().
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void gtk_style_provider_iface_init (gpointer g_iface);
|
enum {
|
||||||
|
CHANGED,
|
||||||
|
LAST_SIGNAL
|
||||||
|
};
|
||||||
|
|
||||||
GType
|
G_DEFINE_INTERFACE (GtkStyleProvider, gtk_style_provider, GTK_TYPE_STYLE_PROVIDER)
|
||||||
gtk_style_provider_get_type (void)
|
|
||||||
{
|
|
||||||
static GType style_provider_type = 0;
|
|
||||||
|
|
||||||
if (!style_provider_type)
|
static guint signals[LAST_SIGNAL];
|
||||||
style_provider_type = g_type_register_static_simple (G_TYPE_INTERFACE,
|
|
||||||
I_("GtkStyleProvider"),
|
|
||||||
sizeof (GtkStyleProviderIface),
|
|
||||||
(GClassInitFunc) gtk_style_provider_iface_init,
|
|
||||||
0, NULL, 0);
|
|
||||||
return style_provider_type;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gtk_style_provider_iface_init (gpointer g_iface)
|
gtk_style_provider_default_init (GtkStyleProviderInterface *iface)
|
||||||
{
|
{
|
||||||
|
signals[CHANGED] = g_signal_new (I_("-gtk-private-changed"),
|
||||||
|
G_TYPE_FROM_INTERFACE (iface),
|
||||||
|
G_SIGNAL_RUN_LAST,
|
||||||
|
G_STRUCT_OFFSET (GtkStyleProviderInterface, changed),
|
||||||
|
NULL, NULL,
|
||||||
|
g_cclosure_marshal_VOID__VOID,
|
||||||
|
G_TYPE_NONE, 0);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
GtkCssValue *
|
||||||
|
gtk_style_provider_get_color (GtkStyleProvider *provider,
|
||||||
|
const char *name)
|
||||||
|
{
|
||||||
|
GtkStyleProviderInterface *iface;
|
||||||
|
|
||||||
|
/* for compat with gtk_symbolic_color_resolve() */
|
||||||
|
if (provider == NULL)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
gtk_internal_return_val_if_fail (GTK_IS_STYLE_PROVIDER (provider), NULL);
|
||||||
|
|
||||||
|
iface = GTK_STYLE_PROVIDER_GET_INTERFACE (provider);
|
||||||
|
|
||||||
|
if (!iface->get_color)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
return iface->get_color (provider, name);
|
||||||
|
}
|
||||||
|
|
||||||
|
GtkCssKeyframes *
|
||||||
|
gtk_style_provider_get_keyframes (GtkStyleProvider *provider,
|
||||||
|
const char *name)
|
||||||
|
{
|
||||||
|
GtkStyleProviderInterface *iface;
|
||||||
|
|
||||||
|
gtk_internal_return_val_if_fail (GTK_IS_STYLE_PROVIDER (provider), NULL);
|
||||||
|
gtk_internal_return_val_if_fail (name != NULL, NULL);
|
||||||
|
|
||||||
|
iface = GTK_STYLE_PROVIDER_GET_INTERFACE (provider);
|
||||||
|
|
||||||
|
if (!iface->get_keyframes)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
return iface->get_keyframes (provider, name);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gtk_style_provider_lookup (GtkStyleProvider *provider,
|
||||||
|
const GtkCssMatcher *matcher,
|
||||||
|
GtkCssLookup *lookup,
|
||||||
|
GtkCssChange *out_change)
|
||||||
|
{
|
||||||
|
GtkStyleProviderInterface *iface;
|
||||||
|
|
||||||
|
gtk_internal_return_if_fail (GTK_IS_STYLE_PROVIDER (provider));
|
||||||
|
gtk_internal_return_if_fail (matcher != NULL);
|
||||||
|
gtk_internal_return_if_fail (lookup != NULL);
|
||||||
|
|
||||||
|
if (out_change)
|
||||||
|
*out_change = 0;
|
||||||
|
|
||||||
|
iface = GTK_STYLE_PROVIDER_GET_INTERFACE (provider);
|
||||||
|
|
||||||
|
if (!iface->lookup)
|
||||||
|
return;
|
||||||
|
|
||||||
|
iface->lookup (provider, matcher, lookup, out_change);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gtk_style_provider_changed (GtkStyleProvider *provider)
|
||||||
|
{
|
||||||
|
gtk_internal_return_if_fail (GTK_IS_STYLE_PROVIDER (provider));
|
||||||
|
|
||||||
|
g_signal_emit (provider, signals[CHANGED], 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
GtkSettings *
|
||||||
|
gtk_style_provider_get_settings (GtkStyleProvider *provider)
|
||||||
|
{
|
||||||
|
GtkStyleProviderInterface *iface;
|
||||||
|
|
||||||
|
gtk_internal_return_val_if_fail (GTK_IS_STYLE_PROVIDER (provider), NULL);
|
||||||
|
|
||||||
|
iface = GTK_STYLE_PROVIDER_GET_INTERFACE (provider);
|
||||||
|
|
||||||
|
if (!iface->get_settings)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
return iface->get_settings (provider);
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
gtk_style_provider_get_scale (GtkStyleProvider *provider)
|
||||||
|
{
|
||||||
|
GtkStyleProviderInterface *iface;
|
||||||
|
|
||||||
|
gtk_internal_return_val_if_fail (GTK_IS_STYLE_PROVIDER (provider), 1);
|
||||||
|
|
||||||
|
iface = GTK_STYLE_PROVIDER_GET_INTERFACE (provider);
|
||||||
|
|
||||||
|
if (!iface->get_scale)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
return iface->get_scale (provider);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gtk_style_provider_emit_error (GtkStyleProvider *provider,
|
||||||
|
GtkCssSection *section,
|
||||||
|
GError *error)
|
||||||
|
{
|
||||||
|
GtkStyleProviderInterface *iface;
|
||||||
|
|
||||||
|
iface = GTK_STYLE_PROVIDER_GET_INTERFACE (provider);
|
||||||
|
|
||||||
|
if (iface->emit_error)
|
||||||
|
iface->emit_error (provider, section, error);
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,6 @@ G_BEGIN_DECLS
|
|||||||
#define GTK_TYPE_STYLE_PROVIDER (gtk_style_provider_get_type ())
|
#define GTK_TYPE_STYLE_PROVIDER (gtk_style_provider_get_type ())
|
||||||
#define GTK_STYLE_PROVIDER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_STYLE_PROVIDER, GtkStyleProvider))
|
#define GTK_STYLE_PROVIDER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_STYLE_PROVIDER, GtkStyleProvider))
|
||||||
#define GTK_IS_STYLE_PROVIDER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_STYLE_PROVIDER))
|
#define GTK_IS_STYLE_PROVIDER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_STYLE_PROVIDER))
|
||||||
#define GTK_STYLE_PROVIDER_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), GTK_TYPE_STYLE_PROVIDER, GtkStyleProviderIface))
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GTK_STYLE_PROVIDER_PRIORITY_FALLBACK:
|
* GTK_STYLE_PROVIDER_PRIORITY_FALLBACK:
|
||||||
@ -84,18 +83,8 @@ G_BEGIN_DECLS
|
|||||||
*/
|
*/
|
||||||
#define GTK_STYLE_PROVIDER_PRIORITY_USER 800
|
#define GTK_STYLE_PROVIDER_PRIORITY_USER 800
|
||||||
|
|
||||||
typedef struct _GtkStyleProviderIface GtkStyleProviderIface;
|
|
||||||
typedef struct _GtkStyleProvider GtkStyleProvider; /* dummy typedef */
|
typedef struct _GtkStyleProvider GtkStyleProvider; /* dummy typedef */
|
||||||
|
|
||||||
/**
|
|
||||||
* GtkStyleProviderIface:
|
|
||||||
*/
|
|
||||||
struct _GtkStyleProviderIface
|
|
||||||
{
|
|
||||||
/*< private >*/
|
|
||||||
GTypeInterface g_iface;
|
|
||||||
};
|
|
||||||
|
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
GType gtk_style_provider_get_type (void) G_GNUC_CONST;
|
GType gtk_style_provider_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
|
@ -1,157 +0,0 @@
|
|||||||
/* GTK - The GIMP Toolkit
|
|
||||||
* Copyright (C) 2011 Benjamin Otte <otte@gnome.org>
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#include "gtkstyleproviderprivate.h"
|
|
||||||
|
|
||||||
#include "gtkintl.h"
|
|
||||||
#include "gtkstyleprovider.h"
|
|
||||||
#include "gtkprivate.h"
|
|
||||||
|
|
||||||
enum {
|
|
||||||
CHANGED,
|
|
||||||
LAST_SIGNAL
|
|
||||||
};
|
|
||||||
|
|
||||||
G_DEFINE_INTERFACE (GtkStyleProviderPrivate, _gtk_style_provider_private, GTK_TYPE_STYLE_PROVIDER)
|
|
||||||
|
|
||||||
static guint signals[LAST_SIGNAL];
|
|
||||||
|
|
||||||
static void
|
|
||||||
_gtk_style_provider_private_default_init (GtkStyleProviderPrivateInterface *iface)
|
|
||||||
{
|
|
||||||
signals[CHANGED] = g_signal_new (I_("-gtk-private-changed"),
|
|
||||||
G_TYPE_FROM_INTERFACE (iface),
|
|
||||||
G_SIGNAL_RUN_LAST,
|
|
||||||
G_STRUCT_OFFSET (GtkStyleProviderPrivateInterface, changed),
|
|
||||||
NULL, NULL,
|
|
||||||
g_cclosure_marshal_VOID__VOID,
|
|
||||||
G_TYPE_NONE, 0);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
GtkCssValue *
|
|
||||||
_gtk_style_provider_private_get_color (GtkStyleProviderPrivate *provider,
|
|
||||||
const char *name)
|
|
||||||
{
|
|
||||||
GtkStyleProviderPrivateInterface *iface;
|
|
||||||
|
|
||||||
/* for compat with gtk_symbolic_color_resolve() */
|
|
||||||
if (provider == NULL)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
gtk_internal_return_val_if_fail (GTK_IS_STYLE_PROVIDER_PRIVATE (provider), NULL);
|
|
||||||
|
|
||||||
iface = GTK_STYLE_PROVIDER_PRIVATE_GET_INTERFACE (provider);
|
|
||||||
|
|
||||||
if (!iface->get_color)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
return iface->get_color (provider, name);
|
|
||||||
}
|
|
||||||
|
|
||||||
GtkCssKeyframes *
|
|
||||||
_gtk_style_provider_private_get_keyframes (GtkStyleProviderPrivate *provider,
|
|
||||||
const char *name)
|
|
||||||
{
|
|
||||||
GtkStyleProviderPrivateInterface *iface;
|
|
||||||
|
|
||||||
gtk_internal_return_val_if_fail (GTK_IS_STYLE_PROVIDER_PRIVATE (provider), NULL);
|
|
||||||
gtk_internal_return_val_if_fail (name != NULL, NULL);
|
|
||||||
|
|
||||||
iface = GTK_STYLE_PROVIDER_PRIVATE_GET_INTERFACE (provider);
|
|
||||||
|
|
||||||
if (!iface->get_keyframes)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
return iface->get_keyframes (provider, name);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
_gtk_style_provider_private_lookup (GtkStyleProviderPrivate *provider,
|
|
||||||
const GtkCssMatcher *matcher,
|
|
||||||
GtkCssLookup *lookup,
|
|
||||||
GtkCssChange *out_change)
|
|
||||||
{
|
|
||||||
GtkStyleProviderPrivateInterface *iface;
|
|
||||||
|
|
||||||
gtk_internal_return_if_fail (GTK_IS_STYLE_PROVIDER_PRIVATE (provider));
|
|
||||||
gtk_internal_return_if_fail (matcher != NULL);
|
|
||||||
gtk_internal_return_if_fail (lookup != NULL);
|
|
||||||
|
|
||||||
if (out_change)
|
|
||||||
*out_change = 0;
|
|
||||||
|
|
||||||
iface = GTK_STYLE_PROVIDER_PRIVATE_GET_INTERFACE (provider);
|
|
||||||
|
|
||||||
if (!iface->lookup)
|
|
||||||
return;
|
|
||||||
|
|
||||||
iface->lookup (provider, matcher, lookup, out_change);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
_gtk_style_provider_private_changed (GtkStyleProviderPrivate *provider)
|
|
||||||
{
|
|
||||||
gtk_internal_return_if_fail (GTK_IS_STYLE_PROVIDER_PRIVATE (provider));
|
|
||||||
|
|
||||||
g_signal_emit (provider, signals[CHANGED], 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
GtkSettings *
|
|
||||||
_gtk_style_provider_private_get_settings (GtkStyleProviderPrivate *provider)
|
|
||||||
{
|
|
||||||
GtkStyleProviderPrivateInterface *iface;
|
|
||||||
|
|
||||||
gtk_internal_return_val_if_fail (GTK_IS_STYLE_PROVIDER_PRIVATE (provider), NULL);
|
|
||||||
|
|
||||||
iface = GTK_STYLE_PROVIDER_PRIVATE_GET_INTERFACE (provider);
|
|
||||||
|
|
||||||
if (!iface->get_settings)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
return iface->get_settings (provider);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
_gtk_style_provider_private_get_scale (GtkStyleProviderPrivate *provider)
|
|
||||||
{
|
|
||||||
GtkStyleProviderPrivateInterface *iface;
|
|
||||||
|
|
||||||
gtk_internal_return_val_if_fail (GTK_IS_STYLE_PROVIDER_PRIVATE (provider), 1);
|
|
||||||
|
|
||||||
iface = GTK_STYLE_PROVIDER_PRIVATE_GET_INTERFACE (provider);
|
|
||||||
|
|
||||||
if (!iface->get_scale)
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
return iface->get_scale (provider);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
_gtk_style_provider_private_emit_error (GtkStyleProviderPrivate *provider,
|
|
||||||
GtkCssSection *section,
|
|
||||||
GError *error)
|
|
||||||
{
|
|
||||||
GtkStyleProviderPrivateInterface *iface;
|
|
||||||
|
|
||||||
iface = GTK_STYLE_PROVIDER_PRIVATE_GET_INTERFACE (provider);
|
|
||||||
|
|
||||||
if (iface->emit_error)
|
|
||||||
iface->emit_error (provider, section, error);
|
|
||||||
}
|
|
@ -27,51 +27,45 @@
|
|||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GTK_TYPE_STYLE_PROVIDER_PRIVATE (_gtk_style_provider_private_get_type ())
|
#define GTK_STYLE_PROVIDER_GET_INTERFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), GTK_TYPE_STYLE_PROVIDER, GtkStyleProviderInterface))
|
||||||
#define GTK_STYLE_PROVIDER_PRIVATE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_STYLE_PROVIDER_PRIVATE, GtkStyleProviderPrivate))
|
|
||||||
#define GTK_IS_STYLE_PROVIDER_PRIVATE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_STYLE_PROVIDER_PRIVATE))
|
|
||||||
#define GTK_STYLE_PROVIDER_PRIVATE_GET_INTERFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), GTK_TYPE_STYLE_PROVIDER_PRIVATE, GtkStyleProviderPrivateInterface))
|
|
||||||
|
|
||||||
typedef struct _GtkStyleProviderPrivateInterface GtkStyleProviderPrivateInterface;
|
typedef struct _GtkStyleProviderInterface GtkStyleProviderInterface;
|
||||||
/* typedef struct _GtkStyleProviderPrivate GtkStyleProviderPrivate; */ /* dummy typedef */
|
|
||||||
|
|
||||||
struct _GtkStyleProviderPrivateInterface
|
struct _GtkStyleProviderInterface
|
||||||
{
|
{
|
||||||
GTypeInterface g_iface;
|
GTypeInterface g_iface;
|
||||||
|
|
||||||
GtkCssValue * (* get_color) (GtkStyleProviderPrivate *provider,
|
GtkCssValue * (* get_color) (GtkStyleProvider *provider,
|
||||||
const char *name);
|
const char *name);
|
||||||
GtkSettings * (* get_settings) (GtkStyleProviderPrivate *provider);
|
GtkSettings * (* get_settings) (GtkStyleProvider *provider);
|
||||||
GtkCssKeyframes * (* get_keyframes) (GtkStyleProviderPrivate *provider,
|
GtkCssKeyframes * (* get_keyframes) (GtkStyleProvider *provider,
|
||||||
const char *name);
|
const char *name);
|
||||||
int (* get_scale) (GtkStyleProviderPrivate *provider);
|
int (* get_scale) (GtkStyleProvider *provider);
|
||||||
void (* lookup) (GtkStyleProviderPrivate *provider,
|
void (* lookup) (GtkStyleProvider *provider,
|
||||||
const GtkCssMatcher *matcher,
|
const GtkCssMatcher *matcher,
|
||||||
GtkCssLookup *lookup,
|
GtkCssLookup *lookup,
|
||||||
GtkCssChange *out_change);
|
GtkCssChange *out_change);
|
||||||
void (* emit_error) (GtkStyleProviderPrivate *provider,
|
void (* emit_error) (GtkStyleProvider *provider,
|
||||||
GtkCssSection *section,
|
GtkCssSection *section,
|
||||||
const GError *error);
|
const GError *error);
|
||||||
/* signal */
|
/* signal */
|
||||||
void (* changed) (GtkStyleProviderPrivate *provider);
|
void (* changed) (GtkStyleProvider *provider);
|
||||||
};
|
};
|
||||||
|
|
||||||
GType _gtk_style_provider_private_get_type (void) G_GNUC_CONST;
|
GtkSettings * gtk_style_provider_get_settings (GtkStyleProvider *provider);
|
||||||
|
GtkCssValue * gtk_style_provider_get_color (GtkStyleProvider *provider,
|
||||||
GtkSettings * _gtk_style_provider_private_get_settings (GtkStyleProviderPrivate *provider);
|
|
||||||
GtkCssValue * _gtk_style_provider_private_get_color (GtkStyleProviderPrivate *provider,
|
|
||||||
const char *name);
|
const char *name);
|
||||||
GtkCssKeyframes * _gtk_style_provider_private_get_keyframes(GtkStyleProviderPrivate *provider,
|
GtkCssKeyframes * gtk_style_provider_get_keyframes (GtkStyleProvider *provider,
|
||||||
const char *name);
|
const char *name);
|
||||||
int _gtk_style_provider_private_get_scale (GtkStyleProviderPrivate *provider);
|
int gtk_style_provider_get_scale (GtkStyleProvider *provider);
|
||||||
void _gtk_style_provider_private_lookup (GtkStyleProviderPrivate *provider,
|
void gtk_style_provider_lookup (GtkStyleProvider *provider,
|
||||||
const GtkCssMatcher *matcher,
|
const GtkCssMatcher *matcher,
|
||||||
GtkCssLookup *lookup,
|
GtkCssLookup *lookup,
|
||||||
GtkCssChange *out_change);
|
GtkCssChange *out_change);
|
||||||
|
|
||||||
void _gtk_style_provider_private_changed (GtkStyleProviderPrivate *provider);
|
void gtk_style_provider_changed (GtkStyleProvider *provider);
|
||||||
|
|
||||||
void _gtk_style_provider_private_emit_error (GtkStyleProviderPrivate *provider,
|
void gtk_style_provider_emit_error (GtkStyleProvider *provider,
|
||||||
GtkCssSection *section,
|
GtkCssSection *section,
|
||||||
GError *error);
|
GError *error);
|
||||||
|
|
||||||
|
@ -307,7 +307,6 @@ gtk_public_sources = files([
|
|||||||
'gtkstylecontext.c',
|
'gtkstylecontext.c',
|
||||||
'gtkstyleproperty.c',
|
'gtkstyleproperty.c',
|
||||||
'gtkstyleprovider.c',
|
'gtkstyleprovider.c',
|
||||||
'gtkstyleproviderprivate.c',
|
|
||||||
'gtkswitch.c',
|
'gtkswitch.c',
|
||||||
'gtktestutils.c',
|
'gtktestutils.c',
|
||||||
'gtktextattributes.c',
|
'gtktextattributes.c',
|
||||||
|
Loading…
Reference in New Issue
Block a user