* Functions.cs: Added helper function for XSendEvent, so that we

don't need to cast the EventMask to IntPtr.
This commit is contained in:
the_fiddler 2009-10-19 19:02:07 +00:00
parent e2dd2cb58f
commit 47c1cc69e5

View file

@ -157,6 +157,11 @@ namespace OpenTK.Platform.X11
[DllImport("libX11", EntryPoint = "XSendEvent")] [DllImport("libX11", EntryPoint = "XSendEvent")]
public extern static int XSendEvent(IntPtr display, IntPtr window, bool propagate, IntPtr event_mask, ref XEvent send_event); public extern static int XSendEvent(IntPtr display, IntPtr window, bool propagate, IntPtr event_mask, ref XEvent send_event);
public static int XSendEvent(IntPtr display, IntPtr window, bool propagate, EventMask event_mask, ref XEvent send_event)
{
return XSendEvent(display, window, propagate, new IntPtr((int)event_mask), ref send_event);
}
[DllImport("libX11", EntryPoint = "XQueryTree")] [DllImport("libX11", EntryPoint = "XQueryTree")]
public extern static int XQueryTree(IntPtr display, IntPtr window, out IntPtr root_return, out IntPtr parent_return, out IntPtr children_return, out int nchildren_return); public extern static int XQueryTree(IntPtr display, IntPtr window, out IntPtr root_return, out IntPtr parent_return, out IntPtr children_return, out int nchildren_return);