[gtk+] API: Remove GtkStyle



commit 0df388051df5896a6199b36e47a133795bdc26be
Author: Benjamin Otte <otte redhat com>
Date:   Thu Oct 6 22:37:42 2016 +0200

    API: Remove GtkStyle
    
    All the remaining gtkrc.c stuff like GtkRcStyle goes with it.

 docs/reference/gtk/gtk4-sections.txt |  106 -
 gtk/deprecated/Makefile.inc          |    4 -
 gtk/deprecated/gtkiconfactory.c      |   87 -
 gtk/deprecated/gtkiconfactory.h      |    9 -
 gtk/deprecated/gtkrc.c               | 1966 --------------
 gtk/deprecated/gtkrc.h               |  405 ---
 gtk/deprecated/gtkstyle.c            | 4769 ----------------------------------
 gtk/deprecated/gtkstyle.h            |  793 ------
 gtk/gtk-autocleanups.h               |    2 -
 gtk/gtk.h                            |    2 -
 gtk/gtkicontheme.c                   |   91 -
 gtk/gtkicontheme.h                   |    6 -
 gtk/gtksizerequest.c                 |    5 -
 gtk/gtktypes.h                       |    2 -
 gtk/gtkwidget.c                      |  119 -
 gtk/gtkwidget.h                      |    2 -
 gtk/gtkwidgetprivate.h               |    4 -
 17 files changed, 0 insertions(+), 8372 deletions(-)
---
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index 4c613db..eef7bed 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -6339,110 +6339,6 @@ gtk_gradient_get_type
 </SECTION>
 
 <SECTION>
-<FILE>gtkstyle</FILE>
-<TITLE>GtkStyle</TITLE>
-GTK_STYLE_ATTACHED
-GtkStyle
-GtkStyleClass
-GtkExpanderStyle
-gtk_style_new
-gtk_style_copy
-gtk_style_attach
-gtk_style_detach
-gtk_style_has_context
-gtk_style_set_background
-gtk_style_apply_default_background
-gtk_style_lookup_color
-gtk_style_lookup_icon_set
-gtk_style_render_icon
-gtk_style_get_style_property
-gtk_style_get_valist
-gtk_style_get
-gtk_paint_arrow
-gtk_paint_box
-gtk_paint_box_gap
-gtk_paint_check
-gtk_paint_diamond
-gtk_paint_extension
-gtk_paint_flat_box
-gtk_paint_focus
-gtk_paint_handle
-gtk_paint_hline
-gtk_paint_option
-gtk_paint_shadow
-gtk_paint_shadow_gap
-gtk_paint_slider
-gtk_paint_spinner
-gtk_paint_tab
-gtk_paint_vline
-gtk_paint_expander
-gtk_paint_layout
-gtk_paint_resize_grip
-gtk_draw_insertion_cursor
-
-<SUBSECTION>
-GtkRcProperty
-GtkRcPropertyParser
-
-<SUBSECTION Standard>
-GTK_STYLE
-GTK_IS_STYLE
-GTK_TYPE_STYLE
-GTK_STYLE_CLASS
-GTK_IS_STYLE_CLASS
-GTK_STYLE_GET_CLASS
-
-gtk_style_get_type
-GtkThemeEngine
-</SECTION>
-
-<SECTION>
-<FILE>gtkrc</FILE>
-<TITLE>Resource Files</TITLE>
-GtkRcStyle
-GtkRcStyleClass
-GtkRcFlags
-GtkRcTokenType
-GtkPathPriorityType
-GtkPathType
-gtk_rc_scanner_new
-gtk_rc_get_style
-gtk_rc_get_style_by_paths
-gtk_rc_parse
-gtk_rc_parse_string
-gtk_rc_reparse_all
-gtk_rc_reparse_all_for_settings
-gtk_rc_reset_styles
-gtk_rc_add_default_file
-gtk_rc_get_default_files
-gtk_rc_set_default_files
-gtk_rc_parse_color
-gtk_rc_parse_color_full
-gtk_rc_parse_state
-gtk_rc_parse_priority
-gtk_rc_find_module_in_path
-gtk_rc_find_pixmap_in_path
-gtk_rc_get_module_dir
-gtk_rc_get_im_module_path
-gtk_rc_get_im_module_file
-gtk_rc_get_theme_dir
-gtk_rc_style_new
-gtk_rc_style_copy
-
-<SUBSECTION Standard>
-GTK_RC_STYLE
-GTK_IS_RC_STYLE
-GTK_TYPE_RC_STYLE
-GTK_RC_STYLE_CLASS
-GTK_IS_RC_STYLE_CLASS
-GTK_RC_STYLE_GET_CLASS
-<SUBSECTION Private>
-gtk_rc_style_get_type
-GtkRcContext
-GTK_PATH_PRIO_MASK
-</SECTION>
-
-<SECTION>
 <FILE>gtkselection</FILE>
 <TITLE>Selections</TITLE>
 GtkSelectionData
@@ -6818,7 +6714,6 @@ gtk_icon_info_load_icon_finish
 gtk_icon_info_load_symbolic
 gtk_icon_info_load_symbolic_async
 gtk_icon_info_load_symbolic_finish
-gtk_icon_info_load_symbolic_for_style
 gtk_icon_info_load_symbolic_for_context
 gtk_icon_info_load_symbolic_for_context_async
 gtk_icon_info_load_symbolic_for_context_finish
@@ -6869,7 +6764,6 @@ gtk_icon_set_copy
 gtk_icon_set_new
 gtk_icon_set_new_from_pixbuf
 gtk_icon_set_ref
-gtk_icon_set_render_icon
 gtk_icon_set_render_icon_pixbuf
 gtk_icon_set_render_icon_surface
 gtk_icon_set_unref
diff --git a/gtk/deprecated/Makefile.inc b/gtk/deprecated/Makefile.inc
index e93bd66..0cf9b94 100644
--- a/gtk/deprecated/Makefile.inc
+++ b/gtk/deprecated/Makefile.inc
@@ -18,10 +18,8 @@ deprecated_h_sources =                       \
        deprecated/gtkimagemenuitem.h   \
        deprecated/gtkmisc.h            \
        deprecated/gtkradioaction.h     \
-       deprecated/gtkrc.h              \
        deprecated/gtkrecentaction.h    \
        deprecated/gtkstock.h           \
-       deprecated/gtkstyle.h           \
        deprecated/gtkstyleproperties.h \
        deprecated/gtksymboliccolor.h   \
        deprecated/gtktable.h           \
@@ -61,10 +59,8 @@ deprecated_c_sources =                       \
        deprecated/gtkimagemenuitem.c   \
        deprecated/gtkmisc.c            \
        deprecated/gtkradioaction.c     \
-       deprecated/gtkrc.c              \
        deprecated/gtkrecentaction.c    \
        deprecated/gtkstock.c           \
-       deprecated/gtkstyle.c           \
        deprecated/gtkstyleproperties.c \
        deprecated/gtksymboliccolor.c   \
        deprecated/gtktable.c           \
diff --git a/gtk/deprecated/gtkiconfactory.c b/gtk/deprecated/gtkiconfactory.c
index 5ac19ca..3be8fc4 100644
--- a/gtk/deprecated/gtkiconfactory.c
+++ b/gtk/deprecated/gtkiconfactory.c
@@ -43,7 +43,6 @@
 #include "gtkbuildable.h"
 #include "gtkbuilderprivate.h"
 #include "gtktypebuiltins.h"
-#include "gtkstyle.h"
 #include "gtkstylecontextprivate.h"
 #include "gtkrender.h"
 #include "gtkrenderprivate.h"
@@ -1556,92 +1555,6 @@ G_GNUC_END_IGNORE_DEPRECATIONS;
   return surface;
 }
 
-/**
- * gtk_icon_set_render_icon:
- * @icon_set: a #GtkIconSet
- * @style: (allow-none): a #GtkStyle associated with @widget, or %NULL
- * @direction: text direction
- * @state: widget state
- * @size: (type int): icon size (#GtkIconSize). A size of `(GtkIconSize)-1`
- *        means render at the size of the source and don’t scale.
- * @widget: (allow-none): widget that will display the icon, or %NULL.
- *          The only use that is typically made of this
- *          is to determine the appropriate #GdkScreen.
- * @detail: (allow-none): detail to pass to the theme engine, or %NULL.
- *          Note that passing a detail of anything but %NULL
- *          will disable caching.
- *
- * Renders an icon using gtk_style_render_icon(). In most cases,
- * gtk_widget_render_icon() is better, since it automatically provides
- * most of the arguments from the current widget settings.  This
- * function never returns %NULL; if the icon can’t be rendered
- * (perhaps because an image file fails to load), a default "missing
- * image" icon will be returned instead.
- *
- * Returns: (transfer full): a #GdkPixbuf to be displayed
- *
- * Deprecated: 3.0: Use gtk_icon_set_render_icon_pixbuf() instead
- */
-GdkPixbuf*
-gtk_icon_set_render_icon (GtkIconSet        *icon_set,
-                          GtkStyle          *style,
-                          GtkTextDirection   direction,
-                          GtkStateType       state,
-                          GtkIconSize        size,
-                          GtkWidget         *widget,
-                          const char        *detail)
-{
-  GdkPixbuf *icon;
-  GtkStyleContext *context = NULL;
-  GtkStateFlags flags = 0;
-
-  g_return_val_if_fail (icon_set != NULL, NULL);
-
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
-
-  g_return_val_if_fail (style == NULL || GTK_IS_STYLE (style), NULL);
-
-  if (style && gtk_style_has_context (style))
-    {
-      g_object_get (style, "context", &context, NULL);
-      /* g_object_get returns a refed object */
-      if (context)
-        g_object_unref (context);
-    }
-  else if (widget)
-    {
-      context = gtk_widget_get_style_context (widget);
-    }
-
-  if (!context)
-    return render_fallback_image (gtk_style_context_lookup_style (context), direction, state, size);
-
-  gtk_style_context_save (context);
-
-  switch (state)
-    {
-    case GTK_STATE_PRELIGHT:
-      flags |= GTK_STATE_FLAG_PRELIGHT;
-      break;
-    case GTK_STATE_INSENSITIVE:
-      flags |= GTK_STATE_FLAG_INSENSITIVE;
-      break;
-    default:
-      break;
-    }
-
-  gtk_style_context_set_state (context, flags);
-  gtk_style_context_set_direction (context, direction);
-
-G_GNUC_END_IGNORE_DEPRECATIONS;
-
-  icon = gtk_icon_set_render_icon_pixbuf (icon_set, context, size);
-
-  gtk_style_context_restore (context);
-
-  return icon;
-}
-
 /* Order sources by their "wildness", so that "wilder" sources are
  * greater than “specific” sources; for determining ordering,
  * direction beats state beats size.
diff --git a/gtk/deprecated/gtkiconfactory.h b/gtk/deprecated/gtkiconfactory.h
index 7b5c540..cdb99a6 100644
--- a/gtk/deprecated/gtkiconfactory.h
+++ b/gtk/deprecated/gtkiconfactory.h
@@ -146,15 +146,6 @@ void        gtk_icon_set_unref           (GtkIconSet      *icon_set);
 GDK_DEPRECATED_IN_3_10
 GtkIconSet* gtk_icon_set_copy            (GtkIconSet      *icon_set);
 
-GDK_DEPRECATED_IN_3_0_FOR(gtk_icon_set_render_icon_pixbuf)
-GdkPixbuf*  gtk_icon_set_render_icon     (GtkIconSet      *icon_set,
-                                          GtkStyle        *style,
-                                          GtkTextDirection direction,
-                                          GtkStateType     state,
-                                          GtkIconSize      size,
-                                          GtkWidget       *widget,
-                                          const gchar     *detail);
-
 GDK_DEPRECATED_IN_3_10
 void           gtk_icon_set_add_source   (GtkIconSet          *icon_set,
                                           const GtkIconSource *source);
diff --git a/gtk/gtk-autocleanups.h b/gtk/gtk-autocleanups.h
index 561485e..0b1c230 100644
--- a/gtk/gtk-autocleanups.h
+++ b/gtk/gtk-autocleanups.h
@@ -133,7 +133,6 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkRadioButton, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkRadioMenuItem, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkRadioToolButton, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkRange, g_object_unref)
-G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkRcStyle, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkRecentChooser, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkRecentChooserDialog, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkRecentChooserMenu, g_object_unref)
@@ -159,7 +158,6 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkSpinner, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkStack, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkStackSwitcher, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkStatusbar, g_object_unref)
-G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkStyle, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkStyleContext, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkStyleProperties, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkStyleProvider, g_object_unref)
diff --git a/gtk/gtk.h b/gtk/gtk.h
index 7cc03bf..7784446 100644
--- a/gtk/gtk.h
+++ b/gtk/gtk.h
@@ -263,10 +263,8 @@
 #include <gtk/deprecated/gtkimagemenuitem.h>
 #include <gtk/deprecated/gtkmisc.h>
 #include <gtk/deprecated/gtkradioaction.h>
-#include <gtk/deprecated/gtkrc.h>
 #include <gtk/deprecated/gtkrecentaction.h>
 #include <gtk/deprecated/gtkstock.h>
-#include <gtk/deprecated/gtkstyle.h>
 #include <gtk/deprecated/gtkstyleproperties.h>
 #include <gtk/deprecated/gtksymboliccolor.h>
 #include <gtk/deprecated/gtktable.h>
diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c
index 4eec9fe..963a258 100644
--- a/gtk/gtkicontheme.c
+++ b/gtk/gtkicontheme.c
@@ -50,13 +50,6 @@
 #include "gtkprivate.h"
 #include "gdkpixbufutilsprivate.h"
 
-#undef GDK_DEPRECATED
-#undef GDK_DEPRECATED_FOR
-#define GDK_DEPRECATED
-#define GDK_DEPRECATED_FOR(f)
-
-#include "deprecated/gtkstyle.h"
-
 /* this is in case round() is not provided by the compiler, 
  * such as in the case of C89 compilers, like MSVC
  */
@@ -5111,90 +5104,6 @@ gtk_icon_info_load_symbolic_for_context_finish (GtkIconInfo   *icon_info,
   return gtk_icon_info_load_symbolic_finish (icon_info, result, was_symbolic, error);
 }
 
-static GdkRGBA *
-color_to_rgba (GdkColor *color,
-               GdkRGBA  *rgba)
-{
-  rgba->red = color->red / 65535.0;
-  rgba->green = color->green / 65535.0;
-  rgba->blue = color->blue / 65535.0;
-  rgba->alpha = 1.0;
-  return rgba;
-}
-
-/**
- * gtk_icon_info_load_symbolic_for_style:
- * @icon_info: a #GtkIconInfo
- * @style: a #GtkStyle to take the colors from
- * @state: the widget state to use for colors
- * @was_symbolic: (out) (allow-none): a #gboolean, returns whether the
- *     loaded icon was a symbolic one and whether the @fg color was
- *     applied to it.
- * @error: (allow-none): location to store error information on failure,
- *     or %NULL.
- *
- * Loads an icon, modifying it to match the system colours for the foreground,
- * success, warning and error colors provided. If the icon is not a symbolic
- * one, the function will return the result from gtk_icon_info_load_icon().
- *
- * This allows loading symbolic icons that will match the system theme.
- *
- * See gtk_icon_info_load_symbolic() for more details.
- *
- * Returns: (transfer full): a #GdkPixbuf representing the loaded icon
- *
- * Since: 3.0
- *
- * Deprecated: 3.0: Use gtk_icon_info_load_symbolic_for_context() instead
- */
-GdkPixbuf *
-gtk_icon_info_load_symbolic_for_style (GtkIconInfo   *icon_info,
-                                       GtkStyle      *style,
-                                       GtkStateType   state,
-                                       gboolean      *was_symbolic,
-                                       GError       **error)
-{
-  GdkColor color;
-  GdkRGBA fg;
-  GdkRGBA success_color;
-  GdkRGBA *success_colorp;
-  GdkRGBA warning_color;
-  GdkRGBA *warning_colorp;
-  GdkRGBA error_color;
-  GdkRGBA *error_colorp;
-  gboolean is_symbolic;
-
-  g_return_val_if_fail (icon_info != NULL, NULL);
-  g_return_val_if_fail (style != NULL, NULL);
-
-  is_symbolic = gtk_icon_info_is_symbolic (icon_info);
-
-  if (was_symbolic)
-    *was_symbolic = is_symbolic;
-
-  if (!is_symbolic)
-    return gtk_icon_info_load_icon (icon_info, error);
-
-  color_to_rgba (&style->fg[state], &fg);
-
-  success_colorp = warning_colorp = error_colorp = NULL;
-
-  if (gtk_style_lookup_color (style, "success_color", &color))
-    success_colorp = color_to_rgba (&color, &success_color);
-
-  if (gtk_style_lookup_color (style, "warning_color", &color))
-    warning_colorp = color_to_rgba (&color, &warning_color);
-
-  if (gtk_style_lookup_color (style, "error_color", &color))
-    error_colorp = color_to_rgba (&color, &error_color);
-
-  return gtk_icon_info_load_symbolic_internal (icon_info,
-                                               &fg, success_colorp,
-                                               warning_colorp, error_colorp,
-                                               TRUE,
-                                               error);
-}
-
 /**
  * gtk_icon_info_set_raw_coordinates:
  * @icon_info: a #GtkIconInfo
diff --git a/gtk/gtkicontheme.h b/gtk/gtkicontheme.h
index 7824a46..48a22e6 100644
--- a/gtk/gtkicontheme.h
+++ b/gtk/gtkicontheme.h
@@ -351,12 +351,6 @@ GdkPixbuf *           gtk_icon_info_load_symbolic_for_context_finish (GtkIconInf
                                                                      GAsyncResult     *res,
                                                                      gboolean         *was_symbolic,
                                                                      GError          **error);
-GDK_DEPRECATED_IN_3_0_FOR(gtk_icon_info_load_symbol_for_context)
-GdkPixbuf *           gtk_icon_info_load_symbolic_for_style  (GtkIconInfo   *icon_info,
-                                                              GtkStyle      *style,
-                                                              GtkStateType   state,
-                                                              gboolean      *was_symbolic,
-                                                              GError       **error);
 GDK_DEPRECATED_IN_3_14
 void                  gtk_icon_info_set_raw_coordinates (GtkIconInfo  *icon_info,
                                                         gboolean      raw_coordinates);
diff --git a/gtk/gtksizerequest.c b/gtk/gtksizerequest.c
index 1dd3671..94617c8 100644
--- a/gtk/gtksizerequest.c
+++ b/gtk/gtksizerequest.c
@@ -29,7 +29,6 @@
 #include "gtksizegroup-private.h"
 #include "gtksizerequestcacheprivate.h"
 #include "gtkwidgetprivate.h"
-#include "deprecated/gtkstyle.h"
 
 
 #ifdef G_ENABLE_CONSISTENCY_CHECKS
@@ -169,10 +168,6 @@ gtk_widget_query_size_for_orientation (GtkWidget        *widget,
     {
       gint adjusted_min, adjusted_natural, adjusted_for_size = for_size;
 
-      G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
-      gtk_widget_ensure_style (widget);
-      G_GNUC_END_IGNORE_DEPRECATIONS;
-
       if (orientation == GTK_ORIENTATION_HORIZONTAL)
         {
           if (for_size < 0)
diff --git a/gtk/gtktypes.h b/gtk/gtktypes.h
index f1b645a..243aabb 100644
--- a/gtk/gtktypes.h
+++ b/gtk/gtktypes.h
@@ -36,11 +36,9 @@ typedef struct _GtkBuilder             GtkBuilder;
 typedef struct _GtkClipboard          GtkClipboard;
 typedef struct _GtkIconSet             GtkIconSet;
 typedef struct _GtkIconSource          GtkIconSource;
-typedef struct _GtkRcStyle             GtkRcStyle;
 typedef struct _GtkRequisition        GtkRequisition;
 typedef struct _GtkSelectionData       GtkSelectionData;
 typedef struct _GtkSettings            GtkSettings;
-typedef struct _GtkStyle               GtkStyle;
 typedef struct _GtkStyleContext        GtkStyleContext;
 typedef struct _GtkTooltip             GtkTooltip;
 typedef struct _GtkWidget              GtkWidget;
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index d50a77c..97b952b 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -503,7 +503,6 @@ enum {
   STATE_CHANGED,
   PARENT_SET,
   HIERARCHY_CHANGED,
-  STYLE_SET,
   DIRECTION_CHANGED,
   GRAB_NOTIFY,
   CHILD_NOTIFY,
@@ -580,7 +579,6 @@ enum {
   PROP_HAS_DEFAULT,
   PROP_RECEIVES_DEFAULT,
   PROP_COMPOSITE_CHILD,
-  PROP_STYLE,
   PROP_EVENTS,
   PROP_NO_SHOW_ALL,
   PROP_HAS_TOOLTIP,
@@ -643,8 +641,6 @@ static void gtk_widget_real_realize          (GtkWidget         *widget);
 static void    gtk_widget_real_unrealize        (GtkWidget         *widget);
 static void    gtk_widget_real_size_allocate    (GtkWidget         *widget,
                                                   GtkAllocation            *allocation);
-static void    gtk_widget_real_style_set        (GtkWidget         *widget,
-                                                  GtkStyle          *previous_style);
 static void    gtk_widget_real_direction_changed(GtkWidget         *widget,
                                                   GtkTextDirection   previous_direction);
 
@@ -1039,7 +1035,6 @@ gtk_widget_class_init (GtkWidgetClass *klass)
   klass->state_flags_changed = gtk_widget_real_state_flags_changed;
   klass->parent_set = NULL;
   klass->hierarchy_changed = NULL;
-  klass->style_set = gtk_widget_real_style_set;
   klass->direction_changed = gtk_widget_real_direction_changed;
   klass->grab_notify = NULL;
   klass->child_notify = NULL;
@@ -1218,24 +1213,6 @@ gtk_widget_class_init (GtkWidgetClass *klass)
                             FALSE,
                             GTK_PARAM_READABLE);
 
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
-
-  /**
-   * GtkWidget:style:
-   *
-   * The style of the widget, which contains information about how it will look (colors, etc).
-   *
-   * Deprecated: Use #GtkStyleContext instead
-   */
-  widget_props[PROP_STYLE] =
-      g_param_spec_object ("style",
-                           P_("Style"),
-                           P_("The style of the widget, which contains information about how it will look 
(colors etc)"),
-                           GTK_TYPE_STYLE,
-                           GTK_PARAM_READWRITE|G_PARAM_DEPRECATED);
-
-G_GNUC_END_IGNORE_DEPRECATIONS
-
   widget_props[PROP_EVENTS] =
       g_param_spec_flags ("events",
                           P_("Events"),
@@ -1850,37 +1827,6 @@ G_GNUC_END_IGNORE_DEPRECATIONS
                  GTK_TYPE_WIDGET);
 
   /**
-   * GtkWidget::style-set:
-   * @widget: the object on which the signal is emitted
-   * @previous_style: (allow-none): the previous style, or %NULL if the widget
-   *   just got its initial style
-   *
-   * The ::style-set signal is emitted when a new style has been set
-   * on a widget. Note that style-modifying functions like
-   * gtk_widget_modify_base() also cause this signal to be emitted.
-   *
-   * Note that this signal is emitted for changes to the deprecated
-   * #GtkStyle. To track changes to the #GtkStyleContext associated
-   * with a widget, use the #GtkWidget::style-updated signal.
-   *
-   * Deprecated:3.0: Use the #GtkWidget::style-updated signal
-   */
-
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
-
-  widget_signals[STYLE_SET] =
-    g_signal_new (I_("style-set"),
-                 G_TYPE_FROM_CLASS (gobject_class),
-                 G_SIGNAL_RUN_FIRST | G_SIGNAL_DEPRECATED,
-                 G_STRUCT_OFFSET (GtkWidgetClass, style_set),
-                 NULL, NULL,
-                 NULL,
-                 G_TYPE_NONE, 1,
-                 GTK_TYPE_STYLE);
-
-G_GNUC_END_IGNORE_DEPRECATIONS
-
-  /**
    * GtkWidget::style-updated:
    * @widget: the object on which the signal is emitted
    *
@@ -3736,11 +3682,6 @@ gtk_widget_set_property (GObject         *object,
     case PROP_RECEIVES_DEFAULT:
       gtk_widget_set_receives_default (widget, g_value_get_boolean (value));
       break;
-    case PROP_STYLE:
-      G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
-      gtk_widget_set_style (widget, g_value_get_object (value));
-      G_GNUC_END_IGNORE_DEPRECATIONS;
-      break;
     case PROP_EVENTS:
       if (!_gtk_widget_get_realized (widget) && _gtk_widget_get_has_window (widget))
        gtk_widget_set_events (widget, g_value_get_flags (value));
@@ -3931,11 +3872,6 @@ gtk_widget_get_property (GObject         *object,
     case PROP_COMPOSITE_CHILD:
       g_value_set_boolean (value, widget->priv->composite_child);
       break;
-    case PROP_STYLE:
-      G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
-      g_value_set_object (value, gtk_widget_get_style (widget));
-      G_GNUC_END_IGNORE_DEPRECATIONS;
-      break;
     case PROP_EVENTS:
       eventp = g_object_get_qdata (G_OBJECT (widget), quark_event_mask);
       g_value_set_flags (value, GPOINTER_TO_INT (eventp));
@@ -4406,11 +4342,6 @@ gtk_widget_init (GTypeInstance *instance, gpointer g_class)
   /* need to set correct type here, and only class has the correct type here */
   gtk_css_node_set_widget_type (priv->cssnode, G_TYPE_FROM_CLASS (g_class));
   gtk_css_node_set_name (priv->cssnode, GTK_WIDGET_CLASS (g_class)->priv->css_name);
-
-  G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
-  priv->style = gtk_widget_get_default_style ();
-  G_GNUC_END_IGNORE_DEPRECATIONS;
-  g_object_ref (priv->style);
 }
 
 
@@ -5444,10 +5375,6 @@ gtk_widget_realize (GtkWidget *widget)
       if (priv->parent && !_gtk_widget_get_realized (priv->parent))
        gtk_widget_realize (priv->parent);
 
-      G_GNUC_BEGIN_IGNORE_DEPRECATIONS
-      gtk_widget_ensure_style (widget);
-      G_GNUC_END_IGNORE_DEPRECATIONS
-
       g_signal_emit (widget, widget_signals[REALIZE], 0);
 
       gtk_widget_real_set_has_tooltip (widget, gtk_widget_get_has_tooltip (widget), TRUE);
@@ -8144,8 +8071,6 @@ gtk_widget_real_state_flags_changed (GtkWidget     *widget,
 static void
 gtk_widget_real_style_updated (GtkWidget *widget)
 {
-  GtkWidgetPrivate *priv = widget->priv;
-
   gtk_widget_update_alpha (widget);
 
   if (widget->priv->context)
@@ -8176,21 +8101,6 @@ gtk_widget_real_style_updated (GtkWidget *widget)
       if (widget->priv->anchored)
         gtk_widget_queue_resize (widget);
     }
-
-  G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
-  if (priv->style != NULL &&
-      priv->style != gtk_widget_get_default_style ())
-    {
-      /* Trigger ::style-set for old
-       * widgets not listening to this
-       */
-      g_signal_emit (widget,
-                     widget_signals[STYLE_SET],
-                     0,
-                     widget->priv->style);
-    }
-  G_GNUC_END_IGNORE_DEPRECATIONS;
-
 }
 
 static gboolean
@@ -9830,12 +9740,6 @@ gtk_widget_real_direction_changed (GtkWidget        *widget,
   gtk_widget_queue_resize (widget);
 }
 
-static void
-gtk_widget_real_style_set (GtkWidget *widget,
-                           GtkStyle  *previous_style)
-{
-}
-
 typedef struct {
   GtkWidget *previous_toplevel;
   GdkScreen *previous_screen;
@@ -12128,13 +12032,6 @@ gtk_widget_real_destroy (GtkWidget *object)
   gtk_grab_remove (widget);
 
   destroy_tick_callbacks (widget);
-
-  G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
-  if (priv->style)
-    g_object_unref (priv->style);
-  priv->style = gtk_widget_get_default_style ();
-  g_object_ref (priv->style);
-  G_GNUC_END_IGNORE_DEPRECATIONS;
 }
 
 static void
@@ -12146,8 +12043,6 @@ gtk_widget_finalize (GObject *object)
 
   gtk_grab_remove (widget);
 
-  g_clear_object (&priv->style);
-
   g_free (priv->name);
 
   g_clear_object (&priv->accessible);
@@ -16496,20 +16391,6 @@ gtk_widget_get_modifier_mask (GtkWidget         *widget,
                                        intent);
 }
 
-GtkStyle *
-_gtk_widget_get_style (GtkWidget *widget)
-{
-  return widget->priv->style;
-}
-
-void
-_gtk_widget_set_style (GtkWidget *widget,
-                       GtkStyle  *style)
-{
-  g_signal_emit (widget, widget_signals[STYLE_SET], 0, widget->priv->style);
-  widget->priv->style = style;
-}
-
 GtkActionMuxer *
 _gtk_widget_get_parent_muxer (GtkWidget *widget,
                               gboolean   create)
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index 65a832d..8d546cc 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -391,8 +391,6 @@ struct _GtkWidgetClass
                                GtkWidget        *previous_parent);
   void (* hierarchy_changed)   (GtkWidget        *widget,
                                GtkWidget        *previous_toplevel);
-  void (* style_set)          (GtkWidget        *widget,
-                               GtkStyle         *previous_style);
   void (* direction_changed)   (GtkWidget        *widget,
                                GtkTextDirection  previous_direction);
   void (* grab_notify)         (GtkWidget        *widget,
diff --git a/gtk/gtkwidgetprivate.h b/gtk/gtkwidgetprivate.h
index 4e26280..ea5dcd7 100644
--- a/gtk/gtkwidgetprivate.h
+++ b/gtk/gtkwidgetprivate.h
@@ -132,7 +132,6 @@ struct _GtkWidgetPrivate
    * along with graphics contexts used to draw with and
    * the font to use for text.
    */
-  GtkStyle *style;
   GtkCssNode *cssnode;
   GtkStyleContext *context;
 
@@ -248,9 +247,6 @@ void              _gtk_widget_buildable_finish_accelerator (GtkWidget *widget,
                                                             GtkWidget *toplevel,
                                                             gpointer   user_data);
 GtkStyleContext * _gtk_widget_peek_style_context           (GtkWidget *widget);
-GtkStyle *        _gtk_widget_get_style                    (GtkWidget *widget);
-void              _gtk_widget_set_style                    (GtkWidget *widget,
-                                                            GtkStyle  *style);
 gboolean          _gtk_widget_supports_clip                (GtkWidget *widget);
 void              _gtk_widget_set_simple_clip              (GtkWidget *widget,
                                                             GtkAllocation *content_clip);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]