Commit 083c556e authored by Kristian Rietveld's avatar Kristian Rietveld

quartz: rename GdkDeviceManagerCore -> GdkQuartzDeviceManagerCore

parent 59a3d9ae
......@@ -25,7 +25,8 @@ libgdk_quartz_la_SOURCES = \
gdkcursor-quartz.h \
gdkdevice-core-quartz.c \
gdkdevice-core-quartz.h \
gdkdevicemanager-core.c \
gdkdevicemanager-core-quartz.c \
gdkdevicemanager-core-quartz.h \
gdkdisplay-quartz.c \
gdkdisplay-quartz.h \
gdkdisplaymanager-quartz.c \
......
......@@ -21,7 +21,7 @@
#include <gdk/gdktypes.h>
#include <gdk/gdkdevicemanager.h>
#include "gdkdevicemanager-core.h"
#include "gdkdevicemanager-core-quartz.h"
#include "gdkdevice-core-quartz.h"
#include "gdkkeysyms.h"
......@@ -29,26 +29,26 @@
#define HAS_FOCUS(toplevel) \
((toplevel)->has_focus || (toplevel)->has_pointer_focus)
static void gdk_device_manager_core_finalize (GObject *object);
static void gdk_device_manager_core_constructed (GObject *object);
static void gdk_quartz_device_manager_core_finalize (GObject *object);
static void gdk_quartz_device_manager_core_constructed (GObject *object);
static GList * gdk_device_manager_core_list_devices (GdkDeviceManager *device_manager,
GdkDeviceType type);
static GdkDevice * gdk_device_manager_core_get_client_pointer (GdkDeviceManager *device_manager);
static GList * gdk_quartz_device_manager_core_list_devices (GdkDeviceManager *device_manager,
GdkDeviceType type);
static GdkDevice * gdk_quartz_device_manager_core_get_client_pointer (GdkDeviceManager *device_manager);
G_DEFINE_TYPE (GdkDeviceManagerCore, gdk_device_manager_core, GDK_TYPE_DEVICE_MANAGER)
G_DEFINE_TYPE (GdkQuartzDeviceManagerCore, gdk_quartz_device_manager_core, GDK_TYPE_DEVICE_MANAGER)
static void
gdk_device_manager_core_class_init (GdkDeviceManagerCoreClass *klass)
gdk_quartz_device_manager_core_class_init (GdkQuartzDeviceManagerCoreClass *klass)
{
GdkDeviceManagerClass *device_manager_class = GDK_DEVICE_MANAGER_CLASS (klass);
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = gdk_device_manager_core_finalize;
object_class->constructed = gdk_device_manager_core_constructed;
device_manager_class->list_devices = gdk_device_manager_core_list_devices;
device_manager_class->get_client_pointer = gdk_device_manager_core_get_client_pointer;
object_class->finalize = gdk_quartz_device_manager_core_finalize;
object_class->constructed = gdk_quartz_device_manager_core_constructed;
device_manager_class->list_devices = gdk_quartz_device_manager_core_list_devices;
device_manager_class->get_client_pointer = gdk_quartz_device_manager_core_get_client_pointer;
}
static GdkDevice *
......@@ -82,30 +82,30 @@ create_core_keyboard (GdkDeviceManager *device_manager,
}
static void
gdk_device_manager_core_init (GdkDeviceManagerCore *device_manager)
gdk_quartz_device_manager_core_init (GdkQuartzDeviceManagerCore *device_manager)
{
}
static void
gdk_device_manager_core_finalize (GObject *object)
gdk_quartz_device_manager_core_finalize (GObject *object)
{
GdkDeviceManagerCore *device_manager_core;
GdkQuartzDeviceManagerCore *quartz_device_manager_core;
device_manager_core = GDK_DEVICE_MANAGER_CORE (object);
quartz_device_manager_core = GDK_QUARTZ_DEVICE_MANAGER_CORE (object);
g_object_unref (device_manager_core->core_pointer);
g_object_unref (device_manager_core->core_keyboard);
g_object_unref (quartz_device_manager_core->core_pointer);
g_object_unref (quartz_device_manager_core->core_keyboard);
G_OBJECT_CLASS (gdk_device_manager_core_parent_class)->finalize (object);
G_OBJECT_CLASS (gdk_quartz_device_manager_core_parent_class)->finalize (object);
}
static void
gdk_device_manager_core_constructed (GObject *object)
gdk_quartz_device_manager_core_constructed (GObject *object)
{
GdkDeviceManagerCore *device_manager;
GdkQuartzDeviceManagerCore *device_manager;
GdkDisplay *display;
device_manager = GDK_DEVICE_MANAGER_CORE (object);
device_manager = GDK_QUARTZ_DEVICE_MANAGER_CORE (object);
display = gdk_device_manager_get_display (GDK_DEVICE_MANAGER (object));
device_manager->core_pointer = create_core_pointer (GDK_DEVICE_MANAGER (device_manager), display);
device_manager->core_keyboard = create_core_keyboard (GDK_DEVICE_MANAGER (device_manager), display);
......@@ -115,27 +115,27 @@ gdk_device_manager_core_constructed (GObject *object)
}
static GList *
gdk_device_manager_core_list_devices (GdkDeviceManager *device_manager,
GdkDeviceType type)
gdk_quartz_device_manager_core_list_devices (GdkDeviceManager *device_manager,
GdkDeviceType type)
{
GdkDeviceManagerCore *device_manager_core;
GdkQuartzDeviceManagerCore *quartz_device_manager_core;
GList *devices = NULL;
if (type == GDK_DEVICE_TYPE_MASTER)
{
device_manager_core = (GdkDeviceManagerCore *) device_manager;
devices = g_list_prepend (devices, device_manager_core->core_keyboard);
devices = g_list_prepend (devices, device_manager_core->core_pointer);
quartz_device_manager_core = (GdkQuartzDeviceManagerCore *) device_manager;
devices = g_list_prepend (devices, quartz_device_manager_core->core_keyboard);
devices = g_list_prepend (devices, quartz_device_manager_core->core_pointer);
}
return devices;
}
static GdkDevice *
gdk_device_manager_core_get_client_pointer (GdkDeviceManager *device_manager)
gdk_quartz_device_manager_core_get_client_pointer (GdkDeviceManager *device_manager)
{
GdkDeviceManagerCore *device_manager_core;
GdkQuartzDeviceManagerCore *quartz_device_manager_core;
device_manager_core = (GdkDeviceManagerCore *) device_manager;
return device_manager_core->core_pointer;
quartz_device_manager_core = (GdkQuartzDeviceManagerCore *) device_manager;
return quartz_device_manager_core->core_pointer;
}
......@@ -17,38 +17,38 @@
* Boston, MA 02111-1307, USA.
*/
#ifndef __GDK_DEVICE_MANAGER_CORE_H__
#define __GDK_DEVICE_MANAGER_CORE_H__
#ifndef __GDK_QUARTZ_DEVICE_MANAGER_CORE_H__
#define __GDK_QUARTZ_DEVICE_MANAGER_CORE_H__
#include <gdk/gdkdevicemanagerprivate.h>
G_BEGIN_DECLS
#define GDK_TYPE_DEVICE_MANAGER_CORE (gdk_device_manager_core_get_type ())
#define GDK_DEVICE_MANAGER_CORE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDK_TYPE_DEVICE_MANAGER_CORE, GdkDeviceManagerCore))
#define GDK_DEVICE_MANAGER_CORE_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), GDK_TYPE_DEVICE_MANAGER_CORE, GdkDeviceManagerCoreClass))
#define GDK_IS_DEVICE_MANAGER_CORE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDK_TYPE_DEVICE_MANAGER_CORE))
#define GDK_IS_DEVICE_MANAGER_CORE_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GDK_TYPE_DEVICE_MANAGER_CORE))
#define GDK_DEVICE_MANAGER_CORE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDK_TYPE_DEVICE_MANAGER_CORE, GdkDeviceManagerCoreClass))
#define GDK_TYPE_QUARTZ_DEVICE_MANAGER_CORE (gdk_quartz_device_manager_core_get_type ())
#define GDK_QUARTZ_DEVICE_MANAGER_CORE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDK_TYPE_QUARTZ_DEVICE_MANAGER_CORE, GdkQuartzDeviceManagerCore))
#define GDK_QUARTZ_DEVICE_MANAGER_CORE_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), GDK_TYPE_QUARTZ_DEVICE_MANAGER_CORE, GdkQuartzDeviceManagerCoreClass))
#define GDK_IS_QUARTZ_DEVICE_MANAGER_CORE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDK_TYPE_QUARTZ_DEVICE_MANAGER_CORE))
#define GDK_IS_QUARTZ_DEVICE_MANAGER_CORE_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GDK_TYPE_QUARTZ_DEVICE_MANAGER_CORE))
#define GDK_QUARTZ_DEVICE_MANAGER_CORE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDK_TYPE_QUARTZ_DEVICE_MANAGER_CORE, GdkQuartzDeviceManagerCoreClass))
typedef struct _GdkDeviceManagerCore GdkDeviceManagerCore;
typedef struct _GdkDeviceManagerCoreClass GdkDeviceManagerCoreClass;
typedef struct _GdkQuartzDeviceManagerCore GdkQuartzDeviceManagerCore;
typedef struct _GdkQuartzDeviceManagerCoreClass GdkQuartzDeviceManagerCoreClass;
struct _GdkDeviceManagerCore
struct _GdkQuartzDeviceManagerCore
{
GdkDeviceManager parent_object;
GdkDevice *core_pointer;
GdkDevice *core_keyboard;
};
struct _GdkDeviceManagerCoreClass
struct _GdkQuartzDeviceManagerCoreClass
{
GdkDeviceManagerClass parent_class;
};
GType gdk_device_manager_core_get_type (void) G_GNUC_CONST;
GType gdk_quartz_device_manager_core_get_type (void) G_GNUC_CONST;
G_END_DECLS
#endif /* __GDK_DEVICE_MANAGER_CORE_H__ */
#endif /* __GDK_QUARTZ_DEVICE_MANAGER_CORE_H__ */
......@@ -25,7 +25,7 @@
#include "gdkscreen-quartz.h"
#include "gdkwindow-quartz.h"
#include "gdkdisplay-quartz.h"
#include "gdkdevicemanager-core.h"
#include "gdkdevicemanager-core-quartz.h"
static GdkWindow *
gdk_quartz_display_get_default_group (GdkDisplay *display)
......@@ -40,7 +40,7 @@ gdk_quartz_display_get_default_group (GdkDisplay *display)
GdkDeviceManager *
_gdk_device_manager_new (GdkDisplay *display)
{
return g_object_new (GDK_TYPE_DEVICE_MANAGER_CORE,
return g_object_new (GDK_TYPE_QUARTZ_DEVICE_MANAGER_CORE,
"display", display,
NULL);
}
......
......@@ -33,7 +33,7 @@
#include "gdkkeysyms.h"
#include "gdkdisplay-quartz.h"
#include "gdkprivate-quartz.h"
#include "gdkdevicemanager-core.h"
#include "gdkdevicemanager-core-quartz.h"
#define GRIP_WIDTH 15
#define GRIP_HEIGHT 15
......@@ -312,13 +312,13 @@ create_focus_event (GdkWindow *window,
gboolean in)
{
GdkEvent *event;
GdkDeviceManagerCore *device_manager;
GdkQuartzDeviceManagerCore *device_manager;
event = gdk_event_new (GDK_FOCUS_CHANGE);
event->focus_change.window = window;
event->focus_change.in = in;
device_manager = GDK_DEVICE_MANAGER_CORE (_gdk_display->device_manager);
device_manager = GDK_QUARTZ_DEVICE_MANAGER_CORE (_gdk_display->device_manager);
gdk_event_set_device (event, device_manager->core_keyboard);
return event;
......@@ -900,7 +900,7 @@ fill_key_event (GdkWindow *window,
GdkEventType type)
{
GdkEventPrivate *priv;
GdkDeviceManagerCore *device_manager;
GdkQuartzDeviceManagerCore *device_manager;
gchar buf[7];
gunichar c = 0;
......@@ -915,7 +915,7 @@ fill_key_event (GdkWindow *window,
event->key.group = ([nsevent modifierFlags] & NSAlternateKeyMask) ? 1 : 0;
event->key.keyval = GDK_KEY_VoidSymbol;
device_manager = GDK_DEVICE_MANAGER_CORE (_gdk_display->device_manager);
device_manager = GDK_QUARTZ_DEVICE_MANAGER_CORE (_gdk_display->device_manager);
gdk_event_set_device (event, device_manager->core_keyboard);
gdk_keymap_translate_keyboard_state (NULL,
......
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