[gtk+] types: Clean up gtkwidget.h includes



commit 7844e8089c53ce3b4e209420f93a07b5ef3f7293
Author: Benjamin Otte <otte redhat com>
Date:   Sat Mar 3 19:22:22 2012 +0100

    types: Clean up gtkwidget.h includes
    
    In particular gtksettings.h and gtkstylecontext.h needed to be included
    in lots of places now.
    
    Also, I order the includes alphabetically in a bunch of headers.

 gtk/deprecated/gtkhsv.c             |    1 +
 gtk/deprecated/gtktearoffmenuitem.c |    1 +
 gtk/gtkapplicationwindow.c          |    1 +
 gtk/gtkassistant.c                  |    1 +
 gtk/gtkbindings.c                   |    1 +
 gtk/gtkcellrendererspinner.c        |    3 ++-
 gtk/gtkcoloreditor.c                |    1 +
 gtk/gtkcolorplaneprivate.h          |    1 +
 gtk/gtkdialog.c                     |    1 +
 gtk/gtkdrawingarea.c                |    1 +
 gtk/gtkfilechooserbutton.c          |    1 +
 gtk/gtkfilechooserdefault.c         |    5 +++--
 gtk/gtkiconfactory.h                |    9 +--------
 gtk/gtkimmulticontext.c             |    5 +++--
 gtk/gtkmenuitem.c                   |    1 +
 gtk/gtkpathbar.c                    |    9 +++++----
 gtk/gtkseparatormenuitem.c          |    3 +++
 gtk/gtksettings.h                   |    7 +------
 gtk/gtkspinner.c                    |    7 ++++---
 gtk/gtkstylecontext.c               |    1 +
 gtk/gtkstylecontext.h               |    6 ++----
 gtk/gtktooltip.c                    |    2 ++
 gtk/gtktreeview.c                   |    1 +
 gtk/gtktypes.h                      |   13 +++++++++++--
 gtk/gtkwidget.h                     |    3 ---
 25 files changed, 50 insertions(+), 35 deletions(-)
---
diff --git a/gtk/deprecated/gtkhsv.c b/gtk/deprecated/gtkhsv.c
index f3befe4..ad09515 100644
--- a/gtk/deprecated/gtkhsv.c
+++ b/gtk/deprecated/gtkhsv.c
@@ -37,6 +37,7 @@
 #include "gtkhsv.h"
 #include "gtkbindings.h"
 #include "gtkmarshalers.h"
+#include "gtkstylecontext.h"
 #include "gtktypebuiltins.h"
 #include "gtkintl.h"
 
diff --git a/gtk/deprecated/gtktearoffmenuitem.c b/gtk/deprecated/gtktearoffmenuitem.c
index 99f5f09..d5528bb 100644
--- a/gtk/deprecated/gtktearoffmenuitem.c
+++ b/gtk/deprecated/gtktearoffmenuitem.c
@@ -26,6 +26,7 @@
 
 #include "gtkmenuprivate.h"
 #include "gtkmenuitemprivate.h"
+#include "gtkstylecontext.h"
 #include "gtktearoffmenuitem.h"
 #include "gtkintl.h"
 
diff --git a/gtk/gtkapplicationwindow.c b/gtk/gtkapplicationwindow.c
index c863b56..04b9471 100644
--- a/gtk/gtkapplicationwindow.c
+++ b/gtk/gtkapplicationwindow.c
@@ -28,6 +28,7 @@
 #include "gtkaccelgroup.h"
 #include "gtkaccelmap.h"
 #include "gtkintl.h"
+#include "gtksettings.h"
 
 #include <gdk/gdk.h>
 #ifdef GDK_WINDOWING_X11
diff --git a/gtk/gtkassistant.c b/gtk/gtkassistant.c
index cd78b6c..18313e6 100644
--- a/gtk/gtkassistant.c
+++ b/gtk/gtkassistant.c
@@ -66,6 +66,7 @@
 #include "gtknotebook.h"
 #include "gtkimage.h"
 #include "gtklabel.h"
+#include "gtksettings.h"
 #include "gtksizegroup.h"
 #include "gtksizerequest.h"
 #include "gtkstock.h"
diff --git a/gtk/gtkbindings.c b/gtk/gtkbindings.c
index da50fde..4cbbeaf 100644
--- a/gtk/gtkbindings.c
+++ b/gtk/gtkbindings.c
@@ -31,6 +31,7 @@
 
 #include "gtkbindingsprivate.h"
 #include "gtkkeyhash.h"
+#include "gtkstylecontext.h"
 #include "gtkwidget.h"
 #include "gtkintl.h"
 
diff --git a/gtk/gtkcellrendererspinner.c b/gtk/gtkcellrendererspinner.c
index 1aedcca..e6a4159 100644
--- a/gtk/gtkcellrendererspinner.c
+++ b/gtk/gtkcellrendererspinner.c
@@ -30,8 +30,9 @@
 #include "gtkcellrendererspinner.h"
 #include "gtkiconfactory.h"
 #include "gtkicontheme.h"
-#include "gtktypebuiltins.h"
 #include "gtkintl.h"
+#include "gtksettings.h"
+#include "gtktypebuiltins.h"
 
 #undef GDK_DEPRECATED
 #undef GDK_DEPRECATED_FOR
diff --git a/gtk/gtkcoloreditor.c b/gtk/gtkcoloreditor.c
index 4947e72..8cbbf21 100644
--- a/gtk/gtkcoloreditor.c
+++ b/gtk/gtkcoloreditor.c
@@ -39,6 +39,7 @@
 #include "gtklabel.h"
 #include "gtkspinbutton.h"
 #include "gtkintl.h"
+#include "gtkstylecontext.h"
 
 #include <math.h>
 
diff --git a/gtk/gtkcolorplaneprivate.h b/gtk/gtkcolorplaneprivate.h
index 34bf2ad..560e892 100644
--- a/gtk/gtkcolorplaneprivate.h
+++ b/gtk/gtkcolorplaneprivate.h
@@ -22,6 +22,7 @@
 #ifndef __GTK_COLOR_PLANE_H__
 #define __GTK_COLOR_PLANE_H__
 
+#include <gtk/gtkadjustment.h>
 #include <gtk/gtkdrawingarea.h>
 
 G_BEGIN_DECLS
diff --git a/gtk/gtkdialog.c b/gtk/gtkdialog.c
index 452a468..87b46a3 100644
--- a/gtk/gtkdialog.c
+++ b/gtk/gtkdialog.c
@@ -39,6 +39,7 @@
 #include "gtkbindings.h"
 #include "gtkprivate.h"
 #include "gtkbuildable.h"
+#include "gtksettings.h"
 
 /**
  * SECTION:gtkdialog
diff --git a/gtk/gtkdrawingarea.c b/gtk/gtkdrawingarea.c
index 1f721b5..912992b 100644
--- a/gtk/gtkdrawingarea.c
+++ b/gtk/gtkdrawingarea.c
@@ -25,6 +25,7 @@
 #include "config.h"
 #include "gtkdrawingarea.h"
 #include "gtkintl.h"
+#include "gtkstylecontext.h"
 
 
 /**
diff --git a/gtk/gtkfilechooserbutton.c b/gtk/gtkfilechooserbutton.c
index 002fea5..d1e2d2e 100644
--- a/gtk/gtkfilechooserbutton.c
+++ b/gtk/gtkfilechooserbutton.c
@@ -54,6 +54,7 @@
 
 #include "gtktypebuiltins.h"
 #include "gtkprivate.h"
+#include "gtksettings.h"
 
 
 /**
diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c
index 455c61c..7559d2d 100644
--- a/gtk/gtkfilechooserdefault.c
+++ b/gtk/gtkfilechooserdefault.c
@@ -39,7 +39,7 @@
 #include "gtkfilesystem.h"
 #include "gtkfilesystemmodel.h"
 #include "gtkframe.h"
-#include "gtkpaned.h"
+#include "gtkgrid.h"
 #include "gtkiconfactory.h"
 #include "gtkicontheme.h"
 #include "gtkimage.h"
@@ -49,6 +49,7 @@
 #include "gtkmarshalers.h"
 #include "gtkmessagedialog.h"
 #include "gtkmountoperation.h"
+#include "gtkpaned.h"
 #include "gtkpathbar.h"
 #include "gtkprivate.h"
 #include "gtkradiobutton.h"
@@ -56,10 +57,10 @@
 #include "gtkrecentmanager.h"
 #include "gtkscrolledwindow.h"
 #include "gtkseparatormenuitem.h"
+#include "gtksettings.h"
 #include "gtksizegroup.h"
 #include "gtksizerequest.h"
 #include "gtkstock.h"
-#include "gtkgrid.h"
 #include "gtktoolbar.h"
 #include "gtktoolbutton.h"
 #include "gtktooltip.h"
diff --git a/gtk/gtkiconfactory.h b/gtk/gtkiconfactory.h
index a40af42..8e49e62 100644
--- a/gtk/gtkiconfactory.h
+++ b/gtk/gtkiconfactory.h
@@ -30,9 +30,8 @@
 #define __GTK_ICON_FACTORY_H__
 
 #include <gdk/gdk.h>
-#include <gtk/gtksettings.h>
 #include <gtk/gtkenums.h>
-#include <gtk/gtkwidgetpath.h>
+#include <gtk/gtktypes.h>
 
 G_BEGIN_DECLS
 
@@ -50,12 +49,6 @@ 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/gtkimmulticontext.c b/gtk/gtkimmulticontext.c
index ada2bde..2b887b9 100644
--- a/gtk/gtkimmulticontext.c
+++ b/gtk/gtkimmulticontext.c
@@ -22,12 +22,13 @@
 
 #include "gtkimmulticontext.h"
 #include "gtkimmoduleprivate.h"
+#include "gtkintl.h"
 #include "gtklabel.h"
 #include "gtkmain.h"
+#include "gtkprivate.h"
 #include "gtkradiomenuitem.h"
 #include "gtkseparatormenuitem.h"
-#include "gtkintl.h"
-#include "gtkprivate.h"
+#include "gtksettings.h"
 
 
 /**
diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c
index 3d70ed6..5a7b166 100644
--- a/gtk/gtkmenuitem.c
+++ b/gtk/gtkmenuitem.c
@@ -40,6 +40,7 @@
 #include "gtkactivatable.h"
 #include "gtkwidgetprivate.h"
 #include "gtkintl.h"
+#include "gtksettings.h"
 #include "gtktypebuiltins.h"
 #include "a11y/gtkmenuitemaccessible.h"
 
diff --git a/gtk/gtkpathbar.c b/gtk/gtkpathbar.c
index d8b9f9e..101f884 100644
--- a/gtk/gtkpathbar.c
+++ b/gtk/gtkpathbar.c
@@ -22,17 +22,18 @@
 
 #include <string.h>
 
-#include "gtktogglebutton.h"
 #include "gtkarrow.h"
+#include "gtkbox.h"
 #include "gtkdnd.h"
+#include "gtkiconfactory.h"
+#include "gtkicontheme.h"
 #include "gtkimage.h"
 #include "gtkintl.h"
-#include "gtkicontheme.h"
-#include "gtkiconfactory.h"
 #include "gtklabel.h"
-#include "gtkbox.h"
 #include "gtkmain.h"
 #include "gtkmarshalers.h"
+#include "gtksettings.h"
+#include "gtktogglebutton.h"
 
 
 enum {
diff --git a/gtk/gtkseparatormenuitem.c b/gtk/gtkseparatormenuitem.c
index 0afdc09..da72129 100644
--- a/gtk/gtkseparatormenuitem.c
+++ b/gtk/gtkseparatormenuitem.c
@@ -23,8 +23,11 @@
  */
 
 #include "config.h"
+
 #include "gtkseparatormenuitem.h"
 
+#include "gtkstylecontext.h"
+
 /**
  * SECTION:gtkseparatormenuitem
  * @Short_description: A separator used in menus
diff --git a/gtk/gtksettings.h b/gtk/gtksettings.h
index 8ada711..4a33093 100644
--- a/gtk/gtksettings.h
+++ b/gtk/gtksettings.h
@@ -23,6 +23,7 @@
 #define __GTK_SETTINGS_H__
 
 #include <gdk/gdk.h>
+#include <gtk/gtktypes.h>
 
 G_BEGIN_DECLS
 
@@ -37,17 +38,11 @@ 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/gtkspinner.c b/gtk/gtkspinner.c
index ce336d8..532ed07 100644
--- a/gtk/gtkspinner.c
+++ b/gtk/gtkspinner.c
@@ -29,10 +29,11 @@
 
 #include "config.h"
 
-#include "gtkintl.h"
-#include "gtkaccessible.h"
-#include "gtkimage.h"
 #include "gtkspinner.h"
+
+#include "gtkimage.h"
+#include "gtkintl.h"
+#include "gtkstylecontext.h"
 #include "a11y/gtkspinneraccessible.h"
 
 
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c
index 5cbebec..a46be6f 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -36,6 +36,7 @@
 #include "gtkiconfactory.h"
 #include "gtkwidgetprivate.h"
 #include "gtkstyleproviderprivate.h"
+#include "gtksettings.h"
 
 /**
  * SECTION:gtkstylecontext
diff --git a/gtk/gtkstylecontext.h b/gtk/gtkstylecontext.h
index dc528ef..6572537 100644
--- a/gtk/gtkstylecontext.h
+++ b/gtk/gtkstylecontext.h
@@ -22,11 +22,10 @@
 #ifndef __GTK_STYLE_CONTEXT_H__
 #define __GTK_STYLE_CONTEXT_H__
 
-#include <glib-object.h>
+#include <gtk/gtkborder.h>
 #include <gtk/gtkcsssection.h>
 #include <gtk/gtkstyleprovider.h>
-#include <gtk/gtkwidgetpath.h>
-#include <gtk/gtkborder.h>
+#include <gtk/gtktypes.h>
 #include <atk/atk.h>
 
 G_BEGIN_DECLS
@@ -38,7 +37,6 @@ G_BEGIN_DECLS
 #define GTK_IS_STYLE_CONTEXT_CLASS(c)  (G_TYPE_CHECK_CLASS_TYPE    ((c), GTK_TYPE_STYLE_CONTEXT))
 #define GTK_STYLE_CONTEXT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS  ((o), GTK_TYPE_STYLE_CONTEXT, GtkStyleContextClass))
 
-typedef struct _GtkStyleContext GtkStyleContext;
 typedef struct _GtkStyleContextClass GtkStyleContextClass;
 typedef struct _GtkStyleContextPrivate GtkStyleContextPrivate;
 
diff --git a/gtk/gtktooltip.c b/gtk/gtktooltip.c
index 84c80e6..eaf94b8 100644
--- a/gtk/gtktooltip.c
+++ b/gtk/gtktooltip.c
@@ -30,7 +30,9 @@
 #include "gtklabel.h"
 #include "gtkimage.h"
 #include "gtkbox.h"
+#include "gtksettings.h"
 #include "gtksizerequest.h"
+#include "gtkstylecontext.h"
 #include "gtkwindowprivate.h"
 
 
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 0f47c07..c22eeb1 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -48,6 +48,7 @@
 #include "gtkstylecontextprivate.h"
 #include "gtktypebuiltins.h"
 #include "gtkmain.h"
+#include "gtksettings.h"
 #include "a11y/gtktreeviewaccessible.h"
 
 
diff --git a/gtk/gtktypes.h b/gtk/gtktypes.h
index 6755455..a144578 100644
--- a/gtk/gtktypes.h
+++ b/gtk/gtktypes.h
@@ -29,18 +29,27 @@
 #ifndef __GTK_TYPES_H__
 #define __GTK_TYPES_H__
 
-#include <gdk/gdk.h>
-
 G_BEGIN_DECLS
 
 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;
 typedef struct _GtkWidgetPath          GtkWidgetPath;
 typedef struct _GtkWindow              GtkWindow;
 
+
+typedef gboolean (*GtkRcPropertyParser) (const GParamSpec *pspec,
+                                         const GString    *rc_string,
+                                         GValue           *property_value);
+
 G_END_DECLS
 
 #endif /* __GTK_TYPES_H__ */
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index c234d4d..5a4ac4f 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -31,10 +31,7 @@
 
 #include <gdk/gdk.h>
 #include <gtk/gtkaccelgroup.h>
-#include <gtk/gtkadjustment.h>
 #include <gtk/gtkborder.h>
-#include <gtk/gtksettings.h>
-#include <gtk/gtkstylecontext.h>
 #include <gtk/gtktypes.h>
 #include <atk/atk.h>
 



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