input: move capability conversion to libinput boundary
This commit is contained in:
parent
a20deb0628
commit
46d39becd4
5 changed files with 50 additions and 50 deletions
|
|
@ -84,6 +84,31 @@ impl StaticText for InputDeviceClickMethod {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Copy, Clone, Hash, Eq, PartialEq, Linearize)]
|
||||
pub enum InputDeviceCapability {
|
||||
Keyboard,
|
||||
Pointer,
|
||||
Touch,
|
||||
TabletTool,
|
||||
TabletPad,
|
||||
Gesture,
|
||||
Switch,
|
||||
}
|
||||
|
||||
impl StaticText for InputDeviceCapability {
|
||||
fn text(&self) -> &'static str {
|
||||
match self {
|
||||
InputDeviceCapability::Keyboard => "keyboard",
|
||||
InputDeviceCapability::Pointer => "pointer",
|
||||
InputDeviceCapability::Touch => "touch",
|
||||
InputDeviceCapability::TabletTool => "tablet tool",
|
||||
InputDeviceCapability::TabletPad => "tablet pad",
|
||||
InputDeviceCapability::Gesture => "gesture",
|
||||
InputDeviceCapability::Switch => "switch",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
linear_ids!(InputDeviceGroupIds, InputDeviceGroupId, usize);
|
||||
|
||||
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue