From 1f0223e9fd77d9e3d586f0e2420fc1b7a2949a85 Mon Sep 17 00:00:00 2001 From: James Ye Date: Fri, 20 Jan 2017 16:54:13 +1100 Subject: Add a "switch" interface for parts of the SW_* range This will allow switch devices known to libinput to be exposed. Currently, this is SW_LID. libinput also handles switch events internally, e.g. a laptop touchpad will be disabled autmoatically when the lid is closed. This is transparent to the caller, although the caller will also receive the event. See https://bugs.freedesktop.org/show_bug.cgi?id=86223 This features is intended to be the main driver for the interface. Co-Authored-By: Peter Hutterer Signed-off-by: James Ye Signed-off-by: Peter Hutterer --- doc/Makefile.am | 1 + doc/switches.dox | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 doc/switches.dox (limited to 'doc') diff --git a/doc/Makefile.am b/doc/Makefile.am index 698a316..a92d791 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -22,6 +22,7 @@ header_files = \ $(srcdir)/reporting-bugs.dox \ $(srcdir)/scrolling.dox \ $(srcdir)/seats.dox \ + $(srcdir)/switches.dox \ $(srcdir)/t440-support.dox \ $(srcdir)/tablet-support.dox \ $(srcdir)/tapping.dox \ diff --git a/doc/switches.dox b/doc/switches.dox new file mode 100644 index 0000000..4bb2675 --- /dev/null +++ b/doc/switches.dox @@ -0,0 +1,16 @@ +/** +@page switches Switches + +libinput supports a couple of switches. Unlike button events that come in +press and release pairs, switches are usually toggled once and left at the +setting for an extended period of time. + +Only some switches are handled by libinput, see @ref libinput_switch for a +list of supported switches. Switch events are exposed to the caller, but +libinput may handle some switch events internally and enable or disable +specific features based on a switch state. + +The order of switch events is guaranteed to be correct, i.e., a switch will +never send consecutive switch on, or switch off, events. + +*/ -- cgit v1.2.3