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
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.
|
* 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.
|
* configure.in.in: don't hardcode CC when cross-compiling.
|
||||||
* gapi-cdecl-insert: monodis support on mono.
|
* 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
|
// Gdk.Event.cs - Custom event wrapper
|
||||||
//
|
//
|
||||||
// Authors: Rachel Hestilow <hestilow@ximian.com>
|
// Authors: Rachel Hestilow <hestilow@ximian.com>
|
||||||
// Mike Kestner <mkestner@ximian.com>
|
// Mike Kestner <mkestner@novell.com>
|
||||||
//
|
//
|
||||||
// Copyright (c) 2002 Rachel Hestilow
|
// 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
|
// This program is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of version 2 of the Lesser GNU General
|
// modify it under the terms of version 2 of the Lesser GNU General
|
||||||
|
@ -28,18 +28,6 @@ namespace Gdk {
|
||||||
|
|
||||||
public class Event : GLib.IWrapper {
|
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;
|
IntPtr raw;
|
||||||
|
|
||||||
public Event(IntPtr raw)
|
public Event(IntPtr raw)
|
||||||
|
@ -48,32 +36,51 @@ namespace Gdk {
|
||||||
}
|
}
|
||||||
|
|
||||||
public IntPtr Handle {
|
public IntPtr Handle {
|
||||||
get {
|
get { return raw; }
|
||||||
return raw;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[DllImport("libgdk-win32-2.0-0.dll")]
|
||||||
|
static extern IntPtr gdk_event_get_type ();
|
||||||
|
|
||||||
public static GLib.GType GType {
|
public static GLib.GType GType {
|
||||||
get {
|
get { return new GLib.GType (gdk_event_get_type ()); }
|
||||||
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 {
|
public EventType Type {
|
||||||
get {
|
get { return Native.type; }
|
||||||
return gtksharp_gdk_event_get_event_type (Handle);
|
set {
|
||||||
|
NativeStruct native = Native;
|
||||||
|
native.type = value;
|
||||||
|
Marshal.StructureToPtr (native, raw, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Window Window {
|
public Window Window {
|
||||||
get {
|
get { return GLib.Object.GetObject (Native.window, false) as Window; }
|
||||||
return GLib.Object.GetObject (gtksharp_gdk_event_get_window (Handle)) as Window;
|
set {
|
||||||
|
NativeStruct native = Native;
|
||||||
|
native.window = value == null ? IntPtr.Zero : value.Handle;
|
||||||
|
Marshal.StructureToPtr (native, raw, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool SendEvent {
|
public bool SendEvent {
|
||||||
get {
|
get { return Native.send_event != 0; }
|
||||||
return gtksharp_gdk_event_get_send_event (Handle) == 0 ? false : true;
|
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)
|
if (raw == IntPtr.Zero)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
switch (gtksharp_gdk_event_get_event_type (raw)) {
|
NativeStruct native = (NativeStruct) Marshal.PtrToStructure (raw, typeof(NativeStruct));
|
||||||
|
switch (native.type) {
|
||||||
case EventType.Expose:
|
case EventType.Expose:
|
||||||
return new EventExpose (raw);
|
return new EventExpose (raw);
|
||||||
case EventType.MotionNotify:
|
case EventType.MotionNotify:
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// Gdk.EventButton.cs - Custom button event wrapper
|
// 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
|
// This program is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of version 2 of the Lesser GNU General
|
// modify it under the terms of version 2 of the Lesser GNU General
|
||||||
|
@ -25,93 +25,116 @@ namespace Gdk {
|
||||||
|
|
||||||
public class EventButton : Event {
|
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 EventButton (IntPtr raw) : base (raw) {}
|
||||||
|
|
||||||
public uint Time {
|
[StructLayout (LayoutKind.Sequential)]
|
||||||
get {
|
struct NativeStruct {
|
||||||
return gtksharp_gdk_event_button_get_time (Handle);
|
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 {
|
NativeStruct Native {
|
||||||
get {
|
get { return (NativeStruct) Marshal.PtrToStructure (Handle, typeof(NativeStruct)); }
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public double[] Axes {
|
public double[] Axes {
|
||||||
get {
|
get {
|
||||||
double[] result = null;
|
double[] result = null;
|
||||||
IntPtr axes = gtksharp_gdk_event_button_get_axes (Handle);
|
IntPtr axes = Native.axes;
|
||||||
if (axes != IntPtr.Zero) {
|
if (axes != IntPtr.Zero) {
|
||||||
result = new double[Device.NumAxes];
|
result = new double [Device.NumAxes];
|
||||||
Marshal.Copy (axes, result, 0, result.Length);
|
Marshal.Copy (axes, result, 0, result.Length);
|
||||||
}
|
}
|
||||||
return result;
|
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
|
// 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
|
// This program is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of version 2 of the Lesser GNU General
|
// modify it under the terms of version 2 of the Lesser GNU General
|
||||||
|
@ -26,26 +26,50 @@ namespace Gdk {
|
||||||
|
|
||||||
public class EventClient : Event {
|
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 EventClient (IntPtr raw) : base (raw) {}
|
||||||
|
|
||||||
public Atom MessageType {
|
struct NativeStruct {
|
||||||
get {
|
EventType type;
|
||||||
return new Atom (gtksharp_gdk_event_client_get_message_type (Handle));
|
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 {
|
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 {
|
get {
|
||||||
return gtksharp_gdk_event_client_get_data_format (Handle);
|
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 {
|
||||||
|
int offset = Marshal.SizeOf (typeof (NativeStruct)) - 5 * IntPtr.Size;
|
||||||
|
return new IntPtr (Handle.ToInt64 () + offset);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,14 +78,14 @@ namespace Gdk {
|
||||||
switch (DataFormat) {
|
switch (DataFormat) {
|
||||||
case 8:
|
case 8:
|
||||||
byte[] b = new byte [20];
|
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;
|
return b;
|
||||||
case 16:
|
case 16:
|
||||||
short[] s = new short [10];
|
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;
|
return s;
|
||||||
case 32:
|
case 32:
|
||||||
IntPtr data_ptr = gtksharp_gdk_event_client_get_data (Handle);
|
IntPtr data_ptr = DataPointer;
|
||||||
long[] l = new long [5];
|
long[] l = new long [5];
|
||||||
for (int i = 0; i < 5; i++)
|
for (int i = 0; i < 5; i++)
|
||||||
l [i] = (long) Marshal.ReadIntPtr (data_ptr, i * IntPtr.Size);
|
l [i] = (long) Marshal.ReadIntPtr (data_ptr, i * IntPtr.Size);
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// Gdk.EventConfigure.cs - Custom configure event wrapper
|
// 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
|
// This program is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of version 2 of the Lesser GNU General
|
// modify it under the terms of version 2 of the Lesser GNU General
|
||||||
|
@ -26,41 +26,56 @@ namespace Gdk {
|
||||||
|
|
||||||
public class EventConfigure : Event {
|
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 EventConfigure (IntPtr raw) : base (raw) {}
|
||||||
|
|
||||||
public int X {
|
[StructLayout (LayoutKind.Sequential)]
|
||||||
get {
|
struct NativeStruct {
|
||||||
return gtksharp_gdk_event_configure_get_x (Handle);
|
EventType type;
|
||||||
}
|
IntPtr window;
|
||||||
|
sbyte send_event;
|
||||||
|
public int x;
|
||||||
|
public int y;
|
||||||
|
public int width;
|
||||||
|
public int height;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int Y {
|
NativeStruct Native {
|
||||||
get {
|
get { return (NativeStruct) Marshal.PtrToStructure (Handle, typeof(NativeStruct)); }
|
||||||
return gtksharp_gdk_event_configure_get_y (Handle);
|
}
|
||||||
|
|
||||||
|
public int Height {
|
||||||
|
get { return Native.height; }
|
||||||
|
set {
|
||||||
|
NativeStruct native = Native;
|
||||||
|
native.height = value;
|
||||||
|
Marshal.StructureToPtr (native, Handle, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int Width {
|
public int Width {
|
||||||
get {
|
get { return Native.width; }
|
||||||
return gtksharp_gdk_event_configure_get_width (Handle);
|
set {
|
||||||
|
NativeStruct native = Native;
|
||||||
|
native.width = value;
|
||||||
|
Marshal.StructureToPtr (native, Handle, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int Height {
|
public int X {
|
||||||
get {
|
get { return Native.x; }
|
||||||
return gtksharp_gdk_event_configure_get_height (Handle);
|
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
|
// 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
|
// This program is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of version 2 of the Lesser GNU General
|
// modify it under the terms of version 2 of the Lesser GNU General
|
||||||
|
@ -26,95 +26,116 @@ namespace Gdk {
|
||||||
|
|
||||||
public class EventCrossing : Event {
|
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 EventCrossing (IntPtr raw) : base (raw) {}
|
||||||
|
|
||||||
public uint Time {
|
[StructLayout (LayoutKind.Sequential)]
|
||||||
get {
|
struct NativeStruct {
|
||||||
return gtksharp_gdk_event_crossing_get_time (Handle);
|
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 {
|
NativeStruct Native {
|
||||||
get {
|
get { return (NativeStruct) Marshal.PtrToStructure (Handle, typeof(NativeStruct)); }
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public NotifyType Detail {
|
public NotifyType Detail {
|
||||||
get {
|
get { return Native.detail; }
|
||||||
return gtksharp_gdk_event_crossing_get_detail (Handle);
|
set {
|
||||||
|
NativeStruct native = Native;
|
||||||
|
native.detail = value;
|
||||||
|
Marshal.StructureToPtr (native, Handle, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Focus {
|
public bool Focus {
|
||||||
get {
|
get { return Native.focus; }
|
||||||
return gtksharp_gdk_event_crossing_get_focus (Handle);
|
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
|
// 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
|
// This program is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of version 2 of the Lesser GNU General
|
// modify it under the terms of version 2 of the Lesser GNU General
|
||||||
|
@ -26,41 +26,56 @@ namespace Gdk {
|
||||||
|
|
||||||
public class EventDND : Event {
|
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) {}
|
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 {
|
public DragContext Context {
|
||||||
get {
|
get { return GLib.Object.GetObject (Native.context, false) as DragContext; }
|
||||||
return GLib.Object.GetObject (gtksharp_gdk_event_dnd_get_context (Handle)) as DragContext;
|
set {
|
||||||
|
NativeStruct native = Native;
|
||||||
|
native.context = value == null ? IntPtr.Zero : value.Handle;
|
||||||
|
Marshal.StructureToPtr (native, Handle, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public uint Time {
|
public uint Time {
|
||||||
get {
|
get { return Native.time; }
|
||||||
return gtksharp_gdk_event_dnd_get_time (Handle);
|
set {
|
||||||
|
NativeStruct native = Native;
|
||||||
|
native.time = value;
|
||||||
|
Marshal.StructureToPtr (native, Handle, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public short XRoot {
|
public short XRoot {
|
||||||
get {
|
get { return Native.x_root; }
|
||||||
return gtksharp_gdk_event_dnd_get_x_root (Handle);
|
set {
|
||||||
|
NativeStruct native = Native;
|
||||||
|
native.x_root = value;
|
||||||
|
Marshal.StructureToPtr (native, Handle, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public short YRoot {
|
public short YRoot {
|
||||||
get {
|
get { return Native.y_root; }
|
||||||
return gtksharp_gdk_event_dnd_get_y_root (Handle);
|
set {
|
||||||
|
NativeStruct native = Native;
|
||||||
|
native.y_root = value;
|
||||||
|
Marshal.StructureToPtr (native, Handle, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// Gdk.EventExpose.cs - Custom expose event wrapper
|
// 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
|
// This program is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of version 2 of the Lesser GNU General
|
// modify it under the terms of version 2 of the Lesser GNU General
|
||||||
|
@ -26,32 +26,46 @@ namespace Gdk {
|
||||||
|
|
||||||
public class EventExpose : Event {
|
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 EventExpose (IntPtr raw) : base (raw) {}
|
||||||
|
|
||||||
public Rectangle Area {
|
[StructLayout (LayoutKind.Sequential)]
|
||||||
get {
|
struct NativeStruct {
|
||||||
return (Gdk.Rectangle) Marshal.PtrToStructure (gtksharp_gdk_event_expose_get_area (Handle), typeof (Gdk.Rectangle));
|
EventType type;
|
||||||
}
|
IntPtr window;
|
||||||
|
sbyte send_event;
|
||||||
|
public Rectangle area;
|
||||||
|
public IntPtr region;
|
||||||
|
public int count;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int Count {
|
NativeStruct Native {
|
||||||
get {
|
get { return (NativeStruct) Marshal.PtrToStructure (Handle, typeof(NativeStruct)); }
|
||||||
return gtksharp_gdk_event_expose_get_count (Handle);
|
}
|
||||||
|
|
||||||
|
public Rectangle Area {
|
||||||
|
get { return Native.area; }
|
||||||
|
set {
|
||||||
|
NativeStruct native = Native;
|
||||||
|
native.area = value;
|
||||||
|
Marshal.StructureToPtr (native, Handle, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Region Region {
|
public Region Region {
|
||||||
get {
|
get { return GLib.Opaque.GetOpaque (Native.region, typeof (Region), false) as Region; }
|
||||||
return new Region (gtksharp_gdk_event_expose_get_region (Handle));
|
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
|
// 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
|
// This program is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of version 2 of the Lesser GNU General
|
// modify it under the terms of version 2 of the Lesser GNU General
|
||||||
|
@ -26,14 +26,26 @@ namespace Gdk {
|
||||||
|
|
||||||
public class EventFocus : Event {
|
public class EventFocus : Event {
|
||||||
|
|
||||||
[DllImport("gdksharpglue-2")]
|
|
||||||
static extern short gtksharp_gdk_event_focus_get_in (IntPtr evt);
|
|
||||||
|
|
||||||
public EventFocus (IntPtr raw) : base (raw) {}
|
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 {
|
public bool In {
|
||||||
get {
|
get { return Native._in != 0; }
|
||||||
return gtksharp_gdk_event_focus_get_in (Handle) == 0 ? false : true;
|
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
|
// 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
|
// This program is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of version 2 of the Lesser GNU General
|
// modify it under the terms of version 2 of the Lesser GNU General
|
||||||
|
@ -27,38 +27,46 @@ namespace Gdk {
|
||||||
|
|
||||||
public class EventGrabBroken : Event {
|
public class EventGrabBroken : Event {
|
||||||
|
|
||||||
|
public EventGrabBroken (IntPtr raw) : base (raw) {}
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
struct NativeEventGrabBroken {
|
struct NativeStruct {
|
||||||
EventType type;
|
EventType type;
|
||||||
IntPtr window;
|
IntPtr window;
|
||||||
sbyte send_event;
|
sbyte send_event;
|
||||||
public bool Keyboard;
|
public bool keyboard;
|
||||||
public bool Implicit;
|
public bool _implicit;
|
||||||
public IntPtr GrabWindowHandle;
|
public IntPtr grab_window;
|
||||||
}
|
}
|
||||||
|
|
||||||
NativeEventGrabBroken native_struct;
|
NativeStruct Native {
|
||||||
|
get { return (NativeStruct) Marshal.PtrToStructure (Handle, typeof(NativeStruct)); }
|
||||||
public EventGrabBroken (IntPtr raw) : base (raw)
|
|
||||||
{
|
|
||||||
native_struct = (NativeEventGrabBroken) Marshal.PtrToStructure (raw, typeof (NativeEventGrabBroken));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Keyboard {
|
public bool Keyboard {
|
||||||
get {
|
get { return Native.keyboard; }
|
||||||
return native_struct.Keyboard;
|
set {
|
||||||
|
NativeStruct native = Native;
|
||||||
|
native.keyboard = value;
|
||||||
|
Marshal.StructureToPtr (native, Handle, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Implicit {
|
public bool Implicit {
|
||||||
get {
|
get { return Native._implicit; }
|
||||||
return native_struct.Implicit;
|
set {
|
||||||
|
NativeStruct native = Native;
|
||||||
|
native._implicit = value;
|
||||||
|
Marshal.StructureToPtr (native, Handle, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Window GrabWindow {
|
public Window GrabWindow {
|
||||||
get {
|
get { return GLib.Object.GetObject(Native.grab_window, false) as Window; }
|
||||||
return GLib.Object.GetObject(native_struct.GrabWindowHandle) 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
|
// 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
|
// This program is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of version 2 of the Lesser GNU General
|
// modify it under the terms of version 2 of the Lesser GNU General
|
||||||
|
@ -26,56 +26,72 @@ namespace Gdk {
|
||||||
|
|
||||||
public class EventKey : Event {
|
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 EventKey (IntPtr raw) : base (raw) {}
|
||||||
|
|
||||||
public uint Time {
|
[StructLayout (LayoutKind.Sequential)]
|
||||||
get {
|
struct NativeStruct {
|
||||||
return gtksharp_gdk_event_key_get_time (Handle);
|
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 {
|
NativeStruct Native {
|
||||||
get {
|
get { return (NativeStruct) Marshal.PtrToStructure (Handle, typeof(NativeStruct)); }
|
||||||
return (ModifierType) gtksharp_gdk_event_key_get_state (Handle);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Key Key {
|
public byte Group {
|
||||||
get {
|
get { return Native.group; }
|
||||||
return (Key) gtksharp_gdk_event_key_get_keyval (Handle);
|
set {
|
||||||
}
|
NativeStruct native = Native;
|
||||||
}
|
native.group = value;
|
||||||
|
Marshal.StructureToPtr (native, Handle, false);
|
||||||
public uint KeyValue {
|
|
||||||
get {
|
|
||||||
return gtksharp_gdk_event_key_get_keyval (Handle);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public ushort HardwareKeycode {
|
public ushort HardwareKeycode {
|
||||||
get {
|
get { return Native.hardware_keycode; }
|
||||||
return gtksharp_gdk_event_key_get_hardware_keycode (Handle);
|
set {
|
||||||
|
NativeStruct native = Native;
|
||||||
|
native.hardware_keycode = value;
|
||||||
|
Marshal.StructureToPtr (native, Handle, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte Group {
|
public Key Key {
|
||||||
get {
|
get { return (Key) KeyValue; }
|
||||||
return gtksharp_gdk_event_key_get_group (Handle);
|
}
|
||||||
|
|
||||||
|
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
|
// 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
|
// This program is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of version 2 of the Lesser GNU General
|
// modify it under the terms of version 2 of the Lesser GNU General
|
||||||
|
@ -26,93 +26,116 @@ namespace Gdk {
|
||||||
|
|
||||||
public class EventMotion : Event {
|
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 EventMotion (IntPtr raw) : base (raw) {}
|
||||||
|
|
||||||
public uint Time {
|
[StructLayout (LayoutKind.Sequential)]
|
||||||
get {
|
struct NativeStruct {
|
||||||
return gtksharp_gdk_event_motion_get_time (Handle);
|
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 {
|
NativeStruct Native {
|
||||||
get {
|
get { return (NativeStruct) Marshal.PtrToStructure (Handle, typeof(NativeStruct)); }
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public double[] Axes {
|
public double[] Axes {
|
||||||
get {
|
get {
|
||||||
double[] result = null;
|
double[] result = null;
|
||||||
IntPtr axes = gtksharp_gdk_event_motion_get_axes (Handle);
|
IntPtr axes = Native.axes;
|
||||||
if (axes != IntPtr.Zero) {
|
if (axes != IntPtr.Zero) {
|
||||||
result = new double [Device.NumAxes];
|
result = new double [Device.NumAxes];
|
||||||
Marshal.Copy (axes, result, 0, result.Length);
|
Marshal.Copy (axes, result, 0, result.Length);
|
||||||
}
|
}
|
||||||
return result;
|
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>
|
// 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
|
// This program is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of version 2 of the Lesser GNU General
|
// 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 {
|
public uint SelectionTime {
|
||||||
get { return Native.selection_time; }
|
get { return Native.selection_time; }
|
||||||
set {
|
set {
|
||||||
|
@ -90,6 +81,15 @@ namespace Gdk {
|
||||||
Marshal.StructureToPtr (native, Handle, false);
|
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
|
// 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
|
// This program is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of version 2 of the Lesser GNU General
|
// modify it under the terms of version 2 of the Lesser GNU General
|
||||||
|
@ -26,32 +26,46 @@ namespace Gdk {
|
||||||
|
|
||||||
public class EventProperty : Event {
|
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) {}
|
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 {
|
public Atom Atom {
|
||||||
get {
|
get { return GLib.Opaque.GetOpaque (Native.atom, typeof (Atom), false) as Atom; }
|
||||||
return new Atom (gtksharp_gdk_event_property_get_atom (Handle));
|
set {
|
||||||
|
NativeStruct native = Native;
|
||||||
|
native.atom = value == null ? IntPtr.Zero : value.Handle;
|
||||||
|
Marshal.StructureToPtr (native, Handle, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public PropertyState State {
|
public PropertyState State {
|
||||||
get {
|
get { return (PropertyState) Native.state; }
|
||||||
return gtksharp_gdk_event_property_get_state (Handle);
|
set {
|
||||||
|
NativeStruct native = Native;
|
||||||
|
native.state = (uint) value;
|
||||||
|
Marshal.StructureToPtr (native, Handle, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public uint Time {
|
public uint Time {
|
||||||
get {
|
get { return Native.time; }
|
||||||
return gtksharp_gdk_event_property_get_time (Handle);
|
set {
|
||||||
|
NativeStruct native = Native;
|
||||||
|
native.time = value;
|
||||||
|
Marshal.StructureToPtr (native, Handle, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// Gdk.EventProximity.cs - Custom proximity event wrapper
|
// 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
|
// This program is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of version 2 of the Lesser GNU General
|
// modify it under the terms of version 2 of the Lesser GNU General
|
||||||
|
@ -26,23 +26,36 @@ namespace Gdk {
|
||||||
|
|
||||||
public class EventProximity : Event {
|
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) {}
|
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 {
|
public Device Device {
|
||||||
get {
|
get { return GLib.Object.GetObject (Native.device, false) as Device; }
|
||||||
return GLib.Object.GetObject (gtksharp_gdk_event_proximity_get_device (Handle)) as Device;
|
set {
|
||||||
|
NativeStruct native = Native;
|
||||||
|
native.device = value == null ? IntPtr.Zero : value.Handle;
|
||||||
|
Marshal.StructureToPtr (native, Handle, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public uint Time {
|
public uint Time {
|
||||||
get {
|
get { return Native.time; }
|
||||||
return gtksharp_gdk_event_proximity_get_time (Handle);
|
set {
|
||||||
|
NativeStruct native = Native;
|
||||||
|
native.time = value;
|
||||||
|
Marshal.StructureToPtr (native, Handle, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// Gdk.EventScroll.cs - Custom scroll event wrapper
|
// 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
|
// This program is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of version 2 of the Lesser GNU General
|
// modify it under the terms of version 2 of the Lesser GNU General
|
||||||
|
@ -26,77 +26,96 @@ namespace Gdk {
|
||||||
|
|
||||||
public class EventScroll : Event {
|
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 EventScroll (IntPtr raw) : base (raw) {}
|
||||||
|
|
||||||
public uint Time {
|
[StructLayout (LayoutKind.Sequential)]
|
||||||
get {
|
struct NativeStruct {
|
||||||
return gtksharp_gdk_event_scroll_get_time (Handle);
|
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 {
|
NativeStruct Native {
|
||||||
get {
|
get { return (NativeStruct) Marshal.PtrToStructure (Handle, typeof(NativeStruct)); }
|
||||||
return (ModifierType) gtksharp_gdk_event_scroll_get_state (Handle);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public double X {
|
public Device Device {
|
||||||
get {
|
get { return GLib.Object.GetObject (Native.device, false) as Device; }
|
||||||
return gtksharp_gdk_event_scroll_get_x (Handle);
|
set {
|
||||||
}
|
NativeStruct native = Native;
|
||||||
}
|
native.device = value == null ? IntPtr.Zero : value.Handle;
|
||||||
|
Marshal.StructureToPtr (native, Handle, false);
|
||||||
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 ScrollDirection Direction {
|
public ScrollDirection Direction {
|
||||||
get {
|
get { return Native.direction; }
|
||||||
return gtksharp_gdk_event_scroll_get_direction (Handle);
|
set {
|
||||||
|
NativeStruct native = Native;
|
||||||
|
native.direction = value;
|
||||||
|
Marshal.StructureToPtr (native, Handle, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Device Device {
|
public ModifierType State {
|
||||||
get {
|
get { return (ModifierType) Native.state; }
|
||||||
return GLib.Object.GetObject (gtksharp_gdk_event_scroll_get_device (Handle)) as Device;
|
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
|
// 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
|
// This program is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of version 2 of the Lesser GNU General
|
// modify it under the terms of version 2 of the Lesser GNU General
|
||||||
|
@ -26,50 +26,67 @@ namespace Gdk {
|
||||||
|
|
||||||
public class EventSelection : Event {
|
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) {}
|
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 {
|
public Atom Property {
|
||||||
get {
|
get { return GLib.Opaque.GetOpaque (Native.property, typeof (Atom), false) as Atom; }
|
||||||
return new Atom (gtksharp_gdk_event_selection_get_property (Handle));
|
set {
|
||||||
}
|
NativeStruct native = Native;
|
||||||
}
|
native.property = value == null ? IntPtr.Zero : value.Handle;
|
||||||
|
Marshal.StructureToPtr (native, Handle, false);
|
||||||
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));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public uint Requestor {
|
public uint Requestor {
|
||||||
get {
|
get { return Native.requestor; }
|
||||||
return gtksharp_gdk_event_selection_get_requestor (Handle);
|
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 {
|
public uint Time {
|
||||||
get {
|
get { return Native.time; }
|
||||||
return gtksharp_gdk_event_selection_get_time (Handle);
|
set {
|
||||||
|
NativeStruct native = Native;
|
||||||
|
native.time = value;
|
||||||
|
Marshal.StructureToPtr (native, Handle, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// Gdk.EventSetting.cs - Custom Setting event wrapper
|
// 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
|
// This program is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of version 2 of the Lesser GNU General
|
// modify it under the terms of version 2 of the Lesser GNU General
|
||||||
|
@ -26,23 +26,37 @@ namespace Gdk {
|
||||||
|
|
||||||
public class EventSetting : Event {
|
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) {}
|
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 {
|
public SettingAction Action {
|
||||||
get {
|
get { return Native.action; }
|
||||||
return gtksharp_gdk_event_setting_get_action (Handle);
|
set {
|
||||||
|
NativeStruct native = Native;
|
||||||
|
native.action = value;
|
||||||
|
Marshal.StructureToPtr (native, Handle, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Name {
|
public string Name {
|
||||||
get {
|
get { return GLib.Marshaller.Utf8PtrToString (Native.name); }
|
||||||
return GLib.Marshaller.Utf8PtrToString (gtksharp_gdk_event_setting_get_name (Handle));
|
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
|
// 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
|
// This program is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of version 2 of the Lesser GNU General
|
// modify it under the terms of version 2 of the Lesser GNU General
|
||||||
|
@ -26,14 +26,26 @@ namespace Gdk {
|
||||||
|
|
||||||
public class EventVisibility : Event {
|
public class EventVisibility : Event {
|
||||||
|
|
||||||
[DllImport("gdksharpglue-2")]
|
|
||||||
static extern VisibilityState gtksharp_gdk_event_visibility_get_state (IntPtr evt);
|
|
||||||
|
|
||||||
public EventVisibility (IntPtr raw) : base (raw) {}
|
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 {
|
public VisibilityState State {
|
||||||
get {
|
get { return Native.state; }
|
||||||
return gtksharp_gdk_event_visibility_get_state (Handle);
|
set {
|
||||||
|
NativeStruct native = Native;
|
||||||
|
native.state = value;
|
||||||
|
Marshal.StructureToPtr (native, Handle, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// Gdk.EventWindowState.cs - Custom WindowState event wrapper
|
// 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
|
// This program is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of version 2 of the Lesser GNU General
|
// modify it under the terms of version 2 of the Lesser GNU General
|
||||||
|
@ -26,23 +26,36 @@ namespace Gdk {
|
||||||
|
|
||||||
public class EventWindowState : Event {
|
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) {}
|
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 {
|
public WindowState ChangedMask {
|
||||||
get {
|
get { return Native.changed_mask; }
|
||||||
return gtksharp_gdk_event_window_state_get_changed_mask (Handle);
|
set {
|
||||||
|
NativeStruct native = Native;
|
||||||
|
native.changed_mask = value;
|
||||||
|
Marshal.StructureToPtr (native, Handle, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public WindowState NewWindowState {
|
public WindowState NewWindowState {
|
||||||
get {
|
get { return Native.new_window_state; }
|
||||||
return gtksharp_gdk_event_window_state_get_new_window_state (Handle);
|
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
|
// 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.
|
// This code is inserted after the automatically generated code.
|
||||||
//
|
//
|
||||||
|
@ -20,18 +20,9 @@
|
||||||
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
// Boston, MA 02111-1307, USA.
|
// Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
[DllImport("gdksharpglue-2")]
|
public static Atom Primary = new Atom (new IntPtr (1));
|
||||||
static extern IntPtr gtksharp_get_gdk_selection_primary ();
|
|
||||||
|
|
||||||
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")]
|
public static Atom Clipboard = new Atom (new IntPtr (69));
|
||||||
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());
|
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,6 @@ lib_LTLIBRARIES = libgdksharpglue-2.la
|
||||||
libgdksharpglue_2_la_SOURCES = \
|
libgdksharpglue_2_la_SOURCES = \
|
||||||
dragcontext.c \
|
dragcontext.c \
|
||||||
device.c \
|
device.c \
|
||||||
event.c \
|
|
||||||
selection.c \
|
|
||||||
vmglueheaders.h \
|
vmglueheaders.h \
|
||||||
windowmanager.c
|
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