1 #ifndef __GDK_INPUT_H__
2 #define __GDK_INPUT_H__
4 #include <gdk/gdktypes.h>
8 #endif /* __cplusplus */
10 #define GDK_TYPE_DEVICE (gdk_device_get_type ())
11 #define GDK_DEVICE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_DEVICE, GdkDevice))
12 #define GDK_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_DEVICE, GdkDeviceClass))
13 #define GDK_IS_DEVICE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_DEVICE))
14 #define GDK_IS_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_DEVICE))
15 #define GDK_DEVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_DEVICE, GdkDeviceClass))
17 typedef struct _GdkDeviceKey GdkDeviceKey;
18 typedef struct _GdkDeviceAxis GdkDeviceAxis;
19 typedef struct _GdkDevice GdkDevice;
20 typedef struct _GdkDeviceClass GdkDeviceClass;
21 typedef struct _GdkTimeCoord GdkTimeCoord;
25 GDK_EXTENSION_EVENTS_NONE,
26 GDK_EXTENSION_EVENTS_ALL,
27 GDK_EXTENSION_EVENTS_CURSOR
60 GdkModifierType modifiers;
72 GObject parent_instance;
73 /* All fields are read-only */
76 GdkInputSource source;
78 gboolean has_cursor; /* TRUE if the X pointer follows device motion */
87 /* We don't allocate each coordinate this big, but we use it to
88 * be ANSI compliant and avoid accessing past the defined limits.
90 #define GDK_MAX_TIMECOORD_AXES 128
95 gdouble axes[GDK_MAX_TIMECOORD_AXES];
98 GType gdk_device_get_type (void);
100 #ifndef GDK_MULTIHEAD_SAFE
101 /* Returns a list of GdkDevice * */
102 GList * gdk_devices_list (void);
103 #endif /* GDK_MULTIHEAD_SAFE */
105 /* Functions to configure a device */
106 void gdk_device_set_source (GdkDevice *device,
107 GdkInputSource source);
109 gboolean gdk_device_set_mode (GdkDevice *device,
112 void gdk_device_set_key (GdkDevice *device,
115 GdkModifierType modifiers);
117 void gdk_device_set_axis_use (GdkDevice *device,
120 void gdk_device_get_state (GdkDevice *device,
123 GdkModifierType *mask);
124 gboolean gdk_device_get_history (GdkDevice *device,
128 GdkTimeCoord ***events,
130 void gdk_device_free_history (GdkTimeCoord **events,
132 gboolean gdk_device_get_axis (GdkDevice *device,
137 void gdk_input_set_extension_events (GdkWindow *window,
139 GdkExtensionMode mode);
141 #ifndef GDK_MULTIHEAD_SAFE
142 GdkDevice *gdk_device_get_core_pointer (void);
147 #endif /* __cplusplus */
149 #endif /* __GDK_INPUT_H__ */