Ardour  9.0-pre0-582-g084a23a80d
gdkinputprivate.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_INPUTPRIVATE_H__
28 #define __GDK_INPUTPRIVATE_H__
29 
30 #include "config.h"
31 #include "gdkinput.h"
32 #include "gdkevents.h"
33 #include "gdkquartz.h"
34 
35 typedef struct _GdkAxisInfo GdkAxisInfo;
36 typedef struct _GdkInputVTable GdkInputVTable;
37 typedef struct _GdkDevicePrivate GdkDevicePrivate;
38 
40  gint (*set_mode) (guint32 deviceid, GdkInputMode mode);
41  void (*set_axes) (guint32 deviceid, GdkAxisUse *axes);
42  void (*set_key) (guint32 deviceid,
43  guint index,
44  guint keyval,
45  GdkModifierType modifiers);
46 
47  GdkTimeCoord* (*motion_events) (GdkWindow *window,
48  guint32 deviceid,
49  guint32 start,
50  guint32 stop,
51  gint *nevents_return);
52  void (*get_pointer) (GdkWindow *window,
53  guint32 deviceid,
54  gdouble *x,
55  gdouble *y,
56  gdouble *pressure,
57  gdouble *xtilt,
58  gdouble *ytilt,
59  GdkModifierType *mask);
60  gint (*grab_pointer) (GdkWindow * window,
61  gint owner_events,
62  GdkEventMask event_mask,
63  GdkWindow * confine_to,
64  guint32 time);
65  void (*ungrab_pointer) (guint32 time);
66 
67  void (*configure_event) (GdkEventConfigure *event, GdkWindow *window);
68  void (*enter_event) (GdkEventCrossing *event, GdkWindow *window);
69  gint (*other_event) (GdkEvent *event, GdkWindow *window);
70  /* Handle an unidentified event. Returns TRUE if handled, FALSE
71  otherwise */
72  gint (*window_none_event) (GdkEvent *event);
73  gint (*enable_window) (GdkWindow *window, GdkDevicePrivate *gdkdev);
74  gint (*disable_window) (GdkWindow *window, GdkDevicePrivate *gdkdev);
75 };
76 
77 /* information about a device axis */
79 {
80  /* reported x resolution */
82 
83  /* reported x minimum/maximum values */
85 
86  /* calibrated resolution (for aspect ration) - only relative values
87  between axes used */
88  gint resolution;
89 
90  /* calibrated minimum/maximum values */
92 };
93 
94 #define GDK_INPUT_NUM_EVENTC 6
95 
98 
99  gint last_state;
100  gdouble *last_axes_state;
101 };
102 
104 {
105  GObjectClass parent_class;
106 };
107 
109 {
110  /* gdk window */
112 
113  /* Extension mode (GDK_EXTENSION_EVENTS_ALL/CURSOR) */
115 
116  /* position relative to root window */
117  gint root_x;
118  gint root_y;
119 
120  /* rectangles relative to window of windows obscuring this one */
123 
124  /* Is there a pointer grab for this window ? */
125  gint grabbed;
126 };
127 
128 /* Global data */
129 
130 extern const GdkDevice gdk_input_core_info;
131 
133 /* information about network port and host for gxid daemon */
134 extern gchar *_gdk_input_gxid_host;
135 extern gint _gdk_input_gxid_port;
136 extern gint _gdk_input_ignore_core;
137 
138 /* Function declarations */
139 
142 void _gdk_input_init (void);
143 void _gdk_input_exit (void);
145  GdkDevicePrivate *gdkdev);
147  GdkDevicePrivate *gdkdev);
149 
151  gboolean enter);
152 
153 void _gdk_input_quartz_tablet_proximity (NSPointingDeviceType deviceType);
155  NSEvent *nsevent,
156  GdkEvent *input_event);
157 
158 void _gdk_input_exit (void);
159 
160 #endif /* __GDK_INPUTPRIVATE_H__ */
GdkEventMask
Definition: gdkevents.h:166
GdkInputMode
Definition: gdkinput.h:67
GdkExtensionMode
Definition: gdkinput.h:52
GdkAxisUse
Definition: gdkinput.h:74
void _gdk_init_input_core(void)
void _gdk_input_quartz_tablet_proximity(NSPointingDeviceType deviceType)
GdkInputVTable gdk_input_vtable
void _gdk_input_window_destroy(GdkWindow *window)
gint _gdk_input_ignore_core
GdkInputWindow * _gdk_input_window_find(GdkWindow *window)
gint _gdk_input_enable_window(GdkWindow *window, GdkDevicePrivate *gdkdev)
void _gdk_input_exit(void)
void _gdk_input_init(void)
gchar * _gdk_input_gxid_host
gint _gdk_input_gxid_port
void _gdk_input_window_crossing(GdkWindow *window, gboolean enter)
gint _gdk_input_disable_window(GdkWindow *window, GdkDevicePrivate *gdkdev)
const GdkDevice gdk_input_core_info
gboolean _gdk_input_fill_quartz_input_event(GdkEvent *event, NSEvent *nsevent, GdkEvent *input_event)
GdkModifierType
Definition: gdktypes.h:127
PBD::PropertyDescriptor< timepos_t > start
GObjectClass parent_class
gdouble * last_axes_state
void(* configure_event)(GdkEventConfigure *event, GdkWindow *window)
gint(* disable_window)(GdkWindow *window, GdkDevicePrivate *gdkdev)
gint(* set_mode)(guint32 deviceid, GdkInputMode mode)
gint(* other_event)(GdkEvent *event, GdkWindow *window)
void(* get_pointer)(GdkWindow *window, guint32 deviceid, gdouble *x, gdouble *y, gdouble *pressure, gdouble *xtilt, gdouble *ytilt, GdkModifierType *mask)
void(* ungrab_pointer)(guint32 time)
void(* enter_event)(GdkEventCrossing *event, GdkWindow *window)
gint(* enable_window)(GdkWindow *window, GdkDevicePrivate *gdkdev)
gint(* grab_pointer)(GdkWindow *window, gint owner_events, GdkEventMask event_mask, GdkWindow *confine_to, guint32 time)
void(* set_key)(guint32 deviceid, guint index, guint keyval, GdkModifierType modifiers)
gint(* window_none_event)(GdkEvent *event)
void(* set_axes)(guint32 deviceid, GdkAxisUse *axes)
GdkExtensionMode mode
GdkWindow * window
GdkRectangle * obscuring