diff --git a/ChangeLog b/ChangeLog index 7b3f8561c..0f333984b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2004-02-16 Mike Kestner + + * gdk/Gdk.metadata : hide EventAny + * gdk/Event.cs : make this a full EventAny implementation. + * gdk/gdk-api.xml : regen + * gdk/gdk-symbols.xml : map EventAny to Gdk.Event. + * glue/event.cs : expose window and send_event fields. + 2004-02-14 Todd Berman * gtk/Gtk.metadata : hide Widget.SetState diff --git a/gdk/Event.cs b/gdk/Event.cs index 6a367606b..22bc3f3f9 100644 --- a/gdk/Event.cs +++ b/gdk/Event.cs @@ -1,22 +1,48 @@ // Gdk.Event.cs - Custom event wrapper // -// Author: Rachel Hestilow +// Authors: Rachel Hestilow +// Mike Kestner // // (c) 2002 Rachel Hestilow - +// (c) 2004 Novell, Inc. namespace Gdk { using System; - using System.Collections; using System.Runtime.InteropServices; - public class Event : GLib.Boxed { + public class Event : GLib.IWrapper { [DllImport("gtksharpglue")] static extern EventType gtksharp_gdk_event_get_event_type (IntPtr evt); - public Event(IntPtr raw) : base(raw) {} + [DllImport("gtksharpglue")] + static extern IntPtr gtksharp_gdk_event_get_window (IntPtr evt); + + [DllImport("gtksharpglue")] + static extern sbyte gtksharp_gdk_event_get_send_event (IntPtr evt); + + [DllImport("libgdk-win32-2.0-0.dll")] + static extern IntPtr gdk_event_get_type (); + + IntPtr raw; + + public Event(IntPtr raw) + { + this.raw = raw; + } + + public IntPtr Handle { + get { + return raw; + } + } + + public static GLib.GType GType { + get { + return new GLib.GType (gdk_event_get_type ()); + } + } public EventType Type { get { @@ -24,11 +50,17 @@ namespace Gdk { } } - public bool IsValid { + public Window Window { get { - return (Handle != IntPtr.Zero); + return GLib.Object.GetObject (gtksharp_gdk_event_get_window (Handle)) as Window; + } + } + + public bool SendEvent { + get { + return gtksharp_gdk_event_get_send_event (Handle) == 0 ? false : true; } } } - } + diff --git a/gdk/Gdk.metadata b/gdk/Gdk.metadata index c3ac25179..5d265579c 100644 --- a/gdk/Gdk.metadata +++ b/gdk/Gdk.metadata @@ -62,6 +62,7 @@ 1 1 1 + 1 1 128 1 diff --git a/gdk/gdk-api.xml b/gdk/gdk-api.xml index 1bde7159a..b18e5e479 100644 --- a/gdk/gdk-api.xml +++ b/gdk/gdk-api.xml @@ -2265,7 +2265,7 @@ - +