Struct input_linux::evdev::EvdevHandle
source · pub struct EvdevHandle<F>(_);
Expand description
A handle to an input device allowing the use of ioctls
Implementations§
source§impl<F> EvdevHandle<F>
impl<F> EvdevHandle<F>
sourcepub fn into_inner(self) -> F
pub fn into_inner(self) -> F
Extracts the contained handle.
sourcepub fn as_inner_mut(&mut self) -> &mut F
pub fn as_inner_mut(&mut self) -> &mut F
A mutable reference to the contained handle.
source§impl EvdevHandle<File>
impl EvdevHandle<File>
source§impl<F: AsRawFd> EvdevHandle<F>
impl<F: AsRawFd> EvdevHandle<F>
sourcepub fn read(&self, events: &mut [input_event]) -> Result<usize>
pub fn read(&self, events: &mut [input_event]) -> Result<usize>
Read events from the input device
sourcepub fn driver_version(&self) -> Result<i32>
pub fn driver_version(&self) -> Result<i32>
EVIOCGVERSION
sourcepub fn repeat_settings(&self) -> Result<repeat_settings>
pub fn repeat_settings(&self) -> Result<repeat_settings>
EVIOGREP
sourcepub fn set_repeat_settings(&self, value: &repeat_settings) -> Result<()>
pub fn set_repeat_settings(&self, value: &repeat_settings) -> Result<()>
EVIOSREP
sourcepub fn keycode_legacy(&self) -> Result<[u32; 2]>
pub fn keycode_legacy(&self) -> Result<[u32; 2]>
EVIOCGKEYCODE
sourcepub fn set_keycode(&self, value: &input_keymap_entry) -> Result<()>
pub fn set_keycode(&self, value: &input_keymap_entry) -> Result<()>
EVIOCSKEYCODE_V2
sourcepub fn device_name_buf(&self, buffer: &mut [u8]) -> Result<usize>
pub fn device_name_buf(&self, buffer: &mut [u8]) -> Result<usize>
EVIOCGNAME
sourcepub fn device_name(&self) -> Result<Vec<u8>>
pub fn device_name(&self) -> Result<Vec<u8>>
EVIOCGNAME
sourcepub fn physical_location_buf(&self, buffer: &mut [u8]) -> Result<usize>
pub fn physical_location_buf(&self, buffer: &mut [u8]) -> Result<usize>
EVIOCGPHYS
sourcepub fn physical_location(&self) -> Result<Vec<u8>>
pub fn physical_location(&self) -> Result<Vec<u8>>
EVIOCGPHYS
sourcepub fn unique_id_buf(&self, buffer: &mut [u8]) -> Result<usize>
pub fn unique_id_buf(&self, buffer: &mut [u8]) -> Result<usize>
EVIOCGUNIQ
sourcepub fn device_properties_raw(&self, buffer: &mut [u8]) -> Result<usize>
pub fn device_properties_raw(&self, buffer: &mut [u8]) -> Result<usize>
EVIOCGPROP
sourcepub fn sounds_state(&self, buffer: &mut [u8]) -> Result<usize>
pub fn sounds_state(&self, buffer: &mut [u8]) -> Result<usize>
EVIOCGSND
sourcepub fn switch_state(&self, buffer: &mut [u8]) -> Result<usize>
pub fn switch_state(&self, buffer: &mut [u8]) -> Result<usize>
EVIOCGSW
sourcepub fn send_force_feedback(&self, value: &mut ff_effect) -> Result<()>
pub fn send_force_feedback(&self, value: &mut ff_effect) -> Result<()>
EVIOCSFF
sourcepub fn erase_force_feedback(&self, value: i16) -> Result<()>
pub fn erase_force_feedback(&self, value: i16) -> Result<()>
EVIOCRMFF
sourcepub fn effects_count(&self) -> Result<i32>
pub fn effects_count(&self) -> Result<i32>
EVIOCGEFFECTS
sourcepub fn device_properties(&self) -> Result<Bitmask<InputProperty>>
pub fn device_properties(&self) -> Result<Bitmask<InputProperty>>
EVIOCGPROP
sourcepub fn multi_touch_slots(
&self,
code: AbsoluteAxis,
values: &mut [i32]
) -> Result<()>
pub fn multi_touch_slots( &self, code: AbsoluteAxis, values: &mut [i32] ) -> Result<()>
EVIOCGMTSLOTS
Warning: the current implementation can leak uninitialized heap memory into values
sourcepub fn event_mask_events(&self) -> Result<Bitmask<EventKind>>
pub fn event_mask_events(&self) -> Result<Bitmask<EventKind>>
EVIOCGMASK
sourcepub fn event_bits(&self) -> Result<Bitmask<EventKind>>
pub fn event_bits(&self) -> Result<Bitmask<EventKind>>
EVIOCGBIT
sourcepub fn relative_mask(&self) -> Result<Bitmask<RelativeAxis>>
pub fn relative_mask(&self) -> Result<Bitmask<RelativeAxis>>
EVIOCGMASK
sourcepub fn set_relative_mask(&self, bitmask: &Bitmask<RelativeAxis>) -> Result<()>
pub fn set_relative_mask(&self, bitmask: &Bitmask<RelativeAxis>) -> Result<()>
EVIOCSMASK
sourcepub fn relative_bits(&self) -> Result<Bitmask<RelativeAxis>>
pub fn relative_bits(&self) -> Result<Bitmask<RelativeAxis>>
EVIOCGBIT
sourcepub fn absolute_mask(&self) -> Result<Bitmask<AbsoluteAxis>>
pub fn absolute_mask(&self) -> Result<Bitmask<AbsoluteAxis>>
EVIOCGMASK
sourcepub fn set_absolute_mask(&self, bitmask: &Bitmask<AbsoluteAxis>) -> Result<()>
pub fn set_absolute_mask(&self, bitmask: &Bitmask<AbsoluteAxis>) -> Result<()>
EVIOCSMASK
sourcepub fn absolute_bits(&self) -> Result<Bitmask<AbsoluteAxis>>
pub fn absolute_bits(&self) -> Result<Bitmask<AbsoluteAxis>>
EVIOCGBIT
sourcepub fn switch_mask(&self) -> Result<Bitmask<SwitchKind>>
pub fn switch_mask(&self) -> Result<Bitmask<SwitchKind>>
EVIOCGMASK
sourcepub fn set_switch_mask(&self, bitmask: &Bitmask<SwitchKind>) -> Result<()>
pub fn set_switch_mask(&self, bitmask: &Bitmask<SwitchKind>) -> Result<()>
EVIOCSMASK
sourcepub fn switch_bits(&self) -> Result<Bitmask<SwitchKind>>
pub fn switch_bits(&self) -> Result<Bitmask<SwitchKind>>
EVIOCGBIT
sourcepub fn sound_mask(&self) -> Result<Bitmask<SoundKind>>
pub fn sound_mask(&self) -> Result<Bitmask<SoundKind>>
EVIOCGMASK
sourcepub fn sound_bits(&self) -> Result<Bitmask<SoundKind>>
pub fn sound_bits(&self) -> Result<Bitmask<SoundKind>>
EVIOCGBIT
sourcepub fn autorepeat_mask(&self) -> Result<Bitmask<AutorepeatKind>>
pub fn autorepeat_mask(&self) -> Result<Bitmask<AutorepeatKind>>
EVIOCGMASK
sourcepub fn set_autorepeat_mask(
&self,
bitmask: &Bitmask<AutorepeatKind>
) -> Result<()>
pub fn set_autorepeat_mask( &self, bitmask: &Bitmask<AutorepeatKind> ) -> Result<()>
EVIOCSMASK
sourcepub fn autorepeat_bits(&self) -> Result<Bitmask<AutorepeatKind>>
pub fn autorepeat_bits(&self) -> Result<Bitmask<AutorepeatKind>>
EVIOCGBIT
sourcepub fn absolute_info(&self, abs: AbsoluteAxis) -> Result<AbsoluteInfo>
pub fn absolute_info(&self, abs: AbsoluteAxis) -> Result<AbsoluteInfo>
EVIOCGABS
sourcepub fn set_absolute_info(
&self,
abs: AbsoluteAxis,
info: &AbsoluteInfo
) -> Result<()>
pub fn set_absolute_info( &self, abs: AbsoluteAxis, info: &AbsoluteInfo ) -> Result<()>
EVIOCSABS
sourcepub fn set_clock_id(&self, value: i32) -> Result<()>
pub fn set_clock_id(&self, value: i32) -> Result<()>
EVIOCSCLOCKID
Trait Implementations§
source§impl<F: AsRawFd> AsRawFd for EvdevHandle<F>
impl<F: AsRawFd> AsRawFd for EvdevHandle<F>
source§impl<F: FromRawFd> FromRawFd for EvdevHandle<F>
impl<F: FromRawFd> FromRawFd for EvdevHandle<F>
source§unsafe fn from_raw_fd(fd: RawFd) -> Self
unsafe fn from_raw_fd(fd: RawFd) -> Self
Constructs a new instance of
Self
from the given raw file
descriptor. Read moresource§impl<F: IntoRawFd> IntoRawFd for EvdevHandle<F>
impl<F: IntoRawFd> IntoRawFd for EvdevHandle<F>
source§fn into_raw_fd(self) -> RawFd
fn into_raw_fd(self) -> RawFd
Consumes this object, returning the raw underlying file descriptor. Read more