diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt index 4e5e6ea044..167a16ee62 100644 --- a/docs/reference/gtk/gtk4-sections.txt +++ b/docs/reference/gtk/gtk4-sections.txt @@ -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 diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c index 81384cc0c9..4e0c953e2c 100644 --- a/gtk/gtkstylecontext.c +++ b/gtk/gtkstylecontext.c @@ -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 diff --git a/gtk/gtkstylecontext.h b/gtk/gtkstylecontext.h index 13de1f1035..f489db9152 100644 --- a/gtk/gtkstylecontext.h +++ b/gtk/gtkstylecontext.h @@ -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);