feat: fstat now handle symbolic link
[lunaix-os.git] / lunaix-os / includes / lunaix / input.h
index 872ea04a6ea8e17386581805da3b8e2eade63cb8..28c89626e0ca794f632dcc52440c0138afc3ebdf 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <lunaix/clock.h>
 #include <lunaix/device.h>
+#include <lunaix/ds/ldga.h>
 #include <lunaix/ds/llist.h>
 #include <lunaix/ds/waitq.h>
 #include <lunaix/types.h>
 // vector (e.g. mice wheel scroll, mice maneuver)
 #define PKT_VECTOR 0x3
 
+#define EXPORT_INPUT_DEV(id, init_fn)                                          \
+    export_ldga_el(inputdev, id, ptr_t, init_fn)
+
 struct input_evt_pkt
 {
-    uint32_t pkt_type;  // packet type
-    uint32_t scan_code; // hardware raw code
-    uint32_t sys_code;  // driver translated code
-    time_t timestamp;   // event timestamp
+    u32_t pkt_type;   // packet type
+    u32_t scan_code;  // hardware raw code
+    u32_t sys_code;   // driver translated code
+    time_t timestamp; // event timestamp
 };
 
 struct input_device
@@ -52,6 +56,6 @@ void
 input_add_listener(input_evt_cb listener);
 
 struct input_device*
-input_add_device(char* name_fmt, ...);
+input_add_device(struct devclass* class, char* name_fmt, ...);
 
 #endif /* __LUNAIX_INPUT_H */