[−][src]Struct input_linux::uinput::UInputHandle
A handle to a uinput allowing the use of ioctls
Implementations
impl<F> UInputHandle<F>
[src]
pub const fn new(fd: F) -> Self
[src]
Create a new handle using an existing open file object.
pub fn into_inner(self) -> F
[src]
Extracts the contained handle.
pub const fn as_inner(&self) -> &F
[src]
A reference to the contained handle.
pub fn as_inner_mut(&mut self) -> &mut F
[src]
A mutable reference to the contained handle.
impl UInputHandle<File>
[src]
impl<F: AsRawFd> UInputHandle<F>
[src]
pub fn create_legacy(
&self,
id: &InputId,
name: &[u8],
ff_effects_max: u32,
abs: &[AbsoluteInfoSetup]
) -> Result<()>
[src]
&self,
id: &InputId,
name: &[u8],
ff_effects_max: u32,
abs: &[AbsoluteInfoSetup]
) -> Result<()>
Create a new uinput device using the legacy UI_DEV_CREATE
interface
pub fn create(
&self,
id: &InputId,
name: &[u8],
ff_effects_max: u32,
abs: &[AbsoluteInfoSetup]
) -> Result<()>
[src]
&self,
id: &InputId,
name: &[u8],
ff_effects_max: u32,
abs: &[AbsoluteInfoSetup]
) -> Result<()>
Create a new uinput device, and fall back on the legacy interface if necessary
pub fn write(&self, events: &[input_event]) -> Result<usize>
[src]
Write input events to the device
pub fn read(&self, events: &mut [input_event]) -> Result<usize>
[src]
Read events from uinput (see EV_UINPUT
)
pub fn sys_path(&self) -> Result<PathBuf>
[src]
Returns the sysfs directory for the input device.
Note that this path may not exist if sysfs is not mounted in the standard /sys
location.
pub fn evdev_name(&self) -> Result<OsString>
[src]
The device name of the input device.
pub fn evdev_path(&self) -> Result<PathBuf>
[src]
The device node path of the input device.
Note that this path may not exist if /dev/input/*
isn't mounted properly.
pub fn dev_create(&self) -> Result<()>
[src]
UI_DEV_CREATE
pub fn dev_destroy(&self) -> Result<()>
[src]
UI_DEV_DESTROY
pub fn dev_setup(&self, value: &uinput_setup) -> Result<()>
[src]
UI_DEV_SETUP
pub fn abs_setup(&self, value: &uinput_abs_setup) -> Result<()>
[src]
UI_ABS_SETUP
pub fn set_evbit(&self, value: EventKind) -> Result<()>
[src]
UI_SET_EVBIT
pub fn set_keybit(&self, value: Key) -> Result<()>
[src]
UI_SET_KEYBIT
pub fn set_relbit(&self, value: RelativeAxis) -> Result<()>
[src]
UI_SET_RELBIT
pub fn set_absbit(&self, value: AbsoluteAxis) -> Result<()>
[src]
UI_SET_ABSBIT
pub fn set_mscbit(&self, value: MiscKind) -> Result<()>
[src]
UI_SET_MSCBIT
pub fn set_ledbit(&self, value: LedKind) -> Result<()>
[src]
UI_SET_LEDBIT
pub fn set_sndbit(&self, value: SoundKind) -> Result<()>
[src]
UI_SET_SNDBIT
pub fn set_ffbit(&self, value: i32) -> Result<()>
[src]
UI_SET_FFBIT
pub fn set_phys(&self, value: &CStr) -> Result<()>
[src]
UI_SET_PHYS
pub fn set_swbit(&self, value: SwitchKind) -> Result<()>
[src]
UI_SET_SWBIT
pub fn set_propbit(&self, value: InputProperty) -> Result<()>
[src]
UI_SET_PROPBIT
pub fn ff_upload_begin(&self, value: &mut uinput_ff_upload) -> Result<()>
[src]
UI_BEGIN_FF_UPLOAD
pub fn ff_upload_end(&self, value: &uinput_ff_upload) -> Result<()>
[src]
UI_END_FF_UPLOAD
pub fn ff_erase_begin(&self, value: &mut uinput_ff_erase) -> Result<()>
[src]
UI_BEGIN_FF_ERASE
pub fn ff_erase_end(&self, value: &uinput_ff_erase) -> Result<()>
[src]
UI_END_FF_ERASE
pub fn sys_name_buf(&self, buffer: &mut [u8]) -> Result<usize>
[src]
UI_GET_SYSNAME
pub fn sys_name(&self) -> Result<Vec<u8>>
[src]
UI_GET_SYSNAME
pub fn version(&self) -> Result<u32>
[src]
UI_GET_VERSION
Trait Implementations
impl<F: FromRawFd> FromRawFd for UInputHandle<F>
[src]
unsafe fn from_raw_fd(fd: RawFd) -> Self
[src]
impl<F: IntoRawFd> IntoRawFd for UInputHandle<F>
[src]
fn into_raw_fd(self) -> RawFd
[src]
Auto Trait Implementations
impl<F> RefUnwindSafe for UInputHandle<F> where
F: RefUnwindSafe,
F: RefUnwindSafe,
impl<F> Send for UInputHandle<F> where
F: Send,
F: Send,
impl<F> Sync for UInputHandle<F> where
F: Sync,
F: Sync,
impl<F> Unpin for UInputHandle<F> where
F: Unpin,
F: Unpin,
impl<F> UnwindSafe for UInputHandle<F> where
F: UnwindSafe,
F: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,