#[repr(C)]pub struct ButtonEvent {
pub __base: IDEvent,
}
Fields§
§__base: IDEvent
Implementations§
Source§impl ButtonEvent
impl ButtonEvent
Sourcepub const VTABLE: [VariantID; 1] = VTABLE_ButtonEvent
pub const VTABLE: [VariantID; 1] = VTABLE_ButtonEvent
Address & offset of Virtual function table.
Sourcepub fn vtable() -> Result<&'static ButtonEventVtbl, DataBaseError>
pub fn vtable() -> Result<&'static ButtonEventVtbl, DataBaseError>
§Errors
Sourcepub fn new_boxed(
input_device: INPUT_DEVICE,
user_event: BSFixedString,
id_code: u32,
value: f32,
held_down_secs: f32,
) -> Result<TESBox<Self>, DataBaseError>
pub fn new_boxed( input_device: INPUT_DEVICE, user_event: BSFixedString, id_code: u32, value: f32, held_down_secs: f32, ) -> Result<TESBox<Self>, DataBaseError>
Sourcepub fn get_runtime_data(&self) -> Result<&RUNTIME_DATA, RelocationError>
pub fn get_runtime_data(&self) -> Result<&RUNTIME_DATA, RelocationError>
Gets fields whose offset is determined at runtime.
§Errors
This function may return an error if the module’s runtime is not available or if any error occurs while fetching the runtime state.
Specifically, it calls ModuleState::map_active
, which could result in an error.
Sourcepub fn get_runtime_data_mut(
&mut self,
) -> Result<&mut RUNTIME_DATA, RelocationError>
pub fn get_runtime_data_mut( &mut self, ) -> Result<&mut RUNTIME_DATA, RelocationError>
Gets mutable fields whose offset is determined at runtime.
§Errors
This function may return an error if the module’s runtime is not available or if any error occurs while fetching the runtime state.
Specifically, it calls ModuleState::map_active_mut
, which could result in an error.
pub fn value(&self) -> Option<f32>
pub fn held_duration(&self) -> Option<f32>
pub fn is_pressed(&self) -> bool
pub fn is_repeating(&self) -> bool
pub fn is_down(&self) -> bool
pub fn is_held(&self) -> bool
pub fn is_up(&self) -> bool
Trait Implementations§
Source§impl Debug for ButtonEvent
impl Debug for ButtonEvent
Source§impl PartialEq for ButtonEvent
impl PartialEq for ButtonEvent
impl StructuralPartialEq for ButtonEvent
Auto Trait Implementations§
impl Freeze for ButtonEvent
impl RefUnwindSafe for ButtonEvent
impl !Send for ButtonEvent
impl !Sync for ButtonEvent
impl Unpin for ButtonEvent
impl UnwindSafe for ButtonEvent
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