This commit is contained in:
parent
8cd76686d0
commit
2bfe5811c4
1 changed files with 34 additions and 15 deletions
|
@ -15,6 +15,14 @@ namespace OpenTK.Platform.X
|
|||
{
|
||||
private const string _dll_name = "libX11";
|
||||
|
||||
public struct Constants
|
||||
{
|
||||
public const int QueuedAlready = 0;
|
||||
public const int QueuedAfterReading = 1;
|
||||
public const int QueuedAfterFlush = 2;
|
||||
}
|
||||
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct VisualInfo
|
||||
{
|
||||
|
@ -32,20 +40,31 @@ namespace OpenTK.Platform.X
|
|||
|
||||
#region Functions
|
||||
|
||||
// Display management
|
||||
[DllImport(_dll_name, EntryPoint = "XOpenDisplay")]
|
||||
public static extern IntPtr OpenDisplay([MarshalAs(UnmanagedType.LPTStr)] string display_name);
|
||||
extern public static IntPtr OpenDisplay([MarshalAs(UnmanagedType.LPTStr)] string display_name);
|
||||
|
||||
[DllImport(_dll_name, EntryPoint = "XCloseDisplay")]
|
||||
public static extern void CloseDisplay(IntPtr display);
|
||||
extern public static void CloseDisplay(IntPtr display);
|
||||
|
||||
|
||||
[DllImport(_dll_name, EntryPoint = "XDefaultScreen")]
|
||||
public static extern int DefaultScreen(IntPtr display);
|
||||
extern public static int DefaultScreen(IntPtr display);
|
||||
|
||||
[DllImport(_dll_name, EntryPoint = "XDefaultVisual")]
|
||||
public static extern IntPtr DefaultVisual(IntPtr display, int screen_number);
|
||||
extern public static IntPtr DefaultVisual(IntPtr display, int screen_number);
|
||||
|
||||
[DllImport(_dll_name, EntryPoint = "XFree")]
|
||||
public static extern void Free(IntPtr data);
|
||||
extern public static void Free(IntPtr data);
|
||||
|
||||
|
||||
// Queue management
|
||||
[DllImport(_dll_name, EntryPoint = "XEventsQueued")]
|
||||
extern public static int EventsQueued(IntPtr Display, int mode);
|
||||
|
||||
[DllImport(_dll_name, EntryPoint = "XPending")]
|
||||
extern public static int Pending(IntPtr Display);
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue