#pragma once
#include <inttypes.h>
+#include <libudev.h>
+#include <linux/input.h>
#include <stdbool.h>
#include <stdlib.h>
#include <systemd/sd-bus.h>
#include <systemd/sd-event.h>
+#include <xkbcommon/xkbcommon.h>
#include "hashmap.h"
#include "idev.h"
#include "list.h"
typedef struct idev_element idev_element;
typedef struct idev_element_vtable idev_element_vtable;
+/*
+ * Evdev Elements
+ */
+
+bool idev_is_evdev(idev_element *e);
+idev_element *idev_find_evdev(idev_session *s, dev_t devnum);
+int idev_evdev_new(idev_element **out, idev_session *s, struct udev_device *ud);
+
+/*
+ * Keyboard Devices
+ */
+
+bool idev_is_keyboard(idev_device *d);
+idev_device *idev_find_keyboard(idev_session *s, const char *name);
+int idev_keyboard_new(idev_device **out, idev_session *s, const char *name);
+
/*
* Element Links
*/
void (*disable) (idev_element *e);
void (*open) (idev_element *e);
void (*close) (idev_element *e);
+ void (*resume) (idev_element *e, int fd);
+ void (*pause) (idev_element *e, const char *mode);
void (*feedback) (idev_element *e, idev_data *data);
};
idev_context *context;
char *name;
char *path;
+ sd_bus_slot *slot_resume_device;
+ sd_bus_slot *slot_pause_device;
Hashmap *element_map;
Hashmap *device_map;