Drop deprecated style context api

This commit is contained in:
Matthias Clasen 2019-03-31 15:04:39 -04:00
parent 6f5675ef3c
commit 0230cc55bc
3 changed files with 0 additions and 70 deletions

View File

@ -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

View File

@ -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

View File

@ -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);