Switch events
Events that come from switch devices. More...
Data Structures | |
struct | libinput_event_switch |
A switch event representing a changed state in a switch. More... | |
Functions | |
enum libinput_switch | libinput_event_switch_get_switch (struct libinput_event_switch *event) |
Return the switch that triggered this event. More... | |
enum libinput_switch_state | libinput_event_switch_get_switch_state (struct libinput_event_switch *event) |
Return the switch state that triggered this event. More... | |
struct libinput_event * | libinput_event_switch_get_base_event (struct libinput_event_switch *event) |
uint32_t | libinput_event_switch_get_time (struct libinput_event_switch *event) |
uint64_t | libinput_event_switch_get_time_usec (struct libinput_event_switch *event) |
Detailed Description
Events that come from switch devices.
Function Documentation
◆ libinput_event_switch_get_base_event()
struct libinput_event* libinput_event_switch_get_base_event | ( | struct libinput_event_switch * | event | ) |
- Returns
- The generic libinput_event of this event
◆ libinput_event_switch_get_switch()
enum libinput_switch libinput_event_switch_get_switch | ( | struct libinput_event_switch * | event | ) |
Return the switch that triggered this event.
For pointer events that are not of type LIBINPUT_EVENT_SWITCH_TOGGLE, this function returns 0.
- Note
- It is an application bug to call this function for events other than LIBINPUT_EVENT_SWITCH_TOGGLE.
- Parameters
-
event The libinput switch event
- Returns
- The switch triggering this event
◆ libinput_event_switch_get_switch_state()
enum libinput_switch_state libinput_event_switch_get_switch_state | ( | struct libinput_event_switch * | event | ) |
Return the switch state that triggered this event.
For switch events that are not of type LIBINPUT_EVENT_SWITCH_TOGGLE, this function returns 0.
- Note
- It is an application bug to call this function for events other than LIBINPUT_EVENT_SWITCH_TOGGLE.
- Parameters
-
event The libinput switch event
- Returns
- The switch state triggering this event
◆ libinput_event_switch_get_time()
uint32_t libinput_event_switch_get_time | ( | struct libinput_event_switch * | event | ) |
- Note
- Timestamps may not always increase. See Event timestamps for details.
- Parameters
-
event The libinput switch event
- Returns
- The event time for this event
◆ libinput_event_switch_get_time_usec()
uint64_t libinput_event_switch_get_time_usec | ( | struct libinput_event_switch * | event | ) |
- Note
- Timestamps may not always increase. See Event timestamps for details.
- Parameters
-
event The libinput switch event
- Returns
- The event time for this event in microseconds