diff --git a/ChangeLog b/ChangeLog index 58cebca02..acc9b37a1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2004-02-20 Mike Kestner + + * gdk/Gdk.metadata : hide NoExpose, Client, Setting, WindowState, + and Proximity events. + * gdk/EventClient.cs : glue-based manual implementation. + * gdk/EventClient.custom : kill + * gdk/EventNoExpose.custom : kill + * gdk/EventProximity.cs : glue-based manual implementation. + * gdk/EventProximity.custom : kill + * gdk/EventSetting.cs : glue-based manual implementation. + * gdk/EventSetting.custom : kill + * gdk/EventWindowState.cs : glue-based manual implementation. + * gdk/EventWindowState.custom : kill + * gdk/gdk-api.xml : regen + * gdk/gdk-symbols.xml : manual mappings. + * glue/event.cs : expose event struct fields. + * gtk/Application.cs : simplify CurrentEvent prop. + 2004-02-20 Mike Kestner * gdk/Gdk.metadata : hide Property, Selection, and DND events diff --git a/gdk/EventClient.cs b/gdk/EventClient.cs new file mode 100644 index 000000000..5d303e29d --- /dev/null +++ b/gdk/EventClient.cs @@ -0,0 +1,62 @@ +// Gdk.EventClient.cs - Custom client event wrapper +// +// Author: Mike Kestner +// +// (c) 2004 Novell, Inc. + +namespace Gdk { + + using System; + using System.Runtime.InteropServices; + + public class EventClient : Event { + + [DllImport("gtksharpglue")] + static extern uint gtksharp_gdk_event_client_get_time (IntPtr evt); + + [DllImport("gtksharpglue")] + static extern IntPtr gtksharp_gdk_event_client_get_message_type (IntPtr evt); + + [DllImport("gtksharpglue")] + static extern ushort gtksharp_gdk_event_client_get_data_format (IntPtr evt); + + [DllImport("gtksharpglue")] + static extern IntPtr gtksharp_gdk_event_client_get_data (IntPtr evt); + + public EventClient (IntPtr raw) : base (raw) {} + + public Atom MessageType { + get { + return new Atom (gtksharp_gdk_event_client_get_message_type (Handle)); + } + } + + public ushort DataFormat { + get { + return gtksharp_gdk_event_client_get_data_format (Handle); + } + } + + public Array Data { + get { + switch (DataFormat) { + case 8: + byte[] b = new byte [20]; + Marshal.Copy (b, 0, gtksharp_gdk_event_client_get_data (Handle), 20); + return b; + case 16: + short[] s = new short [10]; + Marshal.Copy (s, 0, gtksharp_gdk_event_client_get_data (Handle), 10); + return s; + case 32: + long[] l = new long [5]; + Marshal.Copy (l, 0, gtksharp_gdk_event_client_get_data (Handle), 5); + return l; + default: + throw new Exception ("Invalid Data Format: " + DataFormat); + } + } + } + } +} + diff --git a/gdk/EventClient.custom b/gdk/EventClient.custom deleted file mode 100644 index 489899d83..000000000 --- a/gdk/EventClient.custom +++ /dev/null @@ -1,18 +0,0 @@ -// -// gdk/EventClient.custom -// -// Author: Gustavo Giraldez -// -// Copyright (C) 2004 Gustavo Giraldez. -// - -[DllImport("libgdk-win32-2.0-0.dll")] -static extern IntPtr gdk_event_get_type(); - -public static GLib.GType GType { - get { - IntPtr raw_ret = gdk_event_get_type(); - GLib.GType ret = new GLib.GType(raw_ret); - return ret; - } -} diff --git a/gdk/EventNoExpose.custom b/gdk/EventNoExpose.custom deleted file mode 100644 index 88f00744c..000000000 --- a/gdk/EventNoExpose.custom +++ /dev/null @@ -1,18 +0,0 @@ -// -// gdk/EventNoExpose.custom -// -// Author: Gustavo Giraldez -// -// Copyright (C) 2004 Gustavo Giraldez. -// - -[DllImport("libgdk-win32-2.0-0.dll")] -static extern IntPtr gdk_event_get_type(); - -public static GLib.GType GType { - get { - IntPtr raw_ret = gdk_event_get_type(); - GLib.GType ret = new GLib.GType(raw_ret); - return ret; - } -} diff --git a/gdk/EventProximity.cs b/gdk/EventProximity.cs new file mode 100644 index 000000000..2961c6c6d --- /dev/null +++ b/gdk/EventProximity.cs @@ -0,0 +1,35 @@ +// Gdk.EventProximity.cs - Custom proximity event wrapper +// +// Author: Mike Kestner +// +// (c) 2004 Novell, Inc. + +namespace Gdk { + + using System; + using System.Runtime.InteropServices; + + public class EventProximity : Event { + + [DllImport("gtksharpglue")] + static extern uint gtksharp_gdk_event_proximity_get_time (IntPtr evt); + + [DllImport("gtksharpglue")] + static extern IntPtr gtksharp_gdk_event_proximity_get_device (IntPtr evt); + + public EventProximity (IntPtr raw) : base (raw) {} + + public Device Device { + get { + return GLib.Object.GetObject (gtksharp_gdk_event_proximity_get_device (Handle)) as Device; + } + } + + public uint Time { + get { + return gtksharp_gdk_event_proximity_get_time (Handle); + } + } + } +} + diff --git a/gdk/EventProximity.custom b/gdk/EventProximity.custom deleted file mode 100644 index 449274ad6..000000000 --- a/gdk/EventProximity.custom +++ /dev/null @@ -1,18 +0,0 @@ -// -// gdk/EventProximity.custom -// -// Author: Gustavo Giraldez -// -// Copyright (C) 2004 Gustavo Giraldez. -// - -[DllImport("libgdk-win32-2.0-0.dll")] -static extern IntPtr gdk_event_get_type(); - -public static GLib.GType GType { - get { - IntPtr raw_ret = gdk_event_get_type(); - GLib.GType ret = new GLib.GType(raw_ret); - return ret; - } -} diff --git a/gdk/EventSetting.cs b/gdk/EventSetting.cs new file mode 100644 index 000000000..6a36cb0af --- /dev/null +++ b/gdk/EventSetting.cs @@ -0,0 +1,35 @@ +// Gdk.EventSetting.cs - Custom Setting event wrapper +// +// Author: Mike Kestner +// +// (c) 2004 Novell, Inc. + +namespace Gdk { + + using System; + using System.Runtime.InteropServices; + + public class EventSetting : Event { + + [DllImport("gtksharpglue")] + static extern SettingAction gtksharp_gdk_event_setting_get_action (IntPtr evt); + + [DllImport("gtksharpglue")] + static extern IntPtr gtksharp_gdk_event_setting_get_name (IntPtr evt); + + public EventSetting (IntPtr raw) : base (raw) {} + + public SettingAction Action { + get { + return gtksharp_gdk_event_setting_get_action (Handle); + } + } + + public string Name { + get { + return Marshal.PtrToStringAnsi (gtksharp_gdk_event_setting_get_name (Handle)); + } + } + } +} + diff --git a/gdk/EventSetting.custom b/gdk/EventSetting.custom deleted file mode 100644 index 535e1d063..000000000 --- a/gdk/EventSetting.custom +++ /dev/null @@ -1,18 +0,0 @@ -// -// gdk/EventSetting.custom -// -// Author: Gustavo Giraldez -// -// Copyright (C) 2004 Gustavo Giraldez. -// - -[DllImport("libgdk-win32-2.0-0.dll")] -static extern IntPtr gdk_event_get_type(); - -public static GLib.GType GType { - get { - IntPtr raw_ret = gdk_event_get_type(); - GLib.GType ret = new GLib.GType(raw_ret); - return ret; - } -} diff --git a/gdk/EventWindowState.cs b/gdk/EventWindowState.cs new file mode 100644 index 000000000..8ef95d028 --- /dev/null +++ b/gdk/EventWindowState.cs @@ -0,0 +1,35 @@ +// Gdk.EventWindowState.cs - Custom WindowState event wrapper +// +// Author: Mike Kestner +// +// (c) 2004 Novell, Inc. + +namespace Gdk { + + using System; + using System.Runtime.InteropServices; + + public class EventWindowState : Event { + + [DllImport("gtksharpglue")] + static extern WindowState gtksharp_gdk_event_window_state_get_changed_mask (IntPtr evt); + + [DllImport("gtksharpglue")] + static extern WindowState gtksharp_gdk_event_window_state_get_new_window_state (IntPtr evt); + + public EventWindowState (IntPtr raw) : base (raw) {} + + public WindowState ChangedMask { + get { + return gtksharp_gdk_event_window_state_get_changed_mask (Handle); + } + } + + public WindowState NewWindowState { + get { + return gtksharp_gdk_event_window_state_get_new_window_state (Handle); + } + } + } +} + diff --git a/gdk/EventWindowState.custom b/gdk/EventWindowState.custom deleted file mode 100644 index bdd3056a5..000000000 --- a/gdk/EventWindowState.custom +++ /dev/null @@ -1,18 +0,0 @@ -// -// gdk/EventWindowState.custom -// -// Author: Gustavo Giraldez -// -// Copyright (C) 2004 Gustavo Giraldez. -// - -[DllImport("libgdk-win32-2.0-0.dll")] -static extern IntPtr gdk_event_get_type(); - -public static GLib.GType GType { - get { - IntPtr raw_ret = gdk_event_get_type(); - GLib.GType ret = new GLib.GType(raw_ret); - return ret; - } -} diff --git a/gdk/Gdk.metadata b/gdk/Gdk.metadata index 2cdb76bc0..9bd8cc825 100644 --- a/gdk/Gdk.metadata +++ b/gdk/Gdk.metadata @@ -65,6 +65,7 @@ 1 1 1 + 1 1 1 1 @@ -72,10 +73,14 @@ 1 1 1 + 1 1 + 1 1 1 + 1 1 + 1 1 1 128 diff --git a/gdk/gdk-api.xml b/gdk/gdk-api.xml index f336c897f..5324659b8 100644 --- a/gdk/gdk-api.xml +++ b/gdk/gdk-api.xml @@ -2284,7 +2284,7 @@ - + - + - + - + - +