]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
gdk-2.0: Fix GdkEvent binding
authorJürg Billeter <j@bitron.ch>
Thu, 7 May 2009 19:34:54 +0000 (21:34 +0200)
committerJürg Billeter <j@bitron.ch>
Thu, 7 May 2009 19:34:54 +0000 (21:34 +0200)
Bind GdkEvent as a class instead of a struct. Based on patch by
Evan Nemerson, fixes bug 580862.

vapi/gdk-2.0.vapi
vapi/packages/gdk-2.0/gdk-2.0.metadata
vapi/packages/gtk+-2.0/gtk+-2.0.metadata

index ed7ea7400c479f17d8d6d2ab754e65b6dbac9e50..38e1287c038ce6175acfdc546c5410abd72e70e4 100644 (file)
@@ -215,6 +215,50 @@ namespace Gdk {
                public virtual void set_colormap (Gdk.Colormap colormap);
        }
        [Compact]
+       [CCode (copy_function = "gdk_event_copy", type_id = "GDK_TYPE_EVENT", cheader_filename = "gdk/gdk.h")]
+       public class Event {
+               public Gdk.EventAny any;
+               public Gdk.EventButton button;
+               public Gdk.EventClient client;
+               public Gdk.EventConfigure configure;
+               public Gdk.EventCrossing crossing;
+               public Gdk.EventDND dnd;
+               public Gdk.EventExpose expose;
+               public Gdk.EventFocus focus_change;
+               public Gdk.EventGrabBroken grab_broken;
+               public Gdk.EventKey key;
+               public Gdk.EventMotion motion;
+               public Gdk.EventNoExpose no_expose;
+               public Gdk.EventOwnerChange owner_change;
+               public Gdk.EventProperty property;
+               public Gdk.EventProximity proximity;
+               public Gdk.EventScroll scroll;
+               public Gdk.EventSelection selection;
+               public Gdk.EventSetting setting;
+               public Gdk.EventType type;
+               public Gdk.EventVisibility visibility;
+               public Gdk.EventWindowState window_state;
+               public Gdk.Event copy ();
+               public static unowned Gdk.Event get ();
+               public bool get_axis (Gdk.AxisUse axis_use, out double value);
+               public bool get_coords (out double x_win, out double y_win);
+               public static unowned Gdk.Event get_graphics_expose (Gdk.Window window);
+               public bool get_root_coords (out double x_root, out double y_root);
+               public unowned Gdk.Screen get_screen ();
+               public bool get_state (out Gdk.ModifierType state);
+               public uint32 get_time ();
+               public static void handler_set (owned Gdk.EventFunc func);
+               [CCode (has_construct_function = false)]
+               public Event (Gdk.EventType type);
+               public static unowned Gdk.Event peek ();
+               public void put ();
+               public static void request_motions (Gdk.EventMotion event);
+               public bool send_client_message (Gdk.NativeWindow winid);
+               public static bool send_client_message_for_display (Gdk.Display display, Gdk.Event event, Gdk.NativeWindow winid);
+               public void send_clientmessage_toall ();
+               public void set_screen (Gdk.Screen screen);
+       }
+       [Compact]
        [CCode (ref_function = "gdk_font_ref", unref_function = "gdk_font_unref", type_id = "GDK_TYPE_FONT", cheader_filename = "gdk/gdk.h")]
        public class Font {
                public int ascent;
@@ -583,50 +627,6 @@ namespace Gdk {
                public uint keyval;
                public Gdk.ModifierType modifiers;
        }
-       [CCode (type_id = "GDK_TYPE_EVENT", cheader_filename = "gdk/gdk.h")]
-       public struct Event {
-               public Gdk.EventType type;
-               public Gdk.EventAny any;
-               public Gdk.EventExpose expose;
-               public Gdk.EventNoExpose no_expose;
-               public Gdk.EventVisibility visibility;
-               public Gdk.EventMotion motion;
-               public Gdk.EventButton button;
-               public Gdk.EventScroll scroll;
-               public Gdk.EventKey key;
-               public Gdk.EventCrossing crossing;
-               public Gdk.EventFocus focus_change;
-               public Gdk.EventConfigure configure;
-               public Gdk.EventProperty property;
-               public Gdk.EventSelection selection;
-               public Gdk.EventOwnerChange owner_change;
-               public Gdk.EventProximity proximity;
-               public Gdk.EventClient client;
-               public Gdk.EventDND dnd;
-               public Gdk.EventWindowState window_state;
-               public Gdk.EventSetting setting;
-               public Gdk.EventGrabBroken grab_broken;
-               public Gdk.Event copy ();
-               public void free ();
-               public static Gdk.Event get ();
-               public bool get_axis (Gdk.AxisUse axis_use, out double value);
-               public bool get_coords (out double x_win, out double y_win);
-               public static Gdk.Event get_graphics_expose (Gdk.Window window);
-               public bool get_root_coords (out double x_root, out double y_root);
-               public unowned Gdk.Screen get_screen ();
-               public bool get_state (out Gdk.ModifierType state);
-               public uint32 get_time ();
-               public static void handler_set (owned Gdk.EventFunc func);
-               [CCode (cname = "gdk_event_new", has_construct_function = false)]
-               public Event (Gdk.EventType type);
-               public static Gdk.Event peek ();
-               public void put ();
-               public static void request_motions (Gdk.EventMotion event);
-               public bool send_client_message (Gdk.NativeWindow winid);
-               public static bool send_client_message_for_display (Gdk.Display display, Gdk.Event event, Gdk.NativeWindow winid);
-               public void send_clientmessage_toall ();
-               public void set_screen (Gdk.Screen screen);
-       }
        [CCode (type_id = "GDK_TYPE_EVENT_ANY", cheader_filename = "gdk/gdk.h")]
        public struct EventAny {
                public Gdk.EventType type;
index 369d175a490d9a435ffcbf3dac673c9923b9eddc..2acec0ce720cfc16097a9b10c8e43eb6ec6ecda9 100644 (file)
@@ -18,19 +18,23 @@ GdkDeviceClass hidden="1"
 GdkDeviceKey is_value_type="1"
 GdkDisplay.closed hidden="1"
 gdk_display_add_client_message_filter.data hidden="1"
+gdk_display_get_event transfer_ownership="1"
 gdk_display_get_maximal_cursor_size.width is_out="1"
 gdk_display_get_maximal_cursor_size.height is_out="1"
 gdk_display_get_pointer.x is_out="1"
 gdk_display_get_pointer.y is_out="1"
 gdk_display_get_pointer.mask is_out="1"
+gdk_display_peek_event transfer_ownership="1"
 gdk_drawable_draw_pixbuf.gc nullable="1"
 gdk_drawable_get_size.width is_out="1"
 gdk_drawable_get_size.height is_out="1"
 gdk_draw_rgb*_image*.buf no_array_length="1"
 gdk_draw_rgb*_image*.rgb_buf no_array_length="1"
+GdkEvent is_value_type="0"
 GdkEvent* is_value_type="1"
 GdkEventMotion.is_hint type_name="bool"
 GdkEventMotion.state type_name="ModifierType"
+gdk_event_copy transfer_ownership="1"
 gdk_event_get_state.state is_out="1"
 gdk_event_get_axis.value is_out="1"
 gdk_event_get_coords.x_win is_out="1"
index 5a0e228bbd4a1158adc539918520315fa3aa7040..49537fc513a9ac5dd184b769f63172b57b643e5d 100644 (file)
@@ -129,6 +129,7 @@ gtk_frame_new.label nullable="1"
 GtkHandleBox.child_detached hidden="1"
 GtkHandleBox::child_detached hidden="1"
 gtk_hscale_new.adjustment nullable="1"
+gtk_get_current_event transfer_ownership="1"
 gtk_get_option_group transfer_ownership="1"
 gtk_icon_info_get_embedded_rect.rectangle is_out="1"
 gtk_icon_view_get_cursor.path transfer_ownership="1"