pub struct HiResScrollingFeature { /* private fields */ }Expand description
HiRes Scrolling feature implementation.
Implementations§
Source§impl HiResScrollingFeature
impl HiResScrollingFeature
Sourcepub fn new(device_index: u8, feature_index: u8) -> Self
pub fn new(device_index: u8, feature_index: u8) -> Self
Creates a new hi-res scrolling feature accessor.
§Arguments
device_index- Device index (0xFF for direct)feature_index- Feature index from root feature discovery
Sourcepub async fn get_wheel_capability(
&self,
channel: &HidapiChannel,
) -> Result<WheelInfo>
pub async fn get_wheel_capability( &self, channel: &HidapiChannel, ) -> Result<WheelInfo>
Gets the wheel capabilities.
Returns the scroll multiplier and capability flags (ratchet detection, inversion).
§Errors
Returns an error if HID++ communication fails.
Sourcepub async fn get_wheel_mode(
&self,
channel: &HidapiChannel,
) -> Result<HiResScrollConfig>
pub async fn get_wheel_mode( &self, channel: &HidapiChannel, ) -> Result<HiResScrollConfig>
Sourcepub async fn set_wheel_mode(
&self,
channel: &HidapiChannel,
config: &HiResScrollConfig,
) -> Result<()>
pub async fn set_wheel_mode( &self, channel: &HidapiChannel, config: &HiResScrollConfig, ) -> Result<()>
Sourcepub async fn get_ratchet_switch_state(
&self,
channel: &HidapiChannel,
) -> Result<bool>
pub async fn get_ratchet_switch_state( &self, channel: &HidapiChannel, ) -> Result<bool>
Gets the ratchet switch state.
Returns true if the wheel is in ratchet (notched) mode,
false if in free-spin mode.
§Errors
Returns an error if HID++ communication fails or the device doesn’t support ratchet detection.
Auto Trait Implementations§
impl Freeze for HiResScrollingFeature
impl RefUnwindSafe for HiResScrollingFeature
impl Send for HiResScrollingFeature
impl Sync for HiResScrollingFeature
impl Unpin for HiResScrollingFeature
impl UnwindSafe for HiResScrollingFeature
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more