summaryrefslogtreecommitdiff
path: root/src/lib/elput/Elput.h
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-11-07 11:04:03 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-11-08 20:37:50 +0900
commit7a7abb043add0af083c46305824d8c341daf2374 (patch)
treee25ef8ac67091ebc612b831361ece2a0f7420963 /src/lib/elput/Elput.h
parent10b6eb627abe7f0419b1c76ff73faf90274e940b (diff)
elput - re-enable switches (power buttons, lid etc.)
this is needed for devices that no longer produce aspi events for these. otherwise good luck getting any event on lid open/close or on pressing the power button. this also stops hiding switch events from libinput and now you can get switch events to find lid or tablet mode switching changes. @fix
Diffstat (limited to 'src/lib/elput/Elput.h')
-rw-r--r--src/lib/elput/Elput.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/lib/elput/Elput.h b/src/lib/elput/Elput.h
index b05536130b..db62c52d10 100644
--- a/src/lib/elput/Elput.h
+++ b/src/lib/elput/Elput.h
@@ -38,6 +38,7 @@ typedef enum
38 ELPUT_DEVICE_CAPS_TABLET_TOOL = (1 << 3), 38 ELPUT_DEVICE_CAPS_TABLET_TOOL = (1 << 3),
39 ELPUT_DEVICE_CAPS_TABLET_PAD = (1 << 4), 39 ELPUT_DEVICE_CAPS_TABLET_PAD = (1 << 4),
40 ELPUT_DEVICE_CAPS_GESTURE = (1 << 5), 40 ELPUT_DEVICE_CAPS_GESTURE = (1 << 5),
41 ELPUT_DEVICE_CAPS_SWITCH = (1 << 6),
41} Elput_Device_Caps; 42} Elput_Device_Caps;
42 43
43/* opaque structure to represent an input manager */ 44/* opaque structure to represent an input manager */
@@ -112,6 +113,29 @@ typedef struct Elput_Event_Pointer_Motion
112 double dy_unaccel; 113 double dy_unaccel;
113} Elput_Event_Pointer_Motion; 114} Elput_Event_Pointer_Motion;
114 115
116/** @since 1.21 */
117typedef enum
118{
119 ELPUT_SWITCH_TYPE_LID = 1,
120 ELPUT_SWITCH_TYPE_TABLET_MODE,
121} Elput_Switch_Type;
122
123/** @since 1.21 */
124typedef enum
125{
126 ELPUT_SWITCH_STATE_OFF = 0,
127 ELPUT_SWITCH_STATE_ON = 1,
128} Elput_Switch_State;
129
130/** @since 1.21 */
131typedef struct _Elput_Event_Switch
132{
133 Elput_Device *device;
134 uint64_t time_usec;
135 Elput_Switch_Type type;
136 Elput_Switch_State state;
137} Elput_Event_Switch;
138
115 139
116EAPI extern int ELPUT_EVENT_SEAT_CAPS; 140EAPI extern int ELPUT_EVENT_SEAT_CAPS;
117EAPI extern int ELPUT_EVENT_SEAT_FRAME; 141EAPI extern int ELPUT_EVENT_SEAT_FRAME;
@@ -122,6 +146,9 @@ EAPI extern int ELPUT_EVENT_SESSION_ACTIVE;
122/** @since 1.19 */ 146/** @since 1.19 */
123EAPI extern int ELPUT_EVENT_POINTER_MOTION; 147EAPI extern int ELPUT_EVENT_POINTER_MOTION;
124 148
149/** @since 1.21 */
150EAPI extern int ELPUT_EVENT_SWITCH;
151
125/** 152/**
126 * @file 153 * @file
127 * @brief Ecore functions for dealing with libinput 154 * @brief Ecore functions for dealing with libinput