e83c55a242
* */Makefile.am : automakify the build * */Makefile.in : kill * *.custom : remove System.Drawing dependencies * *.cs : remove System.Drawing dependencies * *-api.xml : mv to *-api.raw * glue/* : mv to lib specific gluelibs for glib, gdk, gtk, and glade. * gtk/gtk-symbols : alias GtkType to GType * sources/gtk-sharp-sources.xml : create .raw files. They are now transformed to .xml files by the metadata compilation step. svn path=/trunk/gtk-sharp/; revision=23967
66 lines
1.3 KiB
C#
66 lines
1.3 KiB
C#
// Gdk.Event.cs - Custom event wrapper
|
|
//
|
|
// Authors: Rachel Hestilow <hestilow@ximian.com>
|
|
// Mike Kestner <mkestner@ximian.com>
|
|
//
|
|
// (c) 2002 Rachel Hestilow
|
|
// (c) 2004 Novell, Inc.
|
|
|
|
namespace Gdk {
|
|
|
|
using System;
|
|
using System.Runtime.InteropServices;
|
|
|
|
public class Event : GLib.IWrapper {
|
|
|
|
[DllImport("gdksharpglue")]
|
|
static extern EventType gtksharp_gdk_event_get_event_type (IntPtr evt);
|
|
|
|
[DllImport("gdksharpglue")]
|
|
static extern IntPtr gtksharp_gdk_event_get_window (IntPtr evt);
|
|
|
|
[DllImport("gdksharpglue")]
|
|
static extern sbyte gtksharp_gdk_event_get_send_event (IntPtr evt);
|
|
|
|
[DllImport("libgdk-win32-2.0-0.dll")]
|
|
static extern IntPtr gdk_event_get_type ();
|
|
|
|
IntPtr raw;
|
|
|
|
public Event(IntPtr raw)
|
|
{
|
|
this.raw = raw;
|
|
}
|
|
|
|
public IntPtr Handle {
|
|
get {
|
|
return raw;
|
|
}
|
|
}
|
|
|
|
public static GLib.GType GType {
|
|
get {
|
|
return new GLib.GType (gdk_event_get_type ());
|
|
}
|
|
}
|
|
|
|
public EventType Type {
|
|
get {
|
|
return gtksharp_gdk_event_get_event_type (Handle);
|
|
}
|
|
}
|
|
|
|
public Window Window {
|
|
get {
|
|
return GLib.Object.GetObject (gtksharp_gdk_event_get_window (Handle)) as Window;
|
|
}
|
|
}
|
|
|
|
public bool SendEvent {
|
|
get {
|
|
return gtksharp_gdk_event_get_send_event (Handle) == 0 ? false : true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|