summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2018-02-08 14:39:45 +0100
committerBenjamin Otte <otte@redhat.com>2018-02-08 15:25:53 +0100
commitf08bc40fbb1afad9b538b065079a7766c44dc30a (patch)
treef95f8cb27b672024f6415bf7cf685f6ce30d7fbc
parent453a50dc95945430d0a4e3c4b40417854fdcce29 (diff)
downloadgtk+-f08bc40fbb1afad9b538b065079a7766c44dc30a.tar.gz
a11y: Don't include gtk.h
Also add missing includes and sort them for all the widgets that relied on that before.
-rw-r--r--gtk/a11y/gtkwidgetaccessible.h2
-rw-r--r--gtk/gtkcolorswatch.c20
-rw-r--r--gtk/gtkentry.c43
-rw-r--r--gtk/gtkentryprivate.h14
-rw-r--r--gtk/gtkimage.c10
-rw-r--r--gtk/gtklabel.c17
-rw-r--r--gtk/gtkprogressbar.c22
-rw-r--r--gtk/gtkrange.c19
-rw-r--r--gtk/gtkscale.c15
-rw-r--r--gtk/gtkspinbutton.c22
-rw-r--r--gtk/gtkswitch.c18
-rw-r--r--gtk/gtkwidget.c81
-rw-r--r--gtk/gtkwidgetprivate.h5
13 files changed, 163 insertions, 125 deletions
diff --git a/gtk/a11y/gtkwidgetaccessible.h b/gtk/a11y/gtkwidgetaccessible.h
index 37fd45bbdf..aa4aa8c38e 100644
--- a/gtk/a11y/gtkwidgetaccessible.h
+++ b/gtk/a11y/gtkwidgetaccessible.h
@@ -22,7 +22,7 @@
#error "Only <gtk/gtk-a11y.h> can be included directly."
#endif
-#include <gtk/gtk.h>
+#include <gtk/gtkaccessible.h>
G_BEGIN_DECLS
diff --git a/gtk/gtkcolorswatch.c b/gtk/gtkcolorswatch.c
index 9af9f8e4be..16347a048d 100644
--- a/gtk/gtkcolorswatch.c
+++ b/gtk/gtkcolorswatch.c
@@ -19,19 +19,27 @@
#include "gtkcolorswatchprivate.h"
+#include "gtkbox.h"
#include "gtkcolorchooserprivate.h"
+#include "gtkcssnodeprivate.h"
#include "gtkdnd.h"
+#include "gtkdragdest.h"
+#include "gtkdragsource.h"
+#include "gtkgesturelongpress.h"
+#include "gtkgesturemultipress.h"
+#include "gtkgesturesingle.h"
#include "gtkicontheme.h"
+#include "gtkimage.h"
+#include "gtkintl.h"
#include "gtkmain.h"
-#include "gtkmenu.h"
-#include "gtkmenuitem.h"
-#include "gtkmenushell.h"
+#include "gtkmodelbutton.h"
+#include "gtkpopover.h"
#include "gtkprivate.h"
-#include "gtkintl.h"
-#include "gtkcssnodeprivate.h"
#include "gtkroundedboxprivate.h"
-#include "gtkwidgetprivate.h"
+#include "gtksnapshot.h"
#include "gtkstylecontextprivate.h"
+#include "gtkwidgetprivate.h"
+
#include "a11y/gtkcolorswatchaccessibleprivate.h"
#include "gsk/gskroundedrectprivate.h"
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index e4699417aa..f943193761 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -28,51 +28,56 @@
#include "config.h"
-#include <string.h>
-
-#include <cairo-gobject.h>
+#include "gtkentryprivate.h"
+#include "gtkadjustment.h"
#include "gtkbindings.h"
+#include "gtkbox.h"
+#include "gtkbutton.h"
#include "gtkcelleditable.h"
+#include "gtkcelllayout.h"
+#include "gtkcssnodeprivate.h"
#include "gtkdebug.h"
#include "gtkdnd.h"
#include "gtkdndprivate.h"
-#include "gtkentry.h"
+#include "gtkemojichooser.h"
#include "gtkentrybuffer.h"
+#include "gtkgesturedrag.h"
+#include "gtkgesturemultipress.h"
+#include "gtkgesturesingle.h"
+#include "gtkimageprivate.h"
#include "gtkimcontextsimple.h"
#include "gtkimmulticontext.h"
#include "gtkintl.h"
#include "gtklabel.h"
+#include "gtkmagnifierprivate.h"
#include "gtkmain.h"
#include "gtkmarshalers.h"
#include "gtkmenu.h"
#include "gtkmenuitem.h"
#include "gtkpango.h"
+#include "gtkpopover.h"
+#include "gtkprivate.h"
+#include "gtkprogressbar.h"
#include "gtkseparatormenuitem.h"
#include "gtkselection.h"
#include "gtksettings.h"
+#include "gtksnapshot.h"
+#include "gtkstylecontextprivate.h"
+#include "gtktexthandleprivate.h"
#include "gtktextutil.h"
-#include "gtkwindow.h"
-#include "gtktreeview.h"
+#include "gtktooltip.h"
#include "gtktreeselection.h"
+#include "gtktreeview.h"
#include "gtktypebuiltins.h"
-#include "gtkprivate.h"
-#include "gtkentryprivate.h"
-#include "gtkcelllayout.h"
-#include "gtktooltip.h"
-#include "gtkicontheme.h"
#include "gtkwidgetprivate.h"
-#include "gtkstylecontextprivate.h"
-#include "gtktexthandleprivate.h"
-#include "gtkpopover.h"
-#include "gtktoolbar.h"
-#include "gtkmagnifierprivate.h"
-#include "gtkcssnodeprivate.h"
-#include "gtkimageprivate.h"
-#include "gtkemojichooser.h"
+#include "gtkwindow.h"
#include "a11y/gtkentryaccessible.h"
+#include <cairo-gobject.h>
+#include <string.h>
+
#include "fallback-c89.c"
/**
diff --git a/gtk/gtkentryprivate.h b/gtk/gtkentryprivate.h
index f4be18d0e6..0d1e8494e7 100644
--- a/gtk/gtkentryprivate.h
+++ b/gtk/gtkentryprivate.h
@@ -18,13 +18,13 @@
#ifndef __GTK_ENTRY_PRIVATE_H__
#define __GTK_ENTRY_PRIVATE_H__
-#include <gtk/gtktreeviewcolumn.h>
-#include <gtk/gtktreemodelfilter.h>
-#include <gtk/gtkliststore.h>
-#include <gtk/gtkentrycompletion.h>
-#include <gtk/gtkentry.h>
-#include <gtk/gtkspinbutton.h>
-#include <gtk/gtkeventcontrollermotion.h>
+#include "gtkentry.h"
+
+#include "gtkentrycompletion.h"
+#include "gtkeventcontrollermotion.h"
+#include "gtkliststore.h"
+#include "gtktreemodelfilter.h"
+#include "gtktreeviewcolumn.h"
G_BEGIN_DECLS
diff --git a/gtk/gtkimage.c b/gtk/gtkimage.c
index 807a70c98e..31ae0a4d38 100644
--- a/gtk/gtkimage.c
+++ b/gtk/gtkimage.c
@@ -24,21 +24,23 @@
#include "config.h"
-#include <math.h>
-#include <string.h>
-#include <cairo-gobject.h>
+#include "gtkimageprivate.h"
#include "gtkcssstylepropertyprivate.h"
#include "gtkiconhelperprivate.h"
-#include "gtkimageprivate.h"
#include "gtkicontheme.h"
#include "gtkintl.h"
#include "gtkprivate.h"
+#include "gtksnapshot.h"
#include "gtktypebuiltins.h"
#include "gtkwidgetprivate.h"
#include "a11y/gtkimageaccessible.h"
+#include <math.h>
+#include <string.h>
+#include <cairo-gobject.h>
+
/**
* SECTION:gtkimage
* @Short_description: A widget displaying an image
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index 2d39824f0a..33e978676a 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -24,17 +24,19 @@
#include "config.h"
-#include <math.h>
-#include <string.h>
-
-#include "gtklabel.h"
#include "gtklabelprivate.h"
+
#include "gtkbindings.h"
#include "gtkbuildable.h"
#include "gtkbuilderprivate.h"
+#include "gtkcssnodeprivate.h"
#include "gtkcssshadowsvalueprivate.h"
#include "gtkcssstylepropertyprivate.h"
#include "gtkdnd.h"
+#include "gtkeventcontrollermotion.h"
+#include "gtkgesturedrag.h"
+#include "gtkgesturemultipress.h"
+#include "gtkgesturesingle.h"
#include "gtkimage.h"
#include "gtkintl.h"
#include "gtkmain.h"
@@ -46,18 +48,19 @@
#include "gtkprivate.h"
#include "gtkseparatormenuitem.h"
#include "gtkshow.h"
+#include "gtksnapshot.h"
#include "gtkstylecontextprivate.h"
#include "gtktextutil.h"
#include "gtktooltip.h"
#include "gtktypebuiltins.h"
#include "gtkwidgetprivate.h"
#include "gtkwindow.h"
-#include "gtkcssnodeprivate.h"
-#include "gtkwidgetprivate.h"
-#include "gtkeventcontrollermotion.h"
#include "a11y/gtklabelaccessibleprivate.h"
+#include <math.h>
+#include <string.h>
+
/* this is in case rint() is not provided by the compiler,
* such as in the case of C89 compilers, like MSVC
*/
diff --git a/gtk/gtkprogressbar.c b/gtk/gtkprogressbar.c
index 73aab497c4..aff253c159 100644
--- a/gtk/gtkprogressbar.c
+++ b/gtk/gtkprogressbar.c
@@ -24,23 +24,25 @@
#include "config.h"
-#include <string.h>
-
#include "gtkprogressbar.h"
-#include "gtkorientableprivate.h"
-#include "gtkwidgetprivate.h"
-#include "gtkprivate.h"
-#include "gtkintl.h"
-#include "gtkcssshadowsvalueprivate.h"
-#include "gtkstylecontextprivate.h"
+
#include "gtkcssnodeprivate.h"
-#include "gtkcssstylepropertyprivate.h"
#include "gtkcssnumbervalueprivate.h"
-#include "gtkprogresstrackerprivate.h"
+#include "gtkcssshadowsvalueprivate.h"
+#include "gtkcssstylepropertyprivate.h"
#include "gtkgizmoprivate.h"
+#include "gtkintl.h"
+#include "gtklabel.h"
+#include "gtkorientableprivate.h"
+#include "gtkprogresstrackerprivate.h"
+#include "gtkprivate.h"
+#include "gtkstylecontextprivate.h"
+#include "gtkwidgetprivate.h"
#include "a11y/gtkprogressbaraccessible.h"
+#include <string.h>
+
#include "fallback-c89.c"
/**
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index 4c7c05afee..f4c595613a 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -25,16 +25,17 @@
#include "config.h"
-#include <stdio.h>
-#include <math.h>
-
-#include "gtkrange.h"
#include "gtkrangeprivate.h"
#include "gtkadjustmentprivate.h"
#include "gtkcolorscaleprivate.h"
-#include "gtkintl.h"
+#include "gtkeventcontrollerscroll.h"
+#include "gtkgesturedrag.h"
#include "gtkgesturelongpressprivate.h"
+#include "gtkgesturemultipress.h"
+#include "gtkgizmoprivate.h"
+#include "gtkiconprivate.h"
+#include "gtkintl.h"
#include "gtkmain.h"
#include "gtkmarshalers.h"
#include "gtkorientableprivate.h"
@@ -42,11 +43,13 @@
#include "gtkscale.h"
#include "gtkscrollbar.h"
#include "gtktypebuiltins.h"
-#include "gtkwindow.h"
#include "gtkwidgetprivate.h"
+#include "gtkwindow.h"
+
#include "a11y/gtkrangeaccessible.h"
-#include "gtkgizmoprivate.h"
-#include "gtkiconprivate.h"
+
+#include <stdio.h>
+#include <math.h>
/**
* SECTION:gtkrange
diff --git a/gtk/gtkscale.c b/gtk/gtkscale.c
index d71510510a..1a182cf4bf 100644
--- a/gtk/gtkscale.c
+++ b/gtk/gtkscale.c
@@ -25,29 +25,30 @@
#include "config.h"
-#include <math.h>
-#include <stdlib.h>
-
-#include "gtkrangeprivate.h"
+#include "gtkscale.h"
#include "gtkadjustment.h"
#include "gtkbindings.h"
#include "gtkbuildable.h"
#include "gtkbuilderprivate.h"
+#include "gtkgizmoprivate.h"
#include "gtkicontheme.h"
#include "gtkintl.h"
+#include "gtklabel.h"
#include "gtkmarshalers.h"
#include "gtkorientable.h"
#include "gtkprivate.h"
-#include "gtktypebuiltins.h"
+#include "gtkrangeprivate.h"
#include "gtkstylecontextprivate.h"
#include "gtkstylepropertyprivate.h"
+#include "gtktypebuiltins.h"
#include "gtkwidgetprivate.h"
-#include "gtkcsswidgetnodeprivate.h"
-#include "gtkgizmoprivate.h"
#include "a11y/gtkscaleaccessible.h"
+#include <math.h>
+#include <stdlib.h>
+
/**
* SECTION:gtkscale
diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c
index c2344316f6..641c9e2132 100644
--- a/gtk/gtkspinbutton.c
+++ b/gtk/gtkspinbutton.c
@@ -29,15 +29,16 @@
#include "gtkspinbutton.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <string.h>
-#include <locale.h>
-
#include "gtkadjustment.h"
#include "gtkbindings.h"
+#include "gtkbox.h"
+#include "gtkbutton.h"
+#include "gtkcssstylepropertyprivate.h"
#include "gtkentryprivate.h"
+#include "gtkeventcontrollermotion.h"
+#include "gtkeventcontrollerscroll.h"
+#include "gtkgesturemultipress.h"
+#include "gtkgestureswipe.h"
#include "gtkicontheme.h"
#include "gtkintl.h"
#include "gtkmarshalers.h"
@@ -45,14 +46,19 @@
#include "gtkorientableprivate.h"
#include "gtkprivate.h"
#include "gtksettings.h"
+#include "gtkstylecontextprivate.h"
#include "gtktypebuiltins.h"
#include "gtkwidgetpath.h"
#include "gtkwidgetprivate.h"
-#include "gtkstylecontextprivate.h"
-#include "gtkcssstylepropertyprivate.h"
#include "a11y/gtkspinbuttonaccessible.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include <string.h>
+#include <locale.h>
+
#define MIN_SPIN_BUTTON_WIDTH 30
#define MAX_TIMER_CALLS 5
#define EPSILON 1e-10
diff --git a/gtk/gtkswitch.c b/gtk/gtkswitch.c
index b25ffc9e01..d665ef3dfc 100644
--- a/gtk/gtkswitch.c
+++ b/gtk/gtkswitch.c
@@ -53,17 +53,21 @@
#include "gtkswitch.h"
-#include "gtkintl.h"
-#include "gtkprivate.h"
-#include "gtkwidget.h"
-#include "gtkmarshalers.h"
#include "gtkactionable.h"
-#include "a11y/gtkswitchaccessible.h"
#include "gtkactionhelperprivate.h"
-#include "gtkwidgetprivate.h"
+#include "gtkgesturemultipress.h"
+#include "gtkgesturepan.h"
+#include "gtkgesturesingle.h"
+#include "gtkgizmoprivate.h"
+#include "gtkintl.h"
+#include "gtklabel.h"
+#include "gtkmarshalers.h"
+#include "gtkprivate.h"
#include "gtkprogresstrackerprivate.h"
#include "gtksettingsprivate.h"
-#include "gtkgizmoprivate.h"
+#include "gtkwidgetprivate.h"
+
+#include "a11y/gtkswitchaccessible.h"
#include "fallback-c89.c"
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index d74e12665b..ab86789f0d 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -24,62 +24,65 @@
#include "config.h"
-#include <stdarg.h>
-#include <string.h>
-#include <locale.h>
-#include <math.h>
-
-#define GDK_COMPILATION
-#include "gdk/gdkeventsprivate.h"
-
-#include <gobject/gvaluecollector.h>
-#include <gobject/gobjectnotifyqueue.c>
-#include <cairo-gobject.h>
+#include "gtkwidgetprivate.h"
-#include "gtkcontainer.h"
#include "gtkaccelmapprivate.h"
#include "gtkaccelgroupprivate.h"
+#include "gtkaccessible.h"
+#include "gtkapplicationprivate.h"
+#include "gtkbindings.h"
+#include "gtkbuildable.h"
+#include "gtkbuilderprivate.h"
+#include "gtkcontainerprivate.h"
#include "gtkcssfiltervalueprivate.h"
+#include "gtkcssfontvariationsvalueprivate.h"
#include "gtkcssnumbervalueprivate.h"
#include "gtkcssshadowsvalueprivate.h"
#include "gtkcssstylepropertyprivate.h"
+#include "gtkcsswidgetnodeprivate.h"
+#include "gtkdebug.h"
+#include "gtkdebugupdatesprivate.h"
+#include "gtkeventcontrollerlegacyprivate.h"
+#include "gtkgesturedrag.h"
+#include "gtkgestureprivate.h"
+#include "gtkgesturesingle.h"
+#include "gtkgestureswipe.h"
#include "gtkintl.h"
+#include "gtkinvisible.h"
#include "gtkmarshalers.h"
+#include "gtkmain.h"
+#include "gtkmenu.h"
+#include "gtkpopover.h"
+#include "gtkprivate.h"
+#include "gtkrenderbackgroundprivate.h"
+#include "gtkrenderborderprivate.h"
+#include "gtkscrollable.h"
+#include "gtkselection.h"
#include "gtksettingsprivate.h"
#include "gtksizegroup-private.h"
-#include "gtkwidget.h"
-#include "gtkwidgetprivate.h"
-#include "gtkwindowprivate.h"
-#include "gtkcontainerprivate.h"
-#include "gtkbindings.h"
-#include "gtkprivate.h"
-#include "gtkaccessible.h"
-#include "gtktooltipprivate.h"
-#include "gtkinvisible.h"
-#include "gtkbuildable.h"
-#include "gtkbuilderprivate.h"
-#include "gtksizerequest.h"
+#include "gtksnapshotprivate.h"
#include "gtkstylecontextprivate.h"
-#include "gtkcssprovider.h"
-#include "gtkcsswidgetnodeprivate.h"
-#include "gtkversion.h"
-#include "gtkdebug.h"
+#include "gtktooltipprivate.h"
#include "gtktypebuiltins.h"
-#include "a11y/gtkwidgetaccessible.h"
-#include "gtkapplicationprivate.h"
-#include "gtkgestureprivate.h"
+#include "gtkversion.h"
#include "gtkwidgetpathprivate.h"
-#include "gtksnapshotprivate.h"
-#include "gtkrenderborderprivate.h"
-#include "gtkrenderbackgroundprivate.h"
-#include "gtkcssshadowsvalueprivate.h"
-#include "gtkdebugupdatesprivate.h"
+#include "gtkwindowgroup.h"
+#include "gtkwindowprivate.h"
+
+#include "a11y/gtkwidgetaccessible.h"
+#include "inspector/window.h"
+
+#include "gdk/gdkeventsprivate.h"
#include "gsk/gskdebugprivate.h"
#include "gsk/gskrendererprivate.h"
-#include "gtkeventcontrollerlegacyprivate.h"
-#include "gtkcssfontvariationsvalueprivate.h"
-#include "inspector/window.h"
+#include <cairo-gobject.h>
+#include <gobject/gobjectnotifyqueue.c>
+#include <gobject/gvaluecollector.h>
+#include <locale.h>
+#include <math.h>
+#include <stdarg.h>
+#include <string.h>
/* for the use of round() */
#include "fallback-c89.c"
diff --git a/gtk/gtkwidgetprivate.h b/gtk/gtkwidgetprivate.h
index 616ca032d1..588d743fb9 100644
--- a/gtk/gtkwidgetprivate.h
+++ b/gtk/gtkwidgetprivate.h
@@ -25,11 +25,12 @@
#ifndef __GTK_WIDGET_PRIVATE_H__
#define __GTK_WIDGET_PRIVATE_H__
-#include "gtkcsstypesprivate.h"
#include "gtkwidget.h"
+
+#include "gtkactionmuxerprivate.h"
#include "gtkcontainer.h"
+#include "gtkcsstypesprivate.h"
#include "gtkeventcontroller.h"
-#include "gtkactionmuxerprivate.h"
#include "gtksizerequestcacheprivate.h"
G_BEGIN_DECLS