1 /* GDK - The GIMP Drawing Kit
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library 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.
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 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library 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.
21 * Modified by the GTK+ Team and others 1997-1999. 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/.
27 #ifndef __GDK_INPUT_WIN32_H__
28 #define __GDK_INPUT_WIN32_H__
34 typedef struct _GdkAxisInfo GdkAxisInfo;
35 typedef struct _GdkDevicePrivate GdkDevicePrivate;
36 typedef struct _GdkInputWindow GdkInputWindow;
38 /* information about a device axis */
41 /* reported x resolution */
44 /* reported x minimum/maximum values */
45 gint xmin_value, xmax_value;
47 /* calibrated resolution (for aspect ration) - only relative values
51 /* calibrated minimum/maximum values */
52 gint min_value, max_value;
55 struct _GdkDeviceClass
57 GObjectClass parent_class;
60 #define GDK_INPUT_NUM_EVENTC 6
62 struct _GdkDevicePrivate
66 /* information about the axes */
69 /* minimum key code for device */
72 int buttonpress_type, buttonrelease_type, keypress_type,
73 keyrelease_type, motionnotify_type, proximityin_type,
74 proximityout_type, changenotify_type;
76 /* true if we need to select a different set of events, but
77 can't because this is the core pointer */
80 /* Mask of buttons (used for button grabs) */
83 /* true if we've claimed the device as active. (used only for XINPUT_GXI) */
93 /* The cursor's CSR_PKTDATA */
97 /* Azimuth and altitude axis */
98 AXIS orientation_axes[2];
102 struct _GdkInputWindow
107 /* Extension mode (GDK_EXTENSION_EVENTS_ALL/CURSOR) */
108 GdkExtensionMode mode;
110 /* position relative to root window */
114 /* rectangles relative to window of windows obscuring this one */
115 GdkRectangle *obscuring;
118 /* Is there a pointer grab for this window ? */
124 #define GDK_IS_CORE(d) (((GdkDevice *)(d)) == _gdk_core_pointer)
126 extern GList *_gdk_input_devices;
127 extern GList *_gdk_input_windows;
129 extern gint _gdk_input_ignore_core;
131 /* Function declarations */
132 void _gdk_init_input_core (void);
134 void gdk_input_window_destroy (GdkWindow *window);
135 GdkTimeCoord ** _gdk_device_allocate_history (GdkDevice *device,
138 /* The following functions are provided by each implementation
139 * (just wintab for now)
141 gint _gdk_input_window_none_event(GdkEvent *event,
143 void _gdk_input_configure_event (GdkEventConfigure *event,
145 void _gdk_input_enter_event (GdkEventCrossing *event,
147 gint _gdk_input_other_event (GdkEvent *event,
151 /* These should be in gdkinternals.h */
153 GdkInputWindow *gdk_input_window_find (GdkWindow *window);
155 void gdk_input_window_destroy (GdkWindow *window);
157 gint _gdk_input_enable_window (GdkWindow *window,
158 GdkDevicePrivate *gdkdev);
159 gint _gdk_input_disable_window (GdkWindow *window,
160 GdkDevicePrivate *gdkdev);
161 gint _gdk_input_grab_pointer (GdkWindow *window,
163 GdkEventMask event_mask,
164 GdkWindow *confine_to,
166 void _gdk_input_ungrab_pointer (guint32 time);
167 gboolean _gdk_device_get_history (GdkDevice *device,
171 GdkTimeCoord ***events,
175 #define GDK_MAX_DEVICE_CLASSES 13
177 gint gdk_input_common_init (gint include_core);
178 gint gdk_input_common_other_event (GdkEvent *event,
180 GdkInputWindow *input_window,
183 #endif /* __GDK_INPUT_WIN32_H__ */