mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-30 15:31:34 +00:00
Drop deprecated style context api
This commit is contained in:
parent
6f5675ef3c
commit
0230cc55bc
@ -5055,8 +5055,6 @@ gtk_style_context_get_state
|
||||
gtk_style_context_get_valist
|
||||
gtk_style_context_get_section
|
||||
gtk_style_context_get_color
|
||||
gtk_style_context_get_background_color
|
||||
gtk_style_context_get_border_color
|
||||
gtk_style_context_get_border
|
||||
gtk_style_context_get_padding
|
||||
gtk_style_context_get_margin
|
||||
|
@ -1431,67 +1431,6 @@ gtk_style_context_get_color (GtkStyleContext *context,
|
||||
gdk_rgba_free (c);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_style_context_get_background_color:
|
||||
* @context: a #GtkStyleContext
|
||||
* @color: (out): return value for the background color
|
||||
*
|
||||
* Gets the background color for a given state.
|
||||
*
|
||||
* This function is far less useful than it seems, and it should not be used in
|
||||
* newly written code. CSS has no concept of "background color", as a background
|
||||
* can be an image, or a gradient, or any other pattern including solid colors.
|
||||
*
|
||||
* The only reason why you would call gtk_style_context_get_background_color() is
|
||||
* to use the returned value to draw the background with it; the correct way to
|
||||
* achieve this result is to use gtk_render_background() instead, along with CSS
|
||||
* style classes to modify the color to be rendered.
|
||||
*
|
||||
* Deprecated: 3.16: Use gtk_render_background() instead.
|
||||
**/
|
||||
void
|
||||
gtk_style_context_get_background_color (GtkStyleContext *context,
|
||||
GdkRGBA *color)
|
||||
{
|
||||
GdkRGBA *c;
|
||||
|
||||
g_return_if_fail (color != NULL);
|
||||
g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
|
||||
|
||||
gtk_style_context_get (context,
|
||||
"background-color", &c,
|
||||
NULL);
|
||||
|
||||
*color = *c;
|
||||
gdk_rgba_free (c);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_style_context_get_border_color:
|
||||
* @context: a #GtkStyleContext
|
||||
* @color: (out): return value for the border color
|
||||
*
|
||||
* Gets the border color for a given state.
|
||||
*
|
||||
* Deprecated: 3.16: Use gtk_render_frame() instead.
|
||||
**/
|
||||
void
|
||||
gtk_style_context_get_border_color (GtkStyleContext *context,
|
||||
GdkRGBA *color)
|
||||
{
|
||||
GdkRGBA *c;
|
||||
|
||||
g_return_if_fail (color != NULL);
|
||||
g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
|
||||
|
||||
gtk_style_context_get (context,
|
||||
"border-color", &c,
|
||||
NULL);
|
||||
|
||||
*color = *c;
|
||||
gdk_rgba_free (c);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_style_context_get_border:
|
||||
* @context: a #GtkStyleContext
|
||||
|
@ -1026,13 +1026,6 @@ gboolean gtk_style_context_lookup_color (GtkStyleContext *context,
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gtk_style_context_get_color (GtkStyleContext *context,
|
||||
GdkRGBA *color);
|
||||
GDK_DEPRECATED_FOR(gtk_render_background)
|
||||
void gtk_style_context_get_background_color (GtkStyleContext *context,
|
||||
GdkRGBA *color);
|
||||
GDK_DEPRECATED_FOR(gtk_render_frame)
|
||||
void gtk_style_context_get_border_color (GtkStyleContext *context,
|
||||
GdkRGBA *color);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gtk_style_context_get_border (GtkStyleContext *context,
|
||||
GtkBorder *border);
|
||||
|
Loading…
Reference in New Issue
Block a user