diff options
author | Benjamin Otte <otte@redhat.com> | 2020-02-05 03:12:40 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2020-02-05 04:03:43 +0100 |
commit | 31713ab5ef473fec3d90d925a5fbb2ceeb246e3b (patch) | |
tree | 174f12988cf8666cad935790f0ae7107181b70d1 /gtk | |
parent | b9c880f58de87fe0e1ad40fd99262e3ec81917ed (diff) | |
download | gtk+-31713ab5ef473fec3d90d925a5fbb2ceeb246e3b.tar.gz |
stylecontext: Remove gtk_style_context_new()
It's private now, no more foreign drawing of any sort.
To be fair, it was entirely useless without widget paths already.
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkstylecontext.c | 33 | ||||
-rw-r--r-- | gtk/gtkstylecontext.h | 3 |
2 files changed, 0 insertions, 36 deletions
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c index a5db7066aa..47e96f7ea5 100644 --- a/gtk/gtkstylecontext.c +++ b/gtk/gtkstylecontext.c @@ -68,11 +68,6 @@ * RTL/LTR information set. The style context will also be updated * automatically if any of these settings change on the widget. * - * If you are using the theming layer standalone, you will need to set a - * widget path and a display yourself to the created style context through - * gtk_style_context_set_path() and possibly gtk_style_context_set_display(). - * See the “Foreign drawing“ example in gtk4-demo. - * * # Style Classes # {#gtkstylecontext-classes} * * Widgets can add style classes to their context, which can be used to associate @@ -374,34 +369,6 @@ gtk_style_context_get_node (GtkStyleContext *context) return priv->cssnode; } -/** - * gtk_style_context_new: - * - * Creates a standalone #GtkStyleContext, this style context - * won’t be attached to any widget, so you may want - * to call gtk_style_context_set_path() yourself. - * - * This function is only useful when using the theming layer - * separated from GTK+, if you are using #GtkStyleContext to - * theme #GtkWidgets, use gtk_widget_get_style_context() - * in order to get a style context ready to theme the widget. - * - * Returns: A newly created #GtkStyleContext. - **/ -GtkStyleContext * -gtk_style_context_new (void) -{ - GtkStyleContext *context = g_object_new (GTK_TYPE_STYLE_CONTEXT, NULL); - GtkStyleContextPrivate *priv = gtk_style_context_get_instance_private (context); - - - /* Create default info store */ - priv->cssnode = gtk_css_node_new (); - gtk_css_node_set_state (priv->cssnode, GTK_STATE_FLAG_DIR_LTR); - - return context; -} - GtkStyleContext * gtk_style_context_new_for_node (GtkCssNode *node) { diff --git a/gtk/gtkstylecontext.h b/gtk/gtkstylecontext.h index 331241d78a..991c7a5a3d 100644 --- a/gtk/gtkstylecontext.h +++ b/gtk/gtkstylecontext.h @@ -850,9 +850,6 @@ GDK_AVAILABLE_IN_ALL GType gtk_style_context_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL -GtkStyleContext * gtk_style_context_new (void); - -GDK_AVAILABLE_IN_ALL void gtk_style_context_add_provider_for_display (GdkDisplay *display, GtkStyleProvider *provider, guint priority); |