[gtk+/gdk-backend] Detangle includes for device subclasses



commit 00e0e3c06e02c2a61cbfa864710ead118201f262
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Dec 21 10:37:21 2010 -0500

    Detangle includes for device subclasses

 gdk/gdkdevice.h                     |    2 +-
 gdk/gdkdeviceprivate.h              |    2 -
 gdk/x11/Makefile.am                 |    1 +
 gdk/x11/gdkdevice-core-x11.c        |   11 ++++++
 gdk/x11/gdkdevice-xi.c              |    2 +-
 gdk/x11/gdkdevice-xi2.c             |   13 +++++++-
 gdk/x11/gdkdevicemanager-core-x11.c |    3 +-
 gdk/x11/gdkdevicemanager-xi.c       |    3 +-
 gdk/x11/gdkdeviceprivate-xi.h       |   58 +++++++++++++++++++++++++++++++++++
 gdk/x11/gdkx11device-core.h         |   11 +------
 gdk/x11/gdkx11device-xi.h           |   30 +-----------------
 gdk/x11/gdkx11device-xi2.h          |   15 +--------
 12 files changed, 91 insertions(+), 60 deletions(-)
---
diff --git a/gdk/gdkdevice.h b/gdk/gdkdevice.h
index d65dae8..4085fac 100644
--- a/gdk/gdkdevice.h
+++ b/gdk/gdkdevice.h
@@ -34,7 +34,7 @@ G_BEGIN_DECLS
 #define GDK_IS_DEVICE(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDK_TYPE_DEVICE))
 
 typedef struct _GdkDevice GdkDevice;
-typedef struct _GdkDevicePrivate GdkDevicePrivate;
+typedef struct _GdkDeviceClass GdkDeviceClass;
 typedef struct _GdkTimeCoord GdkTimeCoord;
 
 /**
diff --git a/gdk/gdkdeviceprivate.h b/gdk/gdkdeviceprivate.h
index 29332b2..1e65504 100644
--- a/gdk/gdkdeviceprivate.h
+++ b/gdk/gdkdeviceprivate.h
@@ -30,8 +30,6 @@ G_BEGIN_DECLS
 #define GDK_IS_DEVICE_CLASS(c)  (G_TYPE_CHECK_CLASS_TYPE ((c), GDK_TYPE_DEVICE))
 #define GDK_DEVICE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDK_TYPE_DEVICE, GdkDeviceClass))
 
-typedef struct _GdkDeviceClass GdkDeviceClass;
-
 typedef struct _GdkDeviceKey GdkDeviceKey;
 
 struct _GdkDeviceKey
diff --git a/gdk/x11/Makefile.am b/gdk/x11/Makefile.am
index 3a4ae66..0b7a4fd 100644
--- a/gdk/x11/Makefile.am
+++ b/gdk/x11/Makefile.am
@@ -24,6 +24,7 @@ libgdk_x11_la_SOURCES = 	\
 	gdkasync.h		\
 	gdkcursor-x11.c		\
 	gdkdevice-core-x11.c	\
+	gdkdeviceprivate-xi.h	\
 	gdkdevicemanager-core-x11.c \
 	gdkdevicemanager-x11.c	\
 	gdkdisplaymanager-x11.c	\
diff --git a/gdk/x11/gdkdevice-core-x11.c b/gdk/x11/gdkdevice-core-x11.c
index 795cbb4..938aad7 100644
--- a/gdk/x11/gdkdevice-core-x11.c
+++ b/gdk/x11/gdkdevice-core-x11.c
@@ -20,12 +20,23 @@
 #include "config.h"
 
 #include "gdkx11device-core.h"
+#include "gdkdeviceprivate.h"
 
 #include "gdkinternals.h"
 #include "gdkwindow.h"
 #include "gdkprivate-x11.h"
 #include "gdkasync.h"
 
+struct _GdkX11DeviceCore
+{
+  GdkDevice parent_instance;
+};
+
+struct _GdkX11DeviceCoreClass
+{
+  GdkDeviceClass parent_class;
+};
+
 static gboolean gdk_x11_device_core_get_history (GdkDevice       *device,
                                                  GdkWindow       *window,
                                                  guint32          start,
diff --git a/gdk/x11/gdkdevice-xi.c b/gdk/x11/gdkdevice-xi.c
index 17a90ec..bf81675 100644
--- a/gdk/x11/gdkdevice-xi.c
+++ b/gdk/x11/gdkdevice-xi.c
@@ -20,10 +20,10 @@
 #include "config.h"
 
 #include "gdkx11device-xi.h"
+#include "gdkdeviceprivate-xi.h"
 
 #include "gdkwindow.h"
 #include "gdkintl.h"
-#include "gdkdeviceprivate.h"
 #include "gdkprivate-x11.h"
 #include "gdkasync.h"
 
diff --git a/gdk/x11/gdkdevice-xi2.c b/gdk/x11/gdkdevice-xi2.c
index 6c9b528..53367fd 100644
--- a/gdk/x11/gdkdevice-xi2.c
+++ b/gdk/x11/gdkdevice-xi2.c
@@ -20,12 +20,23 @@
 #include "config.h"
 
 #include "gdkx11device-xi2.h"
+#include "gdkdeviceprivate.h"
 
 #include "gdkintl.h"
 #include "gdkasync.h"
 #include "gdkprivate-x11.h"
 
-#include <X11/extensions/XInput2.h>
+struct _GdkX11DeviceXI2
+{
+  GdkDevice parent_instance;
+
+  gint device_id;
+};
+
+struct _GdkX11DeviceXI2Class
+{
+  GdkDeviceClass parent_class;
+};
 
 static void gdk_x11_device_xi2_get_property (GObject      *object,
                                              guint         prop_id,
diff --git a/gdk/x11/gdkdevicemanager-core-x11.c b/gdk/x11/gdkdevicemanager-core-x11.c
index 99c0b07..fa9f703 100644
--- a/gdk/x11/gdkdevicemanager-core-x11.c
+++ b/gdk/x11/gdkdevicemanager-core-x11.c
@@ -22,11 +22,12 @@
 #include "gdkx11devicemanager-core.h"
 #include "gdkx11device-core.h"
 
-#include "gdkkeysyms.h"
 #include "gdkdevicemanagerprivate.h"
+#include "gdkdeviceprivate.h"
 #include "gdkdisplayprivate.h"
 #include "gdkeventtranslator.h"
 #include "gdkprivate-x11.h"
+#include "gdkkeysyms.h"
 
 #ifdef HAVE_XKB
 #include <X11/XKBlib.h>
diff --git a/gdk/x11/gdkdevicemanager-xi.c b/gdk/x11/gdkdevicemanager-xi.c
index 1dd9f84..564f55b 100644
--- a/gdk/x11/gdkdevicemanager-xi.c
+++ b/gdk/x11/gdkdevicemanager-xi.c
@@ -20,8 +20,9 @@
 #include "config.h"
 
 #include "gdkx11devicemanager-xi.h"
-#include "gdkx11device-xi.h"
+#include "gdkdeviceprivate-xi.h"
 
+#include "gdkdevicemanagerprivate.h"
 #include "gdkeventtranslator.h"
 #include "gdkintl.h"
 #include "gdkprivate-x11.h"
diff --git a/gdk/x11/gdkdeviceprivate-xi.h b/gdk/x11/gdkdeviceprivate-xi.h
new file mode 100644
index 0000000..4a22808
--- /dev/null
+++ b/gdk/x11/gdkdeviceprivate-xi.h
@@ -0,0 +1,58 @@
+/* GDK - The GIMP Drawing Kit
+ * Copyright (C) 2009 Carlos Garnacho <carlosg gnome org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GDK_DEVICE_XI_PRIVATE_H__
+#define __GDK_DEVICE_XI_PRIVATE_H__
+
+#include "gdkx11device-xi.h"
+#include "gdkdeviceprivate.h"
+
+G_BEGIN_DECLS
+
+struct _GdkX11DeviceXI
+{
+  GdkDevice parent_instance;
+
+  /*< private >*/
+  guint32 device_id;
+  XDevice *xdevice;
+
+  gint button_press_type;
+  gint button_release_type;
+  gint key_press_type;
+  gint key_release_type;
+  gint motion_notify_type;
+  gint proximity_in_type;
+  gint proximity_out_type;
+  gint state_notify_type;
+
+  /* minimum key code for device */
+  gint min_keycode;
+  gint *axis_data;
+  guint in_proximity : 1;
+};
+
+struct _GdkX11DeviceXIClass
+{
+  GdkDeviceClass parent_class;
+};
+
+G_END_DECLS
+
+#endif /* __GDK_DEVICE_XI_PRIVATE_H__ */
diff --git a/gdk/x11/gdkx11device-core.h b/gdk/x11/gdkx11device-core.h
index e6aea0a..d53d7b8 100644
--- a/gdk/x11/gdkx11device-core.h
+++ b/gdk/x11/gdkx11device-core.h
@@ -20,7 +20,7 @@
 #ifndef __GDK_X11_DEVICE_CORE_H__
 #define __GDK_X11_DEVICE_CORE_H__
 
-#include "gdkdeviceprivate.h"
+#include <gdk/gdk.h>
 
 G_BEGIN_DECLS
 
@@ -34,15 +34,6 @@ G_BEGIN_DECLS
 typedef struct _GdkX11DeviceCore GdkX11DeviceCore;
 typedef struct _GdkX11DeviceCoreClass GdkX11DeviceCoreClass;
 
-struct _GdkX11DeviceCore
-{
-  GdkDevice parent_instance;
-};
-
-struct _GdkX11DeviceCoreClass
-{
-  GdkDeviceClass parent_class;
-};
 
 GType gdk_x11_device_core_get_type (void) G_GNUC_CONST;
 
diff --git a/gdk/x11/gdkx11device-xi.h b/gdk/x11/gdkx11device-xi.h
index a22fcab..061f8df 100644
--- a/gdk/x11/gdkx11device-xi.h
+++ b/gdk/x11/gdkx11device-xi.h
@@ -20,7 +20,7 @@
 #ifndef __GDK_X11_DEVICE_XI_H__
 #define __GDK_X11_DEVICE_XI_H__
 
-#include "gdkdeviceprivate.h"
+#include <gdk/gdk.h>
 
 #include <X11/extensions/XInput.h>
 
@@ -36,34 +36,6 @@ G_BEGIN_DECLS
 typedef struct _GdkX11DeviceXI GdkX11DeviceXI;
 typedef struct _GdkX11DeviceXIClass GdkX11DeviceXIClass;
 
-struct _GdkX11DeviceXI
-{
-  GdkDevice parent_instance;
-
-  /*< private >*/
-  guint32 device_id;
-  XDevice *xdevice;
-
-  gint button_press_type;
-  gint button_release_type;
-  gint key_press_type;
-  gint key_release_type;
-  gint motion_notify_type;
-  gint proximity_in_type;
-  gint proximity_out_type;
-  gint state_notify_type;
-
-  /* minimum key code for device */
-  gint min_keycode;
-  gint *axis_data;
-
-  guint in_proximity : 1;
-};
-
-struct _GdkX11DeviceXIClass
-{
-  GdkDeviceClass parent_class;
-};
 
 GType gdk_x11_device_xi_get_type (void) G_GNUC_CONST;
 
diff --git a/gdk/x11/gdkx11device-xi2.h b/gdk/x11/gdkx11device-xi2.h
index 6ef339f..85fe788 100644
--- a/gdk/x11/gdkx11device-xi2.h
+++ b/gdk/x11/gdkx11device-xi2.h
@@ -20,7 +20,7 @@
 #ifndef __GDK_X11_DEVICE_XI2_H__
 #define __GDK_X11_DEVICE_XI2_H__
 
-#include "gdkdeviceprivate.h"
+#include <gdk/gdk.h>
 
 #include <X11/extensions/XInput2.h>
 
@@ -36,19 +36,6 @@ G_BEGIN_DECLS
 typedef struct _GdkX11DeviceXI2 GdkX11DeviceXI2;
 typedef struct _GdkX11DeviceXI2Class GdkX11DeviceXI2Class;
 
-struct _GdkX11DeviceXI2
-{
-  GdkDevice parent_instance;
-
-  /*< private >*/
-  gint device_id;
-};
-
-struct _GdkX11DeviceXI2Class
-{
-  GdkDeviceClass parent_class;
-};
-
 GType gdk_x11_device_xi2_get_type (void) G_GNUC_CONST;
 
 G_END_DECLS



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