[vala/bug713240] gdk-3.0: Fix GdkEvent* bindings



commit 1bac4cf1ee6c49e2477fb1e6523833044c5005a4
Author: Jürg Billeter <j bitron ch>
Date:   Sun Jan 26 14:11:43 2014 +0100

    gdk-3.0: Fix GdkEvent* bindings
    
    GdkEvent structs have hidden fields and must be exposed as compact
    classes.
    
    Fixes bug 713240.

 vapi/gdk-3.0.vapi                 |  480 +++++++++++++++++++------------------
 vapi/metadata/Gdk-3.0-custom.vala |   31 +++-
 vapi/metadata/Gdk-3.0.metadata    |   21 ++-
 3 files changed, 293 insertions(+), 239 deletions(-)
---
diff --git a/vapi/gdk-3.0.vapi b/vapi/gdk-3.0.vapi
index 374c31b..bf008f7 100644
--- a/vapi/gdk-3.0.vapi
+++ b/vapi/gdk-3.0.vapi
@@ -4744,26 +4744,7 @@ namespace Gdk {
        [CCode (cheader_filename = "gdk/gdk.h", copy_function = "g_boxed_copy", free_function = 
"g_boxed_free", type_id = "gdk_event_get_type ()")]
        [Compact]
        public class Event {
-               public Gdk.EventAny any;
-               public Gdk.EventButton button;
-               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.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.EventTouch touch;
                public Gdk.EventType type;
-               public Gdk.EventVisibility visibility;
-               public Gdk.EventWindowState window_state;
                [CCode (has_construct_function = false)]
                public Event (Gdk.EventType type);
                public Gdk.Event copy ();
@@ -4793,11 +4774,256 @@ namespace Gdk {
                public void set_screen (Gdk.Screen screen);
                public void set_source_device (Gdk.Device device);
                public bool triggers_context_menu ();
+               public Gdk.EventAny any {[CCode (cname = "(EventAny *)")]  get; }
+               public Gdk.EventButton button {[CCode (cname = "(EventButton *)")]  get; }
+               public Gdk.EventConfigure configure {[CCode (cname = "(EventConfigure *)")]  get; }
+               public Gdk.EventCrossing crossing {[CCode (cname = "(EventCrossing *)")]  get; }
+               public Gdk.EventDND dnd {[CCode (cname = "(EventDND *)")]  get; }
+               public Gdk.EventExpose expose {[CCode (cname = "(EventExpose *)")]  get; }
+               public Gdk.EventFocus focus_change {[CCode (cname = "(EventFocus *)")]  get; }
+               public Gdk.EventGrabBroken grab_broken {[CCode (cname = "(EventGrabBroken *)")]  get; }
+               public Gdk.EventKey key {[CCode (cname = "(GdkEventKey *)")]  get; }
+               public Gdk.EventMotion motion {[CCode (cname = "(EventMotion *)")]  get; }
+               public Gdk.EventOwnerChange owner_change {[CCode (cname = "(EventOwnerChange *)")]  get; }
+               public Gdk.EventProperty property {[CCode (cname = "(EventProperty *)")]  get; }
+               public Gdk.EventProximity proximity {[CCode (cname = "(EventProximity *)")]  get; }
+               public Gdk.EventScroll scroll {[CCode (cname = "(EventScroll *)")]  get; }
+               public Gdk.EventSelection selection {[CCode (cname = "(EventSelection *)")]  get; }
+               public Gdk.EventSetting setting {[CCode (cname = "(EventSetting *)")]  get; }
+               public Gdk.EventTouch touch {[CCode (cname = "(EventTouch *)")]  get; }
+               public Gdk.EventVisibility visibility {[CCode (cname = "(EventVisibility *)")]  get; }
+               public Gdk.EventWindowState window_state {[CCode (cname = "(EventWindowState *)")]  get; }
+       }
+       [CCode (cheader_filename = "gdk/gdk.h", copy_function = "g_boxed_copy", free_function = 
"g_boxed_free", type_id = "gdk_event_get_type ()")]
+       [Compact]
+       public class EventAny : Gdk.Event {
+               public int8 send_event;
+               public Gdk.EventType type;
+               public weak Gdk.Window window;
+       }
+       [CCode (cheader_filename = "gdk/gdk.h", copy_function = "g_boxed_copy", free_function = 
"g_boxed_free", type_id = "gdk_event_get_type ()")]
+       [Compact]
+       public class EventButton : Gdk.Event {
+               public double axes;
+               public uint button;
+               public weak Gdk.Device device;
+               public int8 send_event;
+               public Gdk.ModifierType state;
+               public uint32 time;
+               public Gdk.EventType type;
+               public weak Gdk.Window window;
+               public double x;
+               public double x_root;
+               public double y;
+               public double y_root;
+       }
+       [CCode (cheader_filename = "gdk/gdk.h", copy_function = "g_boxed_copy", free_function = 
"g_boxed_free", type_id = "gdk_event_get_type ()")]
+       [Compact]
+       public class EventConfigure : Gdk.Event {
+               public int height;
+               public int8 send_event;
+               public Gdk.EventType type;
+               public int width;
+               public weak Gdk.Window window;
+               public int x;
+               public int y;
+       }
+       [CCode (cheader_filename = "gdk/gdk.h", copy_function = "g_boxed_copy", free_function = 
"g_boxed_free", type_id = "gdk_event_get_type ()")]
+       [Compact]
+       public class EventCrossing : Gdk.Event {
+               public Gdk.NotifyType detail;
+               public bool focus;
+               public Gdk.CrossingMode mode;
+               public int8 send_event;
+               public Gdk.ModifierType state;
+               public weak Gdk.Window subwindow;
+               public uint32 time;
+               public Gdk.EventType type;
+               public weak Gdk.Window window;
+               public double x;
+               public double x_root;
+               public double y;
+               public double y_root;
+       }
+       [CCode (cheader_filename = "gdk/gdk.h", copy_function = "g_boxed_copy", free_function = 
"g_boxed_free", type_id = "gdk_event_get_type ()")]
+       [Compact]
+       public class EventDND : Gdk.Event {
+               public weak Gdk.DragContext context;
+               public int8 send_event;
+               public uint32 time;
+               public Gdk.EventType type;
+               public weak Gdk.Window window;
+               public short x_root;
+               public short y_root;
+       }
+       [CCode (cheader_filename = "gdk/gdk.h", copy_function = "g_boxed_copy", free_function = 
"g_boxed_free", type_id = "gdk_event_get_type ()")]
+       [Compact]
+       public class EventExpose : Gdk.Event {
+               public Gdk.Rectangle area;
+               public int count;
+               public weak Cairo.Region region;
+               public int8 send_event;
+               public Gdk.EventType type;
+               public weak Gdk.Window window;
+       }
+       [CCode (cheader_filename = "gdk/gdk.h", copy_function = "g_boxed_copy", free_function = 
"g_boxed_free", type_id = "gdk_event_get_type ()")]
+       [Compact]
+       public class EventFocus : Gdk.Event {
+               public int16 @in;
+               public int8 send_event;
+               public Gdk.EventType type;
+               public weak Gdk.Window window;
+       }
+       [CCode (cheader_filename = "gdk/gdk.h", copy_function = "g_boxed_copy", free_function = 
"g_boxed_free", type_id = "gdk_event_get_type ()")]
+       [Compact]
+       public class EventGrabBroken : Gdk.Event {
+               public weak Gdk.Window grab_window;
+               public bool implicit;
+               public bool keyboard;
+               public int8 send_event;
+               public Gdk.EventType type;
+               public weak Gdk.Window window;
+       }
+       [CCode (cheader_filename = "gdk/gdk.h", copy_function = "g_boxed_copy", free_function = 
"g_boxed_free", type_id = "gdk_event_get_type ()")]
+       [Compact]
+       public class EventKey : Gdk.Event {
+               public uint8 group;
+               public uint16 hardware_keycode;
+               public uint is_modifier;
+               public uint keyval;
+               public int length;
+               public int8 send_event;
+               public Gdk.ModifierType state;
+               [CCode (cname = "string")]
+               public string str;
+               public uint32 time;
+               public Gdk.EventType type;
+               public weak Gdk.Window window;
+       }
+       [CCode (cheader_filename = "gdk/gdk.h", copy_function = "g_boxed_copy", free_function = 
"g_boxed_free", type_id = "gdk_event_get_type ()")]
+       [Compact]
+       public class EventMotion : Gdk.Event {
+               [CCode (array_length = false, array_null_terminated = true)]
+               public weak double[] axes;
+               public weak Gdk.Device device;
+               public int16 is_hint;
+               public int8 send_event;
+               public Gdk.ModifierType state;
+               public uint32 time;
+               public Gdk.EventType type;
+               public weak Gdk.Window window;
+               public double x;
+               public double x_root;
+               public double y;
+               public double y_root;
+       }
+       [CCode (cheader_filename = "gdk/gdk.h", copy_function = "g_boxed_copy", free_function = 
"g_boxed_free", type_id = "gdk_event_get_type ()")]
+       [Compact]
+       public class EventOwnerChange : Gdk.Event {
+               public weak Gdk.Window owner;
+               public Gdk.OwnerChange reason;
+               public Gdk.Atom selection;
+               public uint32 selection_time;
+               public int8 send_event;
+               public uint32 time;
+               public Gdk.EventType type;
+               public weak Gdk.Window window;
+       }
+       [CCode (cheader_filename = "gdk/gdk.h", copy_function = "g_boxed_copy", free_function = 
"g_boxed_free", type_id = "gdk_event_get_type ()")]
+       [Compact]
+       public class EventProperty : Gdk.Event {
+               public Gdk.Atom atom;
+               public int8 send_event;
+               public Gdk.PropertyState state;
+               public uint32 time;
+               public Gdk.EventType type;
+               public weak Gdk.Window window;
+       }
+       [CCode (cheader_filename = "gdk/gdk.h", copy_function = "g_boxed_copy", free_function = 
"g_boxed_free", type_id = "gdk_event_get_type ()")]
+       [Compact]
+       public class EventProximity : Gdk.Event {
+               public weak Gdk.Device device;
+               public int8 send_event;
+               public uint32 time;
+               public Gdk.EventType type;
+               public weak Gdk.Window window;
+       }
+       [CCode (cheader_filename = "gdk/gdk.h", copy_function = "g_boxed_copy", free_function = 
"g_boxed_free", type_id = "gdk_event_get_type ()")]
+       [Compact]
+       public class EventScroll : Gdk.Event {
+               public double delta_x;
+               public double delta_y;
+               public weak Gdk.Device device;
+               public Gdk.ScrollDirection direction;
+               public int8 send_event;
+               public Gdk.ModifierType state;
+               public uint32 time;
+               public Gdk.EventType type;
+               public weak Gdk.Window window;
+               public double x;
+               public double x_root;
+               public double y;
+               public double y_root;
+       }
+       [CCode (cheader_filename = "gdk/gdk.h", copy_function = "g_boxed_copy", free_function = 
"g_boxed_free", type_id = "gdk_event_get_type ()")]
+       [Compact]
+       public class EventSelection : Gdk.Event {
+               public Gdk.Atom property;
+               public weak Gdk.Window requestor;
+               public Gdk.Atom selection;
+               public int8 send_event;
+               public Gdk.Atom target;
+               public uint32 time;
+               public Gdk.EventType type;
+               public weak Gdk.Window window;
        }
        [CCode (cheader_filename = "gdk/gdk.h")]
        [Compact]
        public class EventSequence {
        }
+       [CCode (cheader_filename = "gdk/gdk.h", copy_function = "g_boxed_copy", free_function = 
"g_boxed_free", type_id = "gdk_event_get_type ()")]
+       [Compact]
+       public class EventSetting : Gdk.Event {
+               public Gdk.SettingAction action;
+               public weak string name;
+               public int8 send_event;
+               public Gdk.EventType type;
+               public weak Gdk.Window window;
+       }
+       [CCode (cheader_filename = "gdk/gdk.h", copy_function = "g_boxed_copy", free_function = 
"g_boxed_free", type_id = "gdk_event_get_type ()")]
+       [Compact]
+       public class EventTouch : Gdk.Event {
+               public double axes;
+               public weak Gdk.Device device;
+               public bool emulating_pointer;
+               public int8 send_event;
+               public weak Gdk.EventSequence sequence;
+               public Gdk.ModifierType state;
+               public uint32 time;
+               public Gdk.EventType type;
+               public weak Gdk.Window window;
+               public double x;
+               public double x_root;
+               public double y;
+               public double y_root;
+       }
+       [CCode (cheader_filename = "gdk/gdk.h", copy_function = "g_boxed_copy", free_function = 
"g_boxed_free", type_id = "gdk_event_get_type ()")]
+       [Compact]
+       public class EventVisibility : Gdk.Event {
+               public int8 send_event;
+               public Gdk.VisibilityState state;
+               public Gdk.EventType type;
+               public weak Gdk.Window window;
+       }
+       [CCode (cheader_filename = "gdk/gdk.h", copy_function = "g_boxed_copy", free_function = 
"g_boxed_free", type_id = "gdk_event_get_type ()")]
+       [Compact]
+       public class EventWindowState : Gdk.Event {
+               public Gdk.WindowState changed_mask;
+               public Gdk.WindowState new_window_state;
+               public int8 send_event;
+               public Gdk.EventType type;
+               public weak Gdk.Window window;
+       }
        [CCode (cheader_filename = "gdk/gdk.h", type_id = "gdk_frame_clock_get_type ()")]
        public abstract class FrameClock : GLib.Object {
                [CCode (has_construct_function = false)]
@@ -4935,7 +5161,7 @@ namespace Gdk {
                public void begin_resize_drag_for_device (Gdk.WindowEdge edge, Gdk.Device device, int button, 
int root_x, int root_y, uint32 timestamp);
                [Deprecated (since = "3.8")]
                public void configure_finished ();
-               public static void constrain_size (Gdk.Geometry geometry, Gdk.WindowHints flags, int width, 
int height, out int new_width, out int new_height);
+               public static void constrain_size (Gdk.Geometry geometry, uint flags, int width, int height, 
out int new_width, out int new_height);
                public void coords_from_parent (double parent_x, double parent_y, out double x, out double y);
                public void coords_to_parent (double x, double y, out double parent_x, out double parent_y);
                public Cairo.Surface create_similar_image_surface (int format, int width, int height, int 
scale);
@@ -4969,7 +5195,6 @@ namespace Gdk {
                public Gdk.DragProtocol get_drag_protocol (out Gdk.Window target);
                public unowned Gdk.Window get_effective_parent ();
                public unowned Gdk.Window get_effective_toplevel ();
-               public bool get_event_compression ();
                public Gdk.EventMask get_events ();
                public bool get_focus_on_map ();
                public unowned Gdk.FrameClock get_frame_clock ();
@@ -5041,7 +5266,6 @@ namespace Gdk {
                public void set_decorations (Gdk.WMDecoration decorations);
                public void set_device_cursor (Gdk.Device device, Gdk.Cursor cursor);
                public void set_device_events (Gdk.Device device, Gdk.EventMask event_mask);
-               public void set_event_compression (bool event_compression);
                public void set_events (Gdk.EventMask event_mask);
                public void set_focus_on_map (bool focus_on_map);
                public void set_fullscreen_mode (Gdk.FullscreenMode mode);
@@ -5057,7 +5281,6 @@ namespace Gdk {
                public void set_opaque_region (Cairo.Region region);
                public void set_override_redirect (bool override_redirect);
                public void set_role (string role);
-               public void set_shadow_width (int left, int right, int top, int bottom);
                public void set_skip_pager_hint (bool skips_pager);
                public void set_skip_taskbar_hint (bool skips_taskbar);
                public void set_source_events (Gdk.InputSource source, Gdk.EventMask event_mask);
@@ -5112,213 +5335,6 @@ namespace Gdk {
                public string to_string ();
        }
        [CCode (cheader_filename = "gdk/gdk.h", has_type_id = false)]
-       public struct EventAny {
-               public Gdk.EventType type;
-               public weak Gdk.Window window;
-               public int8 send_event;
-       }
-       [CCode (cheader_filename = "gdk/gdk.h", has_type_id = false)]
-       public struct EventButton {
-               public Gdk.EventType type;
-               public weak Gdk.Window window;
-               public int8 send_event;
-               public uint32 time;
-               public double x;
-               public double y;
-               public double axes;
-               public Gdk.ModifierType state;
-               public uint button;
-               public weak Gdk.Device device;
-               public double x_root;
-               public double y_root;
-       }
-       [CCode (cheader_filename = "gdk/gdk.h", has_type_id = false)]
-       public struct EventConfigure {
-               public Gdk.EventType type;
-               public weak Gdk.Window window;
-               public int8 send_event;
-               public int x;
-               public int y;
-               public int width;
-               public int height;
-       }
-       [CCode (cheader_filename = "gdk/gdk.h", has_type_id = false)]
-       public struct EventCrossing {
-               public Gdk.EventType type;
-               public weak Gdk.Window window;
-               public int8 send_event;
-               public weak Gdk.Window subwindow;
-               public uint32 time;
-               public double x;
-               public double y;
-               public double x_root;
-               public double y_root;
-               public Gdk.CrossingMode mode;
-               public Gdk.NotifyType detail;
-               public bool focus;
-               public Gdk.ModifierType state;
-       }
-       [CCode (cheader_filename = "gdk/gdk.h", has_type_id = false)]
-       public struct EventDND {
-               public Gdk.EventType type;
-               public weak Gdk.Window window;
-               public int8 send_event;
-               public weak Gdk.DragContext context;
-               public uint32 time;
-               public short x_root;
-               public short y_root;
-       }
-       [CCode (cheader_filename = "gdk/gdk.h", has_type_id = false)]
-       public struct EventExpose {
-               public Gdk.EventType type;
-               public weak Gdk.Window window;
-               public int8 send_event;
-               public Gdk.Rectangle area;
-               public weak Cairo.Region region;
-               public int count;
-       }
-       [CCode (cheader_filename = "gdk/gdk.h", has_type_id = false)]
-       public struct EventFocus {
-               public Gdk.EventType type;
-               public weak Gdk.Window window;
-               public int8 send_event;
-               public int16 @in;
-       }
-       [CCode (cheader_filename = "gdk/gdk.h", has_type_id = false)]
-       public struct EventGrabBroken {
-               public Gdk.EventType type;
-               public weak Gdk.Window window;
-               public int8 send_event;
-               public bool keyboard;
-               public bool implicit;
-               public weak Gdk.Window grab_window;
-       }
-       [CCode (cheader_filename = "gdk/gdk.h", has_type_id = false)]
-       public struct EventKey {
-               [CCode (cname = "string")]
-               public weak string str;
-               public Gdk.EventType type;
-               public weak Gdk.Window window;
-               public int8 send_event;
-               public uint32 time;
-               public Gdk.ModifierType state;
-               public uint keyval;
-               public int length;
-               public uint16 hardware_keycode;
-               public uint8 group;
-               public uint is_modifier;
-       }
-       [CCode (cheader_filename = "gdk/gdk.h", has_type_id = false)]
-       public struct EventMotion {
-               public Gdk.EventType type;
-               public weak Gdk.Window window;
-               public int8 send_event;
-               public uint32 time;
-               public double x;
-               public double y;
-               [CCode (array_length = false, array_null_terminated = true)]
-               public weak double[] axes;
-               public Gdk.ModifierType state;
-               public int16 is_hint;
-               public weak Gdk.Device device;
-               public double x_root;
-               public double y_root;
-       }
-       [CCode (cheader_filename = "gdk/gdk.h", has_type_id = false)]
-       public struct EventOwnerChange {
-               public Gdk.EventType type;
-               public weak Gdk.Window window;
-               public int8 send_event;
-               public weak Gdk.Window owner;
-               public Gdk.OwnerChange reason;
-               public Gdk.Atom selection;
-               public uint32 time;
-               public uint32 selection_time;
-       }
-       [CCode (cheader_filename = "gdk/gdk.h", has_type_id = false)]
-       public struct EventProperty {
-               public Gdk.EventType type;
-               public weak Gdk.Window window;
-               public int8 send_event;
-               public Gdk.Atom atom;
-               public uint32 time;
-               public Gdk.PropertyState state;
-       }
-       [CCode (cheader_filename = "gdk/gdk.h", has_type_id = false)]
-       public struct EventProximity {
-               public Gdk.EventType type;
-               public weak Gdk.Window window;
-               public int8 send_event;
-               public uint32 time;
-               public weak Gdk.Device device;
-       }
-       [CCode (cheader_filename = "gdk/gdk.h", has_type_id = false)]
-       public struct EventScroll {
-               public Gdk.EventType type;
-               public weak Gdk.Window window;
-               public int8 send_event;
-               public uint32 time;
-               public double x;
-               public double y;
-               public Gdk.ModifierType state;
-               public Gdk.ScrollDirection direction;
-               public weak Gdk.Device device;
-               public double x_root;
-               public double y_root;
-               public double delta_x;
-               public double delta_y;
-       }
-       [CCode (cheader_filename = "gdk/gdk.h", has_type_id = false)]
-       public struct EventSelection {
-               public Gdk.EventType type;
-               public weak Gdk.Window window;
-               public int8 send_event;
-               public Gdk.Atom selection;
-               public Gdk.Atom target;
-               public Gdk.Atom property;
-               public uint32 time;
-               public weak Gdk.Window requestor;
-       }
-       [CCode (cheader_filename = "gdk/gdk.h", has_type_id = false)]
-       public struct EventSetting {
-               public Gdk.EventType type;
-               public weak Gdk.Window window;
-               public int8 send_event;
-               public Gdk.SettingAction action;
-               public weak string name;
-       }
-       [CCode (cheader_filename = "gdk/gdk.h", has_type_id = false)]
-       public struct EventTouch {
-               public Gdk.EventType type;
-               public weak Gdk.Window window;
-               public int8 send_event;
-               public uint32 time;
-               public double x;
-               public double y;
-               public double axes;
-               public Gdk.ModifierType state;
-               public weak Gdk.EventSequence sequence;
-               public bool emulating_pointer;
-               public weak Gdk.Device device;
-               public double x_root;
-               public double y_root;
-       }
-       [CCode (cheader_filename = "gdk/gdk.h", has_type_id = false)]
-       public struct EventVisibility {
-               public Gdk.EventType type;
-               public weak Gdk.Window window;
-               public int8 send_event;
-               public Gdk.VisibilityState state;
-       }
-       [CCode (cheader_filename = "gdk/gdk.h", has_type_id = false)]
-       public struct EventWindowState {
-               public Gdk.EventType type;
-               public weak Gdk.Window window;
-               public int8 send_event;
-               public Gdk.WindowState changed_mask;
-               public Gdk.WindowState new_window_state;
-       }
-       [CCode (cheader_filename = "gdk/gdk.h", has_type_id = false)]
        public struct Geometry {
                public int min_width;
                public int min_height;
@@ -5875,10 +5891,6 @@ namespace Gdk {
        public const int BUTTON_SECONDARY;
        [CCode (cheader_filename = "gdk/gdk.h", cname = "GDK_CURRENT_TIME")]
        public const int CURRENT_TIME;
-       [CCode (cheader_filename = "gdk/gdk.h", cname = "GDK_EVENT_PROPAGATE")]
-       public const bool EVENT_PROPAGATE;
-       [CCode (cheader_filename = "gdk/gdk.h", cname = "GDK_EVENT_STOP")]
-       public const bool EVENT_STOP;
        [CCode (cheader_filename = "gdk/gdk.h", cname = "GDK_MAX_TIMECOORD_AXES")]
        public const int MAX_TIMECOORD_AXES;
        [CCode (cheader_filename = "gdk/gdk.h", cname = "GDK_PARENT_RELATIVE")]
diff --git a/vapi/metadata/Gdk-3.0-custom.vala b/vapi/metadata/Gdk-3.0-custom.vala
index 227a08c..e00bc7d 100644
--- a/vapi/metadata/Gdk-3.0-custom.vala
+++ b/vapi/metadata/Gdk-3.0-custom.vala
@@ -13,10 +13,35 @@ namespace Gdk {
                public static Gdk.Atom NONE;
        }
 
-       [CCode (cheader_filename = "gdk/gdk.h", has_type_id = false)]
-       public struct EventKey {
+       [CCode (cheader_filename = "gdk/gdk.h", copy_function = "g_boxed_copy", free_function = 
"g_boxed_free", type_id = "gdk_event_get_type ()")]
+       [Compact]
+       public class Event {
+               public Gdk.EventAny any { [CCode (cname = "(EventAny *)")] get; }
+               public Gdk.EventButton button { [CCode (cname = "(EventButton *)")] get; }
+               public Gdk.EventConfigure configure { [CCode (cname = "(EventConfigure *)")] get; }
+               public Gdk.EventCrossing crossing { [CCode (cname = "(EventCrossing *)")] get; }
+               public Gdk.EventDND dnd { [CCode (cname = "(EventDND *)")] get; }
+               public Gdk.EventExpose expose { [CCode (cname = "(EventExpose *)")] get; }
+               public Gdk.EventFocus focus_change { [CCode (cname = "(EventFocus *)")] get; }
+               public Gdk.EventGrabBroken grab_broken { [CCode (cname = "(EventGrabBroken *)")] get; }
+               public Gdk.EventKey key { [CCode (cname = "(GdkEventKey *)")] get; }
+               public Gdk.EventMotion motion { [CCode (cname = "(EventMotion *)")] get; }
+               public Gdk.EventOwnerChange owner_change { [CCode (cname = "(EventOwnerChange *)")] get; }
+               public Gdk.EventProperty property { [CCode (cname = "(EventProperty *)")] get; }
+               public Gdk.EventProximity proximity { [CCode (cname = "(EventProximity *)")] get; }
+               public Gdk.EventScroll scroll { [CCode (cname = "(EventScroll *)")] get; }
+               public Gdk.EventSelection selection { [CCode (cname = "(EventSelection *)")] get; }
+               public Gdk.EventSetting setting { [CCode (cname = "(EventSetting *)")] get; }
+               public Gdk.EventTouch touch { [CCode (cname = "(EventTouch *)")] get; }
+               public Gdk.EventVisibility visibility { [CCode (cname = "(EventVisibility *)")] get; }
+               public Gdk.EventWindowState window_state { [CCode (cname = "(EventWindowState *)")] get; }
+       }
+
+       [CCode (cheader_filename = "gdk/gdk.h", copy_function = "g_boxed_copy", free_function = 
"g_boxed_free", type_id = "gdk_event_get_type ()")]
+       [Compact]
+       public class EventKey : Event {
                [CCode (cname = "string")]
-               public weak string str;
+               public string str;
        }
 
        public struct Rectangle : Cairo.RectangleInt {
diff --git a/vapi/metadata/Gdk-3.0.metadata b/vapi/metadata/Gdk-3.0.metadata
index 4a55c74..895f073 100644
--- a/vapi/metadata/Gdk-3.0.metadata
+++ b/vapi/metadata/Gdk-3.0.metadata
@@ -25,7 +25,7 @@ Window
         .add_filter skip=false
         .remove_filter skip=false
 WindowRedirect skip
-EventKey
+EventKey struct=false
         .string skip
 RGBA struct
 ModifierType
@@ -53,8 +53,25 @@ Window
         .destroy destroys_instance
         .destroy_notify skip
 synthesize_window_state skip
-EventMotion
+EventAny struct=false base_type="Gdk.Event" type_id="gdk_event_get_type ()"
+EventButton struct=false base_type="Gdk.Event" type_id="gdk_event_get_type ()"
+EventConfigure struct=false base_type="Gdk.Event" type_id="gdk_event_get_type ()"
+EventCrossing struct=false base_type="Gdk.Event" type_id="gdk_event_get_type ()"
+EventDND struct=false base_type="Gdk.Event" type_id="gdk_event_get_type ()"
+EventExpose struct=false base_type="Gdk.Event" type_id="gdk_event_get_type ()"
+EventFocus struct=false base_type="Gdk.Event" type_id="gdk_event_get_type ()"
+EventGrabBroken struct=false base_type="Gdk.Event" type_id="gdk_event_get_type ()"
+EventMotion struct=false base_type="Gdk.Event" type_id="gdk_event_get_type ()"
         .axes array
+EventOwnerChange struct=false base_type="Gdk.Event" type_id="gdk_event_get_type ()"
+EventProperty struct=false base_type="Gdk.Event" type_id="gdk_event_get_type ()"
+EventProximity struct=false base_type="Gdk.Event" type_id="gdk_event_get_type ()"
+EventScroll struct=false base_type="Gdk.Event" type_id="gdk_event_get_type ()"
+EventSelection struct=false base_type="Gdk.Event" type_id="gdk_event_get_type ()"
+EventSetting struct=false base_type="Gdk.Event" type_id="gdk_event_get_type ()"
+EventTouch struct=false base_type="Gdk.Event" type_id="gdk_event_get_type ()"
+EventVisibility struct=false base_type="Gdk.Event" type_id="gdk_event_get_type ()"
+EventWindowState struct=false base_type="Gdk.Event" type_id="gdk_event_get_type ()"
 FilterFunc.data closure=2
 init*.argv unowned
 parse_args.argv unowned


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