stylecontext: Remove gtk_style_context_new()
authorBenjamin Otte <otte@redhat.com>
Wed, 5 Feb 2020 02:12:40 +0000 (03:12 +0100)
committerBenjamin Otte <otte@redhat.com>
Wed, 5 Feb 2020 03:03:43 +0000 (04:03 +0100)
It's private now, no more foreign drawing of any sort.

To be fair, it was entirely useless without widget paths already.

docs/reference/gtk/gtk4-sections.txt
gtk/gtkstylecontext.c
gtk/gtkstylecontext.h

index a72d0614d9501bf6beb893534ce5b3de06999b1f..086f352e4fbf588ffac1ababbb8f8cda69fb0b2f 100644 (file)
@@ -4801,7 +4801,6 @@ GTK_STYLE_CLASS_WARNING
 GTK_STYLE_CLASS_WIDE
 <SUBSECTION>
 GtkStyleContext
-gtk_style_context_new
 gtk_style_context_add_provider
 gtk_style_context_add_provider_for_display
 gtk_style_context_get_parent
index a5db7066aad6f2d036076ce020f2653f6db7c300..47e96f7ea5d55707aba4e1edcac51196a87fc0d8 100644 (file)
  * 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)
 {
index 331241d78af87c7848b77a41e3dc982545dd9799..991c7a5a3d3e832f0e6cabc33d2ecf38234f5da6 100644 (file)
@@ -849,9 +849,6 @@ struct _GtkStyleContextClass
 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,