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 /* Returns a list of GdkDevice * */
101 GList * gdk_devices_list (void);
103 /* Functions to configure a device */
104 void gdk_device_set_source (GdkDevice *device,
105 GdkInputSource source);
107 gboolean gdk_device_set_mode (GdkDevice *device,
110 void gdk_device_set_key (GdkDevice *device,
113 GdkModifierType modifiers);
115 void gdk_device_set_axis_use (GdkDevice *device,
118 void gdk_device_get_state (GdkDevice *device,
121 GdkModifierType *mask);
122 gboolean gdk_device_get_history (GdkDevice *device,
126 GdkTimeCoord ***events,
128 void gdk_device_free_history (GdkTimeCoord **events,
130 gboolean gdk_device_get_axis (GdkDevice *device,
135 void gdk_input_set_extension_events (GdkWindow *window,
137 GdkExtensionMode mode);
139 GdkDevice *gdk_device_get_core_pointer (void);
143 #endif /* __cplusplus */
145 #endif /* __GDK_INPUT_H__ */