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

Rename x11-specific GdkDevice[Manager] implementations

Make them all fit in the gdk_x11_ prefix, and make the
get_type functions and standard macros available in headers.
parent 5cddc7cc
......@@ -190,11 +190,11 @@ x11_introspection_files = \
x11/gdkapplaunchcontext-x11.c \
x11/gdkasync.c \
x11/gdkcursor-x11.c \
x11/gdkdevice-core.c \
x11/gdkdevicemanager-core.c \
x11/gdkdevice-core-x11.c \
x11/gdkdevicemanager-core-x11.c \
x11/gdkdevicemanager-x11.c \
x11/gdkdevicemanager-xi2.c \
x11/gdkdevicemanager-xi.c \
x11/gdkdevicemanager-xi2.c \
x11/gdkdevice-xi2.c \
x11/gdkdevice-xi.c \
x11/gdkdisplay-x11.c \
......
......@@ -54,18 +54,22 @@ libgdk_x11_la_SOURCES = \
xsettings-common.h \
xsettings-common.c
libgdkx11include_HEADERS =
if XINPUT_XFREE
libgdk_x11_la_SOURCES += \
gdkdevicemanager-xi.c \
gdkdevicemanager-xi.h \
gdkdevice-xi.c \
gdkdevice-xi.h
gdkdevice-xi.c
libgdkx11include_HEADERS += \
gdkx11devicemanager-xi.h \
gdkx11device-xi.h
if XINPUT_2
libgdk_x11_la_SOURCES += \
gdkdevicemanager-xi2.c \
gdkdevicemanager-xi2.h \
gdkdevice-xi2.c \
gdkdevice-xi2.h
gdkdevice-xi2.c
libgdkx11include_HEADERS += \
gdkx11devicemanager-xi2.h \
gdkx11device-xi2.h
endif
endif
......@@ -73,7 +77,7 @@ endif
libgdkinclude_HEADERS = \
gdkx.h
libgdkx11include_HEADERS = \
libgdkx11include_HEADERS += \
gdkx11cursor.h \
gdkx11device-core.h \
gdkx11devicemanager-core.h \
......
This diff is collapsed.
This diff is collapsed.
......@@ -21,9 +21,9 @@
#include "gdkx11devicemanager-core.h"
#ifdef XINPUT_XFREE
#include "gdkdevicemanager-xi.h"
#include "gdkx11devicemanager-xi.h"
#ifdef XINPUT_2
#include "gdkdevicemanager-xi2.h"
#include "gdkx11devicemanager-xi2.h"
#endif
#endif
#include "gdkinternals.h"
......@@ -52,11 +52,11 @@ _gdk_x11_device_manager_new (GdkDisplay *display)
if (!_gdk_disable_multidevice &&
XIQueryVersion (xdisplay, &major, &minor) != BadRequest)
{
GdkDeviceManagerXI2 *device_manager_xi2;
GdkX11DeviceManagerXI2 *device_manager_xi2;
GDK_NOTE (INPUT, g_print ("Creating XI2 device manager\n"));
device_manager_xi2 = g_object_new (GDK_TYPE_DEVICE_MANAGER_XI2,
device_manager_xi2 = g_object_new (GDK_TYPE_X11_DEVICE_MANAGER_XI2,
"display", display,
NULL);
device_manager_xi2->opcode = opcode;
......@@ -68,7 +68,7 @@ _gdk_x11_device_manager_new (GdkDisplay *display)
{
GDK_NOTE (INPUT, g_print ("Creating XI device manager\n"));
return g_object_new (GDK_TYPE_DEVICE_MANAGER_XI,
return g_object_new (GDK_TYPE_X11_DEVICE_MANAGER_XI,
"display", display,
"event-base", firstevent,
NULL);
......
This diff is collapsed.
This diff is collapsed.
......@@ -213,6 +213,24 @@ void _gdk_x11_device_check_extension_events (GdkDevice *device);
GdkDeviceManager *_gdk_x11_device_manager_new (GdkDisplay *display);
void _gdk_x11_device_xi_update_window_info (GdkWindow *window);
void _gdk_x11_device_xi_update_axes (GdkDevice *device,
gint axes_count,
gint first_axis,
gint *axis_data);
void _gdk_x11_device_xi_translate_axes (GdkDevice *device,
GdkWindow *window,
gint *axis_data,
gdouble *axes,
gdouble *x,
gdouble *y);
guchar * _gdk_x11_device_xi2_translate_event_mask (GdkEventMask event_mask,
gint *len);
guint _gdk_x11_device_xi2_translate_state (XIModifierState *mods_state,
XIButtonState *buttons_state);
void _gdk_x11_display_manager_add_display (GdkDisplayManager *manager,
GdkDisplay *display);
void _gdk_x11_display_manager_remove_display (GdkDisplayManager *manager,
......
......@@ -57,7 +57,11 @@
#include <gdk/x11/gdkx11cursor.h>
#include <gdk/x11/gdkx11device-core.h>
#include <gdk/x11/gdkx11device-xi.h>
#include <gdk/x11/gdkx11device-xi2.h>
#include <gdk/x11/gdkx11devicemanager-core.h>
#include <gdk/x11/gdkx11devicemanager-xi.h>
#include <gdk/x11/gdkx11devicemanager-xi2.h>
#include <gdk/x11/gdkx11display.h>
#include <gdk/x11/gdkx11displaymanager.h>
#include <gdk/x11/gdkx11keys.h>
......
......@@ -17,8 +17,8 @@
* Boston, MA 02111-1307, USA.
*/
#ifndef __GDK_DEVICE_XI_H__
#define __GDK_DEVICE_XI_H__
#ifndef __GDK_X11_DEVICE_XI_H__
#define __GDK_X11_DEVICE_XI_H__
#include "gdkdeviceprivate.h"
......@@ -26,20 +26,21 @@
G_BEGIN_DECLS
#define GDK_TYPE_DEVICE_XI (gdk_device_xi_get_type ())
#define GDK_DEVICE_XI(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDK_TYPE_DEVICE_XI, GdkDeviceXI))
#define GDK_DEVICE_XI_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), GDK_TYPE_DEVICE_XI, GdkDeviceXIClass))
#define GDK_IS_DEVICE_XI(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDK_TYPE_DEVICE_XI))
#define GDK_IS_DEVICE_XI_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GDK_TYPE_DEVICE_XI))
#define GDK_DEVICE_XI_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDK_TYPE_DEVICE_XI, GdkDeviceXIClass))
#define GDK_TYPE_X11_DEVICE_XI (gdk_x11_device_xi_get_type ())
#define GDK_X11_DEVICE_XI(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDK_TYPE_X11_DEVICE_XI, GdkX11DeviceXI))
#define GDK_X11_DEVICE_XI_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), GDK_TYPE_X11_DEVICE_XI, GdkX11DeviceXIClass))
#define GDK_IS_X11_DEVICE_XI(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDK_TYPE_X11_DEVICE_XI))
#define GDK_IS_X11_DEVICE_XI_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GDK_TYPE_X11_DEVICE_XI))
#define GDK_X11_DEVICE_XI_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDK_TYPE_X11_DEVICE_XI, GdkX11DeviceXIClass))
typedef struct _GdkDeviceXI GdkDeviceXI;
typedef struct _GdkDeviceXIClass GdkDeviceXIClass;
typedef struct _GdkX11DeviceXI GdkX11DeviceXI;
typedef struct _GdkX11DeviceXIClass GdkX11DeviceXIClass;
struct _GdkDeviceXI
struct _GdkX11DeviceXI
{
GdkDevice parent_instance;
/*< private >*/
guint32 device_id;
XDevice *xdevice;
......@@ -54,36 +55,18 @@ struct _GdkDeviceXI
/* minimum key code for device */
gint min_keycode;
gint *axis_data;
guint in_proximity : 1;
};
struct _GdkDeviceXIClass
struct _GdkX11DeviceXIClass
{
GdkDeviceClass parent_class;
};
G_GNUC_INTERNAL
GType gdk_device_xi_get_type (void) G_GNUC_CONST;
G_GNUC_INTERNAL
void gdk_device_xi_update_window_info (GdkWindow *window);
G_GNUC_INTERNAL
void gdk_device_xi_update_axes (GdkDevice *device,
gint axes_count,
gint first_axis,
gint *axis_data);
G_GNUC_INTERNAL
void gdk_device_xi_translate_axes (GdkDevice *device,
GdkWindow *window,
gint *axis_data,
gdouble *axes,
gdouble *x,
gdouble *y);
GType gdk_x11_device_xi_get_type (void) G_GNUC_CONST;
G_END_DECLS
#endif /* __GDK_DEVICE_XI_H__ */
#endif /* __GDK_X11_DEVICE_XI_H__ */
......@@ -17,8 +17,8 @@
* Boston, MA 02111-1307, USA.
*/
#ifndef __GDK_DEVICE_XI2_H__
#define __GDK_DEVICE_XI2_H__
#ifndef __GDK_X11_DEVICE_XI2_H__
#define __GDK_X11_DEVICE_XI2_H__
#include "gdkdeviceprivate.h"
......@@ -26,41 +26,31 @@
G_BEGIN_DECLS
#define GDK_TYPE_DEVICE_XI2 (gdk_device_xi2_get_type ())
#define GDK_DEVICE_XI2(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDK_TYPE_DEVICE_XI2, GdkDeviceXI2))
#define GDK_DEVICE_XI2_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), GDK_TYPE_DEVICE_XI2, GdkDeviceXI2Class))
#define GDK_IS_DEVICE_XI2(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDK_TYPE_DEVICE_XI2))
#define GDK_IS_DEVICE_XI2_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GDK_TYPE_DEVICE_XI2))
#define GDK_DEVICE_XI2_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDK_TYPE_DEVICE_XI2, GdkDeviceXI2Class))
#define GDK_TYPE_X11_DEVICE_XI2 (gdk_x11_device_xi2_get_type ())
#define GDK_X11_DEVICE_XI2(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDK_TYPE_X11_DEVICE_XI2, GdkX11DeviceXI2))
#define GDK_X11_DEVICE_XI2_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), GDK_TYPE_X11_DEVICE_XI2, GdkX11DeviceXI2Class))
#define GDK_IS_X11_DEVICE_XI2(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDK_TYPE_X11_DEVICE_XI2))
#define GDK_IS_X11_DEVICE_XI2_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GDK_TYPE_X11_DEVICE_XI2))
#define GDK_X11_DEVICE_XI2_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDK_TYPE_X11_DEVICE_XI2, GdkX11DeviceXI2Class))
typedef struct _GdkDeviceXI2 GdkDeviceXI2;
typedef struct _GdkDeviceXI2Private GdkDeviceXI2Private;
typedef struct _GdkDeviceXI2Class GdkDeviceXI2Class;
typedef struct _GdkX11DeviceXI2 GdkX11DeviceXI2;
typedef struct _GdkX11DeviceXI2Class GdkX11DeviceXI2Class;
struct _GdkDeviceXI2
struct _GdkX11DeviceXI2
{
GdkDevice parent_instance;
/*< private >*/
GdkDeviceXI2Private *priv;
gint device_id;
};
struct _GdkDeviceXI2Class
struct _GdkX11DeviceXI2Class
{
GdkDeviceClass parent_class;
};
G_GNUC_INTERNAL
GType gdk_device_xi2_get_type (void) G_GNUC_CONST;
G_GNUC_INTERNAL
guchar * gdk_device_xi2_translate_event_mask (GdkEventMask event_mask,
int *len);
G_GNUC_INTERNAL
guint gdk_device_xi2_translate_state (XIModifierState *mods_state,
XIButtonState *buttons_state);
GType gdk_x11_device_xi2_get_type (void) G_GNUC_CONST;
G_END_DECLS
#endif /* __GDK_DEVICE_XI2_H__ */
#endif /* __GDK_X11_DEVICE_XI2_H__ */
......@@ -17,41 +17,39 @@
* Boston, MA 02111-1307, USA.
*/
#ifndef __GDK_DEVICE_MANAGER_XI_H__
#define __GDK_DEVICE_MANAGER_XI_H__
#ifndef __GDK_X11_DEVICE_MANAGER_XI_H__
#define __GDK_X11_DEVICE_MANAGER_XI_H__
#include "gdkx11devicemanager-core.h"
G_BEGIN_DECLS
#define GDK_TYPE_DEVICE_MANAGER_XI (gdk_device_manager_xi_get_type ())
#define GDK_DEVICE_MANAGER_XI(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDK_TYPE_DEVICE_MANAGER_XI, GdkDeviceManagerXI))
#define GDK_DEVICE_MANAGER_XI_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), GDK_TYPE_DEVICE_MANAGER_XI, GdkDeviceManagerXIClass))
#define GDK_IS_DEVICE_MANAGER_XI(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDK_TYPE_DEVICE_MANAGER_XI))
#define GDK_IS_DEVICE_MANAGER_XI_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GDK_TYPE_DEVICE_MANAGER_XI))
#define GDK_DEVICE_MANAGER_XI_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDK_TYPE_DEVICE_MANAGER_XI, GdkDeviceManagerXIClass))
#define GDK_TYPE_X11_DEVICE_MANAGER_XI (gdk_x11_device_manager_xi_get_type ())
#define GDK_X11_DEVICE_MANAGER_XI(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDK_TYPE_X11_DEVICE_MANAGER_XI, GdkX11DeviceManagerXI))
#define GDK_X11_DEVICE_MANAGER_XI_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), GDK_TYPE_X11_DEVICE_MANAGER_XI, GdkX11DeviceManagerXIClass))
#define GDK_IS_X11_DEVICE_MANAGER_XI(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDK_TYPE_X11_DEVICE_MANAGER_XI))
#define GDK_IS_X11_DEVICE_MANAGER_XI_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GDK_TYPE_X11_DEVICE_MANAGER_XI))
#define GDK_X11_DEVICE_MANAGER_XI_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDK_TYPE_X11_DEVICE_MANAGER_XI, GdkX11DeviceManagerXIClass))
typedef struct _GdkDeviceManagerXI GdkDeviceManagerXI;
typedef struct _GdkDeviceManagerXIPrivate GdkDeviceManagerXIPrivate;
typedef struct _GdkDeviceManagerXIClass GdkDeviceManagerXIClass;
typedef struct _GdkX11DeviceManagerXI GdkX11DeviceManagerXI;
typedef struct _GdkX11DeviceManagerXIPrivate GdkX11DeviceManagerXIPrivate;
typedef struct _GdkX11DeviceManagerXIClass GdkX11DeviceManagerXIClass;
struct _GdkDeviceManagerXI
struct _GdkX11DeviceManagerXI
{
GdkX11DeviceManagerCore parent_object;
GdkDevice *core_pointer;
GdkDevice *core_keyboard;
/*< private >*/
GdkDeviceManagerXIPrivate *priv;
GdkX11DeviceManagerXIPrivate *priv;
};
struct _GdkDeviceManagerXIClass
struct _GdkX11DeviceManagerXIClass
{
GdkX11DeviceManagerCoreClass parent_class;
};
GType gdk_device_manager_xi_get_type (void) G_GNUC_CONST;
GType gdk_x11_device_manager_xi_get_type (void) G_GNUC_CONST;
G_END_DECLS
#endif /* __GDK_DEVICE_MANAGER_XI_H__ */
#endif /* __GDK_X11_DEVICE_MANAGER_XI_H__ */
......@@ -17,8 +17,8 @@
* Boston, MA 02111-1307, USA.
*/
#ifndef __GDK_DEVICE_MANAGER_XI2_H__
#define __GDK_DEVICE_MANAGER_XI2_H__
#ifndef __GDK_X11_DEVICE_MANAGER_XI2_H__
#define __GDK_X11_DEVICE_MANAGER_XI2_H__
#include "gdkdevicemanagerprivate.h"
......@@ -26,20 +26,22 @@
G_BEGIN_DECLS
#define GDK_TYPE_DEVICE_MANAGER_XI2 (gdk_device_manager_xi2_get_type ())
#define GDK_DEVICE_MANAGER_XI2(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDK_TYPE_DEVICE_MANAGER_XI2, GdkDeviceManagerXI2))
#define GDK_DEVICE_MANAGER_XI2_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), GDK_TYPE_DEVICE_MANAGER_XI2, GdkDeviceManagerXI2Class))
#define GDK_IS_DEVICE_MANAGER_XI2(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDK_TYPE_DEVICE_MANAGER_XI2))
#define GDK_IS_DEVICE_MANAGER_XI2_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GDK_TYPE_DEVICE_MANAGER_XI2))
#define GDK_DEVICE_MANAGER_XI2_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDK_TYPE_DEVICE_MANAGER_XI2, GdkDeviceManagerXI2Class))
#define GDK_TYPE_X11_DEVICE_MANAGER_XI2 (gdk_x11_device_manager_xi2_get_type ())
#define GDK_X11_DEVICE_MANAGER_XI2(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDK_TYPE_X11_DEVICE_MANAGER_XI2, GdkX11DeviceManagerXI2))
#define GDK_X11_DEVICE_MANAGER_XI2_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), GDK_TYPE_X11_DEVICE_MANAGER_XI2, GdkX11DeviceManagerXI2Class))
#define GDK_IS_X11_DEVICE_MANAGER_XI2(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDK_TYPE_X11_DEVICE_MANAGER_XI2))
#define GDK_IS_X11_DEVICE_MANAGER_XI2_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GDK_TYPE_X11_DEVICE_MANAGER_XI2))
#define GDK_X11_DEVICE_MANAGER_XI2_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDK_TYPE_X11_DEVICE_MANAGER_XI2, GdkX11DeviceManagerXI2Class))
typedef struct _GdkDeviceManagerXI2 GdkDeviceManagerXI2;
typedef struct _GdkDeviceManagerXI2Class GdkDeviceManagerXI2Class;
typedef struct _GdkX11DeviceManagerXI2 GdkX11DeviceManagerXI2;
typedef struct _GdkX11DeviceManagerXI2Class GdkX11DeviceManagerXI2Class;
struct _GdkDeviceManagerXI2
struct _GdkX11DeviceManagerXI2
{
GdkDeviceManager parent_object;
/*< private >*/
GHashTable *id_table;
GList *master_devices;
......@@ -47,17 +49,17 @@ struct _GdkDeviceManagerXI2
GdkDevice *client_pointer;
int opcode;
gint opcode;
};
struct _GdkDeviceManagerXI2Class
struct _GdkX11DeviceManagerXI2Class
{
GdkDeviceManagerClass parent_class;
};
GType gdk_device_manager_xi2_get_type (void) G_GNUC_CONST;
GType gdk_x11_device_manager_xi2_get_type (void) G_GNUC_CONST;
G_END_DECLS
#endif /* __GDK_DEVICE_MANAGER_XI2_H__ */
#endif /* __GDK_X11_DEVICE_MANAGER_XI2_H__ */
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