1 /* $Id: event.hg,v 1.4 2006/04/12 11:11:24 murrayc Exp $ */
3 /* Copyright (C) 1998-2002 The gtkmm Development Team
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the Free
17 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 _CC_INCLUDE(gdk/gdkenumtypes.h)
23 #include <gdkmm/window.h>
24 #include <gdkmm/screen.h>
26 /* Shadow DELETE macro (from winnt.h).
28 #if defined(DELETE) && !defined(GTKMM_MACRO_SHADOW_DELETE)
29 enum { GTKMM_MACRO_DEFINITION_DELETE = DELETE };
31 enum { DELETE = GTKMM_MACRO_DEFINITION_DELETE };
33 #define GTKMM_MACRO_SHADOW_DELETE 1
36 #ifndef DOXYGEN_SHOULD_SKIP_THIS
37 extern "C" { typedef union _GdkEvent GdkEvent; }
38 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
44 _WRAP_ENUM(EventType, GdkEventType,
45 s#^2BUTTON_PRESS#DOUBLE_BUTTON_PRESS#,
46 s#^3BUTTON_PRESS#TRIPLE_BUTTON_PRESS#
49 _WRAP_ENUM(ExtensionMode, GdkExtensionMode)
50 _WRAP_ENUM(AxisUse, GdkAxisUse)
52 //TODO: Actually use this class instead of GdkEvent?
55 _CLASS_BOXEDTYPE(Event, GdkEvent, NONE, gdk_event_copy, gdk_event_free)
56 _CUSTOM_STRUCT_PROTOTYPE
57 _IGNORE(gdk_event_copy, gdk_event_free)
60 _WRAP_METHOD(static Event get(), gdk_event_get)
61 _WRAP_METHOD(static Event peek(), gdk_event_peek)
62 _WRAP_METHOD(static Event get_graphics_expose(const Glib::RefPtr<Window>& window), gdk_event_get_graphics_expose)
63 _WRAP_METHOD(void put(), gdk_event_put)
65 _WRAP_METHOD(static bool events_pending(), gdk_events_pending)
67 _WRAP_METHOD(guint32 get_time() const, gdk_event_get_time)
68 _WRAP_METHOD(bool get_state(ModifierType& state) const, gdk_event_get_state)
69 _WRAP_METHOD(bool get_coords(double& x_win, double& y_win) const, gdk_event_get_coords)
70 _WRAP_METHOD(bool get_root_coords(double& x_root, double& y_root) const, gdk_event_get_root_coords)
71 _WRAP_METHOD(bool get_axis(AxisUse axis_use, double& value) const, gdk_event_get_axis)
72 //_WRAP_METHOD(void gdk_event_handler_set(GdkEventFunc func, gpointer data, GDestroyNotify notify), gdk_event_handler_set)
74 _WRAP_METHOD(static void set_show_events(bool show_events), gdk_set_show_events)
75 _WRAP_METHOD(static bool get_show_events(), gdk_get_show_events)
77 _WRAP_METHOD(void set_screen(const Glib::RefPtr<Screen>& screen), gdk_event_set_screen)
78 _WRAP_METHOD(Glib::RefPtr<Screen> get_screen(), gdk_event_get_screen, refreturn)
79 _WRAP_METHOD(Glib::RefPtr<const Screen> get_screen() const, gdk_event_get_screen, refreturn, constversion)
81 _WRAP_METHOD(bool send_client_message(NativeWindow winid), gdk_event_send_client_message)
82 bool send_client_message(const Glib::RefPtr<Display>& display, NativeWindow winid);
83 _IGNORE(gdk_event_send_client_message_for_display)