Struct input_linux::uinput::UInputHandle
[−]
[src]
pub struct UInputHandle(_);
A handle to a uinput allowing the use of ioctls
Ownership of the file descriptor is not transferred, and it must stay open for this object's lifetime. It will not be closed automatically.
Methods
impl UInputHandle
[src]
pub fn new<F: AsRawFd>(fd: &F) -> Self
[src]
Create a new handle using an existing open file object.
pub fn from_fd(fd: RawFd) -> Self
[src]
Create a new handle from a raw file descriptor.
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]
pub fn evdev_name(&self) -> Result<OsString>
[src]
pub fn evdev_path(&self) -> Result<PathBuf>
[src]
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