From feece3c0bb2c17599f085263d0f483cc7f172724 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 2 Nov 2011 01:15:21 -0400 Subject: [PATCH] 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(-) rename gtk/{ => deprecated}/gtkrc.c (99%) rename gtk/{ => deprecated}/gtkrc.h (98%) rename gtk/{ => deprecated}/gtkstyle.c (100%) rename gtk/{ => deprecated}/gtkstyle.h (98%) diff --git a/gtk/Makefile.am b/gtk/Makefile.am index cbf5690a1..61a62f288 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 f0e384be0..6fdba2775 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 d2c4d601c..6fbb533a3 100644 --- a/gtk/a11y/gail.c +++ b/gtk/a11y/gail.c @@ -24,6 +24,14 @@ #include #include +#include +#include +#include +#include +#include +#include +#include +#include #include "gailutil.h" #include "gailmisc.h" diff --git a/gtk/a11y/gtktoplevelaccessible.c b/gtk/a11y/gtktoplevelaccessible.c index 4b17274b6..157abf015 100644 --- a/gtk/a11y/gtktoplevelaccessible.c +++ b/gtk/a11y/gtktoplevelaccessible.c @@ -23,6 +23,12 @@ #include #include +#include +#include +#include +#include +#include +#include #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 08e158343..a36d90d0c 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 7ff5bf3d1..6b48f40d0 100644 --- a/gtk/gtkrc.h +++ b/gtk/deprecated/gtkrc.h @@ -31,15 +31,12 @@ #ifndef __GTK_RC_H__ #define __GTK_RC_H__ - -#include +#include 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 f2b698104..ec7d6d38f 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 ff23de4c4..121df5e3c 100644 --- a/gtk/gtk.h +++ b/gtk/gtk.h @@ -151,7 +151,6 @@ #include #include #include -#include #include #include #include @@ -180,7 +179,6 @@ #include #include #include -#include #include #include #include @@ -231,6 +229,8 @@ #include #include #include +#include +#include #include #include #include diff --git a/gtk/gtkcellrendererspin.c b/gtk/gtkcellrendererspin.c index 0243f4701..ea0f7822b 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 ba25312f1..be23e1471 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 fe211e551..2f02a3e0f 100644 --- a/gtk/gtkiconfactory.h +++ b/gtk/gtkiconfactory.h @@ -32,7 +32,9 @@ #define __GTK_ICON_FACTORY_H__ #include -#include +#include +#include +#include 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 5d90596f2..32c9166db 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 71844bbdb..ae05d528c 100644 --- a/gtk/gtkicontheme.h +++ b/gtk/gtkicontheme.h @@ -26,7 +26,6 @@ #include #include -#include #include G_BEGIN_DECLS diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c index f94c0d198..fb494e5e0 100644 --- a/gtk/gtkmodules.c +++ b/gtk/gtkmodules.c @@ -23,7 +23,6 @@ #include #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 b0f9a509a..d45dfdd21 100644 --- a/gtk/gtkmodules.h +++ b/gtk/gtkmodules.h @@ -25,8 +25,7 @@ #ifndef __GTK_MODULES_H__ #define __GTK_MODULES_H__ -#include - +#include G_BEGIN_DECLS diff --git a/gtk/gtkmodulesprivate.h b/gtk/gtkmodulesprivate.h index dc8ea28e6..1bc248c51 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 77ea08ba0..8ccfbda43 100644 --- a/gtk/gtkplug.h +++ b/gtk/gtkplug.h @@ -30,13 +30,14 @@ #ifndef __GTK_PLUG_H__ #define __GTK_PLUG_H__ -#include +#include #ifdef GDK_WINDOWING_X11 #include #include +#include G_BEGIN_DECLS diff --git a/gtk/gtkprivate.h b/gtk/gtkprivate.h index c87ff21d9..53290ffc4 100644 --- a/gtk/gtkprivate.h +++ b/gtk/gtkprivate.h @@ -27,9 +27,8 @@ #ifndef __GTK_PRIVATE_H__ #define __GTK_PRIVATE_H__ -#include - -#include "gtksettings.h" +#include +#include G_BEGIN_DECLS diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c index 798cf88d1..4b8dd324c 100644 --- a/gtk/gtksettings.c +++ b/gtk/gtksettings.c @@ -23,6 +23,8 @@ #include +#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 afa1ff089..917b2877a 100644 --- a/gtk/gtksettings.h +++ b/gtk/gtksettings.h @@ -23,7 +23,7 @@ #ifndef __GTK_SETTINGS_H__ #define __GTK_SETTINGS_H__ -#include +#include 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 d7f6df693..304cb1db5 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 diff --git a/gtk/gtksocket.h b/gtk/gtksocket.h index 2415b142d..a8d6ebcdf 100644 --- a/gtk/gtksocket.h +++ b/gtk/gtksocket.h @@ -30,7 +30,8 @@ #ifndef __GTK_SOCKET_H__ #define __GTK_SOCKET_H__ -#include +#include +#include #ifdef GDK_WINDOWING_X11 diff --git a/gtk/gtkstyleprovider.h b/gtk/gtkstyleprovider.h index d996bb77f..755d6d705 100644 --- a/gtk/gtkstyleprovider.h +++ b/gtk/gtkstyleprovider.h @@ -25,10 +25,10 @@ #define __GTK_STYLE_PROVIDER_H__ #include -#include "gtkwidgetpath.h" -#include "gtkiconfactory.h" -#include "gtkstyleproperties.h" -#include "gtkenums.h" +#include +#include +#include +#include G_BEGIN_DECLS diff --git a/gtk/gtktestutils.c b/gtk/gtktestutils.c index 5bf7c8a95..aad6a966e 100644 --- a/gtk/gtktestutils.c +++ b/gtk/gtktestutils.c @@ -23,6 +23,12 @@ #include #include "gtkspinbutton.h" +#include "gtkmain.h" +#include "gtkbox.h" +#include "gtklabel.h" +#include "gtkbutton.h" +#include "gtktextview.h" +#include "gtkrange.h" #include #include diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h index 2da9ae362..ddf5aca12 100644 --- a/gtk/gtkwidget.h +++ b/gtk/gtkwidget.h @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include @@ -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 b4d224cc0..be0847a64 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) -- 2.43.2