pub struct ArkUIInputEvent {
pub event_type: UIInputEvent,
pub action: UIInputAction,
pub source_type: UIInputSourceType,
pub tool_type: UIInputToolType,
/* private fields */
}Expand description
Wrapper for ArkUI_UIInputEvent.
Fields§
§event_type: UIInputEvent§action: UIInputAction§source_type: UIInputSourceType§tool_type: UIInputToolTypeImplementations§
Source§impl ArkUIInputEvent
impl ArkUIInputEvent
pub fn axis_vertical_value(&self) -> f64
pub fn axis_horizontal_value(&self) -> f64
pub fn axis_pinch_scale_value(&self) -> f64
Source§impl ArkUIInputEvent
impl ArkUIInputEvent
pub fn pointer_x(&self) -> f32
pub fn pointer_x_by_index(&self, pointer_index: u32) -> f32
pub fn pointer_y(&self) -> f32
pub fn pointer_y_by_index(&self, pointer_index: u32) -> f32
pub fn pointer_window_x(&self) -> f32
pub fn pointer_window_x_by_index(&self, pointer_index: u32) -> f32
pub fn pointer_window_y(&self) -> f32
pub fn pointer_window_y_by_index(&self, pointer_index: u32) -> f32
pub fn pointer_display_x(&self) -> f32
pub fn pointer_display_x_by_index(&self, pointer_index: u32) -> f32
pub fn pointer_display_y(&self) -> f32
pub fn pointer_display_y_by_index(&self, pointer_index: u32) -> f32
pub fn pointer_pressure(&self, pointer_index: u32) -> f32
pub fn pointer_tilt_x(&self, pointer_index: u32) -> f32
pub fn pointer_tilt_y(&self, pointer_index: u32) -> f32
pub fn pointer_touch_area_width(&self, pointer_index: u32) -> f32
pub fn pointer_touch_area_height(&self, pointer_index: u32) -> f32
pub fn pointer_history_size(&self) -> u32
pub fn pointer_history_event_time(&self, history_index: u32) -> i64
pub fn pointer_history_pointer_count(&self, history_index: u32) -> u32
pub fn pointer_history_pointer_id( &self, pointer_index: u32, history_index: u32, ) -> i32
pub fn pointer_history_x(&self, pointer_index: u32, history_index: u32) -> f32
pub fn pointer_history_y(&self, pointer_index: u32, history_index: u32) -> f32
pub fn pointer_history_window_x( &self, pointer_index: u32, history_index: u32, ) -> f32
pub fn pointer_history_window_y( &self, pointer_index: u32, history_index: u32, ) -> f32
pub fn pointer_history_display_x( &self, pointer_index: u32, history_index: u32, ) -> f32
pub fn pointer_history_display_y( &self, pointer_index: u32, history_index: u32, ) -> f32
pub fn pointer_history_pressure( &self, pointer_index: u32, history_index: u32, ) -> f32
pub fn pointer_history_tilt_x( &self, pointer_index: u32, history_index: u32, ) -> f32
pub fn pointer_history_tilt_y( &self, pointer_index: u32, history_index: u32, ) -> f32
pub fn pointer_history_touch_area_width( &self, pointer_index: u32, history_index: u32, ) -> f32
pub fn pointer_history_touch_area_height( &self, pointer_index: u32, history_index: u32, ) -> f32
pub fn pointer_set_intercept_hit_test_mode( &self, mode: HitTest, ) -> Result<(), ArkUIInputError>
pub fn mouse_action(&self) -> UIMouseEventAction
pub fn pointer_set_stop_propagation( &self, stop_propagation: bool, ) -> Result<(), ArkUIInputError>
Source§impl ArkUIInputEvent
impl ArkUIInputEvent
pub fn raw(&self) -> *const ArkUI_UIInputEvent
pub fn from_raw(event: *const ArkUI_UIInputEvent) -> Self
pub fn event_time(&self) -> i64
Sourcepub fn pointer_count(&self) -> u32
pub fn pointer_count(&self) -> u32
Get the number of contact points from a pointer event (such as a touch, mouse, or axis event).
Sourcepub fn pointer_id(&self, pointer_index: u32) -> i32
pub fn pointer_id(&self, pointer_index: u32) -> i32
Get the unique ID of a contact point from a pointer event (such as a touch, mouse, or axis event).
Sourcepub fn get_scroll_delta_y(&self) -> Result<f64, ArkUIInputError>
pub fn get_scroll_delta_y(&self) -> Result<f64, ArkUIInputError>
Get the vertical scroll delta of an axis event. Only works for touch board and mouse wheel.
Sourcepub fn get_scroll_delta_x(&self) -> Result<f64, ArkUIInputError>
pub fn get_scroll_delta_x(&self) -> Result<f64, ArkUIInputError>
Get the horizontal scroll delta of an axis event. Only works for touch board.
Trait Implementations§
Source§impl Clone for ArkUIInputEvent
impl Clone for ArkUIInputEvent
Source§fn clone(&self) -> ArkUIInputEvent
fn clone(&self) -> ArkUIInputEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ArkUIInputEvent
impl Debug for ArkUIInputEvent
Source§impl PartialEq for ArkUIInputEvent
impl PartialEq for ArkUIInputEvent
Source§fn eq(&self, other: &ArkUIInputEvent) -> bool
fn eq(&self, other: &ArkUIInputEvent) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for ArkUIInputEvent
impl Eq for ArkUIInputEvent
impl StructuralPartialEq for ArkUIInputEvent
Auto Trait Implementations§
impl Freeze for ArkUIInputEvent
impl RefUnwindSafe for ArkUIInputEvent
impl !Send for ArkUIInputEvent
impl !Sync for ArkUIInputEvent
impl Unpin for ArkUIInputEvent
impl UnsafeUnpin for ArkUIInputEvent
impl UnwindSafe for ArkUIInputEvent
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