Commit d5c0b92d authored by Matthias Clasen's avatar Matthias Clasen
Browse files

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.
parent c6a50742
......@@ -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;
}
/**
......
......@@ -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
......
......@@ -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;
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment