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 #define GDK_INPUT_NUM_EVENTC 6
57 struct _GdkDevicePrivate
61 /* information about the axes */
64 /* minimum key code for device */
67 int buttonpress_type, buttonrelease_type, keypress_type,
68 keyrelease_type, motionnotify_type, proximityin_type,
69 proximityout_type, changenotify_type;
71 /* true if we need to select a different set of events, but
72 can't because this is the core pointer */
75 /* Mask of buttons (used for button grabs) */
78 /* true if we've claimed the device as active. (used only for XINPUT_GXI) */
88 /* The cursor's CSR_PKTDATA */
92 /* Azimuth and altitude axis */
93 AXIS orientation_axes[2];
97 struct _GdkInputWindow
102 /* Extension mode (GDK_EXTENSION_EVENTS_ALL/CURSOR) */
103 GdkExtensionMode mode;
105 /* position relative to root window */
109 /* rectangles relative to window of windows obscuring this one */
110 GdkRectangle *obscuring;
113 /* Is there a pointer grab for this window ? */
119 #define GDK_IS_CORE(d) (((GdkDevice *)(d)) == gdk_core_pointer)
121 extern GList *gdk_input_devices;
122 extern GList *gdk_input_windows;
124 extern gint gdk_input_ignore_core;
126 extern GdkDevice gdk_input_core_info;
128 /* Function declarations */
130 void gdk_input_window_destroy (GdkWindow *window);
131 GdkTimeCoord ** _gdk_device_allocate_history (GdkDevice *device,
134 /* The following functions are provided by each implementation
135 * (just wintab for now)
137 gint _gdk_input_window_none_event(GdkEvent *event,
139 void _gdk_input_configure_event (GdkEventConfigure *event,
141 void _gdk_input_enter_event (GdkEventCrossing *event,
143 gint _gdk_input_other_event (GdkEvent *event,
147 /* These should be in gdkinternals.h */
149 GdkInputWindow *gdk_input_window_find (GdkWindow *window);
151 gint _gdk_input_enable_window (GdkWindow *window,
152 GdkDevicePrivate *gdkdev);
153 gint _gdk_input_disable_window (GdkWindow *window,
154 GdkDevicePrivate *gdkdev);
155 gint _gdk_input_grab_pointer (GdkWindow *window,
157 GdkEventMask event_mask,
158 GdkWindow *confine_to,
160 void _gdk_input_ungrab_pointer (guint32 time);
161 gboolean _gdk_device_get_history (GdkDevice *device,
165 GdkTimeCoord ***events,
169 #define GDK_MAX_DEVICE_CLASSES 13
171 gint gdk_input_common_init (gint include_core);
172 gint gdk_input_common_other_event (GdkEvent *event,
174 GdkInputWindow *input_window,
177 #endif /* __GDK_INPUT_WIN32_H__ */