diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 7a15d4e4f25e8fad68814e6c38199ed4a42e7213..9222d9b61908c5b932cdf499eb83959fbd35efec 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -3370,61 +3370,5 @@ { "first_introduced": "20", "name": "OH_ArkUI_DragEvent_IsRemote" - }, - { - "first_introduced": "20", - "name": "OH_NativeXComponent_GetExtraMouseEventInfo" - }, - { - "first_introduced": "20", - "name": "OH_NativeXComponent_GetMouseEventModifierKeyStates" - }, - { - "first_introduced": "20", - "name": "OH_NativeXComponent_GetKeyEventModifierKeyStates" - }, - { - "first_introduced": "20", - "name": "OH_NativeXComponent_GetKeyEventNumLockState" - }, - { - "first_introduced": "20", - "name": "OH_NativeXComponent_GetKeyEventCapsLockState" - }, - { - "first_introduced": "20", - "name": "OH_NativeXComponent_GetKeyEventScrollLockState" - }, - { - "first_introduced": "20", - "name": "OH_ArkUI_XComponent_SetExpectedFrameRateRange" - }, - { - "first_introduced": "20", - "name": "OH_ArkUI_XComponent_RegisterOnFrameCallback" - }, - { - "first_introduced": "20", - "name": "OH_ArkUI_XComponent_UnregisterOnFrameCallback" - }, - { - "first_introduced": "20", - "name": "OH_ArkUI_XComponent_SetNeedSoftKeyboard" - }, - { - "first_introduced": "20", - "name": "OH_ArkUI_AccessibilityProvider_Create" - }, - { - "first_introduced": "20", - "name": "OH_ArkUI_AccessibilityProvider_Dispose" - }, - { - "first_introduced": "20", - "name": "OH_ArkUI_SurfaceCallback_SetSurfaceShowEvent" - }, - { - "first_introduced": "20", - "name": "OH_ArkUI_SurfaceCallback_SetSurfaceHideEvent" } ] \ No newline at end of file diff --git a/arkui/ace_engine/native/native_interface_xcomponent.h b/arkui/ace_engine/native/native_interface_xcomponent.h index 704b6654db0dd12acb133cb56e0917e62a2fc093..cd3a438ac378c4b084221217f99186fd0e81b652 100644 --- a/arkui/ace_engine/native/native_interface_xcomponent.h +++ b/arkui/ace_engine/native/native_interface_xcomponent.h @@ -326,21 +326,7 @@ typedef struct OH_NativeXComponent OH_NativeXComponent; * @version 1.0 */ typedef struct OH_NativeXComponent_Callback { - /** - * @brief Called when the surface is created. - * - *

API Note - * - * Performance Note - *

By default, the window buffer in the current operating system is accessed via the CPU. If an application - * does not need to access the window buffer data using the CPU, it can proactively disable CPU access to - * enhance energy efficiency and reduce power consumption. - *

- *

For details about how to optimize power consumption for data read/write operations in data buffers, - * see [How do I proactively disable CPU access to window buffers to reduce power consumption?]{@link https://developer.huawei.com/consumer/en/doc/harmonyos-faqs/faqs-arkgraphics-2d-14}.

- *

- * - */ + /** Called when the surface is created. */ void (*OnSurfaceCreated)(OH_NativeXComponent* component, void* window); /** Called when the surface is changed. */ void (*OnSurfaceChanged)(OH_NativeXComponent* component, void* window); @@ -597,43 +583,6 @@ int32_t OH_NativeXComponent_RegisterCallback(OH_NativeXComponent* component, OH_ int32_t OH_NativeXComponent_RegisterMouseEventCallback( OH_NativeXComponent* component, OH_NativeXComponent_MouseEvent_Callback* callback); -/** - * @brief Provides an encapsulated OH_NativeXComponent_ExtraMouseEventInfo - * instance which has extra info compared to OH_NativeXComponent_MouseEvent. - * - * @since 20 - * @version 1.0 - */ -typedef struct OH_NativeXComponent_ExtraMouseEventInfo OH_NativeXComponent_ExtraMouseEventInfo; - -/** - * @brief Obtains the extra mouse event dispatched by the ArkUI XComponent. - * - * @param component Indicates the pointer to this OH_NativeXComponent instance. - * @param extraMouseEventInfo Indicates the pointer to pointer of OH_NativeXComponent_ExtraMouseEventInfo instance. - * @return Returns the status code of the execution. - * {@link ARKUI_ERROR_CODE_NO_ERROR} the execution is successful. - * {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. - * @since 20 - * @version 1.0 - */ -int32_t OH_NativeXComponent_GetExtraMouseEventInfo(OH_NativeXComponent* component, OH_NativeXComponent_ExtraMouseEventInfo** extraMouseEventInfo); - -/** - * @brief Obtains the state of the modifier keys of the mouse event. - * - * @param ExtraMouseEventInfo Indicates the pointer to this OH_NativeXComponent_ExtraMouseEventInfo instance. - * @param keys Pointer to a variable where the current combination of pressed modifier keys will be returned. - * The application can use bitwise operations to determine the state of each modifier key. - * Modifier keys can be referred to {@link ArkUI_ModifierKeyName}. - * @return Returns the result code. - * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. - * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. - * @since 20 - * @version 1.0 - */ -int32_t OH_NativeXComponent_GetMouseEventModifierKeyStates(OH_NativeXComponent_ExtraMouseEventInfo* ExtraMouseEventInfo, uint64_t* keys); - /** * @brief Registers a callback for this OH_NativeXComponent instance. * @@ -738,60 +687,6 @@ int32_t OH_NativeXComponent_GetKeyEventDeviceId(OH_NativeXComponent_KeyEvent* ke */ int32_t OH_NativeXComponent_GetKeyEventTimestamp(OH_NativeXComponent_KeyEvent* keyEvent, int64_t* timestamp); -/** - * @brief Obtains the state of the modifier keys of the key event. - * - * @param keyEvent Indicates the pointer to this OH_NativeXComponent_KeyEvent instance. - * @param keys Pointer to a variable where the current combination of pressed modifier keys will be returned. - * The application can use bitwise operations to determine the state of each modifier key. - * Modifier keys can be referred to {@link ArkUI_ModifierKeyName}. - * @return Returns the result code. - * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. - * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. - * @since 20 - * @version 1.0 - */ -int32_t OH_NativeXComponent_GetKeyEventModifierKeyStates(OH_NativeXComponent_KeyEvent* keyEvent, uint64_t* keys); - -/** - * @brief Obtains the Num Lock state of the key event. - * - * @param keyEvent Indicates the pointer to this OH_NativeXComponent_KeyEvent instance. - * @param isNumLockOn Return whether the Num Lock is on. - * @return Returns the result code. - * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. - * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. - * @since 20 - * @version 1.0 - */ -int32_t OH_NativeXComponent_GetKeyEventNumLockState(OH_NativeXComponent_KeyEvent* keyEvent, bool* isNumLockOn); - -/** - * @brief Obtains the Caps Lock state of the key event. - * - * @param keyEvent Indicates the pointer to this OH_NativeXComponent_KeyEvent instance. - * @param isCapsLockOn Return whether the Caps Lock is on. - * @return Returns the result code. - * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. - * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. - * @since 20 - * @version 1.0 - */ -int32_t OH_NativeXComponent_GetKeyEventCapsLockState(OH_NativeXComponent_KeyEvent* keyEvent, bool* isCapsLockOn); - -/** - * @brief Obtains the Scroll Lock state of the key event. - * - * @param keyEvent Indicates the pointer to this OH_NativeXComponent_KeyEvent instance. - * @param isScrollLockOn Return whether the Scroll Lock is on. - * @return Returns the result code. - * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. - * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. - * @since 20 - * @version 1.0 - */ -int32_t OH_NativeXComponent_GetKeyEventScrollLockState(OH_NativeXComponent_KeyEvent* keyEvent, bool* isScrollLockOn); - /** * @brief Set the Expected FrameRateRange. * @@ -1203,96 +1098,6 @@ int32_t OH_ArkUI_XComponent_Finalize(ArkUI_NodeHandle node); */ int32_t OH_ArkUI_XComponent_IsInitialized(ArkUI_NodeHandle node, bool* isInitialized); -/** - * @brief Set the Expected FrameRateRange for the XComponent node. - * - * @param node Indicates the pointer to the XComponent node. - * @param range Indicates the expected rate range. - * @return Returns the status code of the execution. - * {@link ARKUI_ERROR_CODE_NO_ERROR} the execution is successful. - * {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. - * @since 20 - * @version 1.0 - */ -int32_t OH_ArkUI_XComponent_SetExpectedFrameRateRange( - ArkUI_NodeHandle node, OH_NativeXComponent_ExpectedRateRange range); - -/** - * @brief Registers an onFrame callback for the XComponent node. - * - * @param node Indicates the pointer to the XComponent node. - * @param callback Indicates the pointer to an onFrame callback. - * @return Returns the status code of the execution. - * {@link ARKUI_ERROR_CODE_NO_ERROR} the execution is successful. - * {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. - * @since 20 - * @version 1.0 - */ -int32_t OH_ArkUI_XComponent_RegisterOnFrameCallback(ArkUI_NodeHandle node, - void (*callback)(ArkUI_NodeHandle node, uint64_t timestamp, uint64_t targetTimestamp)); - -/** - * @brief UnRegister the onFrame callback for the XComponent node. - * - * @param node Indicates the pointer to the XComponent node. - * @return Returns the status code of the execution. - * {@link ARKUI_ERROR_CODE_NO_ERROR} the execution is successful. - * {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. - * @since 20 - * @version 1.0 - */ -int32_t OH_ArkUI_XComponent_UnregisterOnFrameCallback(ArkUI_NodeHandle node); - -/** - * @brief Set whether the XComponent node needs soft keyboard when focused. - * @param node Indicates the pointer to the XComponent node. - * @param needSoftKeyboard Indicates whether the XComponent node needs soft keyboard or not. - * Default value is false. - * @return Returns the status code of the execution. - * {@link ARKUI_ERROR_CODE_NO_ERROR} the execution is successful. - * {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. - * @since 20 - */ -int32_t OH_ArkUI_XComponent_SetNeedSoftKeyboard(ArkUI_NodeHandle node, bool needSoftKeyboard); - -/** - * @brief Create a ArkUI_AccessibilityProvider object from an XComponent node. - * - * @param node Indicates the pointer to the XComponent node. - * @return Returns the created ArkUI_AccessibilityProvider object's pointer. - * @since 20 - */ -ArkUI_AccessibilityProvider* OH_ArkUI_AccessibilityProvider_Create(ArkUI_NodeHandle node); - -/** - * @brief Disposes of an ArkUI_AccessibilityProvider object. - * - * @param provider Indicates the pointer to ArkUI_AccessibilityProvider object needed to dispose. - * @since 20 - */ -void OH_ArkUI_AccessibilityProvider_Dispose(ArkUI_AccessibilityProvider* provider); - -/** - * @brief Set the surface show event of the surface callback. - * - * @param callback Indicated the pointer to the surface callback. - * @param onSurfaceShow Indicates the surface show callback event which will called when the surface is shown. - * @since 20 - */ -void OH_ArkUI_SurfaceCallback_SetSurfaceShowEvent( - OH_ArkUI_SurfaceCallback* callback, - void (*onSurfaceShow)(OH_ArkUI_SurfaceHolder* surfaceHolder)); - -/** - * @brief Set the surface hide event of the surface callback. - * - * @param callback Indicated the pointer to the surface callback. - * @param onSurfaceHide Indicates the surface hide callback event which will called when the surface is hide. - * @since 20 - */ -void OH_ArkUI_SurfaceCallback_SetSurfaceHideEvent( - OH_ArkUI_SurfaceCallback* callback, - void (*onSurfaceHide)(OH_ArkUI_SurfaceHolder* surfaceHolder)); #ifdef __cplusplus }; #endif