Ardour  9.0-pre0-582-g084a23a80d
gdkinput.h
Go to the documentation of this file.
1 /* GDK - The GIMP Drawing Kit
2  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19 
20 /*
21  * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
22  * file for a list of people on the GTK+ Team. See the ChangeLog
23  * files for a list of changes. These files are distributed with
24  * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
25  */
26 
27 #ifndef __GDK_INPUT_H__
28 #define __GDK_INPUT_H__
29 
30 #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
31 #error "Only <gdk/gdk.h> can be included directly."
32 #endif
33 
34 #include <gdk/gdktypes.h>
35 
36 G_BEGIN_DECLS
37 
38 #define GDK_TYPE_DEVICE (gdk_device_get_type ())
39 #define GDK_DEVICE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_DEVICE, GdkDevice))
40 #define GDK_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_DEVICE, GdkDeviceClass))
41 #define GDK_IS_DEVICE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_DEVICE))
42 #define GDK_IS_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_DEVICE))
43 #define GDK_DEVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_DEVICE, GdkDeviceClass))
44 
45 typedef struct _GdkDeviceKey GdkDeviceKey;
46 typedef struct _GdkDeviceAxis GdkDeviceAxis;
47 typedef struct _GdkDevice GdkDevice;
48 typedef struct _GdkDeviceClass GdkDeviceClass;
49 typedef struct _GdkTimeCoord GdkTimeCoord;
50 
51 typedef enum
52 {
57 
58 typedef enum
59 {
65 
66 typedef enum
67 {
72 
73 typedef enum
74 {
84 
86 {
87  guint keyval;
89 };
90 
92 {
94  gdouble min;
95  gdouble max;
96 };
97 
98 struct _GdkDevice
99 {
101  /* All fields are read-only */
102 
103  gchar *GSEAL (name);
106  gboolean GSEAL (has_cursor); /* TRUE if the X pointer follows device motion */
107 
108  gint GSEAL (num_axes);
110 
111  gint GSEAL (num_keys);
113 };
114 
115 /* We don't allocate each coordinate this big, but we use it to
116  * be ANSI compliant and avoid accessing past the defined limits.
117  */
118 #define GDK_MAX_TIMECOORD_AXES 128
119 
121 {
122  guint32 time;
124 };
125 
126 GType gdk_device_get_type (void) G_GNUC_CONST;
127 
128 #ifndef GDK_MULTIHEAD_SAFE
129 /* Returns a list of GdkDevice * */
130 GList * gdk_devices_list (void);
131 #endif /* GDK_MULTIHEAD_SAFE */
132 
133 const gchar * gdk_device_get_name (GdkDevice *device);
137 
139  guint index,
140  guint *keyval,
141  GdkModifierType *modifiers);
143  guint index);
146 
147 /* Functions to configure a device */
149  GdkInputSource source);
150 
151 gboolean gdk_device_set_mode (GdkDevice *device,
152  GdkInputMode mode);
153 
155  guint index_,
156  guint keyval,
157  GdkModifierType modifiers);
158 
160  guint index_,
161  GdkAxisUse use);
162 
164  GdkWindow *window,
165  gdouble *axes,
166  GdkModifierType *mask);
167 
169  GdkWindow *window,
170  guint32 start,
171  guint32 stop,
172  GdkTimeCoord ***events,
173  gint *n_events);
174 
176  gint n_events);
177 gboolean gdk_device_get_axis (GdkDevice *device,
178  gdouble *axes,
179  GdkAxisUse use,
180  gdouble *value);
181 
183  gint mask,
184  GdkExtensionMode mode);
185 
186 #ifndef GDK_MULTIHEAD_SAFE
188 #endif
189 
190 G_END_DECLS
191 
192 #endif /* __GDK_INPUT_H__ */
GList * gdk_devices_list(void)
void gdk_device_free_history(GdkTimeCoord **events, gint n_events)
void gdk_device_set_key(GdkDevice *device, guint index_, guint keyval, GdkModifierType modifiers)
gint gdk_device_get_n_axes(GdkDevice *device)
gboolean gdk_device_get_history(GdkDevice *device, GdkWindow *window, guint32 start, guint32 stop, GdkTimeCoord ***events, gint *n_events)
gint gdk_device_get_n_keys(GdkDevice *device)
gboolean gdk_device_set_mode(GdkDevice *device, GdkInputMode mode)
gboolean gdk_device_get_axis(GdkDevice *device, gdouble *axes, GdkAxisUse use, gdouble *value)
GdkInputSource gdk_device_get_source(GdkDevice *device)
GType gdk_device_get_type(void) G_GNUC_CONST
const gchar * gdk_device_get_name(GdkDevice *device)
GdkDevice * gdk_device_get_core_pointer(void)
GdkInputMode
Definition: gdkinput.h:67
@ GDK_MODE_DISABLED
Definition: gdkinput.h:68
@ GDK_MODE_WINDOW
Definition: gdkinput.h:70
@ GDK_MODE_SCREEN
Definition: gdkinput.h:69
void gdk_device_set_axis_use(GdkDevice *device, guint index_, GdkAxisUse use)
GdkInputSource
Definition: gdkinput.h:59
@ GDK_SOURCE_CURSOR
Definition: gdkinput.h:63
@ GDK_SOURCE_ERASER
Definition: gdkinput.h:62
@ GDK_SOURCE_PEN
Definition: gdkinput.h:61
@ GDK_SOURCE_MOUSE
Definition: gdkinput.h:60
GdkExtensionMode
Definition: gdkinput.h:52
@ GDK_EXTENSION_EVENTS_NONE
Definition: gdkinput.h:53
@ GDK_EXTENSION_EVENTS_CURSOR
Definition: gdkinput.h:55
@ GDK_EXTENSION_EVENTS_ALL
Definition: gdkinput.h:54
void gdk_device_get_state(GdkDevice *device, GdkWindow *window, gdouble *axes, GdkModifierType *mask)
GdkAxisUse
Definition: gdkinput.h:74
@ GDK_AXIS_IGNORE
Definition: gdkinput.h:75
@ GDK_AXIS_Y
Definition: gdkinput.h:77
@ GDK_AXIS_X
Definition: gdkinput.h:76
@ GDK_AXIS_LAST
Definition: gdkinput.h:82
@ GDK_AXIS_XTILT
Definition: gdkinput.h:79
@ GDK_AXIS_WHEEL
Definition: gdkinput.h:81
@ GDK_AXIS_PRESSURE
Definition: gdkinput.h:78
@ GDK_AXIS_YTILT
Definition: gdkinput.h:80
gboolean gdk_device_get_has_cursor(GdkDevice *device)
void gdk_input_set_extension_events(GdkWindow *window, gint mask, GdkExtensionMode mode)
void gdk_device_set_source(GdkDevice *device, GdkInputSource source)
GdkAxisUse gdk_device_get_axis_use(GdkDevice *device, guint index)
void gdk_device_get_key(GdkDevice *device, guint index, guint *keyval, GdkModifierType *modifiers)
GdkInputMode gdk_device_get_mode(GdkDevice *device)
#define GDK_MAX_TIMECOORD_AXES
Definition: gdkinput.h:118
GdkModifierType
Definition: gdktypes.h:127
GtkImageIconNameData name
Definition: gtkimage.h:6
PBD::PropertyDescriptor< timepos_t > start
gdouble min
Definition: gdkinput.h:94
gdouble max
Definition: gdkinput.h:95
GdkAxisUse use
Definition: gdkinput.h:93
guint keyval
Definition: gdkinput.h:87
GdkModifierType modifiers
Definition: gdkinput.h:88
GObject parent_instance
Definition: gdkinput.h:100
GdkDeviceKey * GSEAL(keys)
gint GSEAL(num_keys)
gchar * GSEAL(name)
GdkInputSource GSEAL(source)
GdkInputMode GSEAL(mode)
gint GSEAL(num_axes)
GdkDeviceAxis * GSEAL(axes)
gboolean GSEAL(has_cursor)
gdouble axes[128]
Definition: gdkinput.h:123
guint32 time
Definition: gdkinput.h:122