2009-01-13 Mike Kestner <mkestner@novell.com>
* gdk/glue/event.c: kill * gdk/glue/selection.c: kill * gdk/Selection.cs: hardcode the primary, secondary, and clipboard atom definitions instead of using glue to access their macros. * gdk/Event*.cs: rewrite to use layout structures instead of glue for field accessors. Also enable writing for all fields. [Fixes #323373] svn path=/trunk/gtk-sharp/; revision=123197
This commit is contained in:
parent
33849fd085
commit
d02c31e387
24 changed files with 870 additions and 1200 deletions
ChangeLog
gdk
Event.csEventButton.csEventClient.csEventConfigure.csEventCrossing.csEventDND.csEventExpose.csEventFocus.csEventGrabBroken.csEventKey.csEventMotion.csEventOwnerChange.csEventProperty.csEventProximity.csEventScroll.csEventSelection.csEventSetting.csEventVisibility.csEventWindowState.csSelection.custom
glue
14
ChangeLog
14
ChangeLog
|
@ -1,8 +1,18 @@
|
|||
2009-01-09 Mike Kestner <mkestner@novell.com>
|
||||
2009-01-13 Mike Kestner <mkestner@novell.com>
|
||||
|
||||
* gdk/glue/event.c: kill
|
||||
* gdk/glue/selection.c: kill
|
||||
* gdk/Selection.cs: hardcode the primary, secondary, and clipboard
|
||||
atom definitions instead of using glue to access their macros.
|
||||
* gdk/Event*.cs: rewrite to use layout structures instead of glue
|
||||
for field accessors. Also enable writing for all fields.
|
||||
[Fixes #323373]
|
||||
|
||||
2009-01-12 Mike Kestner <mkestner@novell.com>
|
||||
|
||||
* glib/Opaque.cs (GetOpaque): return null for IntPtr.Zero.
|
||||
|
||||
2009-01-09 Mike Kestner <mkestner@novell.com>
|
||||
2009-01-12 Mike Kestner <mkestner@novell.com>
|
||||
|
||||
* configure.in.in: don't hardcode CC when cross-compiling.
|
||||
* gapi-cdecl-insert: monodis support on mono.
|
||||
|
|
62
gdk/Event.cs
62
gdk/Event.cs
|
@ -1,10 +1,10 @@
|
|||
// Gdk.Event.cs - Custom event wrapper
|
||||
//
|
||||
// Authors: Rachel Hestilow <hestilow@ximian.com>
|
||||
// Mike Kestner <mkestner@ximian.com>
|
||||
// Mike Kestner <mkestner@novell.com>
|
||||
//
|
||||
// Copyright (c) 2002 Rachel Hestilow
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
// Copyright (c) 2004-2009 Novell, Inc.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of version 2 of the Lesser GNU General
|
||||
|
@ -28,18 +28,6 @@ namespace Gdk {
|
|||
|
||||
public class Event : GLib.IWrapper {
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern EventType gtksharp_gdk_event_get_event_type (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern IntPtr gtksharp_gdk_event_get_window (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
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)
|
||||
|
@ -48,32 +36,51 @@ namespace Gdk {
|
|||
}
|
||||
|
||||
public IntPtr Handle {
|
||||
get {
|
||||
return raw;
|
||||
}
|
||||
get { return raw; }
|
||||
}
|
||||
|
||||
[DllImport("libgdk-win32-2.0-0.dll")]
|
||||
static extern IntPtr gdk_event_get_type ();
|
||||
|
||||
public static GLib.GType GType {
|
||||
get {
|
||||
return new GLib.GType (gdk_event_get_type ());
|
||||
}
|
||||
get { return new GLib.GType (gdk_event_get_type ()); }
|
||||
}
|
||||
|
||||
[StructLayout (LayoutKind.Sequential)]
|
||||
struct NativeStruct {
|
||||
public EventType type;
|
||||
public IntPtr window;
|
||||
public sbyte send_event;
|
||||
}
|
||||
|
||||
NativeStruct Native {
|
||||
get { return (NativeStruct) Marshal.PtrToStructure (raw, typeof(NativeStruct)); }
|
||||
}
|
||||
|
||||
public EventType Type {
|
||||
get {
|
||||
return gtksharp_gdk_event_get_event_type (Handle);
|
||||
get { return Native.type; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.type = value;
|
||||
Marshal.StructureToPtr (native, raw, false);
|
||||
}
|
||||
}
|
||||
|
||||
public Window Window {
|
||||
get {
|
||||
return GLib.Object.GetObject (gtksharp_gdk_event_get_window (Handle)) as Window;
|
||||
get { return GLib.Object.GetObject (Native.window, false) as Window; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.window = value == null ? IntPtr.Zero : value.Handle;
|
||||
Marshal.StructureToPtr (native, raw, false);
|
||||
}
|
||||
}
|
||||
|
||||
public bool SendEvent {
|
||||
get {
|
||||
return gtksharp_gdk_event_get_send_event (Handle) == 0 ? false : true;
|
||||
get { return Native.send_event != 0; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.send_event = (sbyte) (value ? 1 : 0);
|
||||
Marshal.StructureToPtr (native, raw, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -87,7 +94,8 @@ namespace Gdk {
|
|||
if (raw == IntPtr.Zero)
|
||||
return null;
|
||||
|
||||
switch (gtksharp_gdk_event_get_event_type (raw)) {
|
||||
NativeStruct native = (NativeStruct) Marshal.PtrToStructure (raw, typeof(NativeStruct));
|
||||
switch (native.type) {
|
||||
case EventType.Expose:
|
||||
return new EventExpose (raw);
|
||||
case EventType.MotionNotify:
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// Gdk.EventButton.cs - Custom button event wrapper
|
||||
//
|
||||
// Author: Mike Kestner <mkestner@ximian.com>
|
||||
// Author: Mike Kestner <mkestner@novell.com>
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
// Copyright (c) 2004-2009 Novell, Inc.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of version 2 of the Lesser GNU General
|
||||
|
@ -25,93 +25,116 @@ namespace Gdk {
|
|||
|
||||
public class EventButton : Event {
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern uint gtksharp_gdk_event_button_get_time (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern double gtksharp_gdk_event_button_get_x (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern double gtksharp_gdk_event_button_get_y (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern double gtksharp_gdk_event_button_get_x_root (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern double gtksharp_gdk_event_button_get_y_root (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern uint gtksharp_gdk_event_button_get_state (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern uint gtksharp_gdk_event_button_get_button (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern IntPtr gtksharp_gdk_event_button_get_device (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern IntPtr gtksharp_gdk_event_button_get_axes (IntPtr evt);
|
||||
|
||||
public EventButton (IntPtr raw) : base (raw) {}
|
||||
|
||||
public uint Time {
|
||||
get {
|
||||
return gtksharp_gdk_event_button_get_time (Handle);
|
||||
}
|
||||
[StructLayout (LayoutKind.Sequential)]
|
||||
struct NativeStruct {
|
||||
EventType type;
|
||||
IntPtr window;
|
||||
sbyte send_event;
|
||||
public uint time;
|
||||
public double x;
|
||||
public double y;
|
||||
public IntPtr axes;
|
||||
public uint state;
|
||||
public uint button;
|
||||
public IntPtr device;
|
||||
public double x_root;
|
||||
public double y_root;
|
||||
}
|
||||
|
||||
public ModifierType State {
|
||||
get {
|
||||
return (ModifierType) gtksharp_gdk_event_button_get_state (Handle);
|
||||
}
|
||||
}
|
||||
|
||||
public double X {
|
||||
get {
|
||||
return gtksharp_gdk_event_button_get_x (Handle);
|
||||
}
|
||||
}
|
||||
|
||||
public double Y {
|
||||
get {
|
||||
return gtksharp_gdk_event_button_get_y (Handle);
|
||||
}
|
||||
}
|
||||
|
||||
public double XRoot {
|
||||
get {
|
||||
return gtksharp_gdk_event_button_get_x_root (Handle);
|
||||
}
|
||||
}
|
||||
|
||||
public double YRoot {
|
||||
get {
|
||||
return gtksharp_gdk_event_button_get_y_root (Handle);
|
||||
}
|
||||
}
|
||||
|
||||
public uint Button {
|
||||
get {
|
||||
return gtksharp_gdk_event_button_get_button (Handle);
|
||||
}
|
||||
}
|
||||
|
||||
public Device Device {
|
||||
get {
|
||||
return GLib.Object.GetObject (gtksharp_gdk_event_button_get_device (Handle)) as Device;
|
||||
}
|
||||
NativeStruct Native {
|
||||
get { return (NativeStruct) Marshal.PtrToStructure (Handle, typeof(NativeStruct)); }
|
||||
}
|
||||
|
||||
public double[] Axes {
|
||||
get {
|
||||
double[] result = null;
|
||||
IntPtr axes = gtksharp_gdk_event_button_get_axes (Handle);
|
||||
IntPtr axes = Native.axes;
|
||||
if (axes != IntPtr.Zero) {
|
||||
result = new double[Device.NumAxes];
|
||||
result = new double [Device.NumAxes];
|
||||
Marshal.Copy (axes, result, 0, result.Length);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
if (native.axes == IntPtr.Zero || value.Length != Device.NumAxes)
|
||||
throw new InvalidOperationException ();
|
||||
Marshal.Copy (value, 0, native.axes, value.Length);
|
||||
}
|
||||
}
|
||||
|
||||
public uint Button {
|
||||
get { return Native.button; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.button = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public Device Device {
|
||||
get { return GLib.Object.GetObject (Native.device, false) as Device; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.device = value == null ? IntPtr.Zero : value.Handle;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public ModifierType State {
|
||||
get { return (ModifierType) Native.state; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.state = (uint) value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public uint Time {
|
||||
get { return Native.time; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.time = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public double X {
|
||||
get { return Native.x; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.x = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public double XRoot {
|
||||
get { return Native.x_root; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.x_root = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public double Y {
|
||||
get { return Native.y; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.y = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public double YRoot {
|
||||
get { return Native.y_root; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.y_root = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// Gdk.EventClient.cs - Custom client event wrapper
|
||||
//
|
||||
// Author: Mike Kestner <mkestner@ximian.com>
|
||||
// Author: Mike Kestner <mkestner@novell.com>
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
// Copyright (c) 2004-2009 Novell, Inc.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of version 2 of the Lesser GNU General
|
||||
|
@ -26,26 +26,50 @@ namespace Gdk {
|
|||
|
||||
public class EventClient : Event {
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern IntPtr gtksharp_gdk_event_client_get_message_type (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern ushort gtksharp_gdk_event_client_get_data_format (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
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));
|
||||
}
|
||||
struct NativeStruct {
|
||||
EventType type;
|
||||
IntPtr window;
|
||||
sbyte send_event;
|
||||
public IntPtr message_type;
|
||||
public ushort data_format;
|
||||
public IntPtr data_as_long0;
|
||||
public IntPtr data_as_long1;
|
||||
public IntPtr data_as_long2;
|
||||
public IntPtr data_as_long3;
|
||||
public IntPtr data_as_long4;
|
||||
}
|
||||
|
||||
NativeStruct Native {
|
||||
get { return (NativeStruct) Marshal.PtrToStructure (Handle, typeof (NativeStruct)); }
|
||||
}
|
||||
|
||||
public ushort DataFormat {
|
||||
get { return Native.data_format; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.data_format = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public Atom MessageType {
|
||||
get {
|
||||
IntPtr msg_type = Native.message_type;
|
||||
return msg_type == IntPtr.Zero ? null : (Atom) GLib.Opaque.GetOpaque (msg_type, typeof (Atom), false);
|
||||
}
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.message_type = value == null ? IntPtr.Zero : value.Handle;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
IntPtr DataPointer {
|
||||
get {
|
||||
return gtksharp_gdk_event_client_get_data_format (Handle);
|
||||
int offset = Marshal.SizeOf (typeof (NativeStruct)) - 5 * IntPtr.Size;
|
||||
return new IntPtr (Handle.ToInt64 () + offset);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -54,14 +78,14 @@ namespace Gdk {
|
|||
switch (DataFormat) {
|
||||
case 8:
|
||||
byte[] b = new byte [20];
|
||||
Marshal.Copy (b, 0, gtksharp_gdk_event_client_get_data (Handle), 20);
|
||||
Marshal.Copy (b, 0, DataPointer, 20);
|
||||
return b;
|
||||
case 16:
|
||||
short[] s = new short [10];
|
||||
Marshal.Copy (s, 0, gtksharp_gdk_event_client_get_data (Handle), 10);
|
||||
Marshal.Copy (s, 0, DataPointer, 10);
|
||||
return s;
|
||||
case 32:
|
||||
IntPtr data_ptr = gtksharp_gdk_event_client_get_data (Handle);
|
||||
IntPtr data_ptr = DataPointer;
|
||||
long[] l = new long [5];
|
||||
for (int i = 0; i < 5; i++)
|
||||
l [i] = (long) Marshal.ReadIntPtr (data_ptr, i * IntPtr.Size);
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// Gdk.EventConfigure.cs - Custom configure event wrapper
|
||||
//
|
||||
// Author: Mike Kestner <mkestner@ximian.com>
|
||||
// Author: Mike Kestner <mkestner@novell.com>
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
// Copyright (c) 2004-2009 Novell, Inc.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of version 2 of the Lesser GNU General
|
||||
|
@ -26,41 +26,56 @@ namespace Gdk {
|
|||
|
||||
public class EventConfigure : Event {
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern int gtksharp_gdk_event_configure_get_x (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern int gtksharp_gdk_event_configure_get_y (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern int gtksharp_gdk_event_configure_get_width (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern int gtksharp_gdk_event_configure_get_height (IntPtr evt);
|
||||
|
||||
public EventConfigure (IntPtr raw) : base (raw) {}
|
||||
|
||||
public int X {
|
||||
get {
|
||||
return gtksharp_gdk_event_configure_get_x (Handle);
|
||||
}
|
||||
[StructLayout (LayoutKind.Sequential)]
|
||||
struct NativeStruct {
|
||||
EventType type;
|
||||
IntPtr window;
|
||||
sbyte send_event;
|
||||
public int x;
|
||||
public int y;
|
||||
public int width;
|
||||
public int height;
|
||||
}
|
||||
|
||||
public int Y {
|
||||
get {
|
||||
return gtksharp_gdk_event_configure_get_y (Handle);
|
||||
NativeStruct Native {
|
||||
get { return (NativeStruct) Marshal.PtrToStructure (Handle, typeof(NativeStruct)); }
|
||||
}
|
||||
|
||||
public int Height {
|
||||
get { return Native.height; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.height = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public int Width {
|
||||
get {
|
||||
return gtksharp_gdk_event_configure_get_width (Handle);
|
||||
get { return Native.width; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.width = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public int Height {
|
||||
get {
|
||||
return gtksharp_gdk_event_configure_get_height (Handle);
|
||||
public int X {
|
||||
get { return Native.x; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.x = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public int Y {
|
||||
get { return Native.y; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.y = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// Gdk.EventCrossing.cs - Custom crossing event wrapper
|
||||
//
|
||||
// Author: Mike Kestner <mkestner@ximian.com>
|
||||
// Author: Mike Kestner <mkestner@novell.com>
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
// Copyright (c) 2004-2009 Novell, Inc.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of version 2 of the Lesser GNU General
|
||||
|
@ -26,95 +26,116 @@ namespace Gdk {
|
|||
|
||||
public class EventCrossing : Event {
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern uint gtksharp_gdk_event_crossing_get_time (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern double gtksharp_gdk_event_crossing_get_x (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern double gtksharp_gdk_event_crossing_get_y (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern double gtksharp_gdk_event_crossing_get_x_root (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern double gtksharp_gdk_event_crossing_get_y_root (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern uint gtksharp_gdk_event_crossing_get_state (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern IntPtr gtksharp_gdk_event_crossing_get_subwindow (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern CrossingMode gtksharp_gdk_event_crossing_get_mode (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern NotifyType gtksharp_gdk_event_crossing_get_detail (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern bool gtksharp_gdk_event_crossing_get_focus (IntPtr evt);
|
||||
|
||||
public EventCrossing (IntPtr raw) : base (raw) {}
|
||||
|
||||
public uint Time {
|
||||
get {
|
||||
return gtksharp_gdk_event_crossing_get_time (Handle);
|
||||
}
|
||||
[StructLayout (LayoutKind.Sequential)]
|
||||
struct NativeStruct {
|
||||
EventType type;
|
||||
IntPtr window;
|
||||
sbyte send_event;
|
||||
public IntPtr subwindow;
|
||||
public uint time;
|
||||
public double x;
|
||||
public double y;
|
||||
public double x_root;
|
||||
public double y_root;
|
||||
public CrossingMode mode;
|
||||
public NotifyType detail;
|
||||
public bool focus;
|
||||
public uint state;
|
||||
}
|
||||
|
||||
public ModifierType State {
|
||||
get {
|
||||
return (ModifierType) gtksharp_gdk_event_crossing_get_state (Handle);
|
||||
}
|
||||
}
|
||||
|
||||
public double X {
|
||||
get {
|
||||
return gtksharp_gdk_event_crossing_get_x (Handle);
|
||||
}
|
||||
}
|
||||
|
||||
public double Y {
|
||||
get {
|
||||
return gtksharp_gdk_event_crossing_get_y (Handle);
|
||||
}
|
||||
}
|
||||
|
||||
public double XRoot {
|
||||
get {
|
||||
return gtksharp_gdk_event_crossing_get_x_root (Handle);
|
||||
}
|
||||
}
|
||||
|
||||
public double YRoot {
|
||||
get {
|
||||
return gtksharp_gdk_event_crossing_get_y_root (Handle);
|
||||
}
|
||||
}
|
||||
|
||||
public Window Subwindow {
|
||||
get {
|
||||
return GLib.Object.GetObject (gtksharp_gdk_event_crossing_get_subwindow (Handle)) as Window;
|
||||
}
|
||||
}
|
||||
|
||||
public CrossingMode Mode {
|
||||
get {
|
||||
return gtksharp_gdk_event_crossing_get_mode (Handle);
|
||||
}
|
||||
NativeStruct Native {
|
||||
get { return (NativeStruct) Marshal.PtrToStructure (Handle, typeof(NativeStruct)); }
|
||||
}
|
||||
|
||||
public NotifyType Detail {
|
||||
get {
|
||||
return gtksharp_gdk_event_crossing_get_detail (Handle);
|
||||
get { return Native.detail; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.detail = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public bool Focus {
|
||||
get {
|
||||
return gtksharp_gdk_event_crossing_get_focus (Handle);
|
||||
get { return Native.focus; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.focus = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public CrossingMode Mode {
|
||||
get { return Native.mode; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.mode = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public ModifierType State {
|
||||
get { return (ModifierType) Native.state; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.state = (uint) value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public Window SubWindow {
|
||||
get { return GLib.Object.GetObject (Native.subwindow, false) as Window; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.subwindow = value == null ? IntPtr.Zero : value.Handle;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public uint Time {
|
||||
get { return Native.time; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.time = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public double X {
|
||||
get { return Native.x; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.x = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public double XRoot {
|
||||
get { return Native.x_root; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.x_root = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public double Y {
|
||||
get { return Native.y; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.y = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public double YRoot {
|
||||
get { return Native.y_root; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.y_root = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// Gdk.EventDND.cs - Custom dnd event wrapper
|
||||
//
|
||||
// Author: Mike Kestner <mkestner@ximian.com>
|
||||
// Author: Mike Kestner <mkestner@novell.com>
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
// Copyright (c) 2004-2009 Novell, Inc.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of version 2 of the Lesser GNU General
|
||||
|
@ -26,41 +26,56 @@ namespace Gdk {
|
|||
|
||||
public class EventDND : Event {
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern uint gtksharp_gdk_event_dnd_get_time (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern IntPtr gtksharp_gdk_event_dnd_get_context (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern short gtksharp_gdk_event_dnd_get_x_root (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern short gtksharp_gdk_event_dnd_get_y_root (IntPtr evt);
|
||||
|
||||
public EventDND (IntPtr raw) : base (raw) {}
|
||||
|
||||
[StructLayout (LayoutKind.Sequential)]
|
||||
struct NativeStruct {
|
||||
EventType type;
|
||||
IntPtr window;
|
||||
sbyte send_event;
|
||||
public IntPtr context;
|
||||
public uint time;
|
||||
public short x_root;
|
||||
public short y_root;
|
||||
}
|
||||
|
||||
NativeStruct Native {
|
||||
get { return (NativeStruct) Marshal.PtrToStructure (Handle, typeof(NativeStruct)); }
|
||||
}
|
||||
|
||||
public DragContext Context {
|
||||
get {
|
||||
return GLib.Object.GetObject (gtksharp_gdk_event_dnd_get_context (Handle)) as DragContext;
|
||||
get { return GLib.Object.GetObject (Native.context, false) as DragContext; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.context = value == null ? IntPtr.Zero : value.Handle;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public uint Time {
|
||||
get {
|
||||
return gtksharp_gdk_event_dnd_get_time (Handle);
|
||||
get { return Native.time; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.time = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public short XRoot {
|
||||
get {
|
||||
return gtksharp_gdk_event_dnd_get_x_root (Handle);
|
||||
get { return Native.x_root; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.x_root = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public short YRoot {
|
||||
get {
|
||||
return gtksharp_gdk_event_dnd_get_y_root (Handle);
|
||||
get { return Native.y_root; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.y_root = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// Gdk.EventExpose.cs - Custom expose event wrapper
|
||||
//
|
||||
// Author: Mike Kestner <mkestner@ximian.com>
|
||||
// Author: Mike Kestner <mkestner@novell.com>
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
// Copyright (c) 2004-2009 Novell, Inc.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of version 2 of the Lesser GNU General
|
||||
|
@ -26,32 +26,46 @@ namespace Gdk {
|
|||
|
||||
public class EventExpose : Event {
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern IntPtr gtksharp_gdk_event_expose_get_area (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern IntPtr gtksharp_gdk_event_expose_get_region (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern int gtksharp_gdk_event_expose_get_count (IntPtr evt);
|
||||
|
||||
public EventExpose (IntPtr raw) : base (raw) {}
|
||||
|
||||
public Rectangle Area {
|
||||
get {
|
||||
return (Gdk.Rectangle) Marshal.PtrToStructure (gtksharp_gdk_event_expose_get_area (Handle), typeof (Gdk.Rectangle));
|
||||
}
|
||||
[StructLayout (LayoutKind.Sequential)]
|
||||
struct NativeStruct {
|
||||
EventType type;
|
||||
IntPtr window;
|
||||
sbyte send_event;
|
||||
public Rectangle area;
|
||||
public IntPtr region;
|
||||
public int count;
|
||||
}
|
||||
|
||||
public int Count {
|
||||
get {
|
||||
return gtksharp_gdk_event_expose_get_count (Handle);
|
||||
NativeStruct Native {
|
||||
get { return (NativeStruct) Marshal.PtrToStructure (Handle, typeof(NativeStruct)); }
|
||||
}
|
||||
|
||||
public Rectangle Area {
|
||||
get { return Native.area; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.area = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public Region Region {
|
||||
get {
|
||||
return new Region (gtksharp_gdk_event_expose_get_region (Handle));
|
||||
get { return GLib.Opaque.GetOpaque (Native.region, typeof (Region), false) as Region; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.region = value == null ? IntPtr.Zero : value.Handle;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public int Count {
|
||||
get { return Native.count; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.count = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// Gdk.EventFocus.cs - Custom focus event wrapper
|
||||
//
|
||||
// Author: Mike Kestner <mkestner@ximian.com>
|
||||
// Author: Mike Kestner <mkestner@novell.com>
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
// Copyright (c) 2004-2009 Novell, Inc.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of version 2 of the Lesser GNU General
|
||||
|
@ -26,14 +26,26 @@ namespace Gdk {
|
|||
|
||||
public class EventFocus : Event {
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern short gtksharp_gdk_event_focus_get_in (IntPtr evt);
|
||||
|
||||
public EventFocus (IntPtr raw) : base (raw) {}
|
||||
|
||||
[StructLayout (LayoutKind.Sequential)]
|
||||
struct NativeStruct {
|
||||
EventType type;
|
||||
IntPtr window;
|
||||
sbyte send_event;
|
||||
public short _in;
|
||||
}
|
||||
|
||||
NativeStruct Native {
|
||||
get { return (NativeStruct) Marshal.PtrToStructure (Handle, typeof(NativeStruct)); }
|
||||
}
|
||||
|
||||
public bool In {
|
||||
get {
|
||||
return gtksharp_gdk_event_focus_get_in (Handle) == 0 ? false : true;
|
||||
get { return Native._in != 0; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native._in = (short) (value ? 1 : 0);
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// Gdk.EventGrabBroken.cs - Custom GrabBroken event wrapper
|
||||
//
|
||||
// Author: Mike Kestner <mkestner@ximian.com>
|
||||
// Author: Mike Kestner <mkestner@novell.com>
|
||||
//
|
||||
// Copyright (c) 2005 Novell, Inc.
|
||||
// Copyright (c) 2005-2009 Novell, Inc.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of version 2 of the Lesser GNU General
|
||||
|
@ -27,38 +27,46 @@ namespace Gdk {
|
|||
|
||||
public class EventGrabBroken : Event {
|
||||
|
||||
public EventGrabBroken (IntPtr raw) : base (raw) {}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct NativeEventGrabBroken {
|
||||
struct NativeStruct {
|
||||
EventType type;
|
||||
IntPtr window;
|
||||
sbyte send_event;
|
||||
public bool Keyboard;
|
||||
public bool Implicit;
|
||||
public IntPtr GrabWindowHandle;
|
||||
public bool keyboard;
|
||||
public bool _implicit;
|
||||
public IntPtr grab_window;
|
||||
}
|
||||
|
||||
NativeEventGrabBroken native_struct;
|
||||
|
||||
public EventGrabBroken (IntPtr raw) : base (raw)
|
||||
{
|
||||
native_struct = (NativeEventGrabBroken) Marshal.PtrToStructure (raw, typeof (NativeEventGrabBroken));
|
||||
}
|
||||
NativeStruct Native {
|
||||
get { return (NativeStruct) Marshal.PtrToStructure (Handle, typeof(NativeStruct)); }
|
||||
}
|
||||
|
||||
public bool Keyboard {
|
||||
get {
|
||||
return native_struct.Keyboard;
|
||||
get { return Native.keyboard; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.keyboard = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public bool Implicit {
|
||||
get {
|
||||
return native_struct.Implicit;
|
||||
get { return Native._implicit; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native._implicit = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public Window GrabWindow {
|
||||
get {
|
||||
return GLib.Object.GetObject(native_struct.GrabWindowHandle) as Window;
|
||||
get { return GLib.Object.GetObject(Native.grab_window, false) as Window; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.grab_window = value == null ? IntPtr.Zero : value.Handle;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// Gdk.EventKey.cs - Custom key event wrapper
|
||||
//
|
||||
// Author: Mike Kestner <mkestner@ximian.com>
|
||||
// Author: Mike Kestner <mkestner@novell.com>
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
// Copyright (c) 2004-2009 Novell, Inc.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of version 2 of the Lesser GNU General
|
||||
|
@ -26,56 +26,72 @@ namespace Gdk {
|
|||
|
||||
public class EventKey : Event {
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern uint gtksharp_gdk_event_key_get_time (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern uint gtksharp_gdk_event_key_get_state (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern uint gtksharp_gdk_event_key_get_keyval (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern ushort gtksharp_gdk_event_key_get_hardware_keycode (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern byte gtksharp_gdk_event_key_get_group (IntPtr evt);
|
||||
|
||||
public EventKey (IntPtr raw) : base (raw) {}
|
||||
|
||||
public uint Time {
|
||||
get {
|
||||
return gtksharp_gdk_event_key_get_time (Handle);
|
||||
}
|
||||
[StructLayout (LayoutKind.Sequential)]
|
||||
struct NativeStruct {
|
||||
EventType type;
|
||||
IntPtr window;
|
||||
sbyte send_event;
|
||||
public uint time;
|
||||
public uint state;
|
||||
public uint keyval;
|
||||
int length;
|
||||
IntPtr _string;
|
||||
public ushort hardware_keycode;
|
||||
public byte group;
|
||||
}
|
||||
|
||||
public ModifierType State {
|
||||
get {
|
||||
return (ModifierType) gtksharp_gdk_event_key_get_state (Handle);
|
||||
}
|
||||
NativeStruct Native {
|
||||
get { return (NativeStruct) Marshal.PtrToStructure (Handle, typeof(NativeStruct)); }
|
||||
}
|
||||
|
||||
public Key Key {
|
||||
get {
|
||||
return (Key) gtksharp_gdk_event_key_get_keyval (Handle);
|
||||
}
|
||||
}
|
||||
|
||||
public uint KeyValue {
|
||||
get {
|
||||
return gtksharp_gdk_event_key_get_keyval (Handle);
|
||||
public byte Group {
|
||||
get { return Native.group; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.group = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public ushort HardwareKeycode {
|
||||
get {
|
||||
return gtksharp_gdk_event_key_get_hardware_keycode (Handle);
|
||||
get { return Native.hardware_keycode; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.hardware_keycode = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public byte Group {
|
||||
get {
|
||||
return gtksharp_gdk_event_key_get_group (Handle);
|
||||
public Key Key {
|
||||
get { return (Key) KeyValue; }
|
||||
}
|
||||
|
||||
public uint KeyValue {
|
||||
get { return Native.keyval; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.keyval = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public ModifierType State {
|
||||
get { return (ModifierType) Native.state; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.state = (uint) value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public uint Time {
|
||||
get { return Native.time; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.time = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// Gdk.EventMotion.cs - Custom motion event wrapper
|
||||
//
|
||||
// Author: Mike Kestner <mkestner@ximian.com>
|
||||
// Author: Mike Kestner <mkestner@novell.com>
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
// Copyright (c) 2004-2009 Novell, Inc.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of version 2 of the Lesser GNU General
|
||||
|
@ -26,93 +26,116 @@ namespace Gdk {
|
|||
|
||||
public class EventMotion : Event {
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern uint gtksharp_gdk_event_motion_get_time (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern double gtksharp_gdk_event_motion_get_x (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern double gtksharp_gdk_event_motion_get_y (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern double gtksharp_gdk_event_motion_get_x_root (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern double gtksharp_gdk_event_motion_get_y_root (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern uint gtksharp_gdk_event_motion_get_state (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern ushort gtksharp_gdk_event_motion_get_is_hint (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern IntPtr gtksharp_gdk_event_motion_get_device (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern IntPtr gtksharp_gdk_event_motion_get_axes (IntPtr evt);
|
||||
|
||||
public EventMotion (IntPtr raw) : base (raw) {}
|
||||
|
||||
public uint Time {
|
||||
get {
|
||||
return gtksharp_gdk_event_motion_get_time (Handle);
|
||||
}
|
||||
[StructLayout (LayoutKind.Sequential)]
|
||||
struct NativeStruct {
|
||||
EventType type;
|
||||
IntPtr window;
|
||||
sbyte send_event;
|
||||
public uint time;
|
||||
public double x;
|
||||
public double y;
|
||||
public IntPtr axes;
|
||||
public uint state;
|
||||
public short is_hint;
|
||||
public IntPtr device;
|
||||
public double x_root;
|
||||
public double y_root;
|
||||
}
|
||||
|
||||
public ModifierType State {
|
||||
get {
|
||||
return (ModifierType) gtksharp_gdk_event_motion_get_state (Handle);
|
||||
}
|
||||
}
|
||||
|
||||
public double X {
|
||||
get {
|
||||
return gtksharp_gdk_event_motion_get_x (Handle);
|
||||
}
|
||||
}
|
||||
|
||||
public double Y {
|
||||
get {
|
||||
return gtksharp_gdk_event_motion_get_y (Handle);
|
||||
}
|
||||
}
|
||||
|
||||
public double XRoot {
|
||||
get {
|
||||
return gtksharp_gdk_event_motion_get_x_root (Handle);
|
||||
}
|
||||
}
|
||||
|
||||
public double YRoot {
|
||||
get {
|
||||
return gtksharp_gdk_event_motion_get_y_root (Handle);
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsHint {
|
||||
get {
|
||||
return gtksharp_gdk_event_motion_get_is_hint (Handle) == 0 ? false : true;
|
||||
}
|
||||
}
|
||||
|
||||
public Device Device {
|
||||
get {
|
||||
return GLib.Object.GetObject (gtksharp_gdk_event_motion_get_device (Handle)) as Device;
|
||||
}
|
||||
NativeStruct Native {
|
||||
get { return (NativeStruct) Marshal.PtrToStructure (Handle, typeof(NativeStruct)); }
|
||||
}
|
||||
|
||||
public double[] Axes {
|
||||
get {
|
||||
double[] result = null;
|
||||
IntPtr axes = gtksharp_gdk_event_motion_get_axes (Handle);
|
||||
IntPtr axes = Native.axes;
|
||||
if (axes != IntPtr.Zero) {
|
||||
result = new double [Device.NumAxes];
|
||||
Marshal.Copy (axes, result, 0, result.Length);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
if (native.axes == IntPtr.Zero || value.Length != Device.NumAxes)
|
||||
throw new InvalidOperationException ();
|
||||
Marshal.Copy (value, 0, native.axes, value.Length);
|
||||
}
|
||||
}
|
||||
|
||||
public Device Device {
|
||||
get { return GLib.Object.GetObject (Native.device, false) as Device; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.device = value == null ? IntPtr.Zero : value.Handle;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsHint {
|
||||
get { return Native.is_hint != 0; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.is_hint = (short) (value ? 1 : 0);
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public ModifierType State {
|
||||
get { return (ModifierType) Native.state; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.state = (uint) value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public uint Time {
|
||||
get { return Native.time; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.time = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public double X {
|
||||
get { return Native.x; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.x = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public double XRoot {
|
||||
get { return Native.x_root; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.x_root = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public double Y {
|
||||
get { return Native.y; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.y = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public double YRoot {
|
||||
get { return Native.y_root; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.y_root = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
//
|
||||
// Author: Mike Kestner <mkestner@novell.com>
|
||||
//
|
||||
// Copyright (c) 2008 Novell, Inc.
|
||||
// Copyright (c) 2008-2009 Novell, Inc.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of version 2 of the Lesser GNU General
|
||||
|
@ -73,15 +73,6 @@ namespace Gdk {
|
|||
}
|
||||
}
|
||||
|
||||
public uint Time {
|
||||
get { return Native.time; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.time = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public uint SelectionTime {
|
||||
get { return Native.selection_time; }
|
||||
set {
|
||||
|
@ -90,6 +81,15 @@ namespace Gdk {
|
|||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public uint Time {
|
||||
get { return Native.time; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.time = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// Gdk.EventProperty.cs - Custom property event wrapper
|
||||
//
|
||||
// Author: Mike Kestner <mkestner@ximian.com>
|
||||
// Author: Mike Kestner <mkestner@novell.com>
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
// Copyright (c) 2004-2009 Novell, Inc.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of version 2 of the Lesser GNU General
|
||||
|
@ -26,32 +26,46 @@ namespace Gdk {
|
|||
|
||||
public class EventProperty : Event {
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern uint gtksharp_gdk_event_property_get_time (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern IntPtr gtksharp_gdk_event_property_get_atom (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern PropertyState gtksharp_gdk_event_property_get_state (IntPtr evt);
|
||||
|
||||
public EventProperty (IntPtr raw) : base (raw) {}
|
||||
|
||||
[StructLayout (LayoutKind.Sequential)]
|
||||
struct NativeStruct {
|
||||
EventType type;
|
||||
IntPtr window;
|
||||
sbyte send_event;
|
||||
public IntPtr atom;
|
||||
public uint time;
|
||||
public uint state;
|
||||
}
|
||||
|
||||
NativeStruct Native {
|
||||
get { return (NativeStruct) Marshal.PtrToStructure (Handle, typeof(NativeStruct)); }
|
||||
}
|
||||
|
||||
public Atom Atom {
|
||||
get {
|
||||
return new Atom (gtksharp_gdk_event_property_get_atom (Handle));
|
||||
get { return GLib.Opaque.GetOpaque (Native.atom, typeof (Atom), false) as Atom; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.atom = value == null ? IntPtr.Zero : value.Handle;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public PropertyState State {
|
||||
get {
|
||||
return gtksharp_gdk_event_property_get_state (Handle);
|
||||
get { return (PropertyState) Native.state; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.state = (uint) value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public uint Time {
|
||||
get {
|
||||
return gtksharp_gdk_event_property_get_time (Handle);
|
||||
get { return Native.time; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.time = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// Gdk.EventProximity.cs - Custom proximity event wrapper
|
||||
//
|
||||
// Author: Mike Kestner <mkestner@ximian.com>
|
||||
// Author: Mike Kestner <mkestner@novell.com>
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
// Copyright (c) 2004-2009 Novell, Inc.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of version 2 of the Lesser GNU General
|
||||
|
@ -26,23 +26,36 @@ namespace Gdk {
|
|||
|
||||
public class EventProximity : Event {
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern uint gtksharp_gdk_event_proximity_get_time (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern IntPtr gtksharp_gdk_event_proximity_get_device (IntPtr evt);
|
||||
|
||||
public EventProximity (IntPtr raw) : base (raw) {}
|
||||
|
||||
[StructLayout (LayoutKind.Sequential)]
|
||||
struct NativeStruct {
|
||||
EventType type;
|
||||
IntPtr window;
|
||||
sbyte send_event;
|
||||
public uint time;
|
||||
public IntPtr device;
|
||||
}
|
||||
|
||||
NativeStruct Native {
|
||||
get { return (NativeStruct) Marshal.PtrToStructure (Handle, typeof(NativeStruct)); }
|
||||
}
|
||||
|
||||
public Device Device {
|
||||
get {
|
||||
return GLib.Object.GetObject (gtksharp_gdk_event_proximity_get_device (Handle)) as Device;
|
||||
get { return GLib.Object.GetObject (Native.device, false) as Device; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.device = value == null ? IntPtr.Zero : value.Handle;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public uint Time {
|
||||
get {
|
||||
return gtksharp_gdk_event_proximity_get_time (Handle);
|
||||
get { return Native.time; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.time = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// Gdk.EventScroll.cs - Custom scroll event wrapper
|
||||
//
|
||||
// Author: Mike Kestner <mkestner@ximian.com>
|
||||
// Author: Mike Kestner <mkestner@novell.com>
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
// Copyright (c) 2004-2009 Novell, Inc.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of version 2 of the Lesser GNU General
|
||||
|
@ -26,77 +26,96 @@ namespace Gdk {
|
|||
|
||||
public class EventScroll : Event {
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern uint gtksharp_gdk_event_scroll_get_time (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern double gtksharp_gdk_event_scroll_get_x (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern double gtksharp_gdk_event_scroll_get_y (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern double gtksharp_gdk_event_scroll_get_x_root (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern double gtksharp_gdk_event_scroll_get_y_root (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern uint gtksharp_gdk_event_scroll_get_state (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern ScrollDirection gtksharp_gdk_event_scroll_get_direction (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern IntPtr gtksharp_gdk_event_scroll_get_device (IntPtr evt);
|
||||
|
||||
public EventScroll (IntPtr raw) : base (raw) {}
|
||||
|
||||
public uint Time {
|
||||
get {
|
||||
return gtksharp_gdk_event_scroll_get_time (Handle);
|
||||
}
|
||||
[StructLayout (LayoutKind.Sequential)]
|
||||
struct NativeStruct {
|
||||
EventType type;
|
||||
IntPtr window;
|
||||
sbyte send_event;
|
||||
public uint time;
|
||||
public double x;
|
||||
public double y;
|
||||
public uint state;
|
||||
public ScrollDirection direction;
|
||||
public IntPtr device;
|
||||
public double x_root;
|
||||
public double y_root;
|
||||
}
|
||||
|
||||
public ModifierType State {
|
||||
get {
|
||||
return (ModifierType) gtksharp_gdk_event_scroll_get_state (Handle);
|
||||
}
|
||||
NativeStruct Native {
|
||||
get { return (NativeStruct) Marshal.PtrToStructure (Handle, typeof(NativeStruct)); }
|
||||
}
|
||||
|
||||
public double X {
|
||||
get {
|
||||
return gtksharp_gdk_event_scroll_get_x (Handle);
|
||||
}
|
||||
}
|
||||
|
||||
public double Y {
|
||||
get {
|
||||
return gtksharp_gdk_event_scroll_get_y (Handle);
|
||||
}
|
||||
}
|
||||
|
||||
public double XRoot {
|
||||
get {
|
||||
return gtksharp_gdk_event_scroll_get_x_root (Handle);
|
||||
}
|
||||
}
|
||||
|
||||
public double YRoot {
|
||||
get {
|
||||
return gtksharp_gdk_event_scroll_get_y_root (Handle);
|
||||
public Device Device {
|
||||
get { return GLib.Object.GetObject (Native.device, false) as Device; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.device = value == null ? IntPtr.Zero : value.Handle;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public ScrollDirection Direction {
|
||||
get {
|
||||
return gtksharp_gdk_event_scroll_get_direction (Handle);
|
||||
get { return Native.direction; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.direction = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public Device Device {
|
||||
get {
|
||||
return GLib.Object.GetObject (gtksharp_gdk_event_scroll_get_device (Handle)) as Device;
|
||||
public ModifierType State {
|
||||
get { return (ModifierType) Native.state; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.state = (uint) value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public uint Time {
|
||||
get { return Native.time; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.time = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public double X {
|
||||
get { return Native.x; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.x = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public double XRoot {
|
||||
get { return Native.x_root; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.x_root = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public double Y {
|
||||
get { return Native.y; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.y = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public double YRoot {
|
||||
get { return Native.y_root; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.y_root = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// Gdk.EventSelection.cs - Custom selection event wrapper
|
||||
//
|
||||
// Author: Mike Kestner <mkestner@ximian.com>
|
||||
// Author: Mike Kestner <mkestner@novell.com>
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
// Copyright (c) 2004-2009 Novell, Inc.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of version 2 of the Lesser GNU General
|
||||
|
@ -26,50 +26,67 @@ namespace Gdk {
|
|||
|
||||
public class EventSelection : Event {
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern uint gtksharp_gdk_event_selection_get_time (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern IntPtr gtksharp_gdk_event_selection_get_selection (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern IntPtr gtksharp_gdk_event_selection_get_target (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern IntPtr gtksharp_gdk_event_selection_get_property (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern uint gtksharp_gdk_event_selection_get_requestor (IntPtr evt);
|
||||
|
||||
public EventSelection (IntPtr raw) : base (raw) {}
|
||||
|
||||
[StructLayout (LayoutKind.Sequential)]
|
||||
struct NativeStruct {
|
||||
EventType type;
|
||||
IntPtr window;
|
||||
sbyte send_event;
|
||||
public IntPtr selection;
|
||||
public IntPtr target;
|
||||
public IntPtr property;
|
||||
public uint time;
|
||||
public uint requestor;
|
||||
}
|
||||
|
||||
NativeStruct Native {
|
||||
get { return (NativeStruct) Marshal.PtrToStructure (Handle, typeof(NativeStruct)); }
|
||||
}
|
||||
|
||||
public Atom Property {
|
||||
get {
|
||||
return new Atom (gtksharp_gdk_event_selection_get_property (Handle));
|
||||
}
|
||||
}
|
||||
|
||||
public Atom Selection {
|
||||
get {
|
||||
return new Atom (gtksharp_gdk_event_selection_get_selection (Handle));
|
||||
}
|
||||
}
|
||||
|
||||
public Atom Target {
|
||||
get {
|
||||
return new Atom (gtksharp_gdk_event_selection_get_target (Handle));
|
||||
get { return GLib.Opaque.GetOpaque (Native.property, typeof (Atom), false) as Atom; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.property = value == null ? IntPtr.Zero : value.Handle;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public uint Requestor {
|
||||
get {
|
||||
return gtksharp_gdk_event_selection_get_requestor (Handle);
|
||||
get { return Native.requestor; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.requestor = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public Atom Selection {
|
||||
get { return GLib.Opaque.GetOpaque (Native.selection, typeof (Atom), false) as Atom; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.selection = value == null ? IntPtr.Zero : value.Handle;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public Atom Target {
|
||||
get { return GLib.Opaque.GetOpaque (Native.target, typeof (Atom), false) as Atom; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.target = value.Handle;
|
||||
native.target = value == null ? IntPtr.Zero : value.Handle;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public uint Time {
|
||||
get {
|
||||
return gtksharp_gdk_event_selection_get_time (Handle);
|
||||
get { return Native.time; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.time = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// Gdk.EventSetting.cs - Custom Setting event wrapper
|
||||
//
|
||||
// Author: Mike Kestner <mkestner@ximian.com>
|
||||
// Author: Mike Kestner <mkestner@novell.com>
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
// Copyright (c) 2004-2009 Novell, Inc.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of version 2 of the Lesser GNU General
|
||||
|
@ -26,23 +26,37 @@ namespace Gdk {
|
|||
|
||||
public class EventSetting : Event {
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern SettingAction gtksharp_gdk_event_setting_get_action (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern IntPtr gtksharp_gdk_event_setting_get_name (IntPtr evt);
|
||||
|
||||
public EventSetting (IntPtr raw) : base (raw) {}
|
||||
|
||||
[StructLayout (LayoutKind.Sequential)]
|
||||
struct NativeStruct {
|
||||
EventType type;
|
||||
IntPtr window;
|
||||
sbyte send_event;
|
||||
public SettingAction action;
|
||||
public IntPtr name;
|
||||
}
|
||||
|
||||
NativeStruct Native {
|
||||
get { return (NativeStruct) Marshal.PtrToStructure (Handle, typeof(NativeStruct)); }
|
||||
}
|
||||
|
||||
public SettingAction Action {
|
||||
get {
|
||||
return gtksharp_gdk_event_setting_get_action (Handle);
|
||||
get { return Native.action; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.action = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public string Name {
|
||||
get {
|
||||
return GLib.Marshaller.Utf8PtrToString (gtksharp_gdk_event_setting_get_name (Handle));
|
||||
get { return GLib.Marshaller.Utf8PtrToString (Native.name); }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
GLib.Marshaller.Free (native.name);
|
||||
native.name = GLib.Marshaller.StringToPtrGStrdup (value);
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// Gdk.EventVisibility.cs - Custom visibility event wrapper
|
||||
//
|
||||
// Author: Mike Kestner <mkestner@ximian.com>
|
||||
// Author: Mike Kestner <mkestner@novell.com>
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
// Copyright (c) 2004-2009 Novell, Inc.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of version 2 of the Lesser GNU General
|
||||
|
@ -26,14 +26,26 @@ namespace Gdk {
|
|||
|
||||
public class EventVisibility : Event {
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern VisibilityState gtksharp_gdk_event_visibility_get_state (IntPtr evt);
|
||||
|
||||
public EventVisibility (IntPtr raw) : base (raw) {}
|
||||
|
||||
[StructLayout (LayoutKind.Sequential)]
|
||||
struct NativeStruct {
|
||||
EventType type;
|
||||
IntPtr window;
|
||||
sbyte send_event;
|
||||
public VisibilityState state;
|
||||
}
|
||||
|
||||
NativeStruct Native {
|
||||
get { return (NativeStruct) Marshal.PtrToStructure (Handle, typeof(NativeStruct)); }
|
||||
}
|
||||
|
||||
public VisibilityState State {
|
||||
get {
|
||||
return gtksharp_gdk_event_visibility_get_state (Handle);
|
||||
get { return Native.state; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.state = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// Gdk.EventWindowState.cs - Custom WindowState event wrapper
|
||||
//
|
||||
// Author: Mike Kestner <mkestner@ximian.com>
|
||||
// Author: Mike Kestner <mkestner@novell.com>
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
// Copyright (c) 2004-2009 Novell, Inc.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of version 2 of the Lesser GNU General
|
||||
|
@ -26,23 +26,36 @@ namespace Gdk {
|
|||
|
||||
public class EventWindowState : Event {
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern WindowState gtksharp_gdk_event_window_state_get_changed_mask (IntPtr evt);
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern WindowState gtksharp_gdk_event_window_state_get_new_window_state (IntPtr evt);
|
||||
|
||||
public EventWindowState (IntPtr raw) : base (raw) {}
|
||||
|
||||
[StructLayout (LayoutKind.Sequential)]
|
||||
struct NativeStruct {
|
||||
EventType type;
|
||||
IntPtr window;
|
||||
sbyte send_event;
|
||||
public WindowState changed_mask;
|
||||
public WindowState new_window_state;
|
||||
}
|
||||
|
||||
NativeStruct Native {
|
||||
get { return (NativeStruct) Marshal.PtrToStructure (Handle, typeof(NativeStruct)); }
|
||||
}
|
||||
|
||||
public WindowState ChangedMask {
|
||||
get {
|
||||
return gtksharp_gdk_event_window_state_get_changed_mask (Handle);
|
||||
get { return Native.changed_mask; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.changed_mask = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public WindowState NewWindowState {
|
||||
get {
|
||||
return gtksharp_gdk_event_window_state_get_new_window_state (Handle);
|
||||
get { return Native.new_window_state; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.new_window_state = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// Gdk.Selection.custom - Gdk Selection class customizations
|
||||
//
|
||||
// Author: Mike Kestner <mkestner@speakeasy.net>
|
||||
// Author: Mike Kestner <mkestner@novell.com>
|
||||
//
|
||||
// Copyright (c) 2003 Mike Kestner
|
||||
// Copyright (c) 2009 Novell, Inc.
|
||||
//
|
||||
// This code is inserted after the automatically generated code.
|
||||
//
|
||||
|
@ -20,18 +20,9 @@
|
|||
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
// Boston, MA 02111-1307, USA.
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern IntPtr gtksharp_get_gdk_selection_primary ();
|
||||
public static Atom Primary = new Atom (new IntPtr (1));
|
||||
|
||||
public static Gdk.Atom Primary = new Gdk.Atom (gtksharp_get_gdk_selection_primary());
|
||||
public static Atom Secondary = new Atom (new IntPtr (2));
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern IntPtr gtksharp_get_gdk_selection_secondary ();
|
||||
|
||||
public static Gdk.Atom Secondary = new Gdk.Atom (gtksharp_get_gdk_selection_secondary());
|
||||
|
||||
[DllImport("gdksharpglue-2")]
|
||||
static extern IntPtr gtksharp_get_gdk_selection_clipboard ();
|
||||
|
||||
public static Gdk.Atom Clipboard = new Gdk.Atom (gtksharp_get_gdk_selection_clipboard());
|
||||
public static Atom Clipboard = new Atom (new IntPtr (69));
|
||||
|
||||
|
|
|
@ -3,8 +3,6 @@ lib_LTLIBRARIES = libgdksharpglue-2.la
|
|||
libgdksharpglue_2_la_SOURCES = \
|
||||
dragcontext.c \
|
||||
device.c \
|
||||
event.c \
|
||||
selection.c \
|
||||
vmglueheaders.h \
|
||||
windowmanager.c
|
||||
|
||||
|
|
548
gdk/glue/event.c
548
gdk/glue/event.c
|
@ -1,548 +0,0 @@
|
|||
/* event.c : Glue to access fields in GdkEvent.
|
||||
*
|
||||
* Authors: Rachel Hestilow <hestilow@ximian.com>
|
||||
* Mike Kestner <mkestner@ximian.com>
|
||||
*
|
||||
* Copyright (c) 2002 Rachel Hestilow
|
||||
* Copyright (c) 2002 Mike Kestner
|
||||
* Copyright (c) 2004 Novell, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of version 2 of the Lesser GNU General
|
||||
* Public License as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this program; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
|
||||
#include <gdk/gdkevents.h>
|
||||
|
||||
/* Forward declarations */
|
||||
GdkEventType gtksharp_gdk_event_get_event_type (GdkEvent *event);
|
||||
GdkWindow* gtksharp_gdk_event_get_window (GdkEventAny *event);
|
||||
gint8 gtksharp_gdk_event_get_send_event (GdkEventAny *event);
|
||||
guint32 gtksharp_gdk_event_key_get_time (GdkEventKey *event);
|
||||
guint gtksharp_gdk_event_key_get_state (GdkEventKey *event);
|
||||
guint gtksharp_gdk_event_key_get_keyval (GdkEventKey *event);
|
||||
guint16 gtksharp_gdk_event_key_get_hardware_keycode (GdkEventKey *event);
|
||||
guint8 gtksharp_gdk_event_key_get_group (GdkEventKey *event);
|
||||
guint32 gtksharp_gdk_event_button_get_time (GdkEventButton *event);
|
||||
guint gtksharp_gdk_event_button_get_state (GdkEventButton *event);
|
||||
guint gtksharp_gdk_event_button_get_button (GdkEventButton *event);
|
||||
gdouble gtksharp_gdk_event_button_get_x (GdkEventButton *event);
|
||||
gdouble gtksharp_gdk_event_button_get_y (GdkEventButton *event);
|
||||
gdouble gtksharp_gdk_event_button_get_x_root (GdkEventButton *event);
|
||||
gdouble gtksharp_gdk_event_button_get_y_root (GdkEventButton *event);
|
||||
gdouble* gtksharp_gdk_event_button_get_axes (GdkEventButton *event);
|
||||
GdkDevice* gtksharp_gdk_event_button_get_device (GdkEventButton *event);
|
||||
guint32 gtksharp_gdk_event_scroll_get_time (GdkEventScroll *event);
|
||||
guint gtksharp_gdk_event_scroll_get_state (GdkEventScroll *event);
|
||||
guint gtksharp_gdk_event_scroll_get_direction (GdkEventScroll *event);
|
||||
gdouble gtksharp_gdk_event_scroll_get_x (GdkEventScroll *event);
|
||||
gdouble gtksharp_gdk_event_scroll_get_y (GdkEventScroll *event);
|
||||
gdouble gtksharp_gdk_event_scroll_get_x_root (GdkEventScroll *event);
|
||||
gdouble gtksharp_gdk_event_scroll_get_y_root (GdkEventScroll *event);
|
||||
GdkDevice* gtksharp_gdk_event_scroll_get_device (GdkEventScroll *event);
|
||||
guint32 gtksharp_gdk_event_motion_get_time (GdkEventMotion *event);
|
||||
guint gtksharp_gdk_event_motion_get_state (GdkEventMotion *event);
|
||||
guint16 gtksharp_gdk_event_motion_get_is_hint (GdkEventMotion *event);
|
||||
gdouble gtksharp_gdk_event_motion_get_x (GdkEventMotion *event);
|
||||
gdouble gtksharp_gdk_event_motion_get_y (GdkEventMotion *event);
|
||||
gdouble gtksharp_gdk_event_motion_get_x_root (GdkEventMotion *event);
|
||||
gdouble gtksharp_gdk_event_motion_get_y_root (GdkEventMotion *event);
|
||||
gdouble* gtksharp_gdk_event_motion_get_axes (GdkEventMotion *event);
|
||||
GdkDevice* gtksharp_gdk_event_motion_get_device (GdkEventMotion *event);
|
||||
GdkRectangle* gtksharp_gdk_event_expose_get_area (GdkEventExpose *event);
|
||||
gint gtksharp_gdk_event_expose_get_count (GdkEventExpose *event);
|
||||
GdkRegion* gtksharp_gdk_event_expose_get_region (GdkEventExpose *event);
|
||||
GdkVisibilityState gtksharp_gdk_event_visibility_get_state (GdkEventVisibility *event);
|
||||
guint32 gtksharp_gdk_event_crossing_get_time (GdkEventCrossing *event);
|
||||
guint gtksharp_gdk_event_crossing_get_state (GdkEventCrossing *event);
|
||||
gboolean gtksharp_gdk_event_crossing_get_focus (GdkEventCrossing *event);
|
||||
gdouble gtksharp_gdk_event_crossing_get_x (GdkEventCrossing *event);
|
||||
gdouble gtksharp_gdk_event_crossing_get_y (GdkEventCrossing *event);
|
||||
gdouble gtksharp_gdk_event_crossing_get_x_root (GdkEventCrossing *event);
|
||||
gdouble gtksharp_gdk_event_crossing_get_y_root (GdkEventCrossing *event);
|
||||
GdkNotifyType gtksharp_gdk_event_crossing_get_detail (GdkEventCrossing *event);
|
||||
GdkCrossingMode gtksharp_gdk_event_crossing_get_mode (GdkEventCrossing *event);
|
||||
GdkWindow* gtksharp_gdk_event_crossing_get_subwindow (GdkEventCrossing *event);
|
||||
gint16 gtksharp_gdk_event_focus_get_in (GdkEventFocus *event);
|
||||
gint gtksharp_gdk_event_configure_get_x (GdkEventConfigure *event);
|
||||
gint gtksharp_gdk_event_configure_get_y (GdkEventConfigure *event);
|
||||
gint gtksharp_gdk_event_configure_get_width (GdkEventConfigure *event);
|
||||
gint gtksharp_gdk_event_configure_get_height (GdkEventConfigure *event);
|
||||
guint32 gtksharp_gdk_event_property_get_time (GdkEventProperty *event);
|
||||
GdkAtom gtksharp_gdk_event_property_get_atom (GdkEventProperty *event);
|
||||
guint gtksharp_gdk_event_property_get_state (GdkEventProperty *event);
|
||||
GdkNativeWindow gtksharp_gdk_event_selection_get_requestor (GdkEventSelection *event);
|
||||
GdkAtom gtksharp_gdk_event_selection_get_property (GdkEventSelection *event);
|
||||
GdkAtom gtksharp_gdk_event_selection_get_selection (GdkEventSelection *event);
|
||||
GdkAtom gtksharp_gdk_event_selection_get_target (GdkEventSelection *event);
|
||||
guint32 gtksharp_gdk_event_selection_get_time (GdkEventSelection *event);
|
||||
guint32 gtksharp_gdk_event_dnd_get_time (GdkEventDND *event);
|
||||
gshort gtksharp_gdk_event_dnd_get_x_root (GdkEventDND *event);
|
||||
gshort gtksharp_gdk_event_dnd_get_y_root (GdkEventDND *event);
|
||||
GdkDragContext* gtksharp_gdk_event_dnd_get_context (GdkEventDND *event);
|
||||
GdkDevice* gtksharp_gdk_event_proximity_get_device (GdkEventProximity *event);
|
||||
guint32 gtksharp_gdk_event_proximity_get_time (GdkEventProximity *event);
|
||||
GdkAtom gtksharp_gdk_event_client_get_message_type (GdkEventClient *event);
|
||||
gushort gtksharp_gdk_event_client_get_data_format (GdkEventClient *event);
|
||||
gpointer gtksharp_gdk_event_client_get_data (GdkEventClient *event);
|
||||
GdkWindowState gtksharp_gdk_event_window_state_get_changed_mask (GdkEventWindowState *event);
|
||||
GdkWindowState gtksharp_gdk_event_window_state_get_new_window_state (GdkEventWindowState *event);
|
||||
GdkSettingAction gtksharp_gdk_event_setting_get_action (GdkEventSetting *event);
|
||||
char* gtksharp_gdk_event_setting_get_name (GdkEventSetting *event);
|
||||
/* */
|
||||
|
||||
GdkEventType
|
||||
gtksharp_gdk_event_get_event_type (GdkEvent *event)
|
||||
{
|
||||
return event->type;
|
||||
}
|
||||
|
||||
GdkWindow*
|
||||
gtksharp_gdk_event_get_window (GdkEventAny *event)
|
||||
{
|
||||
return event->window;
|
||||
}
|
||||
|
||||
gint8
|
||||
gtksharp_gdk_event_get_send_event (GdkEventAny *event)
|
||||
{
|
||||
return event->send_event;
|
||||
}
|
||||
|
||||
guint32
|
||||
gtksharp_gdk_event_key_get_time (GdkEventKey *event)
|
||||
{
|
||||
return event->time;
|
||||
}
|
||||
|
||||
guint
|
||||
gtksharp_gdk_event_key_get_state (GdkEventKey *event)
|
||||
{
|
||||
return event->state;
|
||||
}
|
||||
|
||||
guint
|
||||
gtksharp_gdk_event_key_get_keyval (GdkEventKey *event)
|
||||
{
|
||||
return event->keyval;
|
||||
}
|
||||
|
||||
guint16
|
||||
gtksharp_gdk_event_key_get_hardware_keycode (GdkEventKey *event)
|
||||
{
|
||||
return event->hardware_keycode;
|
||||
}
|
||||
|
||||
guint8
|
||||
gtksharp_gdk_event_key_get_group (GdkEventKey *event)
|
||||
{
|
||||
return event->group;
|
||||
}
|
||||
|
||||
guint32
|
||||
gtksharp_gdk_event_button_get_time (GdkEventButton *event)
|
||||
{
|
||||
return event->time;
|
||||
}
|
||||
|
||||
guint
|
||||
gtksharp_gdk_event_button_get_state (GdkEventButton *event)
|
||||
{
|
||||
return event->state;
|
||||
}
|
||||
|
||||
guint
|
||||
gtksharp_gdk_event_button_get_button (GdkEventButton *event)
|
||||
{
|
||||
return event->button;
|
||||
}
|
||||
|
||||
GdkDevice*
|
||||
gtksharp_gdk_event_button_get_device (GdkEventButton *event)
|
||||
{
|
||||
return event->device;
|
||||
}
|
||||
|
||||
gdouble
|
||||
gtksharp_gdk_event_button_get_x (GdkEventButton *event)
|
||||
{
|
||||
return event->x;
|
||||
}
|
||||
|
||||
gdouble
|
||||
gtksharp_gdk_event_button_get_y (GdkEventButton *event)
|
||||
{
|
||||
return event->y;
|
||||
}
|
||||
|
||||
gdouble
|
||||
gtksharp_gdk_event_button_get_x_root (GdkEventButton *event)
|
||||
{
|
||||
return event->x_root;
|
||||
}
|
||||
|
||||
gdouble
|
||||
gtksharp_gdk_event_button_get_y_root (GdkEventButton *event)
|
||||
{
|
||||
return event->y_root;
|
||||
}
|
||||
|
||||
gdouble*
|
||||
gtksharp_gdk_event_button_get_axes (GdkEventButton *event)
|
||||
{
|
||||
return event->axes;
|
||||
}
|
||||
|
||||
guint32
|
||||
gtksharp_gdk_event_scroll_get_time (GdkEventScroll *event)
|
||||
{
|
||||
return event->time;
|
||||
}
|
||||
|
||||
guint
|
||||
gtksharp_gdk_event_scroll_get_state (GdkEventScroll *event)
|
||||
{
|
||||
return event->state;
|
||||
}
|
||||
|
||||
GdkScrollDirection
|
||||
gtksharp_gdk_event_scroll_get_direction (GdkEventScroll *event)
|
||||
{
|
||||
return event->direction;
|
||||
}
|
||||
|
||||
GdkDevice*
|
||||
gtksharp_gdk_event_scroll_get_device (GdkEventScroll *event)
|
||||
{
|
||||
return event->device;
|
||||
}
|
||||
|
||||
gdouble
|
||||
gtksharp_gdk_event_scroll_get_x (GdkEventScroll *event)
|
||||
{
|
||||
return event->x;
|
||||
}
|
||||
|
||||
gdouble
|
||||
gtksharp_gdk_event_scroll_get_y (GdkEventScroll *event)
|
||||
{
|
||||
return event->y;
|
||||
}
|
||||
|
||||
gdouble
|
||||
gtksharp_gdk_event_scroll_get_x_root (GdkEventScroll *event)
|
||||
{
|
||||
return event->x_root;
|
||||
}
|
||||
|
||||
gdouble
|
||||
gtksharp_gdk_event_scroll_get_y_root (GdkEventScroll *event)
|
||||
{
|
||||
return event->y_root;
|
||||
}
|
||||
|
||||
guint32
|
||||
gtksharp_gdk_event_motion_get_time (GdkEventMotion *event)
|
||||
{
|
||||
return event->time;
|
||||
}
|
||||
|
||||
guint
|
||||
gtksharp_gdk_event_motion_get_state (GdkEventMotion *event)
|
||||
{
|
||||
return event->state;
|
||||
}
|
||||
|
||||
guint16
|
||||
gtksharp_gdk_event_motion_get_is_hint (GdkEventMotion *event)
|
||||
{
|
||||
return event->is_hint;
|
||||
}
|
||||
|
||||
GdkDevice*
|
||||
gtksharp_gdk_event_motion_get_device (GdkEventMotion *event)
|
||||
{
|
||||
return event->device;
|
||||
}
|
||||
|
||||
gdouble
|
||||
gtksharp_gdk_event_motion_get_x (GdkEventMotion *event)
|
||||
{
|
||||
return event->x;
|
||||
}
|
||||
|
||||
gdouble
|
||||
gtksharp_gdk_event_motion_get_y (GdkEventMotion *event)
|
||||
{
|
||||
return event->y;
|
||||
}
|
||||
|
||||
gdouble
|
||||
gtksharp_gdk_event_motion_get_x_root (GdkEventMotion *event)
|
||||
{
|
||||
return event->x_root;
|
||||
}
|
||||
|
||||
gdouble
|
||||
gtksharp_gdk_event_motion_get_y_root (GdkEventMotion *event)
|
||||
{
|
||||
return event->y_root;
|
||||
}
|
||||
|
||||
gdouble*
|
||||
gtksharp_gdk_event_motion_get_axes (GdkEventMotion *event)
|
||||
{
|
||||
return event->axes;
|
||||
}
|
||||
|
||||
GdkRectangle*
|
||||
gtksharp_gdk_event_expose_get_area (GdkEventExpose *event)
|
||||
{
|
||||
return &event->area;
|
||||
}
|
||||
|
||||
gint
|
||||
gtksharp_gdk_event_expose_get_count (GdkEventExpose *event)
|
||||
{
|
||||
return event->count;
|
||||
}
|
||||
|
||||
GdkRegion*
|
||||
gtksharp_gdk_event_expose_get_region (GdkEventExpose *event)
|
||||
{
|
||||
return event->region;
|
||||
}
|
||||
|
||||
GdkVisibilityState
|
||||
gtksharp_gdk_event_visibility_get_state (GdkEventVisibility *event)
|
||||
{
|
||||
return event->state;
|
||||
}
|
||||
|
||||
gdouble
|
||||
gtksharp_gdk_event_crossing_get_x (GdkEventCrossing *event)
|
||||
{
|
||||
return event->x;
|
||||
}
|
||||
|
||||
gdouble
|
||||
gtksharp_gdk_event_crossing_get_y (GdkEventCrossing *event)
|
||||
{
|
||||
return event->y;
|
||||
}
|
||||
|
||||
gdouble
|
||||
gtksharp_gdk_event_crossing_get_x_root (GdkEventCrossing *event)
|
||||
{
|
||||
return event->x_root;
|
||||
}
|
||||
|
||||
gdouble
|
||||
gtksharp_gdk_event_crossing_get_y_root (GdkEventCrossing *event)
|
||||
{
|
||||
return event->y_root;
|
||||
}
|
||||
|
||||
guint32
|
||||
gtksharp_gdk_event_crossing_get_time (GdkEventCrossing *event)
|
||||
{
|
||||
return event->time;
|
||||
}
|
||||
|
||||
guint
|
||||
gtksharp_gdk_event_crossing_get_state (GdkEventCrossing *event)
|
||||
{
|
||||
return event->state;
|
||||
}
|
||||
|
||||
gboolean
|
||||
gtksharp_gdk_event_crossing_get_focus (GdkEventCrossing *event)
|
||||
{
|
||||
return event->focus;
|
||||
}
|
||||
|
||||
GdkWindow*
|
||||
gtksharp_gdk_event_crossing_get_subwindow (GdkEventCrossing *event)
|
||||
{
|
||||
return event->subwindow;
|
||||
}
|
||||
|
||||
GdkCrossingMode
|
||||
gtksharp_gdk_event_crossing_get_mode (GdkEventCrossing *event)
|
||||
{
|
||||
return event->mode;
|
||||
}
|
||||
|
||||
GdkNotifyType
|
||||
gtksharp_gdk_event_crossing_get_detail (GdkEventCrossing *event)
|
||||
{
|
||||
return event->detail;
|
||||
}
|
||||
|
||||
gint16
|
||||
gtksharp_gdk_event_focus_get_in (GdkEventFocus *event)
|
||||
{
|
||||
return event->in;
|
||||
}
|
||||
|
||||
gint
|
||||
gtksharp_gdk_event_configure_get_x (GdkEventConfigure *event)
|
||||
{
|
||||
return event->x;
|
||||
}
|
||||
|
||||
gint
|
||||
gtksharp_gdk_event_configure_get_y (GdkEventConfigure *event)
|
||||
{
|
||||
return event->y;
|
||||
}
|
||||
|
||||
gint
|
||||
gtksharp_gdk_event_configure_get_width (GdkEventConfigure *event)
|
||||
{
|
||||
return event->width;
|
||||
}
|
||||
|
||||
gint
|
||||
gtksharp_gdk_event_configure_get_height (GdkEventConfigure *event)
|
||||
{
|
||||
return event->height;
|
||||
}
|
||||
|
||||
guint32
|
||||
gtksharp_gdk_event_property_get_time (GdkEventProperty *event)
|
||||
{
|
||||
return event->time;
|
||||
}
|
||||
|
||||
GdkAtom
|
||||
gtksharp_gdk_event_property_get_atom (GdkEventProperty *event)
|
||||
{
|
||||
return event->atom;
|
||||
}
|
||||
|
||||
guint
|
||||
gtksharp_gdk_event_property_get_state (GdkEventProperty *event)
|
||||
{
|
||||
return event->state;
|
||||
}
|
||||
|
||||
GdkNativeWindow
|
||||
gtksharp_gdk_event_selection_get_requestor (GdkEventSelection *event)
|
||||
{
|
||||
return event->requestor;
|
||||
}
|
||||
|
||||
GdkAtom
|
||||
gtksharp_gdk_event_selection_get_property (GdkEventSelection *event)
|
||||
{
|
||||
return event->property;
|
||||
}
|
||||
|
||||
GdkAtom
|
||||
gtksharp_gdk_event_selection_get_selection (GdkEventSelection *event)
|
||||
{
|
||||
return event->selection;
|
||||
}
|
||||
|
||||
GdkAtom
|
||||
gtksharp_gdk_event_selection_get_target (GdkEventSelection *event)
|
||||
{
|
||||
return event->target;
|
||||
}
|
||||
|
||||
guint32
|
||||
gtksharp_gdk_event_selection_get_time (GdkEventSelection *event)
|
||||
{
|
||||
return event->time;
|
||||
}
|
||||
|
||||
GdkDragContext*
|
||||
gtksharp_gdk_event_dnd_get_context (GdkEventDND *event)
|
||||
{
|
||||
return event->context;
|
||||
}
|
||||
|
||||
gshort
|
||||
gtksharp_gdk_event_dnd_get_x_root (GdkEventDND *event)
|
||||
{
|
||||
return event->x_root;
|
||||
}
|
||||
|
||||
gshort
|
||||
gtksharp_gdk_event_dnd_get_y_root (GdkEventDND *event)
|
||||
{
|
||||
return event->y_root;
|
||||
}
|
||||
|
||||
guint32
|
||||
gtksharp_gdk_event_dnd_get_time (GdkEventDND *event)
|
||||
{
|
||||
return event->time;
|
||||
}
|
||||
|
||||
GdkDevice*
|
||||
gtksharp_gdk_event_proximity_get_device (GdkEventProximity *event)
|
||||
{
|
||||
return event->device;
|
||||
}
|
||||
|
||||
guint32
|
||||
gtksharp_gdk_event_proximity_get_time (GdkEventProximity *event)
|
||||
{
|
||||
return event->time;
|
||||
}
|
||||
|
||||
GdkAtom
|
||||
gtksharp_gdk_event_client_get_message_type (GdkEventClient *event)
|
||||
{
|
||||
return event->message_type;
|
||||
}
|
||||
|
||||
gushort
|
||||
gtksharp_gdk_event_client_get_data_format (GdkEventClient *event)
|
||||
{
|
||||
return event->data_format;
|
||||
}
|
||||
|
||||
gpointer
|
||||
gtksharp_gdk_event_client_get_data (GdkEventClient *event)
|
||||
{
|
||||
return &event->data;
|
||||
}
|
||||
|
||||
GdkWindowState
|
||||
gtksharp_gdk_event_window_state_get_changed_mask (GdkEventWindowState *event)
|
||||
{
|
||||
return event->changed_mask;
|
||||
}
|
||||
|
||||
GdkWindowState
|
||||
gtksharp_gdk_event_window_state_get_new_window_state (GdkEventWindowState *event)
|
||||
{
|
||||
return event->new_window_state;
|
||||
}
|
||||
|
||||
GdkSettingAction
|
||||
gtksharp_gdk_event_setting_get_action (GdkEventSetting *event)
|
||||
{
|
||||
return event->action;
|
||||
}
|
||||
|
||||
char*
|
||||
gtksharp_gdk_event_setting_get_name (GdkEventSetting *event)
|
||||
{
|
||||
return event->name;
|
||||
}
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
/* selection.c : Glue to access GdkAtoms defined in gdkselection.h
|
||||
*
|
||||
* Author: Mike Kestner <mkestner@speakeasy.net>
|
||||
*
|
||||
* Copyright (c) 2003 Mike Kestner
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of version 2 of the Lesser GNU General
|
||||
* Public License as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this program; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <gdk/gdkselection.h>
|
||||
|
||||
GdkAtom gtksharp_get_gdk_selection_primary (void);
|
||||
GdkAtom gtksharp_get_gdk_selection_secondary (void);
|
||||
GdkAtom gtksharp_get_gdk_selection_clipboard (void);
|
||||
|
||||
/* FIXME: These are still left to do
|
||||
#define GDK_TARGET_BITMAP
|
||||
#define GDK_TARGET_COLORMAP
|
||||
#define GDK_TARGET_DRAWABLE
|
||||
#define GDK_TARGET_PIXMAP
|
||||
#define GDK_TARGET_STRING
|
||||
#define GDK_SELECTION_TYPE_ATOM
|
||||
#define GDK_SELECTION_TYPE_BITMAP
|
||||
#define GDK_SELECTION_TYPE_COLORMAP
|
||||
#define GDK_SELECTION_TYPE_DRAWABLE
|
||||
#define GDK_SELECTION_TYPE_INTEGER
|
||||
#define GDK_SELECTION_TYPE_PIXMAP
|
||||
#define GDK_SELECTION_TYPE_WINDOW
|
||||
#define GDK_SELECTION_TYPE_STRING
|
||||
*/
|
||||
|
||||
GdkAtom
|
||||
gtksharp_get_gdk_selection_primary ()
|
||||
{
|
||||
return GDK_SELECTION_PRIMARY;
|
||||
}
|
||||
|
||||
GdkAtom
|
||||
gtksharp_get_gdk_selection_secondary ()
|
||||
{
|
||||
return GDK_SELECTION_SECONDARY;
|
||||
}
|
||||
|
||||
GdkAtom
|
||||
gtksharp_get_gdk_selection_clipboard ()
|
||||
{
|
||||
return GDK_SELECTION_CLIPBOARD;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in a new issue