[gtk/wip/otte/gdk-headers: 3/6] x11: Don't include gdkinternals.h




commit 3b052ca7af455a9f3d6cd410bc5e25b78f4ad523
Author: Benjamin Otte <otte redhat com>
Date:   Fri Sep 24 21:20:15 2021 +0200

    x11: Don't include gdkinternals.h

 gdk/x11/gdkcairocontext-x11.c  |  1 -
 gdk/x11/gdkdevice-xi2.c        | 23 ++++++++++++++++++++++-
 gdk/x11/gdkdevicemanager-x11.c |  1 -
 gdk/x11/gdkdevicemanager-xi2.c |  2 +-
 gdk/x11/gdkdisplay-x11.c       |  2 +-
 gdk/x11/gdkdisplay-x11.h       |  1 -
 gdk/x11/gdkdrag-x11.c          |  3 ++-
 gdk/x11/gdkdrop-x11.c          |  1 -
 gdk/x11/gdkeventsource.c       |  3 ++-
 gdk/x11/gdkeventtranslator.h   |  3 ++-
 gdk/x11/gdkglcontext-egl.c     |  1 -
 gdk/x11/gdkglcontext-glx.c     |  1 -
 gdk/x11/gdkglcontext-x11.c     |  2 --
 gdk/x11/gdkglcontext-x11.h     |  1 -
 gdk/x11/gdkmain-x11.c          | 22 ----------------------
 gdk/x11/gdkprivate-x11.h       |  6 +++---
 gdk/x11/gdkproperty-x11.c      |  1 -
 gdk/x11/gdksurface-x11.c       |  3 ++-
 gdk/x11/gdksurface-x11.h       |  1 -
 gdk/x11/gdkvulkancontext-x11.c |  1 -
 gdk/x11/gdkxftdefaults.c       |  2 ++
 gdk/x11/xsettings-client.c     |  2 --
 22 files changed, 37 insertions(+), 46 deletions(-)
---
diff --git a/gdk/x11/gdkcairocontext-x11.c b/gdk/x11/gdkcairocontext-x11.c
index 3409e30b97..36bf1ae0ba 100644
--- a/gdk/x11/gdkcairocontext-x11.c
+++ b/gdk/x11/gdkcairocontext-x11.c
@@ -26,7 +26,6 @@
 
 #include "gdkcairo.h"
 #include "gdksurfaceprivate.h"
-#include "gdkinternals.h"
 
 #include <X11/Xlib.h>
 
diff --git a/gdk/x11/gdkdevice-xi2.c b/gdk/x11/gdkdevice-xi2.c
index d59dc37612..5976dfafc4 100644
--- a/gdk/x11/gdkdevice-xi2.c
+++ b/gdk/x11/gdkdevice-xi2.c
@@ -278,6 +278,27 @@ gdk_x11_device_xi2_query_state (GdkDevice        *device,
   free (button_state.mask);
 }
 
+static GdkGrabStatus
+gdk_x11_convert_grab_status (int status)
+{
+  switch (status)
+    {
+    case GrabSuccess:
+      return GDK_GRAB_SUCCESS;
+    case AlreadyGrabbed:
+      return GDK_GRAB_ALREADY_GRABBED;
+    case GrabInvalidTime:
+      return GDK_GRAB_INVALID_TIME;
+    case GrabNotViewable:
+      return GDK_GRAB_NOT_VIEWABLE;
+    case GrabFrozen:
+      return GDK_GRAB_FROZEN;
+    default:
+      g_assert_not_reached();
+      return 0;
+    }
+}
+
 static GdkGrabStatus
 gdk_x11_device_xi2_grab (GdkDevice    *device,
                          GdkSurface    *surface,
@@ -332,7 +353,7 @@ gdk_x11_device_xi2_grab (GdkDevice    *device,
 
   _gdk_x11_display_update_grab_info (display, device, status);
 
-  return _gdk_x11_convert_grab_status (status);
+  return gdk_x11_convert_grab_status (status);
 }
 
 static void
diff --git a/gdk/x11/gdkdevicemanager-x11.c b/gdk/x11/gdkdevicemanager-x11.c
index c98faa711f..c7b9743be0 100644
--- a/gdk/x11/gdkdevicemanager-x11.c
+++ b/gdk/x11/gdkdevicemanager-x11.c
@@ -18,7 +18,6 @@
 #include "config.h"
 
 #include "gdkx11devicemanager-xi2.h"
-#include "gdkinternals.h"
 #include "gdkprivate-x11.h"
 #include "gdkdisplay-x11.h"
 
diff --git a/gdk/x11/gdkdevicemanager-xi2.c b/gdk/x11/gdkdevicemanager-xi2.c
index 07073ee395..e4114e5279 100644
--- a/gdk/x11/gdkdevicemanager-xi2.c
+++ b/gdk/x11/gdkdevicemanager-xi2.c
@@ -23,13 +23,13 @@
 #include "gdkdeviceprivate.h"
 #include "gdkdevicetoolprivate.h"
 #include "gdkdisplayprivate.h"
+#include "gdkeventsprivate.h"
 #include "gdkeventtranslator.h"
 #include "gdkkeys-x11.h"
 #include "gdkprivate-x11.h"
 #include "gdkdisplay-x11.h"
 #include "gdkintl.h"
 #include "gdkkeysyms.h"
-#include "gdkinternals.h"
 #include "gdkseatdefaultprivate.h"
 
 #include <X11/Xlib.h>
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
index a03690c788..6e5fd276f7 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -29,10 +29,10 @@
 
 #include "gdkasync.h"
 #include "gdkdisplay.h"
+#include "gdkeventsprivate.h"
 #include "gdkeventsource.h"
 #include "gdkeventtranslator.h"
 #include "gdkframeclockprivate.h"
-#include "gdkinternals.h"
 #include "gdkdeviceprivate.h"
 #include "gdksurfaceprivate.h"
 #include "gdkkeysprivate.h"
diff --git a/gdk/x11/gdkdisplay-x11.h b/gdk/x11/gdkdisplay-x11.h
index 2a7356f752..78aece4177 100644
--- a/gdk/x11/gdkdisplay-x11.h
+++ b/gdk/x11/gdkdisplay-x11.h
@@ -25,7 +25,6 @@
 #include "gdkdisplayprivate.h"
 #include "gdkkeys.h"
 #include "gdksurface.h"
-#include "gdkinternals.h"
 #include "gdkx11devicemanager.h"
 #include "gdkx11display.h"
 #include "gdkx11screen.h"
diff --git a/gdk/x11/gdkdrag-x11.c b/gdk/x11/gdkdrag-x11.c
index 1bd75b37cb..5804085a56 100644
--- a/gdk/x11/gdkdrag-x11.c
+++ b/gdk/x11/gdkdrag-x11.c
@@ -34,11 +34,12 @@
 #include "gdkdevice-xi2-private.h"
 #include "gdkdisplay-x11.h"
 #include "gdkdragprivate.h"
+#include "gdkeventsprivate.h"
 #include "gdksurfaceprivate.h"
-#include "gdkinternals.h"
 #include "gdkintl.h"
 #include "gdkprivate-x11.h"
 #include "gdkscreen-x11.h"
+#include "gdkseatprivate.h"
 #include "gdkselectioninputstream-x11.h"
 #include "gdkselectionoutputstream-x11.h"
 
diff --git a/gdk/x11/gdkdrop-x11.c b/gdk/x11/gdkdrop-x11.c
index 3470382da7..91987fad13 100644
--- a/gdk/x11/gdkdrop-x11.c
+++ b/gdk/x11/gdkdrop-x11.c
@@ -33,7 +33,6 @@
 #include "gdkdeviceprivate.h"
 #include "gdkdisplay-x11.h"
 #include "gdkdragprivate.h"
-#include "gdkinternals.h"
 #include "gdkintl.h"
 #include "gdkprivate-x11.h"
 #include "gdkscreen-x11.h"
diff --git a/gdk/x11/gdkeventsource.c b/gdk/x11/gdkeventsource.c
index 7131f31c95..5a39a5b595 100644
--- a/gdk/x11/gdkeventsource.c
+++ b/gdk/x11/gdkeventsource.c
@@ -19,7 +19,8 @@
 
 #include "gdkeventsource.h"
 
-#include "gdkinternals.h"
+#include "gdk/gdkeventsprivate.h"
+
 #include "gdksurface-x11.h"
 #include "gdkprivate-x11.h"
 #include "gdkdisplay-x11.h"
diff --git a/gdk/x11/gdkeventtranslator.h b/gdk/x11/gdkeventtranslator.h
index 2c4c415cb0..4fcec6db03 100644
--- a/gdk/x11/gdkeventtranslator.h
+++ b/gdk/x11/gdkeventtranslator.h
@@ -20,7 +20,8 @@
 
 #include "gdktypes.h"
 #include "gdkdisplay.h"
-#include "gdkinternals.h"
+
+#include "gdk/gdkdeviceprivate.h"
 
 #include <X11/Xlib.h>
 
diff --git a/gdk/x11/gdkglcontext-egl.c b/gdk/x11/gdkglcontext-egl.c
index 9e3301adf8..24375ecd4d 100644
--- a/gdk/x11/gdkglcontext-egl.c
+++ b/gdk/x11/gdkglcontext-egl.c
@@ -22,7 +22,6 @@
 #include "gdkx11property.h"
 #include <X11/Xatom.h>
 
-#include "gdkinternals.h"
 #include "gdkprofilerprivate.h"
 #include "gdkintl.h"
 
diff --git a/gdk/x11/gdkglcontext-glx.c b/gdk/x11/gdkglcontext-glx.c
index bc1eeb94fb..c9667fbeed 100644
--- a/gdk/x11/gdkglcontext-glx.c
+++ b/gdk/x11/gdkglcontext-glx.c
@@ -22,7 +22,6 @@
 #include "gdkx11property.h"
 #include <X11/Xatom.h>
 
-#include "gdkinternals.h"
 #include "gdkprofilerprivate.h"
 #include "gdkintl.h"
 
diff --git a/gdk/x11/gdkglcontext-x11.c b/gdk/x11/gdkglcontext-x11.c
index d758066812..8c78e3c07e 100644
--- a/gdk/x11/gdkglcontext-x11.c
+++ b/gdk/x11/gdkglcontext-x11.c
@@ -32,8 +32,6 @@
 #include "gdkx11property.h"
 #include <X11/Xatom.h>
 
-#include "gdkinternals.h"
-
 #include "gdkintl.h"
 
 #include <cairo-xlib.h>
diff --git a/gdk/x11/gdkglcontext-x11.h b/gdk/x11/gdkglcontext-x11.h
index 89bc03b578..825efe11f9 100644
--- a/gdk/x11/gdkglcontext-x11.h
+++ b/gdk/x11/gdkglcontext-x11.h
@@ -36,7 +36,6 @@
 #include "gdkglcontextprivate.h"
 #include "gdkdisplay-x11.h"
 #include "gdksurface.h"
-#include "gdkinternals.h"
 
 G_BEGIN_DECLS
 
diff --git a/gdk/x11/gdkmain-x11.c b/gdk/x11/gdkmain-x11.c
index 51f24ff1f3..c92e3858fe 100644
--- a/gdk/x11/gdkmain-x11.c
+++ b/gdk/x11/gdkmain-x11.c
@@ -25,7 +25,6 @@
 #include "config.h"
 
 #include "gdkdeviceprivate.h"
-#include "gdkinternals.h"
 #include "gdkintl.h"
 #include "gdkasync.h"
 #include "gdkdisplay-x11.h"
@@ -67,27 +66,6 @@ _gdk_x11_surfaceing_init (void)
   XSetIOErrorHandler (gdk_x_io_error);
 }
 
-GdkGrabStatus
-_gdk_x11_convert_grab_status (int status)
-{
-  switch (status)
-    {
-    case GrabSuccess:
-      return GDK_GRAB_SUCCESS;
-    case AlreadyGrabbed:
-      return GDK_GRAB_ALREADY_GRABBED;
-    case GrabInvalidTime:
-      return GDK_GRAB_INVALID_TIME;
-    case GrabNotViewable:
-      return GDK_GRAB_NOT_VIEWABLE;
-    case GrabFrozen:
-      return GDK_GRAB_FROZEN;
-    default:
-      g_assert_not_reached();
-      return 0;
-    }
-}
-
 /*
  * _gdk_x11_surface_grab_check_unmap:
  * @surface: a `GdkSurface`
diff --git a/gdk/x11/gdkprivate-x11.h b/gdk/x11/gdkprivate-x11.h
index 5a0f565f55..4461f15e6b 100644
--- a/gdk/x11/gdkprivate-x11.h
+++ b/gdk/x11/gdkprivate-x11.h
@@ -30,11 +30,13 @@
 #define __GDK_PRIVATE_X11_H__
 
 #include "gdkcursor.h"
-#include "gdkinternals.h"
 #include "gdkx.h"
 #include "gdksurface-x11.h"
 #include "gdkscreen-x11.h"
 
+#include "gdk/gdkdeviceprivate.h"
+#include "gdk/gdkkeysprivate.h"
+
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
 #include <X11/extensions/XInput2.h>
@@ -239,8 +241,6 @@ void gdk_x11_surface_set_opacity (GdkSurface *surface,
                                   double      opacity);
 gboolean gdk_x11_surface_supports_edge_constraints (GdkSurface *surface);
 
-GdkGrabStatus _gdk_x11_convert_grab_status (int status);
-
 cairo_surface_t * _gdk_x11_display_create_bitmap_surface (GdkDisplay *display,
                                                           int         width,
                                                           int         height);
diff --git a/gdk/x11/gdkproperty-x11.c b/gdk/x11/gdkproperty-x11.c
index 056a1e9635..88dc856ca5 100644
--- a/gdk/x11/gdkproperty-x11.c
+++ b/gdk/x11/gdkproperty-x11.c
@@ -24,7 +24,6 @@
 
 #include "config.h"
 
-#include "gdkinternals.h"
 #include "gdkprivate-x11.h"
 #include "gdkdisplay-x11.h"
 #include "gdkscreen-x11.h"
diff --git a/gdk/x11/gdksurface-x11.c b/gdk/x11/gdksurface-x11.c
index dd1d0d3bd2..06bc9cf00e 100644
--- a/gdk/x11/gdksurface-x11.c
+++ b/gdk/x11/gdksurface-x11.c
@@ -31,7 +31,6 @@
 #include "gdkpopupprivate.h"
 #include "gdktoplevelprivate.h"
 #include "gdkdragsurfaceprivate.h"
-#include "gdkinternals.h"
 #include "gdkdeviceprivate.h"
 #include "gdkdevice-xi2-private.h"
 #include "gdkframeclockidleprivate.h"
@@ -41,6 +40,8 @@
 #include "gdkglcontext-x11.h"
 #include "gdkprivate-x11.h"
 #include "gdktextureprivate.h"
+
+#include "gdkseatprivate.h"
 #include "gdk-private.h"
 
 #include <graphene.h>
diff --git a/gdk/x11/gdksurface-x11.h b/gdk/x11/gdksurface-x11.h
index a4c9e53e0a..8a50b5b5d4 100644
--- a/gdk/x11/gdksurface-x11.h
+++ b/gdk/x11/gdksurface-x11.h
@@ -27,7 +27,6 @@
 
 #include "gdksurfaceprivate.h"
 #include "gdkx11surface.h"
-#include "gdkinternals.h"
 
 #include <X11/Xlib.h>
 
diff --git a/gdk/x11/gdkvulkancontext-x11.c b/gdk/x11/gdkvulkancontext-x11.c
index 002473e41f..eb0270c596 100644
--- a/gdk/x11/gdkvulkancontext-x11.c
+++ b/gdk/x11/gdkvulkancontext-x11.c
@@ -26,7 +26,6 @@
 
 #include "gdkvulkancontext-x11.h"
 
-#include "gdkinternals.h"
 #include "gdkdisplay-x11.h"
 #include "gdksurface-x11.h"
 
diff --git a/gdk/x11/gdkxftdefaults.c b/gdk/x11/gdkxftdefaults.c
index ef7580d4c0..2e745627ff 100644
--- a/gdk/x11/gdkxftdefaults.c
+++ b/gdk/x11/gdkxftdefaults.c
@@ -54,6 +54,8 @@
 #include <gdkscreen-x11.h>
 #include <gdkprivate-x11.h>
 
+#include "gdkdebug.h"
+
 static int
 parse_boolean (char *v)
 {
diff --git a/gdk/x11/xsettings-client.c b/gdk/x11/xsettings-client.c
index 2bab3c154f..ac4811faa8 100644
--- a/gdk/x11/xsettings-client.c
+++ b/gdk/x11/xsettings-client.c
@@ -33,8 +33,6 @@
 #include <gdk/x11/gdkdisplay-x11.h>
 #include <gdk/x11/gdkscreen-x11.h>
 
-#include <gdkinternals.h>
-
 #include <string.h>
 
 #include <X11/Xlib.h>


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