aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/XLib/Window.cs
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2018-11-21 18:48:52 +0100
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2018-11-21 18:48:52 +0100
commit4db409fdff013e3e4249d567e4d6fdb0ee877256 (patch)
tree3b985c0941fda237f60b2e5f9a63382327159fb9 /src/XLib/Window.cs
parenta1dca1431f685020df843162b805edee11e1929c (diff)
xcb backend
Diffstat (limited to 'src/XLib/Window.cs')
-rw-r--r--src/XLib/Window.cs62
1 files changed, 0 insertions, 62 deletions
diff --git a/src/XLib/Window.cs b/src/XLib/Window.cs
deleted file mode 100644
index f74a5fdb..00000000
--- a/src/XLib/Window.cs
+++ /dev/null
@@ -1,62 +0,0 @@
-using System;
-using System.Runtime.InteropServices;
-
-namespace XLib
-{
-
- public enum EventType {
- KeyPress = 2,
- KeyRelease,
- ButtonPress,
- ButtonRelease,
- MotionNotify,
- EnterNotify,
- LeaveNotify,
- FocusIn,
- FocusOut,
- KeymapNotify,
- Expose,
- GraphicsExpose,
- NoExpose,
- VisibilityNotify,
- CreateNotify,
- DestroyNotify,
- UnmapNotify,
- MapNotify,
- MapRequest,
- ReparentNotify,
- ConfigureNotify,
- ConfigureRequest,
- GravityNotify,
- ResizeRequest,
- CirculateNotify,
- CirculateRequest,
- PropertyNotify,
- SelectionClear,
- SelectionRequest,
- SelectionNotify,
- ColormapNotify,
- ClientMessage,
- MappingNotify,
- GenericEvent,
- LASTEvent = 36 /* must be bigger than any event # */
- }
- public class Window
- {
- IntPtr handle;
- Display disp;
-
- public Window (Display display, UInt32 width = 800, UInt32 height = 600, Int32 x = 0, Int32 y = 0) {
- disp = display;
- handle = NativeMethods.XCreateSimpleWindow (disp.handle, NativeMethods.XDefaultRootWindow(disp.handle), x, y, width, height,
- 0, IntPtr.Zero, IntPtr.Zero);
- if (handle == IntPtr.Zero)
- throw new NotSupportedException("[XLib] Failed to create window.");
-
- NativeMethods.XSelectInput (disp.handle, handle, EventMask.ExposureMask | EventMask.KeyPressMask);
-
- NativeMethods.XMapWindow (disp.handle, handle);
- }
-
- }
-}