[gtk+/gdk-backend: 22/91] Hide GdkDeviceManager and GdkDeviceManagerClass



commit 2be25d252ae5f673b0552c781cb8f9cc9e16c870
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Dec 10 09:35:59 2010 -0500

    Hide GdkDeviceManager and GdkDeviceManagerClass
    
    And nuke GdkDeviceManagerPrivate at the same time. Again a commit
    that only deals with the X11 backend, other backends will need to
    catch up.

 gdk/gdkdevicemanager.c          |   30 +++---------------------------
 gdk/gdkdevicemanager.h          |   37 +++++--------------------------------
 gdk/gdkinternals.h              |   25 +++++++++++++++++++++++++
 gdk/x11/gdkdevicemanager-core.h |    3 ++-
 gdk/x11/gdkdevicemanager-xi.h   |    1 +
 gdk/x11/gdkdevicemanager-xi2.h  |    4 +++-
 6 files changed, 39 insertions(+), 61 deletions(-)
---
diff --git a/gdk/gdkdevicemanager.c b/gdk/gdkdevicemanager.c
index 5ef51b7..2eefc3a 100644
--- a/gdk/gdkdevicemanager.c
+++ b/gdk/gdkdevicemanager.c
@@ -117,12 +117,6 @@ enum {
 static guint signals [LAST_SIGNAL] = { 0 };
 
 
-struct _GdkDeviceManagerPrivate
-{
-  GdkDisplay *display;
-};
-
-
 static void
 gdk_device_manager_class_init (GdkDeviceManagerClass *klass)
 {
@@ -203,18 +197,11 @@ gdk_device_manager_class_init (GdkDeviceManagerClass *klass)
                   g_cclosure_marshal_VOID__OBJECT,
                   G_TYPE_NONE, 1,
                   GDK_TYPE_DEVICE);
-
-  g_type_class_add_private (object_class, sizeof (GdkDeviceManagerPrivate));
 }
 
 static void
 gdk_device_manager_init (GdkDeviceManager *device_manager)
 {
-  GdkDeviceManagerPrivate *priv;
-
-  device_manager->priv = priv = G_TYPE_INSTANCE_GET_PRIVATE (device_manager,
-                                                             GDK_TYPE_DEVICE_MANAGER,
-                                                             GdkDeviceManagerPrivate);
 }
 
 static void
@@ -223,14 +210,10 @@ gdk_device_manager_set_property (GObject      *object,
                                  const GValue *value,
                                  GParamSpec   *pspec)
 {
-  GdkDeviceManagerPrivate *priv;
-
-  priv = GDK_DEVICE_MANAGER (object)->priv;
-
   switch (prop_id)
     {
     case PROP_DISPLAY:
-      priv->display = g_value_get_object (value);
+      GDK_DEVICE_MANAGER (object)->display = g_value_get_object (value);
       break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -244,14 +227,11 @@ gdk_device_manager_get_property (GObject      *object,
                                  GValue       *value,
                                  GParamSpec   *pspec)
 {
-  GdkDeviceManagerPrivate *priv;
-
-  priv = GDK_DEVICE_MANAGER (object)->priv;
 
   switch (prop_id)
     {
     case PROP_DISPLAY:
-      g_value_set_object (value, priv->display);
+      g_value_set_object (value, GDK_DEVICE_MANAGER (object)->display);
       break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -274,13 +254,9 @@ gdk_device_manager_get_property (GObject      *object,
 GdkDisplay *
 gdk_device_manager_get_display (GdkDeviceManager *device_manager)
 {
-  GdkDeviceManagerPrivate *priv;
-
   g_return_val_if_fail (GDK_IS_DEVICE_MANAGER (device_manager), NULL);
 
-  priv = device_manager->priv;
-
-  return priv->display;
+  return device_manager->display;
 }
 
 /**
diff --git a/gdk/gdkdevicemanager.h b/gdk/gdkdevicemanager.h
index bed2bbb..2bb6041 100644
--- a/gdk/gdkdevicemanager.h
+++ b/gdk/gdkdevicemanager.h
@@ -37,41 +37,14 @@ G_BEGIN_DECLS
 #define GDK_DEVICE_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDK_TYPE_DEVICE_MANAGER, GdkDeviceManagerClass))
 
 typedef struct _GdkDeviceManager GdkDeviceManager;
-typedef struct _GdkDeviceManagerPrivate GdkDeviceManagerPrivate;
 typedef struct _GdkDeviceManagerClass GdkDeviceManagerClass;
 
-struct _GdkDeviceManager
-{
-  GObject parent_instance;
+GType        gdk_device_manager_get_type           (void) G_GNUC_CONST;
 
-  /*< private >*/
-  GdkDeviceManagerPrivate *priv;
-};
-
-struct _GdkDeviceManagerClass
-{
-  GObjectClass parent_class;
-
-  /* Signals */
-  void (* device_added)   (GdkDeviceManager *device_manager,
-                           GdkDevice        *device);
-  void (* device_removed) (GdkDeviceManager *device_manager,
-                           GdkDevice        *device);
-  void (* device_changed) (GdkDeviceManager *device_manager,
-                           GdkDevice        *device);
-
-  /* VMethods */
-  GList * (* list_devices) (GdkDeviceManager *device_manager,
-                            GdkDeviceType     type);
-  GdkDevice * (* get_client_pointer) (GdkDeviceManager *device_manager);
-};
-
-GType gdk_device_manager_get_type (void) G_GNUC_CONST;
-
-GdkDisplay *             gdk_device_manager_get_display      (GdkDeviceManager *device_manager);
-GList *                  gdk_device_manager_list_devices     (GdkDeviceManager *device_manager,
-                                                              GdkDeviceType     type);
-GdkDevice *              gdk_device_manager_get_client_pointer (GdkDeviceManager *device_manager);
+GdkDisplay * gdk_device_manager_get_display        (GdkDeviceManager *device_manager);
+GList *      gdk_device_manager_list_devices       (GdkDeviceManager *device_manager,
+                                                    GdkDeviceType     type);
+GdkDevice *  gdk_device_manager_get_client_pointer (GdkDeviceManager *device_manager);
 
 G_END_DECLS
 
diff --git a/gdk/gdkinternals.h b/gdk/gdkinternals.h
index 026b938..baef6f9 100644
--- a/gdk/gdkinternals.h
+++ b/gdk/gdkinternals.h
@@ -496,6 +496,31 @@ struct _GdkVisualClass
   GObjectClass parent_class;
 };
 
+struct _GdkDeviceManager
+{
+  GObject parent_instance;
+
+  GdkDisplay *display;
+};
+
+struct _GdkDeviceManagerClass
+{
+  GObjectClass parent_class;
+
+  /* Signals */
+  void (* device_added)   (GdkDeviceManager *device_manager,
+                           GdkDevice        *device);
+  void (* device_removed) (GdkDeviceManager *device_manager,
+                           GdkDevice        *device);
+  void (* device_changed) (GdkDeviceManager *device_manager,
+                           GdkDevice        *device);
+
+  /* VMethods */
+  GList * (* list_devices) (GdkDeviceManager *device_manager,
+                            GdkDeviceType     type);
+  GdkDevice * (* get_client_pointer) (GdkDeviceManager *device_manager);
+};
+
 extern GSList    *_gdk_displays;
 extern gchar     *_gdk_display_name;
 extern gint       _gdk_screen_number;
diff --git a/gdk/x11/gdkdevicemanager-core.h b/gdk/x11/gdkdevicemanager-core.h
index 0a337fc..53d894f 100644
--- a/gdk/x11/gdkdevicemanager-core.h
+++ b/gdk/x11/gdkdevicemanager-core.h
@@ -20,7 +20,8 @@
 #ifndef __GDK_DEVICE_MANAGER_CORE_H__
 #define __GDK_DEVICE_MANAGER_CORE_H__
 
-#include <gdk/gdkdevicemanager.h>
+#include "gdkinternals.h"
+#include "gdkdevicemanager.h"
 
 G_BEGIN_DECLS
 
diff --git a/gdk/x11/gdkdevicemanager-xi.h b/gdk/x11/gdkdevicemanager-xi.h
index e2028fd..57974eb 100644
--- a/gdk/x11/gdkdevicemanager-xi.h
+++ b/gdk/x11/gdkdevicemanager-xi.h
@@ -20,6 +20,7 @@
 #ifndef __GDK_DEVICE_MANAGER_XI_H__
 #define __GDK_DEVICE_MANAGER_XI_H__
 
+#include "gdkinternals.h"
 #include "gdkdevicemanager-core.h"
 
 G_BEGIN_DECLS
diff --git a/gdk/x11/gdkdevicemanager-xi2.h b/gdk/x11/gdkdevicemanager-xi2.h
index e16a6f7..39bc29b 100644
--- a/gdk/x11/gdkdevicemanager-xi2.h
+++ b/gdk/x11/gdkdevicemanager-xi2.h
@@ -20,7 +20,9 @@
 #ifndef __GDK_DEVICE_MANAGER_XI2_H__
 #define __GDK_DEVICE_MANAGER_XI2_H__
 
-#include <gdk/gdkdevicemanager.h>
+#include "gdkinternals.h"
+#include "gdkdevicemanager.h"
+
 #include <X11/extensions/XInput2.h>
 
 G_BEGIN_DECLS



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