Struct ohos_sys::xcomponent::OH_NativeXComponent_Callback
source · #[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)>,
}Available on crate feature
xcomponent only.Expand description
@brief Registers the surface lifecycle and touch event callbacks.
@since 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 copy of the value. Read more
1.0.0 · 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 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§
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)