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__
33 typedef struct _GdkAxisInfo GdkAxisInfo;
34 typedef struct _GdkDevicePrivate GdkDevicePrivate;
35 typedef struct _GdkInputWindow GdkInputWindow;
37 /* information about a device axis */
40 /* reported x resolution */
43 /* reported x minimum/maximum values */
44 gint xmin_value, xmax_value;
46 /* calibrated resolution (for aspect ration) - only relative values
50 /* calibrated minimum/maximum values */
51 gint min_value, max_value;
54 struct _GdkDeviceClass
56 GObjectClass parent_class;
59 #define GDK_INPUT_NUM_EVENTC 6
61 struct _GdkDevicePrivate
65 /* information about the axes */
68 /* minimum key code for device */
71 int buttonpress_type, buttonrelease_type, keypress_type,
72 keyrelease_type, motionnotify_type, proximityin_type,
73 proximityout_type, changenotify_type;
75 /* true if we need to select a different set of events, but
76 can't because this is the core pointer */
79 /* Mask of buttons (used for button grabs) */
82 /* true if we've claimed the device as active. (used only for XINPUT_GXI) */
91 /* The cursor's CSR_PKTDATA */
95 /* Azimuth and altitude axis */
96 AXIS orientation_axes[2];
99 struct _GdkInputWindow
104 /* Extension mode (GDK_EXTENSION_EVENTS_ALL/CURSOR) */
105 GdkExtensionMode mode;
107 /* position relative to root window */
111 /* rectangles relative to window of windows obscuring this one */
112 GdkRectangle *obscuring;
115 /* Is there a pointer grab for this window ? */
121 #define GDK_IS_CORE(d) (((GdkDevice *)(d)) == gdk_display_get_default ()->core_pointer)
123 extern GList *_gdk_input_devices;
124 extern GList *_gdk_input_windows;
126 extern gint _gdk_input_ignore_core;
128 /* Function declarations */
129 void _gdk_init_input_core (GdkDisplay *display);
131 GdkTimeCoord ** _gdk_device_allocate_history (GdkDevice *device,
134 /* The following functions are provided by each implementation
135 * (just wintab for now)
137 void _gdk_input_configure_event (GdkWindow *window);
138 void _gdk_input_enter_event (GdkWindow *window);
139 gboolean _gdk_input_other_event (GdkEvent *event,
143 /* These should be in gdkinternals.h */
145 GdkInputWindow *_gdk_input_window_find (GdkWindow *window);
147 void _gdk_input_window_destroy (GdkWindow *window);
149 gint _gdk_input_enable_window (GdkWindow *window,
150 GdkDevicePrivate *gdkdev);
151 gint _gdk_input_disable_window (GdkWindow *window,
152 GdkDevicePrivate *gdkdev);
153 gint _gdk_input_grab_pointer (GdkWindow *window,
155 GdkEventMask event_mask,
156 GdkWindow *confine_to,
158 void _gdk_input_ungrab_pointer (guint32 time);
159 gboolean _gdk_device_get_history (GdkDevice *device,
163 GdkTimeCoord ***events,
166 void _gdk_input_wintab_init_check (void);
167 void _gdk_input_set_tablet_active (void);
169 #endif /* __GDK_INPUT_WIN32_H__ */