[vala] gdk-3.0: Fix regression to the bindings of GdkXEvent



commit 9c52e7b7cd3da56c04160af63a312083116882eb
Author: Luca Bruno <lucabru src gnome org>
Date:   Fri Oct 21 18:47:29 2011 +0200

    gdk-3.0: Fix regression to the bindings of GdkXEvent
    
    Using non-simpletype struct might not be safe as Vala might dereference
    the pointer to void.
    
    The regression was introduced by the switch to gir.

 vapi/gdk-3.0.vapi                 |   10 +++++-----
 vapi/metadata/Gdk-3.0-custom.vala |    5 ++++-
 vapi/metadata/Gdk-3.0.metadata    |    3 ++-
 3 files changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/vapi/gdk-3.0.vapi b/vapi/gdk-3.0.vapi
index 5c0d04f..ccaf35d 100644
--- a/vapi/gdk-3.0.vapi
+++ b/vapi/gdk-3.0.vapi
@@ -4990,6 +4990,10 @@ namespace Gdk {
 		public signal unowned Gdk.Window pick_embedded_child (double x, double y);
 		public virtual signal void to_embedder (double offscreen_x, double offscreen_y, out double embedder_x, out double embedder_y);
 	}
+	[CCode (cheader_filename = "gdk/gdk.h", ref_function = "", unref_function = "")]
+	[Compact]
+	public class XEvent {
+	}
 	[CCode (cheader_filename = "gdk/gdk.h")]
 	[SimpleType]
 	public struct Atom {
@@ -5267,10 +5271,6 @@ namespace Gdk {
 		public bool override_redirect;
 		public Gdk.WindowTypeHint type_hint;
 	}
-	[CCode (cheader_filename = "gdk/gdk.h")]
-	[SimpleType]
-	public struct XEvent {
-	}
 	[CCode (cheader_filename = "gdk/gdk.h", cprefix = "GDK_AXIS_")]
 	public enum AxisUse {
 		IGNORE,
@@ -5710,7 +5710,7 @@ namespace Gdk {
 	}
 	[CCode (cheader_filename = "gdk/gdk.h", instance_pos = 1.9)]
 	public delegate void EventFunc (Gdk.Event event);
-	[CCode (cheader_filename = "gdk/gdk.h")]
+	[CCode (cheader_filename = "gdk/gdk.h", instance_pos = 2.9)]
 	public delegate Gdk.FilterReturn FilterFunc (Gdk.XEvent xevent, Gdk.Event event);
 	[CCode (cheader_filename = "gdk/gdk.h", instance_pos = 1.9)]
 	public delegate bool WindowChildFunc (Gdk.Window window);
diff --git a/vapi/metadata/Gdk-3.0-custom.vala b/vapi/metadata/Gdk-3.0-custom.vala
index 37d5970..2d02459 100644
--- a/vapi/metadata/Gdk-3.0-custom.vala
+++ b/vapi/metadata/Gdk-3.0-custom.vala
@@ -23,7 +23,10 @@ namespace Gdk {
 		public void union (Gdk.Rectangle src2, out Gdk.Rectangle dest);
 	}
 
-	public delegate Gdk.FilterReturn FilterFunc (Gdk.XEvent xevent, Gdk.Event event);
+	[CCode (ref_function = "", unref_function = "")]
+	[Compact]
+	public class XEvent {
+	}
 
 	public const Gdk.Atom SELECTION_CLIPBOARD;
 	[CCode (cheader_filename = "gdk/gdk.h")]
diff --git a/vapi/metadata/Gdk-3.0.metadata b/vapi/metadata/Gdk-3.0.metadata
index 0deca7f..186f40f 100644
--- a/vapi/metadata/Gdk-3.0.metadata
+++ b/vapi/metadata/Gdk-3.0.metadata
@@ -52,7 +52,7 @@ Window
 synthesize_window_state skip
 EventMotion
         .axes array
-FilterFunc skip
+FilterFunc.data closure=2
 init*.argv unowned
 parse_args.argv unowned
 property_change.data array array_length_idx=6
@@ -62,3 +62,4 @@ threads_add_idle skip=false
 threads_add_timeout skip=false
 threads_add_timeout_seconds skip=false
 threads_set_lock_functions skip=false
+XEvent skip



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