1# OH_NativeXComponent_Callback 2 3 4## Overview 5 6Registers callbacks for the surface lifecycle and touch event. 7 8**Since**: 8 9 10**Related module**: [Native XComponent](_o_h___native_x_component.md) 11 12**Header file**: [native_interface_xcomponent.h](native__interface__xcomponent_8h.md) 13 14## Summary 15 16 17### Member Variables 18 19| Name| Description| 20| -------- | -------- | 21| void(\* [OnSurfaceCreated](_o_h___native_x_component.md#onsurfacecreated) )([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent) \*component, void \*window) | Invoked when a surface is created.| 22| void(\* [OnSurfaceChanged](_o_h___native_x_component.md#onsurfacechanged) )([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent) \*component, void \*window) | Invoked when the surface changes.| 23| void(\* [OnSurfaceDestroyed](_o_h___native_x_component.md#onsurfacedestroyed) )([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent) \*component, void \*window) | Invoked when the surface is destroyed.| 24| void(\* [DispatchTouchEvent](_o_h___native_x_component.md#dispatchtouchevent) )([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent) \*component, void \*window) | Invoked when a touch event is triggered.| 25