]> Pileus Git - ~andy/gtk/blob - gdk/directfb/gdkinput-directfb.h
Added ifdef to compile with 0.9.24 removes creating a child GdkWindow
[~andy/gtk] / gdk / directfb / gdkinput-directfb.h
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 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.
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  * Library General Public License for more details.
13  *
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.
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.
23  */
24
25 /*
26  * GTK+ DirectFB backend
27  * Copyright (C) 2001-2002  convergence integrated media GmbH
28  * Copyright (C) 2002       convergence GmbH
29  * Written by Denis Oliver Kropp <dok@convergence.de> and
30  *            Sven Neumann <sven@convergence.de>
31  */
32
33 #ifndef __GDK_INPUT_DIRECTFB_H__
34 #define __GDK_INPUT_DIRECTFB_H__
35
36 extern GdkModifierType _gdk_directfb_modifiers;
37 extern int _gdk_directfb_mouse_x, _gdk_directfb_mouse_y;
38
39 typedef struct _GdkAxisInfo      GdkAxisInfo;
40 typedef struct _GdkInputWindow   GdkInputWindow;
41
42 /* information about a device axis */
43 struct _GdkAxisInfo
44 {
45   /* reported x resolution */
46   gint xresolution;
47
48   /* reported x minimum/maximum values */
49   gint xmin_value, xmax_value;
50
51   /* calibrated resolution (for aspect ration) - only relative values
52      between axes used */
53   gint resolution;
54
55   /* calibrated minimum/maximum values */
56   gint min_value, max_value;
57 };
58
59 #define GDK_INPUT_NUM_EVENTC 6
60
61 struct _GdkDeviceClass
62 {
63   GObjectClass parent_class;
64 };
65
66 struct _GdkInputWindow
67 {
68   /* gdk window */
69   GdkWindow *window;
70
71   /* Extension mode (GDK_EXTENSION_EVENTS_ALL/CURSOR) */
72   GdkExtensionMode mode;
73
74   /* position relative to root window */
75   gint root_x;
76   gint root_y;
77
78   /* rectangles relative to window of windows obscuring this one */
79   GdkRectangle *obscuring;
80   gint num_obscuring;
81
82   /* Is there a pointer grab for this window ? */
83   gint grabbed;
84 };
85
86 /* Global data */
87
88 #define GDK_IS_CORE(d) (((GdkDevice *)(d)) == _gdk_core_pointer)
89
90 extern GList *_gdk_input_devices;
91 extern GList *_gdk_input_windows;
92
93 extern gint   _gdk_input_ignore_core;
94
95 /* Function declarations */
96
97 /* The following functions are provided by each implementation
98  */
99 gint             _gdk_input_window_none_event(GdkEvent          *event,
100                                               gchar             *msg);
101 void             _gdk_input_configure_event  (GdkEventConfigure *event,
102                                               GdkWindow         *window);
103 void             _gdk_input_enter_event      (GdkEventCrossing  *event,
104                                               GdkWindow         *window);
105 gint             _gdk_input_other_event      (GdkEvent          *event,
106                                               gchar             *msg,
107                                               GdkWindow         *window);
108
109 /* These should be in gdkinternals.h */
110
111 GdkInputWindow  * gdk_input_window_find      (GdkWindow         *window);
112
113 void              gdk_input_window_destroy   (GdkWindow         *window);
114
115 gint             _gdk_input_enable_window    (GdkWindow         *window,
116                                               GdkDevice         *gdkdev);
117 gint             _gdk_input_disable_window   (GdkWindow         *window,
118                                               GdkDevice         *gdkdev);
119 gint             _gdk_input_grab_pointer     (GdkWindow         *window,
120                                               gint               owner_events,
121                                               GdkEventMask       event_mask,
122                                               GdkWindow         *confine_to,
123                                               guint32            time);
124 void             _gdk_input_ungrab_pointer   (guint32            time);
125 gboolean         _gdk_device_get_history     (GdkDevice         *device,
126                                               GdkWindow         *window,
127                                               guint32            start,
128                                               guint32            stop,
129                                               GdkTimeCoord    ***events,
130                                               gint              *n_events);
131
132 gint             gdk_input_common_init        (gint              include_core);
133 gint             gdk_input_common_other_event (GdkEvent         *event,
134                                                gchar            *msg,
135                                                GdkInputWindow   *input_window,
136                                                GdkWindow        *window);
137
138 void         _gdk_directfb_keyboard_init      (void);
139 void         _gdk_directfb_keyboard_exit      (void);
140
141 void         gdk_directfb_translate_key_event (DFBWindowEvent   *dfb_event,
142                                                GdkEventKey      *event);
143
144 #endif /* __GDK_INPUT_DIRECTFB_H__ */