[vala] gdk-2.0: Fix GdkEvent binding



commit 3084684bfd9379334f4fc49e542a26f82bd4f388
Author: Jürg Billeter <j bitron ch>
Date:   Thu May 7 21:34:54 2009 +0200

    gdk-2.0: Fix GdkEvent binding
    
    Bind GdkEvent as a class instead of a struct. Based on patch by
    Evan Nemerson, fixes bug 580862.
---
 vapi/gdk-2.0.vapi                        |   88 +++++++++++++++---------------
 vapi/packages/gdk-2.0/gdk-2.0.metadata   |    4 ++
 vapi/packages/gtk+-2.0/gtk+-2.0.metadata |    1 +
 3 files changed, 49 insertions(+), 44 deletions(-)

diff --git a/vapi/gdk-2.0.vapi b/vapi/gdk-2.0.vapi
index ed7ea74..38e1287 100644
--- a/vapi/gdk-2.0.vapi
+++ b/vapi/gdk-2.0.vapi
@@ -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;
diff --git a/vapi/packages/gdk-2.0/gdk-2.0.metadata b/vapi/packages/gdk-2.0/gdk-2.0.metadata
index 369d175..2acec0c 100644
--- a/vapi/packages/gdk-2.0/gdk-2.0.metadata
+++ b/vapi/packages/gdk-2.0/gdk-2.0.metadata
@@ -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"
diff --git a/vapi/packages/gtk+-2.0/gtk+-2.0.metadata b/vapi/packages/gtk+-2.0/gtk+-2.0.metadata
index 5a0e228..49537fc 100644
--- a/vapi/packages/gtk+-2.0/gtk+-2.0.metadata
+++ b/vapi/packages/gtk+-2.0/gtk+-2.0.metadata
@@ -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"



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]