aboutsummaryrefslogtreecommitdiff
path: root/src/Wetterhorn/Foreign/WlRoots.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wetterhorn/Foreign/WlRoots.hs')
-rw-r--r--src/Wetterhorn/Foreign/WlRoots.hs33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/Wetterhorn/Foreign/WlRoots.hs b/src/Wetterhorn/Foreign/WlRoots.hs
new file mode 100644
index 0000000..56f2a2c
--- /dev/null
+++ b/src/Wetterhorn/Foreign/WlRoots.hs
@@ -0,0 +1,33 @@
+module Wetterhorn.Foreign.WlRoots where
+
+import Foreign (Ptr, Word32)
+
+data WlrSeat
+
+data WlrInputDevice
+
+data WlrEventKeyboardKey
+
+data WlrXdgSurface
+
+data WlrXWaylandSurface
+
+data Surface
+ = XdgSurface (Ptr WlrXdgSurface)
+ | XWaylandSurface (Ptr WlrXWaylandSurface)
+ deriving (Show, Ord, Eq)
+
+class ForeignSurface a where
+ toSurface :: Ptr a -> Surface
+
+instance ForeignSurface WlrXdgSurface where
+ toSurface = XdgSurface
+
+instance ForeignSurface WlrXWaylandSurface where
+ toSurface = XWaylandSurface
+
+foreign import ccall "wlr_seat_set_keyboard" wlrSeatSetKeyboard :: Ptr WlrSeat -> Ptr WlrInputDevice -> IO ()
+
+foreign import ccall "wlr_seat_keyboard_notify_key"
+ wlrSeatKeyboardNotifyKey ::
+ Ptr WlrSeat -> Word32 -> Word32 -> Word32 -> IO ()