#[repr(C)]pub struct OH_NativeXComponent_Callback {
pub OnSurfaceCreated: Option<unsafe extern "C" fn(component: *mut OH_NativeXComponent, window: *mut c_void)>,
pub OnSurfaceChanged: Option<unsafe extern "C" fn(component: *mut OH_NativeXComponent, window: *mut c_void)>,
pub OnSurfaceDestroyed: Option<unsafe extern "C" fn(component: *mut OH_NativeXComponent, window: *mut c_void)>,
pub DispatchTouchEvent: Option<unsafe extern "C" fn(component: *mut OH_NativeXComponent, window: *mut c_void)>,
}Expand description
Registers the surface lifecycle and touch event callbacks.
Available since API-level: 8
Version: 1.0
Fields§
§OnSurfaceCreated: Option<unsafe extern "C" fn(component: *mut OH_NativeXComponent, window: *mut c_void)>Called when the surface is created.
OnSurfaceChanged: Option<unsafe extern "C" fn(component: *mut OH_NativeXComponent, window: *mut c_void)>Called when the surface is changed.
OnSurfaceDestroyed: Option<unsafe extern "C" fn(component: *mut OH_NativeXComponent, window: *mut c_void)>Called when the surface is destroyed.
DispatchTouchEvent: Option<unsafe extern "C" fn(component: *mut OH_NativeXComponent, window: *mut c_void)>Called when a touch event is triggered.
Trait Implementations§
Source§impl Clone for OH_NativeXComponent_Callback
impl Clone for OH_NativeXComponent_Callback
Source§fn clone(&self) -> OH_NativeXComponent_Callback
fn clone(&self) -> OH_NativeXComponent_Callback
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OH_NativeXComponent_Callback
impl Debug for OH_NativeXComponent_Callback
impl Copy for OH_NativeXComponent_Callback
Auto Trait Implementations§
impl Freeze for OH_NativeXComponent_Callback
impl RefUnwindSafe for OH_NativeXComponent_Callback
impl Send for OH_NativeXComponent_Callback
impl Sync for OH_NativeXComponent_Callback
impl Unpin for OH_NativeXComponent_Callback
impl UnwindSafe for OH_NativeXComponent_Callback
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)