1# OH_NativeXComponent_Callback 2 3 4## 概述 5 6注册surface生命周期和触摸事件回调。 7 8**起始版本:** 8 9 10**相关模块:**[Native XComponent](_o_h___native_x_component.md) 11 12 13## 汇总 14 15 16### 成员变量 17 18| 名称 | 描述 | 19| -------- | -------- | 20| void(\* [OnSurfaceCreated](_o_h___native_x_component.md#onsurfacecreated) )([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent) \*component, void \*window) | 创建surface时调用。| 21| void(\* [OnSurfaceChanged](_o_h___native_x_component.md#onsurfacechanged) )([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent) \*component, void \*window) | 当surface改变时调用。| 22| void(\* [OnSurfaceDestroyed](_o_h___native_x_component.md#onsurfacedestroyed) )([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent) \*component, void \*window) | 当surface被销毁时调用。| 23| void(\* [DispatchTouchEvent](_o_h___native_x_component.md#dispatchtouchevent) )([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent) \*component, void \*window) | 当触摸事件被触发时调用。| 24