types/wlr_switch: add base wlr_input_device

wlr_switch owns its wlr_input_device. It will be initialized when the
switch is initialized, and finished when the switch is destroyed.
This commit is contained in:
Simon Zeni 2022-01-31 10:53:58 -05:00 committed by Kirill Primak
parent d5480efc7a
commit 0f3b38365d
4 changed files with 15 additions and 4 deletions

View file

@ -16,7 +16,7 @@ struct wlr_switch_impl {
};
void wlr_switch_init(struct wlr_switch *switch_device,
struct wlr_switch_impl *impl);
struct wlr_switch_impl *impl, const char *name);
void wlr_switch_destroy(struct wlr_switch *switch_device);
#endif

View file

@ -16,6 +16,8 @@
struct wlr_switch_impl;
struct wlr_switch {
struct wlr_input_device base;
struct wlr_switch_impl *impl;
struct {