diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-11-13 14:48:41 +0100 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-11-13 14:48:41 +0100 |
| commit | e6541b353e7a0ecfd2e514e5c9c6f6c9c1ba96b1 (patch) | |
| tree | 8f3e5ecd92e3a6b5a328e514d6c14fa703bba9e6 /src/XLib/NativeMethods.cs | |
| parent | 65820f61457262b631eba35283c55135aecbc5f2 (diff) | |
first try with xlib
Diffstat (limited to 'src/XLib/NativeMethods.cs')
| -rw-r--r-- | src/XLib/NativeMethods.cs | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/XLib/NativeMethods.cs b/src/XLib/NativeMethods.cs new file mode 100644 index 00000000..ed6fa7d5 --- /dev/null +++ b/src/XLib/NativeMethods.cs @@ -0,0 +1,48 @@ +using System; +using System.Runtime.InteropServices; + +namespace XLib +{ + public static class NativeMethods + { + #region pinvoke + [DllImportAttribute("X11")] + public static extern int XInitThreads(); + [DllImportAttribute("X11")] + public static extern IntPtr XOpenDisplay(IntPtr displayName); + [DllImportAttribute("X11")] + public static extern IntPtr XCloseDisplay(IntPtr disp); + [DllImportAttribute("X11")] + public static extern Int32 XDefaultScreen(IntPtr disp); + [DllImportAttribute("X11")] + public static extern IntPtr XDefaultRootWindow(IntPtr disp); + [DllImportAttribute("X11")] + public static extern UInt32 XDefaultDepth (IntPtr disp, Int32 screen); + [DllImportAttribute("X11")] + public static extern IntPtr XDefaultVisual(IntPtr disp, Int32 screen); + [DllImportAttribute("X11")] + public static extern IntPtr XCreateSimpleWindow(IntPtr disp, IntPtr rootWindow, Int32 x, Int32 y, UInt32 width, UInt32 height, + UInt32 borderWidth, IntPtr border, IntPtr background); + [DllImportAttribute("X11")] + public static extern IntPtr XCreatePixmap(IntPtr disp, IntPtr rootWindow, UInt32 width, UInt32 height, UInt32 depth); + [DllImportAttribute("X11")] + public static extern IntPtr XFreePixmap(IntPtr disp, IntPtr pixmap); + [DllImportAttribute("X11")] + public static extern Int32 XSelectInput(IntPtr disp, IntPtr win, EventMask eventMask); + [DllImportAttribute("X11")] + public static extern Int32 XMapWindow(IntPtr disp, IntPtr win); + [DllImportAttribute("X11")] + public static extern int XPending (IntPtr disp); + [DllImportAttribute("X11")] + public static extern IntPtr XNextEvent(IntPtr disp, ref XEvent xevent); + [DllImportAttribute("X11")] + public static extern Int32 XSync(IntPtr disp, int discard); + [DllImportAttribute("X11")] + public static extern int XConnectionNumber(IntPtr disp); + [DllImportAttribute("X11")] + public static extern IntPtr XSetErrorHandler(XErrorHandler error_handler); + #endregion + + + } +} |