Ardour  9.0-pre0-582-g084a23a80d
event.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 // Generated by gmmproc 2.45.3 -- DO NOT MODIFY!
3 #ifndef _GDKMM_EVENT_H
4 #define _GDKMM_EVENT_H
5 
6 
7 #include <glibmm/ustring.h>
8 #include <sigc++/sigc++.h>
9 
10 /* Copyright (C) 1998-2002 The gtkmm Development Team
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  * You should have received a copy of the GNU Lesser General Public
23  * License along with this library; if not, write to the Free
24  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25  */
26 
27 
28 #include <gdkmm/window.h>
29 #include <gdkmm/screen.h>
30 
31 /* Shadow DELETE macro (from winnt.h).
32  */
33 #if defined(DELETE) && !defined(GTKMM_MACRO_SHADOW_DELETE)
34 enum { GTKMM_MACRO_DEFINITION_DELETE = DELETE };
35 #undef DELETE
36 enum { DELETE = GTKMM_MACRO_DEFINITION_DELETE };
37 #define DELETE DELETE
38 #define GTKMM_MACRO_SHADOW_DELETE 1
39 #endif
40 
41 #ifndef DOXYGEN_SHOULD_SKIP_THIS
42 extern "C" { typedef union _GdkEvent GdkEvent; }
43 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
44 
45 
46 namespace Gdk
47 {
48 
56 {
57  NOTHING = -1,
72  MAP,
99 };
100 
101 } // namespace Gdk
102 
103 
104 #ifndef DOXYGEN_SHOULD_SKIP_THIS
105 namespace Glib
106 {
107 
108 template <>
109 class Value<Gdk::EventType> : public Glib::Value_Enum<Gdk::EventType>
110 {
111 public:
112  static GType value_type() G_GNUC_CONST;
113 };
114 
115 } // namespace Glib
116 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
117 
118 
119 namespace Gdk
120 {
121 
122 
128 {
132 };
133 
134 } // namespace Gdk
135 
136 
137 #ifndef DOXYGEN_SHOULD_SKIP_THIS
138 namespace Glib
139 {
140 
141 template <>
142 class Value<Gdk::ExtensionMode> : public Glib::Value_Enum<Gdk::ExtensionMode>
143 {
144 public:
145  static GType value_type() G_GNUC_CONST;
146 };
147 
148 } // namespace Glib
149 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
150 
151 
152 namespace Gdk
153 {
154 
160 {
168  AXIS_LAST
169 };
170 
171 } // namespace Gdk
172 
173 
174 #ifndef DOXYGEN_SHOULD_SKIP_THIS
175 namespace Glib
176 {
177 
178 template <>
179 class Value<Gdk::AxisUse> : public Glib::Value_Enum<Gdk::AxisUse>
180 {
181 public:
182  static GType value_type() G_GNUC_CONST;
183 };
184 
185 } // namespace Glib
186 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
187 
188 
189 namespace Gdk
190 {
191 
192 
193 //TODO: Actually use this class instead of GdkEvent?
194 class Event
195 {
196  public:
197 #ifndef DOXYGEN_SHOULD_SKIP_THIS
198  typedef Event CppObjectType;
199  typedef GdkEvent BaseObjectType;
200 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
201 
204  static GType get_type() G_GNUC_CONST;
205 
206  Event();
207 
208  explicit Event(GdkEvent* gobject, bool make_a_copy = true);
209 
210  Event(const Event& other);
211  Event& operator=(const Event& other);
212 
213  ~Event();
214 
215  void swap(Event& other);
216 
218  GdkEvent* gobj() { return gobject_; }
219 
221  const GdkEvent* gobj() const { return gobject_; }
222 
224  GdkEvent* gobj_copy() const;
225 
226 protected:
228 
229 private:
230 
231 
232 public:
233 
234 
242  static Event get();
243 
251  static Event peek();
252 
253 #ifndef GDKMM_DISABLE_DEPRECATED
254 
265  static Event get_graphics_expose(const Glib::RefPtr<Window>& window);
266 #endif // GDKMM_DISABLE_DEPRECATED
267 
268 
273  void put();
274 
275 
280  static bool events_pending();
281 
282 
288  guint32 get_time() const;
289 
298  bool get_state(ModifierType& state) const;
299 
306  bool get_coords(double& x_win, double& y_win) const;
307 
314  bool get_root_coords(double& x_root, double& y_root) const;
315 
323  bool get_axis(AxisUse axis_use, double& value) const;
324  //_WRAP_METHOD(void gdk_event_handler_set(GdkEventFunc func, gpointer data, GDestroyNotify notify), gdk_event_handler_set)
325 
326 
334  static void set_show_events(bool show_events);
335 
340  static bool get_show_events();
341 
342 
349  void set_screen(const Glib::RefPtr<Screen>& screen);
350 
361  Glib::RefPtr<Screen> get_screen();
362 
373  Glib::RefPtr<const Screen> get_screen() const;
374 
375 
385  bool send_client_message(const Glib::RefPtr<Display>& display, NativeWindow winid);
386 
387 
388 };
389 
390 } // namespace Gdk
391 
392 
393 namespace Gdk
394 {
395 
400 inline void swap(Event& lhs, Event& rhs)
401  { lhs.swap(rhs); }
402 
403 } // namespace Gdk
404 
405 namespace Glib
406 {
407 
416 Gdk::Event wrap(GdkEvent* object, bool take_copy = false);
417 
418 #ifndef DOXYGEN_SHOULD_SKIP_THIS
419 template <>
420 class Value<Gdk::Event> : public Glib::Value_Boxed<Gdk::Event>
421 {};
422 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
423 
424 } // namespace Glib
425 
426 
427 #endif /* _GDKMM_EVENT_H */
428 
bool get_coords(double &x_win, double &y_win) const
bool send_client_message(const Glib::RefPtr< Display > &display, NativeWindow winid)
GdkEvent * gobj_copy() const
Provides access to the underlying C instance. The caller is responsible for freeing it....
Glib::RefPtr< Screen > get_screen()
static GType get_type() G_GNUC_CONST
Glib::RefPtr< const Screen > get_screen() const
GdkEvent * gobj()
Provides access to the underlying C instance.
Definition: event.h:218
GdkEvent * gobject_
Definition: event.h:227
void set_screen(const Glib::RefPtr< Screen > &screen)
bool send_client_message(NativeWindow winid)
void swap(Event &lhs, Event &rhs)
Definition: event.h:400
guint32 get_time() const
void put()
Gdk::Event wrap(GdkEvent *object, bool take_copy=false)
static Event get_graphics_expose(const Glib::RefPtr< Window > &window)
bool get_state(ModifierType &state) const
static Event peek()
const GdkEvent * gobj() const
Provides access to the underlying C instance.
Definition: event.h:221
bool get_axis(AxisUse axis_use, double &value) const
static bool get_show_events()
void swap(Event &other)
static void set_show_events(bool show_events)
bool get_root_coords(double &x_root, double &y_root) const
static bool events_pending()
static Event get()
ExtensionMode
Definition: event.h:128
EventType
Definition: event.h:56
AxisUse
Definition: event.h:160
@ EXTENSION_EVENTS_ALL
Definition: event.h:130
@ EXTENSION_EVENTS_CURSOR
Definition: event.h:131
@ EXTENSION_EVENTS_NONE
Definition: event.h:129
@ DOUBLE_BUTTON_PRESS
Definition: event.h:63
@ DESTROY
Definition: event.h:59
@ MAP
Definition: event.h:72
@ ENTER_NOTIFY
Definition: event.h:68
@ DAMAGE
Definition: event.h:94
@ GRAB_BROKEN
Definition: event.h:93
@ DROP_FINISHED
Definition: event.h:85
@ DELETE
Definition: event.h:58
@ KEY_RELEASE
Definition: event.h:67
@ CLIENT_EVENT
Definition: event.h:86
@ TRIPLE_BUTTON_PRESS
Definition: event.h:64
@ UNMAP
Definition: event.h:73
@ EXPOSE
Definition: event.h:60
@ NOTHING
Definition: event.h:57
@ SELECTION_NOTIFY
Definition: event.h:77
@ DRAG_ENTER
Definition: event.h:80
@ TOUCH_END
Definition: event.h:97
@ KEY_PRESS
Definition: event.h:66
@ VISIBILITY_NOTIFY
Definition: event.h:87
@ SETTING
Definition: event.h:91
@ EVENT_LAST
Definition: event.h:98
@ PROXIMITY_OUT
Definition: event.h:79
@ TOUCH_BEGIN
Definition: event.h:95
@ PROXIMITY_IN
Definition: event.h:78
@ CONFIGURE
Definition: event.h:71
@ MOTION_NOTIFY
Definition: event.h:61
@ BUTTON_PRESS
Definition: event.h:62
@ OWNER_CHANGE
Definition: event.h:92
@ SCROLL
Definition: event.h:89
@ PROPERTY_NOTIFY
Definition: event.h:74
@ DRAG_LEAVE
Definition: event.h:81
@ TOUCH_UPDATE
Definition: event.h:96
@ DRAG_MOTION
Definition: event.h:82
@ BUTTON_RELEASE
Definition: event.h:65
@ SELECTION_REQUEST
Definition: event.h:76
@ LEAVE_NOTIFY
Definition: event.h:69
@ DRAG_STATUS
Definition: event.h:83
@ FOCUS_CHANGE
Definition: event.h:70
@ WINDOW_STATE
Definition: event.h:90
@ DROP_START
Definition: event.h:84
@ NO_EXPOSE
Definition: event.h:88
@ SELECTION_CLEAR
Definition: event.h:75
@ AXIS_Y
Definition: event.h:163
@ AXIS_LAST
Definition: event.h:168
@ AXIS_X
Definition: event.h:162
@ AXIS_XTILT
Definition: event.h:165
@ AXIS_IGNORE
Definition: event.h:161
@ AXIS_YTILT
Definition: event.h:166
@ AXIS_PRESSURE
Definition: event.h:164
@ AXIS_WHEEL
Definition: event.h:167
GdkNativeWindow NativeWindow
Definition: lobject.h:100