Skip to main content

joydev_rs/
event_type.rs

1use sys::{JS_EVENT_AXIS, JS_EVENT_BUTTON, JS_EVENT_INIT};
2
3/// Event types
4#[derive(Clone, Copy, Debug, Eq, PartialEq)]
5#[repr(u8)]
6pub enum EventType {
7	/// Real axis event
8	Axis = JS_EVENT_AXIS,
9	/// Synthetic axis event
10	AxisSynthetic = JS_EVENT_AXIS | JS_EVENT_INIT,
11	/// Real button event
12	Button = JS_EVENT_BUTTON,
13	/// Synthetic button event
14	ButtonSynthetic = JS_EVENT_BUTTON | JS_EVENT_INIT,
15}