[gtk+/wip/otte/gtk4: 118/118] Remove GtkThemingEngine



commit 237673adb001da3bcbe1453879e2a320dc808d06
Author: Timm Bäder <mail baedert org>
Date:   Wed Oct 5 20:26:08 2016 +0200

    Remove GtkThemingEngine
    
    As well as the corresponding GtkCssEngineValue used to parse it in css.

 docs/reference/gtk/gtk3-sections.txt      |   41 -
 gtk/Makefile.am                           |    2 -
 gtk/deprecated/Makefile.inc               |    2 -
 gtk/deprecated/gtkstyleproperties.c       |    1 -
 gtk/deprecated/gtkthemingengine.c         | 1209 -----------------------------
 gtk/deprecated/gtkthemingengine.h         |  292 -------
 gtk/gtk.h                                 |    1 -
 gtk/gtkcssarrayvalue.c                    |    1 -
 gtk/gtkcsscustomproperty.c                |    6 +-
 gtk/gtkcssenginevalue.c                   |  140 ----
 gtk/gtkcssenginevalueprivate.h            |   37 -
 gtk/gtkcssstylefuncs.c                    |   68 --
 gtk/gtkcssstylepropertyimpl.c             |   40 -
 gtk/gtkcsstypesprivate.h                  |    1 -
 gtk/gtkstylecontext.h                     |   12 -
 testsuite/css/parser/deprecated.css       |    1 -
 testsuite/css/parser/deprecated.errors    |    1 -
 testsuite/css/parser/deprecated.ref.css   |    1 -
 testsuite/css/parser/value-inherit.css    |    1 -
 testsuite/css/parser/value-inherit.errors |    1 -
 testsuite/css/parser/value-initial.css    |    1 -
 testsuite/css/parser/value-initial.errors |    1 -
 testsuite/css/parser/value-none.css       |    1 -
 testsuite/css/parser/value-none.errors    |    3 +-
 testsuite/css/parser/value-none.ref.css   |    1 -
 25 files changed, 2 insertions(+), 1863 deletions(-)
---
diff --git a/docs/reference/gtk/gtk3-sections.txt b/docs/reference/gtk/gtk3-sections.txt
index 57fdbd6..42caf16 100644
--- a/docs/reference/gtk/gtk3-sections.txt
+++ b/docs/reference/gtk/gtk3-sections.txt
@@ -5920,47 +5920,6 @@ gtk_css_section_get_type
 </SECTION>
 
 <SECTION>
-<FILE>gtkthemingengine</FILE>
-<TITLE>GtkThemingEngine</TITLE>
-GtkThemingEngineClass
-GtkThemingEngine
-gtk_theming_engine_get
-gtk_theming_engine_get_direction
-gtk_theming_engine_get_junction_sides
-gtk_theming_engine_get_path
-gtk_theming_engine_get_property
-gtk_theming_engine_get_screen
-gtk_theming_engine_get_state
-gtk_theming_engine_get_style
-gtk_theming_engine_get_style_property
-gtk_theming_engine_get_style_valist
-gtk_theming_engine_get_valist
-gtk_theming_engine_get_color
-gtk_theming_engine_get_background_color
-gtk_theming_engine_get_border_color
-gtk_theming_engine_get_border
-gtk_theming_engine_get_padding
-gtk_theming_engine_get_margin
-gtk_theming_engine_get_font
-gtk_theming_engine_has_class
-gtk_theming_engine_has_region
-gtk_theming_engine_lookup_color
-gtk_theming_engine_state_is_running
-gtk_theming_engine_load
-gtk_theming_engine_register_property
-<SUBSECTION Standard>
-GTK_THEMING_ENGINE
-GTK_THEMING_ENGINE_CLASS
-GTK_THEMING_ENGINE_GET_CLASS
-GTK_IS_THEMING_ENGINE
-GTK_IS_THEMING_ENGINE_CLASS
-<SUBSECTION Private>
-GtkThemingEnginePrivate
-GTK_TYPE_THEMING_ENGINE
-gtk_theming_engine_get_type
-</SECTION>
-
-<SECTION>
 <FILE>gtksymboliccolor</FILE>
 <TITLE>GtkSymbolicColor</TITLE>
 GtkSymbolicColor
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index 2e50ce6..74cef42 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -407,7 +407,6 @@ gtk_private_h_sources =             \
        gtkcsscustompropertyprivate.h   \
        gtkcssdimensionvalueprivate.h   \
        gtkcsseasevalueprivate.h        \
-       gtkcssenginevalueprivate.h      \
        gtkcssenumvalueprivate.h        \
        gtkcssgadgetprivate.h           \
        gtkcssiconthemevalueprivate.h   \
@@ -678,7 +677,6 @@ gtk_base_c_sources =                \
        gtkcssdimensionvalue.c  \
        gtkcsseasevalue.c       \
        gtkcssenumvalue.c       \
-       gtkcssenginevalue.c     \
        gtkcssgadget.c          \
        gtkcssiconthemevalue.c  \
        gtkcssimage.c           \
diff --git a/gtk/deprecated/Makefile.inc b/gtk/deprecated/Makefile.inc
index beefc36..75d7ac6 100644
--- a/gtk/deprecated/Makefile.inc
+++ b/gtk/deprecated/Makefile.inc
@@ -10,7 +10,6 @@ deprecated_h_sources =                        \
        deprecated/gtkstyleproperties.h \
        deprecated/gtksymboliccolor.h   \
        deprecated/gtktable.h           \
-       deprecated/gtkthemingengine.h   \
        deprecated/gtktoggleaction.h    \
        deprecated/gtkuimanager.h
 
@@ -31,6 +30,5 @@ deprecated_c_sources =                        \
        deprecated/gtkstyleproperties.c \
        deprecated/gtksymboliccolor.c   \
        deprecated/gtktable.c           \
-       deprecated/gtkthemingengine.c   \
        deprecated/gtktoggleaction.c    \
        deprecated/gtkuimanager.c
diff --git a/gtk/deprecated/gtkstyleproperties.c b/gtk/deprecated/gtkstyleproperties.c
index 30aac87..36f49a8 100644
--- a/gtk/deprecated/gtkstyleproperties.c
+++ b/gtk/deprecated/gtkstyleproperties.c
@@ -33,7 +33,6 @@
 #include "gtkstyleproviderprivate.h"
 #include "gtkintl.h"
 
-#include "deprecated/gtkthemingengine.h"
 #include "deprecated/gtkgradient.h"
 #include "deprecated/gtksymboliccolorprivate.h"
 
diff --git a/gtk/gtk.h b/gtk/gtk.h
index d20ea12..9eef211 100644
--- a/gtk/gtk.h
+++ b/gtk/gtk.h
@@ -255,7 +255,6 @@
 #include <gtk/deprecated/gtkstyleproperties.h>
 #include <gtk/deprecated/gtksymboliccolor.h>
 #include <gtk/deprecated/gtktable.h>
-#include <gtk/deprecated/gtkthemingengine.h>
 #include <gtk/deprecated/gtktoggleaction.h>
 #include <gtk/deprecated/gtkuimanager.h>
 #endif /* GTK_DISABLE_DEPRECATED */
diff --git a/gtk/gtkcssarrayvalue.c b/gtk/gtkcssarrayvalue.c
index d564637..edda886 100644
--- a/gtk/gtkcssarrayvalue.c
+++ b/gtk/gtkcssarrayvalue.c
@@ -285,7 +285,6 @@ gtk_css_value_array_transition (GtkCssValue *start,
     case GTK_CSS_PROPERTY_BORDER_IMAGE_REPEAT:
     case GTK_CSS_PROPERTY_BORDER_IMAGE_SLICE:
     case GTK_CSS_PROPERTY_BORDER_IMAGE_WIDTH:
-    case GTK_CSS_PROPERTY_ENGINE:
     default:
       /* keep all values that are not arrays here, so we get a warning if we ever turn them
        * into arrays and start animating them. */
diff --git a/gtk/gtkcsscustomproperty.c b/gtk/gtkcsscustomproperty.c
index bc9b8d3..4d3d7e3 100644
--- a/gtk/gtkcsscustomproperty.c
+++ b/gtk/gtkcsscustomproperty.c
@@ -27,8 +27,6 @@
 #include "gtkcsstypedvalueprivate.h"
 #include "deprecated/gtkstylepropertiesprivate.h"
 
-#include "deprecated/gtkthemingengine.h"
-
 #include "deprecated/gtksymboliccolor.h"
 
 G_DEFINE_TYPE (GtkCssCustomProperty, _gtk_css_custom_property, GTK_TYPE_CSS_STYLE_PROPERTY)
@@ -100,9 +98,7 @@ gtk_css_custom_property_create_initial_value (GParamSpec *pspec)
 
 
 G_GNUC_BEGIN_IGNORE_DEPRECATIONS
-  if (pspec->value_type == GTK_TYPE_THEMING_ENGINE)
-    g_value_set_object (&value, gtk_theming_engine_load (NULL));
-  else if (pspec->value_type == PANGO_TYPE_FONT_DESCRIPTION)
+  if (pspec->value_type == PANGO_TYPE_FONT_DESCRIPTION)
     g_value_take_boxed (&value, pango_font_description_from_string ("Sans 10"));
   else if (pspec->value_type == GDK_TYPE_RGBA)
     {
diff --git a/gtk/gtkcssstylefuncs.c b/gtk/gtkcssstylefuncs.c
index 4668631..0a379ea 100644
--- a/gtk/gtkcssstylefuncs.c
+++ b/gtk/gtkcssstylefuncs.c
@@ -38,7 +38,6 @@
 #include "gtktypebuiltins.h"
 #include "gtkcsswin32sizevalueprivate.h"
 
-#include "deprecated/gtkthemingengine.h"
 #include "deprecated/gtkgradientprivate.h"
 #include "deprecated/gtksymboliccolorprivate.h"
 
@@ -552,63 +551,6 @@ string_value_print (const GValue *value,
 }
 
 static gboolean 
-theming_engine_value_parse (GtkCssParser *parser,
-                            GValue       *value)
-{
-  GtkThemingEngine *engine;
-  char *str;
-
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
-
-  if (_gtk_css_parser_try (parser, "none", TRUE))
-    {
-      g_value_set_object (value, gtk_theming_engine_load (NULL));
-      return TRUE;
-    }
-
-  str = _gtk_css_parser_try_ident (parser, TRUE);
-  if (str == NULL)
-    {
-      _gtk_css_parser_error (parser, "Expected a valid theme name");
-      return FALSE;
-    }
-
-  engine = gtk_theming_engine_load (str);
-
-  if (engine == NULL)
-    {
-      _gtk_css_parser_error (parser, "Theming engine '%s' not found", str);
-      g_free (str);
-      return FALSE;
-    }
-
-  g_value_set_object (value, engine);
-  g_free (str);
-  return TRUE;
-
-G_GNUC_END_IGNORE_DEPRECATIONS
-}
-
-static void
-theming_engine_value_print (const GValue *value,
-                            GString      *string)
-{
-  GtkThemingEngine *engine;
-  char *name;
-
-  engine = g_value_get_object (value);
-  if (engine == NULL)
-    g_string_append (string, "none");
-  else
-    {
-      /* XXX: gtk_theming_engine_get_name()? */
-      g_object_get (engine, "name", &name, NULL);
-      g_string_append (string, name ? name : "none");
-      g_free (name);
-    }
-}
-
-static gboolean 
 border_value_parse (GtkCssParser *parser,
                     GValue       *value)
 {
@@ -1021,16 +963,6 @@ gtk_css_style_funcs_init (void)
                                 string_value_parse,
                                 string_value_print,
                                 NULL);
-
-  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
-
-  register_conversion_function (GTK_TYPE_THEMING_ENGINE,
-                                theming_engine_value_parse,
-                                theming_engine_value_print,
-                                NULL);
-
-  G_GNUC_END_IGNORE_DEPRECATIONS
-
   register_conversion_function (GTK_TYPE_BORDER,
                                 border_value_parse,
                                 border_value_print,
diff --git a/gtk/gtkcssstylepropertyimpl.c b/gtk/gtkcssstylepropertyimpl.c
index 9fd506a..3190923 100644
--- a/gtk/gtkcssstylepropertyimpl.c
+++ b/gtk/gtkcssstylepropertyimpl.c
@@ -44,7 +44,6 @@
 #include "gtkcsscolorvalueprivate.h"
 #include "gtkcsscornervalueprivate.h"
 #include "gtkcsseasevalueprivate.h"
-#include "gtkcssenginevalueprivate.h"
 #include "gtkcssiconthemevalueprivate.h"
 #include "gtkcssimageprivate.h"
 #include "gtkcssimagebuiltinprivate.h"
@@ -62,8 +61,6 @@
 #include "gtkcsstransformvalueprivate.h"
 #include "gtktypebuiltins.h"
 
-#include "deprecated/gtkthemingengine.h"
-
 /*** REGISTRATION ***/
 
 typedef enum {
@@ -932,31 +929,6 @@ iteration_count_parse (GtkCssStyleProperty *property,
 }
 
 static GtkCssValue *
-engine_parse (GtkCssStyleProperty *property,
-              GtkCssParser        *parser)
-{
-  return _gtk_css_engine_value_parse (parser);
-}
-
-static void
-engine_query (GtkCssStyleProperty *property,
-              const GtkCssValue   *css_value,
-              GValue              *value)
-{
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
-  g_value_init (value, GTK_TYPE_THEMING_ENGINE);
-  g_value_set_object (value, _gtk_css_engine_value_get_engine (css_value));
-G_GNUC_END_IGNORE_DEPRECATIONS
-}
-
-static GtkCssValue *
-engine_assign (GtkCssStyleProperty *property,
-               const GValue        *value)
-{
-  return _gtk_css_engine_value_new (g_value_get_object (value));
-}
-
-static GtkCssValue *
 parse_margin (GtkCssStyleProperty *property,
               GtkCssParser        *parser)
 {
@@ -1827,18 +1799,6 @@ _gtk_css_style_property_init_properties (void)
                                          _gtk_css_icon_effect_value_new (GTK_CSS_ICON_EFFECT_NONE));
   _gtk_style_property_add_alias ("-gtk-icon-effect", "-gtk-image-effect");
 
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
-  gtk_css_style_property_register        ("engine",
-                                          GTK_CSS_PROPERTY_ENGINE,
-                                          GTK_TYPE_THEMING_ENGINE,
-                                          0,
-                                          0,
-                                          engine_parse,
-                                          engine_query,
-                                          engine_assign,
-                                          _gtk_css_engine_value_new (gtk_theming_engine_load (NULL)));
-G_GNUC_END_IGNORE_DEPRECATIONS
-
   /* Private property holding the binding sets */
   gtk_css_style_property_register        ("-gtk-key-bindings",
                                           GTK_CSS_PROPERTY_GTK_KEY_BINDINGS,
diff --git a/gtk/gtkcsstypesprivate.h b/gtk/gtkcsstypesprivate.h
index 59f392a..dfc1f5e 100644
--- a/gtk/gtkcsstypesprivate.h
+++ b/gtk/gtkcsstypesprivate.h
@@ -223,7 +223,6 @@ enum { /*< skip >*/
   GTK_CSS_PROPERTY_ANIMATION_FILL_MODE,
   GTK_CSS_PROPERTY_OPACITY,
   GTK_CSS_PROPERTY_ICON_EFFECT,
-  GTK_CSS_PROPERTY_ENGINE,
   GTK_CSS_PROPERTY_GTK_KEY_BINDINGS,
   GTK_CSS_PROPERTY_CARET_COLOR,
   GTK_CSS_PROPERTY_SECONDARY_CARET_COLOR,
diff --git a/gtk/gtkstylecontext.h b/gtk/gtkstylecontext.h
index 0ca572c..27519b6 100644
--- a/gtk/gtkstylecontext.h
+++ b/gtk/gtkstylecontext.h
@@ -1091,18 +1091,6 @@ GDK_AVAILABLE_IN_ALL
 void gtk_style_context_get_style          (GtkStyleContext *context,
                                            ...);
 
-GDK_DEPRECATED_IN_3_10
-GdkPixbuf  * gtk_icon_set_render_icon_pixbuf   (GtkIconSet      *icon_set,
-                                                GtkStyleContext *context,
-                                                GtkIconSize      size);
-GDK_DEPRECATED_IN_3_10
-cairo_surface_t  *
-gtk_icon_set_render_icon_surface               (GtkIconSet      *icon_set,
-                                               GtkStyleContext *context,
-                                               GtkIconSize      size,
-                                               int              scale,
-                                               GdkWindow       *for_window);
-
 GDK_AVAILABLE_IN_ALL
 void        gtk_style_context_set_screen (GtkStyleContext *context,
                                           GdkScreen       *screen);
diff --git a/testsuite/css/parser/deprecated.css b/testsuite/css/parser/deprecated.css
index 6b22436..abaea1f 100644
--- a/testsuite/css/parser/deprecated.css
+++ b/testsuite/css/parser/deprecated.css
@@ -1,5 +1,4 @@
 * {
-  engine: none;
   gtk-key-bindings: none;
   icon-shadow: none;
 }
diff --git a/testsuite/css/parser/deprecated.errors b/testsuite/css/parser/deprecated.errors
index 6d5cf34..37d68ef 100644
--- a/testsuite/css/parser/deprecated.errors
+++ b/testsuite/css/parser/deprecated.errors
@@ -1,3 +1,2 @@
 deprecated.css:2: error: GTK_CSS_PROVIDER_ERROR_DEPRECATED
 deprecated.css:3: error: GTK_CSS_PROVIDER_ERROR_DEPRECATED
-deprecated.css:4: error: GTK_CSS_PROVIDER_ERROR_DEPRECATED
diff --git a/testsuite/css/parser/deprecated.ref.css b/testsuite/css/parser/deprecated.ref.css
index a49d477..e438f16 100644
--- a/testsuite/css/parser/deprecated.ref.css
+++ b/testsuite/css/parser/deprecated.ref.css
@@ -1,5 +1,4 @@
 * {
   -gtk-icon-shadow: none;
   -gtk-key-bindings: none;
-  engine: none;
 }
diff --git a/testsuite/css/parser/value-inherit.css b/testsuite/css/parser/value-inherit.css
index 509c601..a00998d 100644
--- a/testsuite/css/parser/value-inherit.css
+++ b/testsuite/css/parser/value-inherit.css
@@ -27,7 +27,6 @@
   border-top-width: inherit;
   box-shadow: inherit;
   color: inherit;
-  engine: inherit;
   font-family: inherit;
   font-size: inherit;
   font-stretch: inherit;
diff --git a/testsuite/css/parser/value-inherit.errors b/testsuite/css/parser/value-inherit.errors
index 99adf8d..e69de29 100644
--- a/testsuite/css/parser/value-inherit.errors
+++ b/testsuite/css/parser/value-inherit.errors
@@ -1 +0,0 @@
-value-inherit.css:30: error: GTK_CSS_PROVIDER_ERROR_DEPRECATED
diff --git a/testsuite/css/parser/value-initial.css b/testsuite/css/parser/value-initial.css
index 1bf604f..349881c 100644
--- a/testsuite/css/parser/value-initial.css
+++ b/testsuite/css/parser/value-initial.css
@@ -27,7 +27,6 @@
   border-top-width: initial;
   box-shadow: initial;
   color: initial;
-  engine: initial;
   font-family: initial;
   font-size: initial;
   font-style: initial;
diff --git a/testsuite/css/parser/value-initial.errors b/testsuite/css/parser/value-initial.errors
index f1d23c5..e69de29 100644
--- a/testsuite/css/parser/value-initial.errors
+++ b/testsuite/css/parser/value-initial.errors
@@ -1 +0,0 @@
-value-initial.css:30: error: GTK_CSS_PROVIDER_ERROR_DEPRECATED
diff --git a/testsuite/css/parser/value-none.css b/testsuite/css/parser/value-none.css
index ed15d6e..4446c92 100644
--- a/testsuite/css/parser/value-none.css
+++ b/testsuite/css/parser/value-none.css
@@ -27,7 +27,6 @@
   border-top-width: none;
   box-shadow: none;
   color: none;
-  engine: none;
   font-family: none;
   font-size: none;
   font-style: none;
diff --git a/testsuite/css/parser/value-none.errors b/testsuite/css/parser/value-none.errors
index e0663e4..f3e07a3 100644
--- a/testsuite/css/parser/value-none.errors
+++ b/testsuite/css/parser/value-none.errors
@@ -18,7 +18,7 @@ value-none.css:24: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
 value-none.css:25: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
 value-none.css:27: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
 value-none.css:29: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
-value-none.css:30: error: GTK_CSS_PROVIDER_ERROR_DEPRECATED
+value-none.css:31: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
 value-none.css:32: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
 value-none.css:33: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
 value-none.css:34: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
@@ -30,4 +30,3 @@ value-none.css:39: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
 value-none.css:40: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
 value-none.css:41: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
 value-none.css:42: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
-value-none.css:43: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
diff --git a/testsuite/css/parser/value-none.ref.css b/testsuite/css/parser/value-none.ref.css
index e2a1578..80dbe10 100644
--- a/testsuite/css/parser/value-none.ref.css
+++ b/testsuite/css/parser/value-none.ref.css
@@ -7,7 +7,6 @@
   border-right-style: none;
   border-top-style: none;
   box-shadow: none;
-  engine: none;
   font-family: "none";
   text-shadow: none;
 }


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