#[derive(Copy, Clone, PartialEq, Eq)]
pub struct EventType(pub u16);
evdev_enum!(
EventType,
Array,
SYNCHRONIZATION = 0x00,
KEY = 0x01,
RELATIVE = 0x02,
ABSOLUTE = 0x03,
MISC = 0x04,
SWITCH = 0x05,
LED = 0x11,
SOUND = 0x12,
REPEAT = 0x14,
FORCEFEEDBACK = 0x15,
POWER = 0x16,
FORCEFEEDBACKSTATUS = 0x17,
);
impl EventType {
pub(crate) const COUNT: usize = libc::EV_CNT;
}
#[derive(Copy, Clone, PartialEq, Eq)]
pub struct Synchronization(pub u16);
evdev_enum!(
Synchronization,
SYN_REPORT = 0,
SYN_CONFIG = 1,
SYN_MT_REPORT = 2,
SYN_DROPPED = 3,
);
#[derive(Copy, Clone, PartialEq, Eq)]
pub struct PropType(pub u16);
evdev_enum!(
PropType,
Array,
POINTER = 0x00,
DIRECT = 0x01,
BUTTONPAD = 0x02,
SEMI_MT = 0x03,
TOPBUTTONPAD = 0x04,
POINTING_STICK = 0x05,
ACCELEROMETER = 0x06,
);
impl PropType {
pub(crate) const COUNT: usize = libc::INPUT_PROP_CNT;
}
#[derive(Copy, Clone, PartialEq, Eq)]
pub struct RelativeAxisType(pub u16);
evdev_enum!(
RelativeAxisType,
Array,
REL_X = 0x00,
REL_Y = 0x01,
REL_Z = 0x02,
REL_RX = 0x03,
REL_RY = 0x04,
REL_RZ = 0x05,
REL_HWHEEL = 0x06,
REL_DIAL = 0x07,
REL_WHEEL = 0x08,
REL_MISC = 0x09,
REL_RESERVED = 0x0a,
REL_WHEEL_HI_RES = 0x0b,
REL_HWHEEL_HI_RES = 0x0c,
);
impl RelativeAxisType {
pub(crate) const COUNT: usize = libc::REL_CNT;
}
#[derive(Copy, Clone, PartialEq, Eq)]
pub struct AbsoluteAxisType(pub u16);
evdev_enum!(
AbsoluteAxisType,
Array,
ABS_X = 0x00,
ABS_Y = 0x01,
ABS_Z = 0x02,
ABS_RX = 0x03,
ABS_RY = 0x04,
ABS_RZ = 0x05,
ABS_THROTTLE = 0x06,
ABS_RUDDER = 0x07,
ABS_WHEEL = 0x08,
ABS_GAS = 0x09,
ABS_BRAKE = 0x0a,
ABS_HAT0X = 0x10,
ABS_HAT0Y = 0x11,
ABS_HAT1X = 0x12,
ABS_HAT1Y = 0x13,
ABS_HAT2X = 0x14,
ABS_HAT2Y = 0x15,
ABS_HAT3X = 0x16,
ABS_HAT3Y = 0x17,
ABS_PRESSURE = 0x18,
ABS_DISTANCE = 0x19,
ABS_TILT_X = 0x1a,
ABS_TILT_Y = 0x1b,
ABS_TOOL_WIDTH = 0x1c,
ABS_VOLUME = 0x20,
ABS_MISC = 0x28,
ABS_MT_SLOT = 0x2f,
ABS_MT_TOUCH_MAJOR = 0x30,
ABS_MT_TOUCH_MINOR = 0x31,
ABS_MT_WIDTH_MAJOR = 0x32,
ABS_MT_WIDTH_MINOR = 0x33,
ABS_MT_ORIENTATION = 0x34,
ABS_MT_POSITION_X = 0x35,
ABS_MT_POSITION_Y = 0x36,
ABS_MT_TOOL_TYPE = 0x37,
ABS_MT_BLOB_ID = 0x38,
ABS_MT_TRACKING_ID = 0x39,
ABS_MT_PRESSURE = 0x3a,
ABS_MT_DISTANCE = 0x3b,
ABS_MT_TOOL_X = 0x3c,
ABS_MT_TOOL_Y = 0x3d,
);
impl AbsoluteAxisType {
pub(crate) const COUNT: usize = libc::ABS_CNT;
}
#[derive(Copy, Clone, PartialEq, Eq)]
pub struct SwitchType(pub u16);
evdev_enum!(
SwitchType,
Array,
SW_LID = 0x00,
SW_TABLET_MODE = 0x01,
SW_HEADPHONE_INSERT = 0x02,
SW_RFKILL_ALL = 0x03,
SW_MICROPHONE_INSERT = 0x04,
SW_DOCK = 0x05,
SW_LINEOUT_INSERT = 0x06,
SW_JACK_PHYSICAL_INSERT = 0x07,
SW_VIDEOOUT_INSERT = 0x08,
SW_CAMERA_LENS_COVER = 0x09,
SW_KEYPAD_SLIDE = 0x0a,
SW_FRONT_PROXIMITY = 0x0b,
SW_ROTATE_LOCK = 0x0c,
SW_LINEIN_INSERT = 0x0d,
SW_MUTE_DEVICE = 0x0e,
SW_PEN_INSERTED = 0x0f,
SW_MACHINE_COVER = 0x10,
);
impl SwitchType {
pub(crate) const COUNT: usize = libc::SW_CNT;
}
#[derive(Copy, Clone, PartialEq, Eq)]
pub struct LedType(pub u16);
evdev_enum!(
LedType,
Array,
LED_NUML = 0x00,
LED_CAPSL = 0x01,
LED_SCROLLL = 0x02,
LED_COMPOSE = 0x03,
LED_KANA = 0x04,
LED_SLEEP = 0x05,
LED_SUSPEND = 0x06,
LED_MUTE = 0x07,
LED_MISC = 0x08,
LED_MAIL = 0x09,
LED_CHARGING = 0x0a,
);
impl LedType {
pub(crate) const COUNT: usize = libc::LED_CNT;
}
#[derive(Copy, Clone, PartialEq, Eq)]
pub struct MiscType(pub u16);
evdev_enum!(
MiscType,
Array,
MSC_SERIAL = 0x00,
MSC_PULSELED = 0x01,
MSC_GESTURE = 0x02,
MSC_RAW = 0x03,
MSC_SCAN = 0x04,
MSC_TIMESTAMP = 0x05,
);
impl MiscType {
pub(crate) const COUNT: usize = libc::MSC_CNT;
}
#[derive(Copy, Clone, PartialEq, Eq)]
pub struct SoundType(pub u16);
evdev_enum!(
SoundType,
Array,
SND_CLICK = 0x00,
SND_BELL = 0x01,
SND_TONE = 0x02,
);
impl SoundType {
pub(crate) const COUNT: usize = libc::SND_CNT;
}