2018-11-14 23:24:55 +00:00
|
|
|
/*
|
|
|
|
* This an unstable interface of wlroots. No guarantees are made regarding the
|
|
|
|
* future consistency of this API.
|
|
|
|
*/
|
|
|
|
#ifndef WLR_USE_UNSTABLE
|
|
|
|
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef WLR_TYPES_WLR_SWITCH_H
|
|
|
|
#define WLR_TYPES_WLR_SWITCH_H
|
|
|
|
|
|
|
|
#include <stdint.h>
|
2019-07-27 08:53:54 +00:00
|
|
|
#include <wayland-server-core.h>
|
2018-11-14 23:24:55 +00:00
|
|
|
#include <wlr/types/wlr_input_device.h>
|
|
|
|
|
|
|
|
struct wlr_switch_impl;
|
|
|
|
|
|
|
|
struct wlr_switch {
|
|
|
|
struct wlr_switch_impl *impl;
|
|
|
|
|
|
|
|
struct {
|
|
|
|
struct wl_signal toggle;
|
|
|
|
} events;
|
|
|
|
|
|
|
|
void *data;
|
|
|
|
};
|
|
|
|
|
|
|
|
enum wlr_switch_type {
|
|
|
|
WLR_SWITCH_TYPE_LID = 1,
|
|
|
|
WLR_SWITCH_TYPE_TABLET_MODE,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum wlr_switch_state {
|
|
|
|
WLR_SWITCH_STATE_OFF = 0,
|
2018-11-28 20:03:42 +00:00
|
|
|
WLR_SWITCH_STATE_ON,
|
|
|
|
WLR_SWITCH_STATE_TOGGLE
|
2018-11-14 23:24:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct wlr_event_switch_toggle {
|
|
|
|
struct wlr_input_device *device;
|
|
|
|
uint32_t time_msec;
|
|
|
|
enum wlr_switch_type switch_type;
|
|
|
|
enum wlr_switch_state switch_state;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|