Ardour  8.7-14-g57a6773833
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,
96 };
97 
98 } // namespace Gdk
99 
100 
101 #ifndef DOXYGEN_SHOULD_SKIP_THIS
102 namespace Glib
103 {
104 
105 template <>
106 class Value<Gdk::EventType> : public Glib::Value_Enum<Gdk::EventType>
107 {
108 public:
109  static GType value_type() G_GNUC_CONST;
110 };
111 
112 } // namespace Glib
113 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
114 
115 
116 namespace Gdk
117 {
118 
119 
125 {
129 };
130 
131 } // namespace Gdk
132 
133 
134 #ifndef DOXYGEN_SHOULD_SKIP_THIS
135 namespace Glib
136 {
137 
138 template <>
139 class Value<Gdk::ExtensionMode> : public Glib::Value_Enum<Gdk::ExtensionMode>
140 {
141 public:
142  static GType value_type() G_GNUC_CONST;
143 };
144 
145 } // namespace Glib
146 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
147 
148 
149 namespace Gdk
150 {
151 
157 {
165  AXIS_LAST
166 };
167 
168 } // namespace Gdk
169 
170 
171 #ifndef DOXYGEN_SHOULD_SKIP_THIS
172 namespace Glib
173 {
174 
175 template <>
176 class Value<Gdk::AxisUse> : public Glib::Value_Enum<Gdk::AxisUse>
177 {
178 public:
179  static GType value_type() G_GNUC_CONST;
180 };
181 
182 } // namespace Glib
183 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
184 
185 
186 namespace Gdk
187 {
188 
189 
190 //TODO: Actually use this class instead of GdkEvent?
191 class Event
192 {
193  public:
194 #ifndef DOXYGEN_SHOULD_SKIP_THIS
195  typedef Event CppObjectType;
196  typedef GdkEvent BaseObjectType;
197 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
198 
201  static GType get_type() G_GNUC_CONST;
202 
203  Event();
204 
205  explicit Event(GdkEvent* gobject, bool make_a_copy = true);
206 
207  Event(const Event& other);
208  Event& operator=(const Event& other);
209 
210  ~Event();
211 
212  void swap(Event& other);
213 
215  GdkEvent* gobj() { return gobject_; }
216 
218  const GdkEvent* gobj() const { return gobject_; }
219 
221  GdkEvent* gobj_copy() const;
222 
223 protected:
225 
226 private:
227 
228 
229 public:
230 
231 
239  static Event get();
240 
248  static Event peek();
249 
250 #ifndef GDKMM_DISABLE_DEPRECATED
251 
262  static Event get_graphics_expose(const Glib::RefPtr<Window>& window);
263 #endif // GDKMM_DISABLE_DEPRECATED
264 
265 
270  void put();
271 
272 
277  static bool events_pending();
278 
279 
285  guint32 get_time() const;
286 
295  bool get_state(ModifierType& state) const;
296 
303  bool get_coords(double& x_win, double& y_win) const;
304 
311  bool get_root_coords(double& x_root, double& y_root) const;
312 
320  bool get_axis(AxisUse axis_use, double& value) const;
321  //_WRAP_METHOD(void gdk_event_handler_set(GdkEventFunc func, gpointer data, GDestroyNotify notify), gdk_event_handler_set)
322 
323 
331  static void set_show_events(bool show_events);
332 
337  static bool get_show_events();
338 
339 
346  void set_screen(const Glib::RefPtr<Screen>& screen);
347 
358  Glib::RefPtr<Screen> get_screen();
359 
370  Glib::RefPtr<const Screen> get_screen() const;
371 
372 
382  bool send_client_message(const Glib::RefPtr<Display>& display, NativeWindow winid);
383 
384 
385 };
386 
387 } // namespace Gdk
388 
389 
390 namespace Gdk
391 {
392 
397 inline void swap(Event& lhs, Event& rhs)
398  { lhs.swap(rhs); }
399 
400 } // namespace Gdk
401 
402 namespace Glib
403 {
404 
413 Gdk::Event wrap(GdkEvent* object, bool take_copy = false);
414 
415 #ifndef DOXYGEN_SHOULD_SKIP_THIS
416 template <>
417 class Value<Gdk::Event> : public Glib::Value_Boxed<Gdk::Event>
418 {};
419 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
420 
421 } // namespace Glib
422 
423 
424 #endif /* _GDKMM_EVENT_H */
425 
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:215
GdkEvent * gobject_
Definition: event.h:224
void set_screen(const Glib::RefPtr< Screen > &screen)
bool send_client_message(NativeWindow winid)
void swap(Event &lhs, Event &rhs)
Definition: event.h:397
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:218
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:125
EventType
Definition: event.h:56
AxisUse
Definition: event.h:157
@ EXTENSION_EVENTS_ALL
Definition: event.h:127
@ EXTENSION_EVENTS_CURSOR
Definition: event.h:128
@ EXTENSION_EVENTS_NONE
Definition: event.h:126
@ 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
@ KEY_PRESS
Definition: event.h:66
@ VISIBILITY_NOTIFY
Definition: event.h:87
@ SETTING
Definition: event.h:91
@ EVENT_LAST
Definition: event.h:95
@ PROXIMITY_OUT
Definition: event.h:79
@ 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
@ 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:160
@ AXIS_LAST
Definition: event.h:165
@ AXIS_X
Definition: event.h:159
@ AXIS_XTILT
Definition: event.h:162
@ AXIS_IGNORE
Definition: event.h:158
@ AXIS_YTILT
Definition: event.h:163
@ AXIS_PRESSURE
Definition: event.h:161
@ AXIS_WHEEL
Definition: event.h:164
GdkNativeWindow NativeWindow
Definition: lobject.h:100