[gtk+] Move gtkstyle and gtkrc to deprecated/



commit feece3c0bb2c17599f085263d0f483cc7f172724
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Nov 2 01:15:21 2011 -0400

    Move gtkstyle and gtkrc to deprecated/
    
    This required a somewhat more substantial include reshuffling.
    Some typedefs have been moved to gtkiconfactory.h and to
    gtksettings.h.

 gtk/Makefile.am                  |    8 ++++----
 gtk/a11y/Makefile.am             |    2 --
 gtk/a11y/gail.c                  |    8 ++++++++
 gtk/a11y/gtktoplevelaccessible.c |    6 ++++++
 gtk/{ => deprecated}/gtkrc.c     |    1 +
 gtk/{ => deprecated}/gtkrc.h     |    8 +-------
 gtk/{ => deprecated}/gtkstyle.c  |    0
 gtk/{ => deprecated}/gtkstyle.h  |   11 -----------
 gtk/gtk.h                        |    4 ++--
 gtk/gtkcellrendererspin.c        |    3 ++-
 gtk/gtkiconfactory.c             |    1 +
 gtk/gtkiconfactory.h             |   11 ++++++++++-
 gtk/gtkicontheme.c               |    1 +
 gtk/gtkicontheme.h               |    1 -
 gtk/gtkmodules.c                 |    1 -
 gtk/gtkmodules.h                 |    3 +--
 gtk/gtkmodulesprivate.h          |    2 ++
 gtk/gtkplug.h                    |    3 ++-
 gtk/gtkprivate.h                 |    5 ++---
 gtk/gtksettings.c                |    4 ++++
 gtk/gtksettings.h                |    8 +++++++-
 gtk/gtksocket.c                  |    1 +
 gtk/gtksocket.h                  |    3 ++-
 gtk/gtkstyleprovider.h           |    8 ++++----
 gtk/gtktestutils.c               |    6 ++++++
 gtk/gtkwidget.h                  |    4 +---
 gtk/tests/Makefile.am            |    2 --
 27 files changed, 68 insertions(+), 47 deletions(-)
---
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index cbf5690..61a62f2 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -151,6 +151,8 @@ deprecated_h_sources = 			\
 	deprecated/gtkhscale.h		\
 	deprecated/gtkhscrollbar.h	\
 	deprecated/gtkhseparator.h	\
+	deprecated/gtkstyle.h		\
+	deprecated/gtkrc.h		\
 	deprecated/gtktable.h		\
 	deprecated/gtktearoffmenuitem.h	\
 	deprecated/gtkvbbox.h		\
@@ -286,7 +288,6 @@ gtk_public_h_sources = 		\
 	gtkradiomenuitem.h	\
 	gtkradiotoolbutton.h	\
 	gtkrange.h		\
-	gtkrc.h			\
 	gtkrecentaction.h	\
 	gtkrecentchooser.h	\
 	gtkrecentchooserdialog.h \
@@ -316,7 +317,6 @@ gtk_public_h_sources = 		\
 	gtkstylecontext.h	\
 	gtkstyleproperties.h	\
 	gtkstyleprovider.h	\
-	gtkstyle.h		\
 	gtkswitch.h		\
 	gtksymboliccolor.h	\
 	gtktestutils.h		\
@@ -478,6 +478,8 @@ deprecated_c_sources = 			\
 	deprecated/gtkhscale.c		\
 	deprecated/gtkhscrollbar.c	\
 	deprecated/gtkhseparator.c	\
+	deprecated/gtkrc.c		\
+	deprecated/gtkstyle.c		\
 	deprecated/gtktable.c		\
 	deprecated/gtktearoffmenuitem.c	\
 	deprecated/gtkvbbox.c		\
@@ -638,7 +640,6 @@ gtk_base_c_sources = 		\
 	gtkradiotoolbutton.c	\
 	gtkrange.c		\
 	gtkrbtree.c		\
-	gtkrc.c			\
 	gtkrecentaction.c	\
 	gtkrecentchooserdefault.c \
 	gtkrecentchooserdialog.c \
@@ -672,7 +673,6 @@ gtk_base_c_sources = 		\
 	gtkstyleproperties.c	\
 	gtkstyleproperty.c	\
 	gtkstyleprovider.c	\
-	gtkstyle.c		\
 	gtkswitch.c		\
 	gtksymboliccolor.c	\
 	gtktestutils.c		\
diff --git a/gtk/a11y/Makefile.am b/gtk/a11y/Makefile.am
index f0e384b..6fdba27 100644
--- a/gtk/a11y/Makefile.am
+++ b/gtk/a11y/Makefile.am
@@ -109,8 +109,6 @@ libgail_la_CPPFLAGS = \
 	-I$(top_builddir)/gtk		\
 	-DGTK_VERSION=\"$(GTK_VERSION)\"\
 	-DGTK_COMPILATION		\
-	-DGDK_DISABLE_DEPRECATED	\
-	-DGTK_DISABLE_DEPRECATED	\
 	$(AM_CPPFLAGS)
 
 libgail_la_CFLAGS = \
diff --git a/gtk/a11y/gail.c b/gtk/a11y/gail.c
index d2c4d60..6fbb533 100644
--- a/gtk/a11y/gail.c
+++ b/gtk/a11y/gail.c
@@ -24,6 +24,14 @@
 
 #include <gdk/gdk.h>
 #include <gtk/gtkx.h>
+#include <gtk/gtkentry.h>
+#include <gtk/gtknotebook.h>
+#include <gtk/gtkmenuitem.h>
+#include <gtk/gtkmenu.h>
+#include <gtk/gtkmenubar.h>
+#include <gtk/gtktogglebutton.h>
+#include <gtk/gtkcombobox.h>
+#include <gtk/gtkaccessible.h>
 #include "gailutil.h"
 #include "gailmisc.h"
 
diff --git a/gtk/a11y/gtktoplevelaccessible.c b/gtk/a11y/gtktoplevelaccessible.c
index 4b17274..157abf0 100644
--- a/gtk/a11y/gtktoplevelaccessible.c
+++ b/gtk/a11y/gtktoplevelaccessible.c
@@ -23,6 +23,12 @@
 #include <string.h>
 
 #include <gtk/gtkx.h>
+#include <gtk/gtkeventbox.h>
+#include <gtk/gtkscrolledwindow.h>
+#include <gtk/gtkframe.h>
+#include <gtk/gtkmenu.h>
+#include <gtk/gtkmenuitem.h>
+#include <gtk/gtkbutton.h>
 
 #include "gtktoplevelaccessible.h"
 
diff --git a/gtk/gtkrc.c b/gtk/deprecated/gtkrc.c
similarity index 99%
rename from gtk/gtkrc.c
rename to gtk/deprecated/gtkrc.c
index 08e1583..a36d90d 100644
--- a/gtk/gtkrc.c
+++ b/gtk/deprecated/gtkrc.c
@@ -46,6 +46,7 @@
 
 #include "gtkversion.h"
 #include "gtkrc.h"
+#include "gtkstyle.h"
 #include "gtkbindings.h"
 #include "gtkintl.h"
 #include "gtkiconfactory.h"
diff --git a/gtk/gtkrc.h b/gtk/deprecated/gtkrc.h
similarity index 98%
rename from gtk/gtkrc.h
rename to gtk/deprecated/gtkrc.h
index 7ff5bf3..6b48f40 100644
--- a/gtk/gtkrc.h
+++ b/gtk/deprecated/gtkrc.h
@@ -31,15 +31,12 @@
 #ifndef __GTK_RC_H__
 #define __GTK_RC_H__
 
-
-#include <gtk/gtkstyle.h>
+#include <gtk/gtkwidget.h>
 
 G_BEGIN_DECLS
 
 /* Forward declarations */
-typedef struct _GtkIconFactory  GtkIconFactory;
 typedef struct _GtkRcContext    GtkRcContext;
-
 typedef struct _GtkRcStyleClass GtkRcStyleClass;
 
 #define GTK_TYPE_RC_STYLE              (gtk_rc_style_get_type ())
@@ -148,7 +145,6 @@ gboolean  _gtk_rc_match_widget_class     (GSList       *list,
                                           gchar        *path,
                                           gchar        *path_reversed);
 
-#if !defined(GTK_DISABLE_DEPRECATED) || defined(GTK_COMPILATION)
 GDK_DEPRECATED_FOR(GtkStyleContext)
 void      gtk_rc_add_default_file       (const gchar *filename);
 GDK_DEPRECATED_FOR(GtkStyleContext)
@@ -309,8 +305,6 @@ GDK_DEPRECATED_FOR(GtkStyleContext)
 guint     gtk_rc_parse_priority (GScanner            *scanner,
                                  GtkPathPriorityType *priority);
 
-#endif
-
 /* rc properties
  * (structure forward declared in gtkstyle.h)
  */
diff --git a/gtk/gtkstyle.c b/gtk/deprecated/gtkstyle.c
similarity index 100%
rename from gtk/gtkstyle.c
rename to gtk/deprecated/gtkstyle.c
diff --git a/gtk/gtkstyle.h b/gtk/deprecated/gtkstyle.h
similarity index 98%
rename from gtk/gtkstyle.h
rename to gtk/deprecated/gtkstyle.h
index f2b6981..ec7d6d3 100644
--- a/gtk/gtkstyle.h
+++ b/gtk/deprecated/gtkstyle.h
@@ -49,17 +49,9 @@ G_BEGIN_DECLS
 /* Some forward declarations needed to rationalize the header
  * files.
  */
-typedef struct _GtkStyle       GtkStyle;
 typedef struct _GtkStyleClass  GtkStyleClass;
 typedef struct _GtkThemeEngine GtkThemeEngine;
-typedef struct _GtkRcStyle     GtkRcStyle;
-typedef struct _GtkIconSet     GtkIconSet;
-typedef struct _GtkIconSource  GtkIconSource;
 typedef struct _GtkRcProperty  GtkRcProperty;
-typedef struct _GtkSettings    GtkSettings;
-typedef gboolean (*GtkRcPropertyParser) (const GParamSpec *pspec,
-                                         const GString    *rc_string,
-                                         GValue           *property_value);
 
 /**
  * GTK_STYLE_ATTACHED:
@@ -376,8 +368,6 @@ struct _GtkStyleClass
   void (*_gtk_reserved11) (void);
 };
 
-#if !defined(GTK_DISABLE_DEPRECATED) || defined(GTK_COMPILATION)
-
 GType     gtk_style_get_type                 (void) G_GNUC_CONST;
 GDK_DEPRECATED_FOR(GtkStyleContext)
 GtkStyle* gtk_style_new                      (void);
@@ -659,7 +649,6 @@ void gtk_style_get                (GtkStyle    *style,
                                    const gchar *first_property_name,
                                    ...) G_GNUC_NULL_TERMINATED;
 
-#endif
 
 /* --- private API --- */
 GtkStyle*     _gtk_style_new_for_path        (GdkScreen          *screen,
diff --git a/gtk/gtk.h b/gtk/gtk.h
index ff23de4..121df5e 100644
--- a/gtk/gtk.h
+++ b/gtk/gtk.h
@@ -151,7 +151,6 @@
 #include <gtk/gtkradiomenuitem.h>
 #include <gtk/gtkradiotoolbutton.h>
 #include <gtk/gtkrange.h>
-#include <gtk/gtkrc.h>
 #include <gtk/gtkrecentaction.h>
 #include <gtk/gtkrecentchooser.h>
 #include <gtk/gtkrecentchooserdialog.h>
@@ -180,7 +179,6 @@
 #include <gtk/gtkstylecontext.h>
 #include <gtk/gtkstyleproperties.h>
 #include <gtk/gtkstyleprovider.h>
-#include <gtk/gtkstyle.h>
 #include <gtk/gtkswitch.h>
 #include <gtk/gtksymboliccolor.h>
 #include <gtk/gtktextattributes.h>
@@ -231,6 +229,8 @@
 #include <gtk/deprecated/gtkhscale.h>
 #include <gtk/deprecated/gtkhscrollbar.h>
 #include <gtk/deprecated/gtkhseparator.h>
+#include <gtk/deprecated/gtkrc.h>
+#include <gtk/deprecated/gtkstyle.h>
 #include <gtk/deprecated/gtktable.h>
 #include <gtk/deprecated/gtktearoffmenuitem.h>
 #include <gtk/deprecated/gtkvbbox.h>
diff --git a/gtk/gtkcellrendererspin.c b/gtk/gtkcellrendererspin.c
index 0243f47..ea0f782 100644
--- a/gtk/gtkcellrendererspin.c
+++ b/gtk/gtkcellrendererspin.c
@@ -22,10 +22,11 @@
 
 #include "config.h"
 
+#include "gtkcellrendererspin.h"
+
 #include "gtkintl.h"
 #include "gtkprivate.h"
 #include "gtkspinbutton.h"
-#include "gtkcellrendererspin.h"
 
 
 /**
diff --git a/gtk/gtkiconfactory.c b/gtk/gtkiconfactory.c
index ba25312..be23e14 100644
--- a/gtk/gtkiconfactory.c
+++ b/gtk/gtkiconfactory.c
@@ -41,6 +41,7 @@
 #include "gtkbuildable.h"
 #include "gtkbuilderprivate.h"
 #include "gtktypebuiltins.h"
+#include "deprecated/gtkstyle.h"
 
 
 /**
diff --git a/gtk/gtkiconfactory.h b/gtk/gtkiconfactory.h
index fe211e5..2f02a3e 100644
--- a/gtk/gtkiconfactory.h
+++ b/gtk/gtkiconfactory.h
@@ -32,7 +32,9 @@
 #define __GTK_ICON_FACTORY_H__
 
 #include <gdk/gdk.h>
-#include <gtk/gtkrc.h>
+#include <gtk/gtksettings.h>
+#include <gtk/gtkenums.h>
+#include <gtk/gtkwidgetpath.h>
 
 G_BEGIN_DECLS
 
@@ -46,9 +48,16 @@ G_BEGIN_DECLS
 #define GTK_TYPE_ICON_SET                  (gtk_icon_set_get_type ())
 #define GTK_TYPE_ICON_SOURCE               (gtk_icon_source_get_type ())
 
+typedef struct _GtkIconFactory              GtkIconFactory;
 typedef struct _GtkIconFactoryPrivate       GtkIconFactoryPrivate;
 typedef struct _GtkIconFactoryClass         GtkIconFactoryClass;
 
+typedef struct _GtkIconSet     GtkIconSet;
+typedef struct _GtkIconSource  GtkIconSource;
+
+typedef struct _GtkStyle               GtkStyle;
+typedef struct _GtkRcStyle             GtkRcStyle;
+
 struct _GtkIconFactory
 {
   GObject parent_instance;
diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c
index 5d90596..32c9166 100644
--- a/gtk/gtkicontheme.c
+++ b/gtk/gtkicontheme.c
@@ -48,6 +48,7 @@
 #include "gtknumerableiconprivate.h"
 #include "gtksettings.h"
 #include "gtkprivate.h"
+#include "deprecated/gtkstyle.h"
 
 
 /**
diff --git a/gtk/gtkicontheme.h b/gtk/gtkicontheme.h
index 71844bb..ae05d52 100644
--- a/gtk/gtkicontheme.h
+++ b/gtk/gtkicontheme.h
@@ -26,7 +26,6 @@
 
 #include <gdk-pixbuf/gdk-pixbuf.h>
 #include <gdk/gdk.h>
-#include <gtk/gtkstyle.h>
 #include <gtk/gtkstylecontext.h>
 
 G_BEGIN_DECLS
diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c
index f94c0d1..fb494e5 100644
--- a/gtk/gtkmodules.c
+++ b/gtk/gtkmodules.c
@@ -23,7 +23,6 @@
 #include <string.h>
 
 #include "gtkmodules.h"
-#include "gtkmodulesprivate.h"
 #include "gtksettings.h"
 #include "gtkdebug.h"
 #include "gtkprivate.h"
diff --git a/gtk/gtkmodules.h b/gtk/gtkmodules.h
index b0f9a50..d45dfdd 100644
--- a/gtk/gtkmodules.h
+++ b/gtk/gtkmodules.h
@@ -25,8 +25,7 @@
 #ifndef __GTK_MODULES_H__
 #define __GTK_MODULES_H__
 
-#include <gtk/gtksettings.h>
-
+#include <gdk/gdk.h>
 
 G_BEGIN_DECLS
 
diff --git a/gtk/gtkmodulesprivate.h b/gtk/gtkmodulesprivate.h
index dc8ea28..1bc248c 100644
--- a/gtk/gtkmodulesprivate.h
+++ b/gtk/gtkmodulesprivate.h
@@ -29,6 +29,8 @@
 
 G_BEGIN_DECLS
 
+#include "gtksettings.h"
+
 gchar  * _gtk_find_module              (const gchar  *name,
                                         const gchar  *type);
 gchar ** _gtk_get_module_path          (const gchar  *type);
diff --git a/gtk/gtkplug.h b/gtk/gtkplug.h
index 77ea08b..8ccfbda 100644
--- a/gtk/gtkplug.h
+++ b/gtk/gtkplug.h
@@ -30,13 +30,14 @@
 #ifndef __GTK_PLUG_H__
 #define __GTK_PLUG_H__
 
-#include <gtk/gtk.h>
+#include <gdk/gdk.h>
 
 #ifdef GDK_WINDOWING_X11
 
 #include <gdk/gdkx.h>
 
 #include <gtk/gtksocket.h>
+#include <gtk/gtkwindow.h>
 
 
 G_BEGIN_DECLS
diff --git a/gtk/gtkprivate.h b/gtk/gtkprivate.h
index c87ff21..53290ff 100644
--- a/gtk/gtkprivate.h
+++ b/gtk/gtkprivate.h
@@ -27,9 +27,8 @@
 #ifndef __GTK_PRIVATE_H__
 #define __GTK_PRIVATE_H__
 
-#include <glib.h>
-
-#include "gtksettings.h"
+#include <glib-object.h>
+#include <gdk/gdk.h>
 
 G_BEGIN_DECLS
 
diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c
index 798cf88..4b8dd32 100644
--- a/gtk/gtksettings.c
+++ b/gtk/gtksettings.c
@@ -23,6 +23,8 @@
 
 #include <string.h>
 
+#include "gtksettings.h"
+
 #include "gtkmodules.h"
 #include "gtkmodulesprivate.h"
 #include "gtksettingsprivate.h"
@@ -43,6 +45,8 @@
 #include "quartz/gdkquartz.h"
 #endif
 
+#include "deprecated/gtkrc.h"
+
 
 /**
  * SECTION:gtksettings
diff --git a/gtk/gtksettings.h b/gtk/gtksettings.h
index afa1ff0..917b287 100644
--- a/gtk/gtksettings.h
+++ b/gtk/gtksettings.h
@@ -23,7 +23,7 @@
 #ifndef __GTK_SETTINGS_H__
 #define __GTK_SETTINGS_H__
 
-#include <gtk/gtkrc.h>
+#include <gdk/gdk.h>
 
 G_BEGIN_DECLS
 
@@ -38,11 +38,17 @@ G_BEGIN_DECLS
 
 
 /* --- typedefs --- */
+typedef struct _GtkSettings GtkSettings;
 typedef struct _GtkSettingsPrivate GtkSettingsPrivate;
 typedef struct _GtkSettingsClass GtkSettingsClass;
 typedef struct _GtkSettingsValue GtkSettingsValue;
 
 
+typedef gboolean (*GtkRcPropertyParser) (const GParamSpec *pspec,
+                                         const GString    *rc_string,
+                                         GValue           *property_value);
+
+
 /* --- structures --- */
 struct _GtkSettings
 {
diff --git a/gtk/gtksocket.c b/gtk/gtksocket.c
index d7f6df6..304cb1d 100644
--- a/gtk/gtksocket.c
+++ b/gtk/gtksocket.c
@@ -38,6 +38,7 @@
 #include "gtkdnd.h"
 #include "gtkdebug.h"
 #include "gtkintl.h"
+#include "gtkmain.h"
 #include "gtkwidgetprivate.h"
 
 #include <gdk/gdkx.h>
diff --git a/gtk/gtksocket.h b/gtk/gtksocket.h
index 2415b14..a8d6ebc 100644
--- a/gtk/gtksocket.h
+++ b/gtk/gtksocket.h
@@ -30,7 +30,8 @@
 #ifndef __GTK_SOCKET_H__
 #define __GTK_SOCKET_H__
 
-#include <gtk/gtk.h>
+#include <gdk/gdk.h>
+#include <gtk/gtkwindow.h>
 
 #ifdef GDK_WINDOWING_X11
 
diff --git a/gtk/gtkstyleprovider.h b/gtk/gtkstyleprovider.h
index d996bb7..755d6d7 100644
--- a/gtk/gtkstyleprovider.h
+++ b/gtk/gtkstyleprovider.h
@@ -25,10 +25,10 @@
 #define __GTK_STYLE_PROVIDER_H__
 
 #include <glib-object.h>
-#include "gtkwidgetpath.h"
-#include "gtkiconfactory.h"
-#include "gtkstyleproperties.h"
-#include "gtkenums.h"
+#include <gtk/gtkwidgetpath.h>
+#include <gtk/gtkiconfactory.h>
+#include <gtk/gtkstyleproperties.h>
+#include <gtk/gtkenums.h>
 
 G_BEGIN_DECLS
 
diff --git a/gtk/gtktestutils.c b/gtk/gtktestutils.c
index 5bf7c8a..aad6a96 100644
--- a/gtk/gtktestutils.c
+++ b/gtk/gtktestutils.c
@@ -23,6 +23,12 @@
 
 #include <gtk/gtkx.h>
 #include "gtkspinbutton.h"
+#include "gtkmain.h"
+#include "gtkbox.h"
+#include "gtklabel.h"
+#include "gtkbutton.h"
+#include "gtktextview.h"
+#include "gtkrange.h"
 
 #include <locale.h>
 #include <string.h>
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index 2da9ae3..ddf5aca 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -34,7 +34,6 @@
 #include <gdk/gdk.h>
 #include <gtk/gtkaccelgroup.h>
 #include <gtk/gtkadjustment.h>
-#include <gtk/gtkstyle.h>
 #include <gtk/gtkborder.h>
 #include <gtk/gtksettings.h>
 #include <gtk/gtkstylecontext.h>
@@ -74,7 +73,6 @@ typedef struct _GtkClipboard	       GtkClipboard;
 typedef struct _GtkTooltip             GtkTooltip;
 typedef struct _GtkWindow              GtkWindow;
 
-
 /**
  * GtkAllocation:
  * @x: the X position of the widget's area relative to its parents allocation.
@@ -792,7 +790,7 @@ void         gtk_widget_override_cursor           (GtkWidget       *widget,
 
 void       gtk_widget_reset_style       (GtkWidget      *widget);
 
-#if !defined(GTK_DISABLE_DEPRECATED) || defined(GTK_COMPILATION)
+#ifndef GTK_DISABLE_DEPRECATED
 
 void        gtk_widget_style_attach               (GtkWidget     *widget);
 
diff --git a/gtk/tests/Makefile.am b/gtk/tests/Makefile.am
index b4d224c..be0847a 100644
--- a/gtk/tests/Makefile.am
+++ b/gtk/tests/Makefile.am
@@ -6,8 +6,6 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir)			\
 	-I$(top_builddir)/gdk		\
 	-I$(top_srcdir)/gdk		\
-	-DGDK_DISABLE_DEPRECATED	\
-	-DGTK_DISABLE_DEPRECATED	\
 	-DSRCDIR=\""$(abs_srcdir)"\"	\
 	$(GTK_DEBUG_FLAGS)		\
 	$(GTK_DEP_CFLAGS)



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