已合并
capi注释一致性整改 #5370
capi注释一致性整改 #5370
已合并
zouqianshun创建于 6月16日
10 个文件变更+7850-2995
Markui/ace_engine/native/drag_and_drop.h+528-511
@@ -25,7 +25,7 @@
25/**25/**
26 * @file drag_and_drop.h26 * @file drag_and_drop.h
27 *27 *
28- * @brief Defines the native drag and drop APIs.28+ * @brief Declares the APIs of **NativeDrag**.
29 *29 *
30 * @library libace_ndk.z.so30 * @library libace_ndk.z.so
31 * @kit ArkUI31 * @kit ArkUI
@@ -47,101 +47,137 @@ extern "C" {
47#endif47#endif
48 48 
49/**49/**
50- * @brief Defines an enum for drag results, which are set by the data receiver and transferred by the system to the50+ * @brief Enumerates drag results, which are set by the data receiver and transferred by the system to the drag source
51- * drag source so that the drag source is aware of the data processing result of the receiver.51+ * so that the drag source is aware of the data processing result of the receiver.
52- *
53- * @since 12
54- */
55-typedef enum {
56- /** The drag and drop operation succeeded. */
57- ARKUI_DRAG_RESULT_SUCCESSFUL = 0,
58- /** The drag and drop operation failed. */
59- ARKUI_DRAG_RESULT_FAILED,
60- /** The drag and drop operation was canceled. */
61- ARKUI_DRAG_RESULT_CANCELED,
62-} ArkUI_DragResult;
63- 
64-/**
65- * @brief Defines an enum for data processing modes used when data is dropped, which affects the display of the badge.
66- *
67- * @since 12
68- */
69-typedef enum {
70- /** Copy. */
71- ARKUI_DROP_OPERATION_COPY = 0,
72- /** Cut. */
73- ARKUI_DROP_OPERATION_MOVE,
74-} ArkUI_DropOperation;
75- 
76-/**
77- * @brief Defines an enum for interaction states prior to a drop and drop operation.
78- *
79- * @since 12
80- */
81-typedef enum {
82- /** Unknown. */
83- ARKUI_PRE_DRAG_STATUS_UNKNOWN = -1,
84- /** A drag gesture is being detected. */
85- ARKUI_PRE_DRAG_STATUS_ACTION_DETECTING,
86- /** The component is ready to be dragged. */
87- ARKUI_PRE_DRAG_STATUS_READY_TO_TRIGGER_DRAG,
88- /** A lift animation is started. */
89- ARKUI_PRE_DRAG_STATUS_PREVIEW_LIFT_STARTED,
90- /** A lift animation is finished. */
91- ARKUI_PRE_DRAG_STATUS_PREVIEW_LIFT_FINISHED,
92- /** A drop animation is started. */
93- ARKUI_PRE_DRAG_STATUS_PREVIEW_LANDING_STARTED,
94- /** A drop animation is finished. */
95- ARKUI_PRE_DRAG_STATUS_PREVIEW_LANDING_FINISHED,
96- /** A drop animation is terminated. */
97- ARKUI_PRE_DRAG_STATUS_CANCELED_BEFORE_DRAG,
98-} ArkUI_PreDragStatus;
99- 
100-/**
101- * @brief Defines an enum for drag preview scale modes.
102 *52 *
103 * @since 1253 * @since 12
104 */54 */
105typedef enum {55typedef enum {
106 /**56 /**
107- * The system automatically changes the position of the dragged point based on the scenario and57+ * The drag and drop operation succeeded.
108- * scales the drag preview based on set rules.
109 */58 */
110- ARKUI_DRAG_PREVIEW_SCALE_AUTO = 0,59+ ARKUI_DRAG_RESULT_SUCCESSFUL = 0,
111- /** The system does not scale the drag preview. */60+ /**
112- ARKUI_DRAG_PREVIEW_SCALE_DISABLED,61+ * The drag and drop operation failed.
113-} ArkUI_DragPreviewScaleMode;62+ */
63+ ARKUI_DRAG_RESULT_FAILED,
64+ /**
65+ * The drag and drop operation was canceled.
66+ */
67+ ARKUI_DRAG_RESULT_CANCELED,
68+} ArkUI_DragResult;
114 69 
115/**70/**
116- * @brief Defines an enum for drag states.71+ * @brief Enumerates data processing modes used when data is dropped, which affects the display of the badge. When the
72+ * copy operation is set, the badge displays a plus sign (+). When the cut operation is set, the badge does not display
73+ * a plus sign (+).
117 *74 *
118 * @since 1275 * @since 12
119 */76 */
120typedef enum {77typedef enum {
121- /** Unknown. */78+ /**
79+ * Copy.
80+ */
81+ ARKUI_DROP_OPERATION_COPY = 0,
82+ /**
83+ * Cut.
84+ */
85+ ARKUI_DROP_OPERATION_MOVE,
86+} ArkUI_DropOperation;
87+ 
88+/**
89+ * @brief Enumerates interaction states prior to a drop and drop operation.
90+ *
91+ * @since 12
92+ */
93+typedef enum {
94+ /**
95+ * Unknown.
96+ */
97+ ARKUI_PRE_DRAG_STATUS_UNKNOWN = -1,
98+ /**
99+ * A drag gesture is being detected.
100+ */
101+ ARKUI_PRE_DRAG_STATUS_ACTION_DETECTING,
102+ /**
103+ * The component is ready to be dragged.
104+ */
105+ ARKUI_PRE_DRAG_STATUS_READY_TO_TRIGGER_DRAG,
106+ /**
107+ * A lift animation is started.
108+ */
109+ ARKUI_PRE_DRAG_STATUS_PREVIEW_LIFT_STARTED,
110+ /**
111+ * A lift animation is finished.
112+ */
113+ ARKUI_PRE_DRAG_STATUS_PREVIEW_LIFT_FINISHED,
114+ /**
115+ * A drop animation is started.
116+ */
117+ ARKUI_PRE_DRAG_STATUS_PREVIEW_LANDING_STARTED,
118+ /**
119+ * A drop animation is finished.
120+ */
121+ ARKUI_PRE_DRAG_STATUS_PREVIEW_LANDING_FINISHED,
122+ /**
123+ * A drop animation is terminated.
124+ */
125+ ARKUI_PRE_DRAG_STATUS_CANCELED_BEFORE_DRAG,
126+} ArkUI_PreDragStatus;
127+ 
128+/**
129+ * @brief Enumerates drag preview scale modes.
130+ *
131+ * @since 12
132+ */
133+typedef enum {
134+ /**
135+ * Enables the system to automatically change the position of the dragged point based on the scenario and apply
136+ * scaling transformations to the drag preview based on set rules.
137+ */
138+ ARKUI_DRAG_PREVIEW_SCALE_AUTO = 0,
139+ /**
140+ * Disables the system's scaling behavior for the drag preview.
141+ */
142+ ARKUI_DRAG_PREVIEW_SCALE_DISABLED,
143+} ArkUI_DragPreviewScaleMode;
144+ 
145+/**
146+ * @brief Enumerates drag operation states.
147+ *
148+ * @since 12
149+ */
150+typedef enum {
151+ /**
152+ * Unknown.
153+ */
122 ARKUI_DRAG_STATUS_UNKNOWN = -1,154 ARKUI_DRAG_STATUS_UNKNOWN = -1,
123- /** Started. */155+ /**
156+ * The drag operation has started.
157+ */
124 ARKUI_DRAG_STATUS_STARTED,158 ARKUI_DRAG_STATUS_STARTED,
125- /** Ended. */159+ /**
160+ * The drag operation has ended.
161+ */
126 ARKUI_DRAG_STATUS_ENDED,162 ARKUI_DRAG_STATUS_ENDED,
127} ArkUI_DragStatus;163} ArkUI_DragStatus;
128 164 
129/**165/**
130- * @brief Defines a struct for a component event.166+ * @brief Defines a component event. This is a general struct type.
131 *167 *
132 * @since 12168 * @since 12
133 */169 */
134typedef struct ArkUI_NodeEvent ArkUI_NodeEvent;170typedef struct ArkUI_NodeEvent ArkUI_NodeEvent;
135 171 
136/**172/**
137- * @brief Defines a struct for a UI context object.173+ * @brief Defines a native UI context instance.
138 *174 *
139 * @since 12175 * @since 12
140 */176 */
141typedef struct ArkUI_Context ArkUI_Context;177typedef struct ArkUI_Context ArkUI_Context;
142 178 
143/**179/**
144- * @brief Defines a struct for a UI context object pointer.180+ * @brief Defines the pointer to the ArkUI native UI context.
145 *181 *
146 * @since 12182 * @since 12
147 */183 */
@@ -162,48 +198,48 @@ typedef struct ArkUI_DragEvent ArkUI_DragEvent;
162typedef struct ArkUI_DragPreviewOption ArkUI_DragPreviewOption;198typedef struct ArkUI_DragPreviewOption ArkUI_DragPreviewOption;
163 199 
164/**200/**
165- * @brief Defines a struct for a drag action.201+ * @brief Defines a drag action.
166 *202 *
167 * @since 12203 * @since 12
168 */204 */
169typedef struct ArkUI_DragAction ArkUI_DragAction;205typedef struct ArkUI_DragAction ArkUI_DragAction;
170 206 
171/**207/**
172- * @brief Defines a struct for drag and drop information returned through a drag status listener.208+ * @brief Defines drag and drop information returned through a drag status listener.
173 *209 *
174 * @since 12210 * @since 12
175 */211 */
176typedef struct ArkUI_DragAndDropInfo ArkUI_DragAndDropInfo;212typedef struct ArkUI_DragAndDropInfo ArkUI_DragAndDropInfo;
177 213 
178/**214/**
179- * @brief Obtains a <b>ArkUI_DragEvent</b> object from the specified <b>ArkUI_NodeEvent</b> object.215+ * @brief Obtains a **DragEvent** object from the specified **NodeEvent** object.
180 *216 *
181- * @param nodeEvent Indicates the pointer to an <b>ArkUI_NodeEvent</b> object.217+ * @param nodeEvent Pointer to the target **ArkUI_NodeEvent** object.
182- * @return Returns the pointer to an <b>ArkUI_DragEvent</b> object.218+ * @return Returns the pointer to an **ArkUI_DragEvent** object; returns null if the parameter passed in is invalid or
183- * Returns <b>null</b> if the parameter passed in is invalid or is not a drag-related event.219+ * is not a drag-related event.
184 * @since 12220 * @since 12
185 */221 */
186ArkUI_DragEvent* OH_ArkUI_NodeEvent_GetDragEvent(ArkUI_NodeEvent* nodeEvent);222ArkUI_DragEvent* OH_ArkUI_NodeEvent_GetDragEvent(ArkUI_NodeEvent* nodeEvent);
187 223 
188/**224/**
189- * @brief Obtains the interaction state prior to a drop and drop operation.225+ * @brief Obtains the state prior to a drop and drop operation.
190 *226 *
191- * @param nodeEvent Indicates the pointer to an <b>ArkUI_NodeEvent</b> object.227+ * @param nodeEvent Pointer to the target **ArkUI_NodeEvent** object.
192- * @return Returns the interaction state prior to the drop and drop operation.228+ * @return State prior to the drop and drop operation.
193 * @since 12229 * @since 12
194 */230 */
195ArkUI_PreDragStatus OH_ArkUI_NodeEvent_GetPreDragStatus(ArkUI_NodeEvent* nodeEvent);231ArkUI_PreDragStatus OH_ArkUI_NodeEvent_GetPreDragStatus(ArkUI_NodeEvent* nodeEvent);
196 232 
197/**233/**
198- * @brief Sets whether to disable the default drop animation.234+ * @brief Sets whether to disable the default drop animation, which is enabled by default. Use this API to apply a
199- * The default drop animation is enabled by default and can be disabled to apply a custom drop animation.235+ * custom drop animation.
200 *236 *
201- * @param event Indicates the pointer to an <b>ArkUI_DragEvent</b> object.237+ * @param event Pointer to the target **ArkUI_DragEvent** object.
202- * @param disable Indicates whether to disable the default drop animation.238+ * @param disable Whether to disable the default drop animation. The value **true** means to disable the default drop
203- * The value <b>true</b> means to disable the default drop animation, and <b>false</b> means the opposite.239+ * animation, and **false** means the opposite.
204- * @return Returns the result code.240+ * @return Result code.
205- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.241+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
206- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.242+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
207 * @since 12243 * @since 12
208 */244 */
209int32_t OH_ArkUI_DragEvent_DisableDefaultDropAnimation(ArkUI_DragEvent* event, bool disable);245int32_t OH_ArkUI_DragEvent_DisableDefaultDropAnimation(ArkUI_DragEvent* event, bool disable);
@@ -211,11 +247,11 @@ int32_t OH_ArkUI_DragEvent_DisableDefaultDropAnimation(ArkUI_DragEvent* event, b
211/**247/**
212 * @brief Sets the data processing mode.248 * @brief Sets the data processing mode.
213 *249 *
214- * @param event Indicates the pointer to an <b>ArkUI_DragEvent</b> object.250+ * @param event Pointer to the target **ArkUI_DragEvent** object.
215- * @param dropOperation Indicates the data processing mode.251+ * @param dropOperation Type of the suggested drop operation.
216- * @return Returns the result code.252+ * @return Result code.
217- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.253+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
218- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.254+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
219 * @since 12255 * @since 12
220 */256 */
221int32_t OH_ArkUI_DragEvent_SetSuggestedDropOperation(ArkUI_DragEvent* event, ArkUI_DropOperation dropOperation);257int32_t OH_ArkUI_DragEvent_SetSuggestedDropOperation(ArkUI_DragEvent* event, ArkUI_DropOperation dropOperation);
@@ -223,11 +259,11 @@ int32_t OH_ArkUI_DragEvent_SetSuggestedDropOperation(ArkUI_DragEvent* event, Ark
223/**259/**
224 * @brief Sets the result for a drag event.260 * @brief Sets the result for a drag event.
225 *261 *
226- * @param event Indicates the pointer to an <b>ArkUI_DragEvent</b> object.262+ * @param event Pointer to the target **ArkUI_DragEvent** object.
227- * @param result Indicates the drag result.263+ * @param result Drag data processing result.
228- * @return Returns the result code.264+ * @return Result code.
229- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.265+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
230- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.266+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
231 * @since 12267 * @since 12
232 */268 */
233int32_t OH_ArkUI_DragEvent_SetDragResult(ArkUI_DragEvent* event, ArkUI_DragResult result);269int32_t OH_ArkUI_DragEvent_SetDragResult(ArkUI_DragEvent* event, ArkUI_DragResult result);
@@ -235,46 +271,41 @@ int32_t OH_ArkUI_DragEvent_SetDragResult(ArkUI_DragEvent* event, ArkUI_DragResul
235/**271/**
236 * @brief Set drag data for a drag event.272 * @brief Set drag data for a drag event.
237 *273 *
238- * @param event Indicates the pointer to an <b>ArkUI_DragEvent</b> object.274+ * @param event Pointer to the target **ArkUI_DragEvent** object.
239- * @param data Indicates the drag data.275+ * @param data Drag data configuration.
240- * @return Returns the result code.276+ * @return Result code.
241- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.277+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
242- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.278+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
243 * @since 12279 * @since 12
244 */280 */
245int32_t OH_ArkUI_DragEvent_SetData(ArkUI_DragEvent* event, OH_UdmfData* data);281int32_t OH_ArkUI_DragEvent_SetData(ArkUI_DragEvent* event, OH_UdmfData* data);
246 282 
247/**283/**
248-* @brief Use this method to provide a data loading parameter to the system instead of providing284+ * @brief This API provides data loading parameters to the system instead of directly providing a complete data object.
249-* a complete data object directly. When the user drags and drops to the target application,285+ * When the user drops data on the target application, the system will use **dataLoadParams** to request data. This can
250-* the system will use this parameter to request data from you. This can greatly improve the efficiency286+ * significantly improve the efficiency of dragging large volumes of data and the efficiency of processing the dropped
251-* of the dragging operation for large amounts of data and the effectiveness of the drop data handling287+ * data in the target application. This API must always be used in preference to {@link OH_ArkUI_DragEvent_SetData}.
252-* in the target application.288+ * For details about how to create and prepare data loading parameters, see {@link OH_UdmfDataLoadParams_Create} in **
253-*289+ * udmf.h**. If this API conflicts with {@link OH_ArkUI_DragEvent_SetData}, the system always uses the last called API.
254-* This method should be always prioritized over using {@link OH_ArkUI_DragEvent_SetData}.290+ *
255-* See {@link OH_UdmfDataLoadParams_Create} in <b>udmf.h</b> for how to create and prepare the data loading parameter.291+ * @param event Pointer to the target **ArkUI_DragEvent** object.
256-*292+ * @param dataLoadParams Data loading parameters used during a drop operation.
257-* [Note]: Please be awared this method is conflict with {@link OH_ArkUI_DragEvent_SetData}, and the system always use293+ * @return Result code.
258-* the last called method as the final result.294+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
259-*295+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
260-* @param event Indicates the pointer to an <b>ArkUI_DragEvent</b> object.296+ * @since 20
261-* @param dataLoadParams Indicates the data loading parameters which will be used when dropping.297+ */
262-* @return Returns the result code.
263-* Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
264-* Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
265-* @since 20
266-*/
267ArkUI_ErrorCode OH_ArkUI_DragEvent_SetDataLoadParams(ArkUI_DragEvent* event, OH_UdmfDataLoadParams* dataLoadParams);298ArkUI_ErrorCode OH_ArkUI_DragEvent_SetDataLoadParams(ArkUI_DragEvent* event, OH_UdmfDataLoadParams* dataLoadParams);
268 299 
269/**300/**
270 * @brief Obtains the default drag data from a drag event.301 * @brief Obtains the default drag data from a drag event.
271 *302 *
272- * @param event Indicates the pointer to an <b>ArkUI_DragEvent</b> object.303+ * @param event Pointer to the target **ArkUI_DragEvent** object.
273- * @param data Indicates the pointer to an <b>OH_UdmfData</b> object. The application needs to create a pointer304+ * @param data Pointer to an **OH_UdmfData** object. The application needs to create a pointer for receiving data by
274- * for receiving data by using the {@link OH_UdmfData_Create} method.305+ * using the {@link OH_UdmfData_Create} API.
275- * @return Returns the result code.306+ * @return Result code.
276- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.307+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
277- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.308+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
278 * @since 12309 * @since 12
279 */310 */
280int32_t OH_ArkUI_DragEvent_GetUdmfData(ArkUI_DragEvent* event, OH_UdmfData *data);311int32_t OH_ArkUI_DragEvent_GetUdmfData(ArkUI_DragEvent* event, OH_UdmfData *data);
@@ -282,11 +313,11 @@ int32_t OH_ArkUI_DragEvent_GetUdmfData(ArkUI_DragEvent* event, OH_UdmfData *data
282/**313/**
283 * @brief Obtains the number of drag data types from a drag event.314 * @brief Obtains the number of drag data types from a drag event.
284 *315 *
285- * @param event Indicates the pointer to an <b>ArkUI_DragEvent</b> object.316+ * @param event Pointer to the target **ArkUI_DragEvent** object.
286- * @param count Indicates the number of drag data types returned.317+ * @param count Number of drag data types returned.
287- * @return Returns the result code.318+ * @return Result code.
288- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.319+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
289- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.320+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
290 * @since 12321 * @since 12
291 */322 */
292int32_t OH_ArkUI_DragEvent_GetDataTypeCount(ArkUI_DragEvent* event, int32_t* count);323int32_t OH_ArkUI_DragEvent_GetDataTypeCount(ArkUI_DragEvent* event, int32_t* count);
@@ -309,46 +340,44 @@ int32_t OH_ArkUI_DragEvent_GetDataTypes(
309 ArkUI_DragEvent *event, char *eventTypeArray[], int32_t length, int32_t maxStrLen);340 ArkUI_DragEvent *event, char *eventTypeArray[], int32_t length, int32_t maxStrLen);
310 341 
311/**342/**
312- * @brief Obtains the drag result from a drag event.343+ * @brief Obtains the drag and drop result from the drag event.
313 *344 *
314- * @param event Indicates the pointer to an <b>ArkUI_DragEvent</b> object.345+ * @param event Pointer to the target **ArkUI_DragEvent** object.
315- * @param result Indicates the drag result returned.346+ * @param result Drag result returned.
316- * @return Returns the result code.347+ * @return Result code.
317- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.348+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
318- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.349+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
319 * @since 12350 * @since 12
320 */351 */
321int32_t OH_ArkUI_DragEvent_GetDragResult(ArkUI_DragEvent* event, ArkUI_DragResult* result);352int32_t OH_ArkUI_DragEvent_GetDragResult(ArkUI_DragEvent* event, ArkUI_DragResult* result);
322 353 
323/**354/**
324- * @brief Obtains the drop operation from a drag event.355+ * @brief Obtains the data handling method from the drag event.
325 *356 *
326- * @param event Indicates the pointer to an <b>ArkUI_DragEvent</b> object.357+ * @param event Pointer to the target **ArkUI_DragEvent** object.
327- * @param operation Indicates the drop operation which the data receiver set.358+ * @param operation Data handling method.
328- * @return Returns the result code.359+ * @return Result code.
329- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.360+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
330- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.361+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
331- * Possible causes: 1. The given parameters are null or the given event is not a valid DragEvent.362+ * <br>Possible causes: 1. Parameters are null or the event is not a valid DragEvent.
332 * @since 12363 * @since 12
333 */364 */
334int32_t OH_ArkUI_DragEvent_GetDropOperation(ArkUI_DragEvent* event, ArkUI_DropOperation* operation);365int32_t OH_ArkUI_DragEvent_GetDropOperation(ArkUI_DragEvent* event, ArkUI_DropOperation* operation);
335 366 
336/**367/**
337- * @brief Obtains the X coordinate of the touch point for a drag preview from a drag event.368+ * @brief Obtains the x-coordinate of the touch point for a drag preview from a drag event.
338 *369 *
339- * @param event Indicates the pointer to an <b>ArkUI_DragEvent</b> object.370+ * @param event Pointer to the target **ArkUI_DragEvent** object.
340- * @return Returns the X coordinate of the touch point, in px.371+ * @return X-coordinate of the touch point, in px, or the default value **0** if the input parameter is invalid.
341- * Returns the default value <b>0</b> if the input parameter is invalid.
342 * @since 12372 * @since 12
343 */373 */
344float OH_ArkUI_DragEvent_GetPreviewTouchPointX(ArkUI_DragEvent* event);374float OH_ArkUI_DragEvent_GetPreviewTouchPointX(ArkUI_DragEvent* event);
345 375 
346/**376/**
347- * @brief Obtains the Y coordinate of the touch point for a drag preview from a drag event.377+ * @brief Obtains the y-coordinate of the touch point on the preview image from a drag event.
348 *378 *
349- * @param event Indicates the pointer to an <b>ArkUI_DragEvent</b> object.379+ * @param event Pointer to the target **ArkUI_DragEvent** object.
350- * @return Returns the Y coordinate of the touch point, in px.380+ * @return Y-coordinate of the touch point, in px, or the default value **0** if the input parameter is invalid.
351- * Returns the default value <b>0</b> if the input parameter is invalid.
352 * @since 12381 * @since 12
353 */382 */
354float OH_ArkUI_DragEvent_GetPreviewTouchPointY(ArkUI_DragEvent* event);383float OH_ArkUI_DragEvent_GetPreviewTouchPointY(ArkUI_DragEvent* event);
@@ -356,9 +385,8 @@ float OH_ArkUI_DragEvent_GetPreviewTouchPointY(ArkUI_DragEvent* event);
356/**385/**
357 * @brief Obtains the width of a drag preview from a drag event.386 * @brief Obtains the width of a drag preview from a drag event.
358 *387 *
359- * @param event Indicates the pointer to an <b>ArkUI_DragEvent</b> object.388+ * @param event Pointer to the target **ArkUI_DragEvent** object.
360- * @return Returns the width of the drag preview, in px.389+ * @return Width of the drag preview, in px, or the default value **0** if the input parameter is invalid.
361- * Returns the default value <b>0</b> if the input parameter is invalid.
362 * @since 12390 * @since 12
363 */391 */
364float OH_ArkUI_DragEvent_GetPreviewRectWidth(ArkUI_DragEvent* event);392float OH_ArkUI_DragEvent_GetPreviewRectWidth(ArkUI_DragEvent* event);
@@ -366,69 +394,70 @@ float OH_ArkUI_DragEvent_GetPreviewRectWidth(ArkUI_DragEvent* event);
366/**394/**
367 * @brief Obtains the height of a drag preview from a drag event.395 * @brief Obtains the height of a drag preview from a drag event.
368 *396 *
369- * @param event Indicates the pointer to an <b>ArkUI_DragEvent</b> object.397+ * @param event Pointer to the target **ArkUI_DragEvent** object.
370- * @return Returns the height of the drag preview, in px.398+ * @return Height of the drag preview, in px, or the default value **0** if the input parameter is invalid.
371- * Returns the default value <b>0</b> if the input parameter is invalid.
372 * @since 12399 * @since 12
373 */400 */
374float OH_ArkUI_DragEvent_GetPreviewRectHeight(ArkUI_DragEvent* event);401float OH_ArkUI_DragEvent_GetPreviewRectHeight(ArkUI_DragEvent* event);
375 402 
376/**403/**
377- * @brief Obtains the X coordinate of the touch point relative to the window from a drag event.404+ * @brief Obtains the x-coordinate of the touch point relative to the window from a drag event.
378 *405 *
379- * @param event Indicates the pointer to an <b>ArkUI_DragEvent</b> object.406+ * @param event Pointer to the target **ArkUI_DragEvent** object.
380- * @return Returns the X coordinate of the touch point relative to the window, in px.407+ * @return X-coordinate of the touch point relative to the window, in px, or the default value **0** if the input
381- * Returns the default value <b>0</b> if the input parameter is invalid.408+ * parameter is invalid.
382 * @since 12409 * @since 12
383 */410 */
384float OH_ArkUI_DragEvent_GetTouchPointXToWindow(ArkUI_DragEvent* event);411float OH_ArkUI_DragEvent_GetTouchPointXToWindow(ArkUI_DragEvent* event);
385 412 
386/**413/**
387- * @brief Obtains the Y coordinate of the touch point relative to the window from a drag event.414+ * @brief Obtains the y-coordinate of the touch point relative to the window from a drag event.
388 *415 *
389- * @param event Indicates the pointer to an <b>ArkUI_DragEvent</b> object.416+ * @param event Pointer to the target **ArkUI_DragEvent** object.
390- * @return Returns the Y coordinate of the touch point relative to the window, in px.417+ * @return Y-coordinate of the touch point relative to the window, in px, or the default value **0** if the input
391- * Returns the default value <b>0</b> if the input parameter is invalid.418+ * parameter is invalid.
392 * @since 12419 * @since 12
393 */420 */
394float OH_ArkUI_DragEvent_GetTouchPointYToWindow(ArkUI_DragEvent* event);421float OH_ArkUI_DragEvent_GetTouchPointYToWindow(ArkUI_DragEvent* event);
395 422 
396/**423/**
397- * @brief Obtains the X coordinate of the touch point relative to the current display from a drag event.424+ * @brief Obtains the x-coordinate of the touch point relative to the display from a drag event.
398 *425 *
399- * @param event Indicates the pointer to an <b>ArkUI_DragEvent</b> object.426+ * @param event Pointer to the target **ArkUI_DragEvent** object.
400- * @return Returns the X coordinate of the touch point relative to the current display, in px.427+ * @return X-coordinate of the touch point relative to the display, in px, or the default value **0** if the input
401- * Returns the default value <b>0</b> if the input parameter is invalid.428+ * parameter is invalid.
402 * @since 12429 * @since 12
403 */430 */
404float OH_ArkUI_DragEvent_GetTouchPointXToDisplay(ArkUI_DragEvent* event);431float OH_ArkUI_DragEvent_GetTouchPointXToDisplay(ArkUI_DragEvent* event);
405 432 
406/**433/**
407- * @brief Obtains the Y coordinate of the touch point relative to the current display from a drag event.434+ * @brief Obtains the y-coordinate of the touch point relative to the display from a drag event.
408 *435 *
409- * @param event Indicates the pointer to an <b>ArkUI_DragEvent</b> object.436+ * @param event Pointer to the target **ArkUI_DragEvent** object.
410- * @return Returns the Y coordinate of the touch point relative to the current display, in px.437+ * @return Y-coordinate of the touch point relative to the display, in px, or the default value **0** if the input
411- * Returns the default value <b>0</b> if the input parameter is invalid.438+ * parameter is invalid.
412 * @since 12439 * @since 12
413 */440 */
414float OH_ArkUI_DragEvent_GetTouchPointYToDisplay(ArkUI_DragEvent* event);441float OH_ArkUI_DragEvent_GetTouchPointYToDisplay(ArkUI_DragEvent* event);
415 442 
416/**443/**
417- * @brief Obtains the global display X coordinate of the touch point from an <b>ArkUI_DragEvent</b> object.444+ * @brief Obtains the x-coordinate of the drag touch point relative to the global display from the specified **
445+ * ArkUI_DragEvent** object.
418 *446 *
419- * @param event Pointer to an <b>ArkUI_DragEvent</b> object.447+ * @param event Pointer to the target **ArkUI_DragEvent** object.
420- * @return float Global display X coordinate of the touch point, in px.448+ * @return X-coordinate of the touch point relative to the global display, in px, or the default value **0** if the
421- * If the input parameter is invalid, the default value <b>0</b> is returned.449+ * input parameter is invalid.
422 * @since 20450 * @since 20
423 */451 */
424float OH_ArkUI_DragEvent_GetTouchPointXToGlobalDisplay(ArkUI_DragEvent* event);452float OH_ArkUI_DragEvent_GetTouchPointXToGlobalDisplay(ArkUI_DragEvent* event);
425 453 
426/**454/**
427- * @brief Obtains the global display Y coordinate of the touch point from an <b>ArkUI_DragEvent</b> object.455+ * @brief Obtains the y-coordinate of the drag touch point relative to the global display from the specified **
456+ * ArkUI_DragEvent** object.
428 *457 *
429- * @param event Pointer to an <b>ArkUI_DragEvent</b> object.458+ * @param event Pointer to the target **ArkUI_DragEvent** object.
430- * @return float Global display Y coordinate of the touch point, in px.459+ * @return Y-coordinate of the touch point relative to the global display, in px, or the default value **0** if the
431- * If the input parameter is invalid, the default value <b>0</b> is returned.460+ * input parameter is invalid.
432 * @since 20461 * @since 20
433 */462 */
434float OH_ArkUI_DragEvent_GetTouchPointYToGlobalDisplay(ArkUI_DragEvent* event);463float OH_ArkUI_DragEvent_GetTouchPointYToGlobalDisplay(ArkUI_DragEvent* event);
@@ -436,9 +465,8 @@ float OH_ArkUI_DragEvent_GetTouchPointYToGlobalDisplay(ArkUI_DragEvent* event);
436/**465/**
437 * @brief Obtains the dragging velocity along the x-axis.466 * @brief Obtains the dragging velocity along the x-axis.
438 *467 *
439- * @param event Indicates the pointer to an <b>ArkUI_DragEvent</b> object.468+ * @param event Pointer to the target **ArkUI_DragEvent** object.
440- * @return Returns the dragging velocity along the x-axis, in px.469+ * @return Dragging velocity along the x-axis, in px/s, or the default value **0** if the input parameter is invalid.
441- * Returns the default value <b>0</b> if the input parameter is invalid.
442 * @since 12470 * @since 12
443 */471 */
444float OH_ArkUI_DragEvent_GetVelocityX(ArkUI_DragEvent* event);472float OH_ArkUI_DragEvent_GetVelocityX(ArkUI_DragEvent* event);
@@ -446,9 +474,8 @@ float OH_ArkUI_DragEvent_GetVelocityX(ArkUI_DragEvent* event);
446/**474/**
447 * @brief Obtains the dragging velocity along the y-axis.475 * @brief Obtains the dragging velocity along the y-axis.
448 *476 *
449- * @param event Indicates the pointer to an <b>ArkUI_DragEvent</b> object.477+ * @param event Pointer to the target **ArkUI_DragEvent** object.
450- * @return Returns the dragging velocity along the y-axis, in px.478+ * @return Dragging velocity along the y-axis, in px/s, or the default value **0** if the input parameter is invalid.
451- * Returns the default value <b>0</b> if the input parameter is invalid.
452 * @since 12479 * @since 12
453 */480 */
454float OH_ArkUI_DragEvent_GetVelocityY(ArkUI_DragEvent* event);481float OH_ArkUI_DragEvent_GetVelocityY(ArkUI_DragEvent* event);
@@ -456,165 +483,193 @@ float OH_ArkUI_DragEvent_GetVelocityY(ArkUI_DragEvent* event);
456/**483/**
457 * @brief Obtains the dragging velocity along the main axis.484 * @brief Obtains the dragging velocity along the main axis.
458 *485 *
459- * @param event Indicates the pointer to an <b>ArkUI_DragEvent</b> object.486+ * @param event Pointer to the target **ArkUI_DragEvent** object.
460- * @return Returns the dragging velocity along the main axis, in px.487+ * @return Dragging velocity along the main axis, in px/s, or the default value **0** if the input parameter is invalid.
461- * Returns the default value <b>0</b> if the input parameter is invalid.
462 * @since 12488 * @since 12
463 */489 */
464float OH_ArkUI_DragEvent_GetVelocity(ArkUI_DragEvent* event);490float OH_ArkUI_DragEvent_GetVelocity(ArkUI_DragEvent* event);
465 491 
466/**492/**
467- * @brief Obtains the pressed status of modifier keys from a drag event.493+ * @brief Obtains the pressed status of modifier keys.
468 *494 *
469- * @param event Indicates the pointer to an <b>ArkUI_DragEvent</b> object.495+ * @param event Pointer to the target **ArkUI_DragEvent** object.
470- * @param keys {@link ArkUI_ModifierKeyName} Indicates the returned combination of modifier keys that are496+ * @param keys Pointer to the combination of pressed modifier keys (Ctrl, Shift, and Alt). The application can use
471- * currently pressed. The application can determine the pressed modifier keys through bitwise operations.497+ * bitwise operations to determine which keys are pressed.
472- * @return Returns the result code.498+ * @return Result code.
473- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.499+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
474- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.500+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
475 * @since 12501 * @since 12
476 */502 */
477int32_t OH_ArkUI_DragEvent_GetModifierKeyStates(ArkUI_DragEvent* event, uint64_t* keys);503int32_t OH_ArkUI_DragEvent_GetModifierKeyStates(ArkUI_DragEvent* event, uint64_t* keys);
478 504 
479/**505/**
480- * @brief Obtains the display ID of the screen for the specified drag event.506+ * @brief Obtains the ID of the screen where this drag event occurs. This API is not supported when **eventType** is **
507+ * NODE_ON_DRAG_END**.
481 *508 *
482- * @param event Pointer to an <b>ArkUI_DragEvent</b> object.509+ * @param event Pointer to the target **ArkUI_DragEvent** object.
483- * @param displayId Display ID of the event occurs in.510+ * @param displayId ID of the screen where the current drag event occurs.
484- * @return Returns the result code.511+ * @return Result code.
485- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.512+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
486- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.513+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
487 * @since 20514 * @since 20
488 */515 */
489ArkUI_ErrorCode OH_ArkUI_DragEvent_GetDisplayId(ArkUI_DragEvent* event, int32_t* displayId);516ArkUI_ErrorCode OH_ArkUI_DragEvent_GetDisplayId(ArkUI_DragEvent* event, int32_t* displayId);
490 517 
491/**518/**
492- * @brief Request to start the data sync process with the sync option.519+ * @brief Obtains the bundle name of the drag source application. The caller must provide a character array with a
520+ * minimum length of 128 characters to store the bundle name.
493 *521 *
494- * @param event Indicates the pointer to an <b>ArkUI_DragEvent</b> object.522+ * @param event Pointer to the target **ArkUI_DragEvent** object.
495- * @param options Indicates the pointer to an <b>OH_UdmfGetDataParams</b> object.523+ * @param bundleName Character array to store the bundle name string, with a length of at least 128 characters.
496- * @param key Represents return value after set data to database successfully, it should be not524+ * @param length Length of the character array to store the bundle name string. The minimum length is 128 characters.
497- * less than {@link UDMF_KEY_BUFFER_LEN}.525+ * @return Result code.
498- * @param keyLen Represents the length of key string.526+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
499- * @return Returns the result code.527+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
500- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.528+ * @since 20
501- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.529+ */
530+ArkUI_ErrorCode OH_ArkUI_DragEvent_GetDragSource(ArkUI_DragEvent* event, char *bundleName, int32_t length);
531+ 
532+/**
533+ * @brief Checks whether the current drag operation is a cross-device drag.
534+ *
535+ * @param event Pointer to the target **ArkUI_DragEvent** object.
536+ * @param isRemote Pointer to a boolean variable to store the result. The value **true** means that the current drag
537+ * operation is a cross-device drag, and **false** means the opposite.
538+ * @return Result code.
539+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
540+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
541+ * @since 20
542+ */
543+ArkUI_ErrorCode OH_ArkUI_DragEvent_IsRemote(ArkUI_DragEvent* event, bool* isRemote);
544+ 
545+/**
546+ * @brief Starts data synchronization using the specified synchronization parameters.
547+ *
548+ * @param event Pointer to the target **ArkUI_DragEvent** object.
549+ * @param options Pointer to the **OH_UdmfGetDataParams** object.
550+ * @param key Key value returned after successful data setting. The length of the string must be no less than
551+ * {@link UDMF_KEY_BUFFER_LEN}.
552+ * @param keyLen Length of the **key** string.
553+ * @return Result code.
554+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
555+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
502 * @since 15556 * @since 15
503 */557 */
504int32_t OH_ArkUI_DragEvent_StartDataLoading(558int32_t OH_ArkUI_DragEvent_StartDataLoading(
505 ArkUI_DragEvent* event, OH_UdmfGetDataParams* options, char* key, unsigned int keyLen);559 ArkUI_DragEvent* event, OH_UdmfGetDataParams* options, char* key, unsigned int keyLen);
506 560 
507/**561/**
508- * @brief Cancel the data sync process.562+ * @brief Cancels the ongoing data synchronization.
509 *563 *
510- * @param uiContext Indicates the pointer to a UI instance.564+ * @param uiContext Pointer to the UI instance.
511- * @param key Represents the data key returned by {@link OH_ArkUI_DragEvent_StartDataLoading}.565+ * @param key Data key value, which is returned via {@link OH_ArkUI_DragEvent_StartDataLoading}.
512- * @return Returns the result code.566+ * @return Result code.
513- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.567+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
514- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.568+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
515 * @since 15569 * @since 15
516 */570 */
517int32_t OH_ArkUI_CancelDataLoading(ArkUI_ContextHandle uiContext, const char* key);571int32_t OH_ArkUI_CancelDataLoading(ArkUI_ContextHandle uiContext, const char* key);
518 572 
519/**573/**
520- * @brief Sets whether to disable data prefetch process before the onDrop callback executing.574+ * @brief Sets whether to disable the data prefetch process before executing {@link NODE_ON_DROP}. The system will
521- * The system will retry to getting data until the max time limit (2.4s for now) reaches,575+ * retry data fetching until the maximum time limit (currently 2.4 seconds) is reached, which is useful for cross-
522- * this's useful for the cross device draging operation, as the system helps to eliminate576+ * device drag and drop operations as it helps stabilize system communication. However, this feature is redundant for
523- * the communication instability, but it's redundant for {@link OH_ArkUI_DragEvent_StartDataLoading}577+ * the {@link OH_ArkUI_DragEvent_StartDataLoading} API. Since this API uses an asynchronous mechanism to fetch data,
524- * method, as it will take care the data fetching with asynchronous mechanism, so must set this578+ * when {@link OH_ArkUI_DragEvent_StartDataLoading} is used in **NODE_ON_DROP**, this field must be set to **true** to
525- * field to true if using {@link OH_ArkUI_DragEvent_StartDataLoading} in onDrop to avoid the data is579+ * prevent accidental data fetching before **NODE_ON_DROP** is executed.
526- * fetched before onDrop executing unexpectedly.
527 *580 *
528- * @param node Indicates the pointer to a component node.581+ * @param node Pointer to the component node.
529- * @param disabled Indicates whether to disable the data pre-fetch process, true for disable, false for not.582+ * @param disabled Whether to disable the data prefetching process. The value **true** means to disable the data
530- * @return Returns the result code.583+ * prefetching process, and **false** means the opposite.
531- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.584+ * @return Result code.
532- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.585+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
586+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
533 * @since 15587 * @since 15
534 */588 */
535int32_t OH_ArkUI_DisableDropDataPrefetchOnNode(ArkUI_NodeHandle node, bool disabled);589int32_t OH_ArkUI_DisableDropDataPrefetchOnNode(ArkUI_NodeHandle node, bool disabled);
536 590 
537/**591/**
538- * @brief Sets whether to enable strict reporting on drag events.592+ * @brief Sets whether to enable strict reporting on drag events. This feature is disabled by default, and you are
539- * This feature is disabled by default, and you are advised to enable it.593+ * advised to enable it. If this feature is disabled, the parent component is not notified when an item in it is
540- * If this feature is disabled, the parent component is not notified when an item in it is dragged over its child594+ * dragged over its child component. If this feature is enabled, the component is notified of the dragged item's
541- * component. If this feature is enabled, the component is notified of the dragged item's leaving, and the chil595+ * leaving, and the child component to which the dragged item is dropped is notified of the item's entering. This
542- * component to which the dragged item is dropped is notified of the item's entering. This configuration is596+ * configuration is related to a specific UI instance. You can pass in a specific component node on the current UI
543- * related to a specific UI instance. You can pass in a specific component node on the current UI instance597+ * instance for association.
544- * for association.
545 *598 *
546- * @param node Indicates the pointer to a component node.599+ * @param node Pointer to the component node.
547- * @param enabled Indicates whether to enable strict reporting on drag events.600+ * @param enabled Whether to enable strict reporting on drag events. The value **true** means to enable strict
548- * @return Returns the result code.601+ * reporting on drag events, and **false** means the opposite.
549- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.602+ * @return Result code.
550- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.603+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
604+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
551 * @since 12605 * @since 12
552 */606 */
553int32_t OH_ArkUI_SetDragEventStrictReportWithNode(ArkUI_NodeHandle node, bool enabled);607int32_t OH_ArkUI_SetDragEventStrictReportWithNode(ArkUI_NodeHandle node, bool enabled);
554 608 
555/**609/**
556- * @brief Sets whether to enable strict reporting on drag events.610+ * @brief Sets whether to enable strict reporting on drag events. This feature is disabled by default, and you are
557- * This feature is disabled by default, and you are advised to enable it.611+ * advised to enable it. If this feature is disabled, the parent component is not notified when an item in it is
558- * If this feature is disabled, the parent component is not notified when an item in it is dragged over its child612+ * dragged over its child component. If this feature is enabled, the component is notified of the dragged item's
559- * component. If this feature is enabled, the component is notified of the dragged item's leaving, and the child613+ * leaving, and the child component to which the dragged item is dropped is notified of the item's entering. This
560- * component to which the dragged item is dropped is notified of the item's entering. This configuration is614+ * configuration is related to a specific UI instance. You can pass in a specific UI instance for association.
561- * related to a specific UI instance. You can pass in a specific UI instance for association.
562 *615 *
563- * @param uiContext Indicates the pointer to a UI instance.616+ * @param uiContext Pointer to the UI instance.
564- * @param enabled Indicates whether to enable strict reporting on drag events.617+ * @param enabled Whether to enable strict reporting on drag events. The value **true** means to enable strict
565- * @return Returns the result code.618+ * reporting on drag events, and **false** means the opposite.
566- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.619+ * @return Result code.
567- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.620+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
621+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
568 * @since 12622 * @since 12
569 */623 */
570int32_t OH_ArkUI_SetDragEventStrictReportWithContext(ArkUI_ContextHandle uiContext, bool enabled);624int32_t OH_ArkUI_SetDragEventStrictReportWithContext(ArkUI_ContextHandle uiContext, bool enabled);
571 625 
572/**626/**
573- * @brief Sets the types of data that can be dropped to the specified component. This API resets the settings configured627+ * @brief Sets the types of data that can be dropped to the specified component. This API resets the settings
574- * through {@link OH_ArkUI_DisallowNodeAnyDropDataTypes} and {@link OH_ArkUI_AllowNodeAllDropDataTypes}.628+ * configured through {@link OH_ArkUI_DisallowNodeAnyDropDataTypes} or {@link OH_ArkUI_AllowNodeAllDropDataTypes}.
575 *629 *
576- * @param node Indicates the pointer to a component node.630+ * @param node Pointer to the component node.
577 * @param typesArray Indicates the array of types of data that can be dropped.631 * @param typesArray Indicates the array of types of data that can be dropped.
578- * @param count Indicates length of an array.632+ * @param count Length of the array.
579- * @return Returns the result code.633+ * @return Result code.
580- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.634+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
581- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.635+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
582 * @since 12636 * @since 12
583 */637 */
584int32_t OH_ArkUI_SetNodeAllowedDropDataTypes(ArkUI_NodeHandle node, const char* typesArray[], int32_t count);638int32_t OH_ArkUI_SetNodeAllowedDropDataTypes(ArkUI_NodeHandle node, const char* typesArray[], int32_t count);
585 639 
586/**640/**
587- * @brief Configures the specified component to disallow any data types. This API resets the settings configured through641+ * @brief Configures the specified component to disallow any data types. This API resets the settings configured
588- * {@link OH_ArkUI_SetNodeAllowedDropDataTypes}.642+ * through {@link OH_ArkUI_SetNodeAllowedDropDataTypes}.
589 *643 *
590- * @param node Indicates the pointer to a component node.644+ * @param node Pointer to the component node.
591- * @return Returns the result code.645+ * @return Result code.
592- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.646+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
593- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.647+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
594 * @since 12648 * @since 12
595 */649 */
596int32_t OH_ArkUI_DisallowNodeAnyDropDataTypes(ArkUI_NodeHandle node);650int32_t OH_ArkUI_DisallowNodeAnyDropDataTypes(ArkUI_NodeHandle node);
597 651 
598/**652/**
599 * @brief Configures the specified component to allow any data types. This API resets the settings configured through653 * @brief Configures the specified component to allow any data types. This API resets the settings configured through
600- * {@link OH_ArkUI_SetNodeAllowedDropDataTypes}.654+ * {@link OH_ArkUI_SetNodeAllowedDropDataTypes}.
601 *655 *
602- * @param node Indicates the pointer to a component node.656+ * @param node Pointer to the component node.
603- * @return Returns the result code.657+ * @return Result code.
604- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.658+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
605- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.659+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
606 * @since 12660 * @since 12
607 */661 */
608int32_t OH_ArkUI_AllowNodeAllDropDataTypes(ArkUI_NodeHandle node);662int32_t OH_ArkUI_AllowNodeAllDropDataTypes(ArkUI_NodeHandle node);
609 663 
610/**664/**
611- * @brief Sets whether the specified component is draggable.665+ * @brief Sets whether the component is draggable.
612 *666 *
613- * @param node Indicates the pointer to a component node.667+ * @param node Pointer to the component node.
614- * @param enabled Indicates whether the component is draggable.668+ * @param enabled Whether the component is draggable. The value **true** means that the component is draggable, and **
615- * @return Returns the result code.669+ * false** means the opposite.
616- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.670+ * @return Result code.
617- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.671+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
672+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
618 * @since 12673 * @since 12
619 */674 */
620int32_t OH_ArkUI_SetNodeDraggable(ArkUI_NodeHandle node, bool enabled);675int32_t OH_ArkUI_SetNodeDraggable(ArkUI_NodeHandle node, bool enabled);
@@ -622,125 +677,129 @@ int32_t OH_ArkUI_SetNodeDraggable(ArkUI_NodeHandle node, bool enabled);
622/**677/**
623 * @brief Sets a custom drag preview for the specified component.678 * @brief Sets a custom drag preview for the specified component.
624 *679 *
625- * @param node Indicates the pointer to a component node.680+ * @param node Pointer to the component node.
626- * @param preview Indicates the custom drag preview, which is a pixel map.681+ * @param preview Custom drag preview, which is a pixel map.
627- * @return Returns the result code.682+ * @return Result code.
628- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.683+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
629- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.684+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
630 * @since 12685 * @since 12
631 */686 */
632int32_t OH_ArkUI_SetNodeDragPreview(ArkUI_NodeHandle node, OH_PixelmapNative* preview);687int32_t OH_ArkUI_SetNodeDragPreview(ArkUI_NodeHandle node, OH_PixelmapNative* preview);
633 688 
634/**689/**
635- * @brief Creates an <b>ArkUI_DragPreviewOption</b> object.690+ * @brief Creates an **ArkUI_DragPreviewOption** object.
636 *691 *
637- * @return Returns the created <b>ArkUI_DragPreviewOption</b> object.692+ * @return **ArkUI_DragPreviewOption** object.
638 * @since 12693 * @since 12
639 */694 */
640ArkUI_DragPreviewOption* OH_ArkUI_CreateDragPreviewOption(void);695ArkUI_DragPreviewOption* OH_ArkUI_CreateDragPreviewOption(void);
641 696 
642/**697/**
643- * @brief Disposes of a <b>ArkUI_DragPreviewOption</b> object.698+ * @brief Disposes of an **ArkUI_DragPreviewOption** object.
644 *699 *
645- * @param option Indicates the pointer to an <b>ArkUI_DragPreviewOption</b> object.700+ * @param option Custom parameters.
646 * @since 12701 * @since 12
647 */702 */
648void OH_ArkUI_DragPreviewOption_Dispose(ArkUI_DragPreviewOption* option);703void OH_ArkUI_DragPreviewOption_Dispose(ArkUI_DragPreviewOption* option);
649 704 
650/**705/**
651- * @brief Sets the scale mode for an <b>ArkUI_DragPreviewOption</b> object.706+ * @brief Sets the scale mode for an **ArkUI_DragPreviewOption** object.
652 *707 *
653- * @param option Indicates the pointer to an <b>ArkUI_DragPreviewOption</b> object.708+ * @param option Custom parameters.
654- * @param scaleMode Indicates the scale mode.709+ * @param scaleMode Scale mode to set.
655- * @return Returns the result code.710+ * @return Result code.
656- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.711+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
657- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.712+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
658 * @since 12713 * @since 12
659 */714 */
660int32_t OH_ArkUI_DragPreviewOption_SetScaleMode(ArkUI_DragPreviewOption* option, ArkUI_DragPreviewScaleMode scaleMode);715int32_t OH_ArkUI_DragPreviewOption_SetScaleMode(ArkUI_DragPreviewOption* option, ArkUI_DragPreviewScaleMode scaleMode);
661 716 
662/**717/**
663- * @brief Sets whether to enable the shadow effect for an <b>ArkUI_DragPreviewOption</b> object.718+ * @brief Sets whether to enable the default shadow effect for an **ArkUI_DragPreviewOption** object. The effect is
664- * The shadow effect is enabled by default.719+ * disabled by default.
665 *720 *
666- * @param option Indicates the pointer to an <b>ArkUI_DragPreviewOption</b> object.721+ * @param option Custom parameters.
667- * @param enabled Indicates whether to enable the shadow effect.722+ * @param enabled Whether to enable the default shadow effect. The value **true** means to enable the default shadow
668- * @return Returns the result code.723+ * effect, and **false** means the opposite.
669- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.724+ * @return Result code.
670- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.725+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
726+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
671 * @since 12727 * @since 12
672 */728 */
673int32_t OH_ArkUI_DragPreviewOption_SetDefaultShadowEnabled(ArkUI_DragPreviewOption* option, bool enabled);729int32_t OH_ArkUI_DragPreviewOption_SetDefaultShadowEnabled(ArkUI_DragPreviewOption* option, bool enabled);
674 730 
675/**731/**
676- * @brief Sets whether to enable the rounded corner effect for an <b>ArkUI_DragPreviewOption</b> object.732+ * @brief Sets whether to enable the default rounded corner effect for an **ArkUI_DragPreviewOption** object. The
677- * The rounded corner effect is enabled by default.733+ * rounded corner radius is 12.0 vp by default. The effect is disabled by default.
678 *734 *
679- * @param option Indicates the pointer to an <b>ArkUI_DragPreviewOption</b> object.735+ * @param option Custom parameters.
680- * @param enabled Indicates whether to enable the rounded corner effect.736+ * @param enabled Whether to enable the default corner radius effect. The value **true** means to enable the default
681- * @return Returns the result code.737+ * corner radius effect, and **false** means the opposite.
682- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.738+ * @return Result code.
683- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.739+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
740+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
684 * @since 12741 * @since 12
685 */742 */
686int32_t OH_ArkUI_DragPreviewOption_SetDefaultRadiusEnabled(ArkUI_DragPreviewOption* option, bool enabled);743int32_t OH_ArkUI_DragPreviewOption_SetDefaultRadiusEnabled(ArkUI_DragPreviewOption* option, bool enabled);
687 744 
688/**745/**
689- * @brief Sets whether to enable the badge for an <b>ArkUI_DragPreviewOption</b> object.746+ * @brief Sets whether to enable the badge for an **ArkUI_DragPreviewOption** object. If this feature is enabled, a
690- * If this feature is enabled, a badge that contains the number of dragged items is displayed.747+ * badge that contains the number of dragged items is displayed.
691 *748 *
692- * @param option Indicates the pointer to an <b>ArkUI_DragPreviewOption</b> object.749+ * @param option Custom parameters.
693- * @param enabled Indicates whether to enable badge.750+ * @param enabled Whether to enable the badge. The value **true** means to enable the badge, and **false** means the
694- * @return Returns the result code.751+ * opposite.
695- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.752+ * @return Result code.
696- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.753+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
754+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
697 * @since 12755 * @since 12
698 */756 */
699int32_t OH_ArkUI_DragPreviewOption_SetNumberBadgeEnabled(ArkUI_DragPreviewOption* option, bool enabled);757int32_t OH_ArkUI_DragPreviewOption_SetNumberBadgeEnabled(ArkUI_DragPreviewOption* option, bool enabled);
700 758 
701/**759/**
702- * @brief Sets the count on the badge.760+ * @brief Sets the count on the badge. The settings will overwrite the value in
703- * The settings will overwrite the value in the <b>SetDragPreviewNumberBadgeEnabled</b> API.761+ * {@link OH_ArkUI_DragPreviewOption_SetNumberBadgeEnabled}.
704 *762 *
705- * @param option Indicates the pointer to an <b>ArkUI_DragPreviewOption</b> object.763+ * @param option Custom parameters.
706- * @param forcedNumber Indicates the count on the badge.764+ * @param forcedNumber Number of badges.
707- * @return Returns the result code.765+ * @return Result code.
708- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.766+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
709- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.767+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
710 * @since 12768 * @since 12
711 */769 */
712int32_t OH_ArkUI_DragPreviewOption_SetBadgeNumber(ArkUI_DragPreviewOption* option, uint32_t forcedNumber);770int32_t OH_ArkUI_DragPreviewOption_SetBadgeNumber(ArkUI_DragPreviewOption* option, uint32_t forcedNumber);
713 771 
714/**772/**
715- * @brief Sets whether to enable the default animation on a click or touch, it's not used in drag action.773+ * @brief Sets whether to enable the default animation on a click or touch.
716 *774 *
717- * @param option Indicates the pointer to an <b>ArkUI_DragPreviewOption</b> object.775+ * @param option Custom parameters.
718- * @param enabled Indicates whether to enable the default animation on a click or touch.776+ * @param enabled Whether to enable the default animation on a click or touch. The value **true** means to enable the
719- * @return Returns the result code.777+ * default animation on a click or touch, and **false** means the opposite.
720- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.778+ * @return Result code.
721- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.779+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
780+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
722 * @since 12781 * @since 12
723 */782 */
724int32_t OH_ArkUI_DragPreviewOption_SetDefaultAnimationBeforeLiftingEnabled(783int32_t OH_ArkUI_DragPreviewOption_SetDefaultAnimationBeforeLiftingEnabled(
725 ArkUI_DragPreviewOption* option, bool enabled);784 ArkUI_DragPreviewOption* option, bool enabled);
726/**785/**
727- * @brief Sets an <b>ArkUI_DragPreviewOption</b> object for the specified component.786+ * @brief Sets an **ArkUI_DragPreviewOption** object for the specified component.
728 *787 *
729- * @param node Indicates the pointer to a component node.788+ * @param node Pointer to the component node.
730- * @param option Indicates the pointer to an <b>ArkUI_DragPreviewOption</b> object.789+ * @param option Custom parameters.
731- * @return Returns the result code.790+ * @return Result code.
732- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.791+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
733- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.792+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
734 * @since 12793 * @since 12
735 */794 */
736int32_t OH_ArkUI_SetNodeDragPreviewOption(ArkUI_NodeHandle node, ArkUI_DragPreviewOption* option);795int32_t OH_ArkUI_SetNodeDragPreviewOption(ArkUI_NodeHandle node, ArkUI_DragPreviewOption* option);
737 796 
738/**797/**
739- * @brief Creates a drag action object for a UI instance based on the specified component node of the current798+ * @brief Creates a drag action object. The object needs to be associated with a UI instance, which can be specified by
740- * UI instance.799+ * passing in a component node of the current UI instance.
741 *800 *
742- * @param node Indicates the pointer to a component node.801+ * @param node Pointer to the component node.
743- * @return Returns the pointer to the created drag action object; returns null if the operation fails.802+ * @return Pointer to the created drag action object, or null if the operation fails.
744 * @since 12803 * @since 12
745 */804 */
746ArkUI_DragAction* OH_ArkUI_CreateDragActionWithNode(ArkUI_NodeHandle node);805ArkUI_DragAction* OH_ArkUI_CreateDragActionWithNode(ArkUI_NodeHandle node);
@@ -748,42 +807,42 @@ ArkUI_DragAction* OH_ArkUI_CreateDragActionWithNode(ArkUI_NodeHandle node);
748/**807/**
749 * @brief Creates a drag action object for the specified UI instance.808 * @brief Creates a drag action object for the specified UI instance.
750 *809 *
751- * @param uiContext Indicates the pointer to a UI instance.810+ * @param uiContext Pointer to the UI instance.
752- * @return Returns the pointer to the created drag action object; returns null if the operation fails.811+ * @return Pointer to the created drag action object, or null if the operation fails.
753 * @since 12812 * @since 12
754 */813 */
755ArkUI_DragAction* OH_ArkUI_CreateDragActionWithContext(ArkUI_ContextHandle uiContext);814ArkUI_DragAction* OH_ArkUI_CreateDragActionWithContext(ArkUI_ContextHandle uiContext);
756 815 
757/**816/**
758- * @brief Disposes of a drag action object.817+ * @brief Disposes of an **ArkUI_DragAction** object.
759 *818 *
760- * @param dragAction Indicates the pointer to the target drag action object.819+ * @param dragAction Pointer to the target drag action object.
761 * @since 12820 * @since 12
762 */821 */
763void OH_ArkUI_DragAction_Dispose(ArkUI_DragAction* dragAction);822void OH_ArkUI_DragAction_Dispose(ArkUI_DragAction* dragAction);
764 823 
765/**824/**
766- * @brief Sets the pointer ID. If only one finger is operating on the screen, the pointer ID is 0.825+ * @brief Sets the pointer ID. If only one finger is used on the screen, the finger ID is 0. Generally, you can set
767- * In general cases, you can set the pointer ID to 0.826+ * this parameter to **0**.
768 *827 *
769- * @param dragAction Indicates the pointer to the target drag action object.828+ * @param dragAction Pointer to the target drag action object.
770- * @param pointer Indicates the pointer ID. The value ranges from 0 to 9.829+ * @param pointer Pointer ID. The value ranges from 0 to 9. If the value is out of the range, **-1** is used by default.
771- * @return Returns the result code.830+ * @return Result code.
772- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.831+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
773- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.832+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
774 * @since 12833 * @since 12
775 */834 */
776int32_t OH_ArkUI_DragAction_SetPointerId(ArkUI_DragAction* dragAction, int32_t pointer);835int32_t OH_ArkUI_DragAction_SetPointerId(ArkUI_DragAction* dragAction, int32_t pointer);
777 836 
778/**837/**
779- * @brief Sets the drag previews for a drag action.838+ * @brief Sets the drag previews for a drag action. Only pixel map objects are supported.
780 *839 *
781- * @param dragAction Indicates the pointer to the target drag action object.840+ * @param dragAction Pointer to the target drag action object.
782 * @param pixelmapArray Indicates the array of the drag previews to set, which must be pixel maps.841 * @param pixelmapArray Indicates the array of the drag previews to set, which must be pixel maps.
783- * @param size Indicates the size of the drag preview array.842+ * @param size Number of drag previews.
784- * @return Returns the result code.843+ * @return Result code.
785- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.844+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
786- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.845+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
787 * @since 12846 * @since 12
788 */847 */
789int32_t OH_ArkUI_DragAction_SetPixelMaps(848int32_t OH_ArkUI_DragAction_SetPixelMaps(
@@ -792,11 +851,11 @@ int32_t OH_ArkUI_DragAction_SetPixelMaps(
792/**851/**
793 * @brief Sets the touch point relative to the upper left corner of the first drag preview (pixel map).852 * @brief Sets the touch point relative to the upper left corner of the first drag preview (pixel map).
794 *853 *
795- * @param dragAction Indicates the pointer to the target drag action object.854+ * @param dragAction Pointer to the target drag action object.
796- * @param x Indicates the X coordinate of the touch point.855+ * @param x X-coordinate of the touch point, in px.
797- * @return Returns the result code.856+ * @return Result code.
798- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.857+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
799- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.858+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
800 * @since 12859 * @since 12
801 */860 */
802int32_t OH_ArkUI_DragAction_SetTouchPointX(ArkUI_DragAction* dragAction, float x);861int32_t OH_ArkUI_DragAction_SetTouchPointX(ArkUI_DragAction* dragAction, float x);
@@ -804,11 +863,11 @@ int32_t OH_ArkUI_DragAction_SetTouchPointX(ArkUI_DragAction* dragAction, float x
804/**863/**
805 * @brief Sets the touch point relative to the upper left corner of the first drag preview (pixel map).864 * @brief Sets the touch point relative to the upper left corner of the first drag preview (pixel map).
806 *865 *
807- * @param dragAction Indicates the pointer to the target drag action object.866+ * @param dragAction Pointer to the target drag action object.
808- * @param y Indicates the Y coordinate of the touch point.867+ * @param y Y-coordinate of the touch point, in px.
809- * @return Returns the result code.868+ * @return Result code.
810- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.869+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
811- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.870+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
812 * @since 12871 * @since 12
813 */872 */
814int32_t OH_ArkUI_DragAction_SetTouchPointY(ArkUI_DragAction* dragAction, float y);873int32_t OH_ArkUI_DragAction_SetTouchPointY(ArkUI_DragAction* dragAction, float y);
@@ -816,62 +875,56 @@ int32_t OH_ArkUI_DragAction_SetTouchPointY(ArkUI_DragAction* dragAction, float y
816/**875/**
817 * @brief Sets the drag data.876 * @brief Sets the drag data.
818 *877 *
819- * @param dragAction Indicates the pointer to the target drag action object.878+ * @param dragAction Pointer to the target drag action object.
820- * @param data Indicates the drag data.879+ * @param data Drag data configuration.
821- * @return Returns the result code.880+ * @return Result code.
822- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.881+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
823- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.882+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
824 * @since 12883 * @since 12
825 */884 */
826int32_t OH_ArkUI_DragAction_SetData(ArkUI_DragAction* dragAction, OH_UdmfData* data);885int32_t OH_ArkUI_DragAction_SetData(ArkUI_DragAction* dragAction, OH_UdmfData* data);
827 886 
828/**887/**
829- * @brief Use this method to provide a data loading parameter to the system instead of providing888+ * @brief This API provides data loading parameters to the system instead of directly providing a complete data object.
830- * a complete data object directly. When the user drags and drops to the target application,889+ * When the user drops data on the target application, the system will use **dataLoadParams** to request data. This can
831- * the system will use this parameter to request data from you. This can greatly improve the efficiency890+ * significantly improve the efficiency of dragging large volumes of data and the efficiency of processing the dropped
832- * of the dragging operation for large amounts of data and the effectiveness of the drop data handling891+ * data in the target application. This API must always be used in preference to {@link OH_ArkUI_DragAction_SetData}.
833- * in the target application.892+ * For details about how to create and prepare data loading parameters, see {@link OH_UdmfDataLoadParams_Create} in **
893+ * udmf.h**. If this API conflicts with {@link OH_ArkUI_DragAction_SetData}, the system always uses the last called API.
834 *894 *
835- * It's recommanded to use this method instead of using {@link OH_ArkUI_DragAction_SetData}.895+ * @param dragAction Pointer to the target drag action object.
836- * See {@link OH_UdmfDataLoadParams_Create} in <b>udmf.h</b> for how to create and prepare the data loading parameter.896+ * @param dataLoadParams Data loading parameters used during a drop operation.
837- *897+ * @return Result code.
838- * [Note]: Please be awared this method is conflict with {@link OH_ArkUI_DragAction_SetData}, and the system always use898+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
839- * the last called method as the final result.899+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
840- *
841- * @param dragAction Indicates the pointer to the target drag action object.
842- * @param dataLoadParams Indicates the data loading parameters which will be used when dropping.
843- * @return Returns the result code.
844- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
845- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
846 * @since 20900 * @since 20
847 */901 */
848ArkUI_ErrorCode OH_ArkUI_DragAction_SetDataLoadParams(ArkUI_DragAction* dragAction,902ArkUI_ErrorCode OH_ArkUI_DragAction_SetDataLoadParams(ArkUI_DragAction* dragAction,
849 OH_UdmfDataLoadParams* dataLoadParams);903 OH_UdmfDataLoadParams* dataLoadParams);
850 904 
851/**905/**
852- * @brief Sets an <b>ArkUI_DragPreviewOption</b> object for the specified drag action object.906+ * @brief Sets an **ArkUI_DragPreviewOption** object for the specified drag action object.
853 *907 *
854- * @param dragAction Indicates the pointer to the target drag action object.908+ * @param dragAction Pointer to the target drag action object.
855- * @param option Indicates the pointer to an <b>ArkUI_DragPreviewOption</b> object.909+ * @param option Custom parameters.
856- * @return Returns the result code.910+ * @return Result code.
857- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.911+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
858- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.912+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
859 * @since 12913 * @since 12
860 */914 */
861int32_t OH_ArkUI_DragAction_SetDragPreviewOption(ArkUI_DragAction* dragAction, ArkUI_DragPreviewOption* option);915int32_t OH_ArkUI_DragAction_SetDragPreviewOption(ArkUI_DragAction* dragAction, ArkUI_DragPreviewOption* option);
862 916 
863/**917/**
864- * @brief Registers a drag status listener.918+ * @brief Registers a drag status listener. This listener can be used to check whether the data is successfully
865- * This listener can be used to check whether the data is successfully received and processed.919+ * received and processed.
866 *920 *
867- * @param dragAction Indicates the pointer to the target drag action object.921+ * @param dragAction Pointer to the target drag action object.
868- * @param userData Indicates the custom user data.922+ * @param userData Custom user data.
869- * @param listener923+ * @param listener Listener to register. When the callback is invoked, the system returns a pointer to the drag status
870- * Indicates the listener to register. When the callback is invoked, the system returns a pointer to the drag status924+ * object. The pointer is destroyed after the callback is complete and the application should not hold it anymore.
871- * object. The pointer is destroyed after the callback is complete and the application should not hold it anymore.925+ * @return Result code.
872- * @return Returns the result code.926+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
873- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.927+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
874- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
875 * @since 12928 * @since 12
876 */929 */
877int32_t OH_ArkUI_DragAction_RegisterStatusListener(ArkUI_DragAction* dragAction, void* userData,930int32_t OH_ArkUI_DragAction_RegisterStatusListener(ArkUI_DragAction* dragAction, void* userData,
@@ -880,172 +933,136 @@ int32_t OH_ArkUI_DragAction_RegisterStatusListener(ArkUI_DragAction* dragAction,
880/**933/**
881 * @brief Unregisters a drag status listener.934 * @brief Unregisters a drag status listener.
882 *935 *
883- * @param dragAction Indicates the pointer to the target drag action object.936+ * @param dragAction Pointer to the target drag action object.
884 * @since 12937 * @since 12
885 */938 */
886void OH_ArkUI_DragAction_UnregisterStatusListener(ArkUI_DragAction* dragAction);939void OH_ArkUI_DragAction_UnregisterStatusListener(ArkUI_DragAction* dragAction);
887 940 
888/**941/**
889- * @brief Obtains the drag status of a drag action.942+ * @brief Obtains the drag status of the {@link ArkUI_DragAction}. **ArkUI_DRAG_STATUS_UNKNOWN** is returned if the
943+ * acquisition fails.
890 *944 *
891- * @param dragAndDropInfo Indicates the drag and drop information returned by the drag status listener.945+ * @param dragAndDropInfo Drag and drop information returned by the drag status listener.
892- * @return Returns an <b>ArkUI_DragStatus</b> object; returns <b>ArkUI_DRAG_STATUS_UNKNOWN</b> if an error occurs.946+ * @return **ArkUI_DragStatus** object, or **ArkUI_DRAG_STATUS_UNKNOWN** if an error occurs.
893 * @since 12947 * @since 12
894 */948 */
895ArkUI_DragStatus OH_ArkUI_DragAndDropInfo_GetDragStatus(ArkUI_DragAndDropInfo* dragAndDropInfo);949ArkUI_DragStatus OH_ArkUI_DragAndDropInfo_GetDragStatus(ArkUI_DragAndDropInfo* dragAndDropInfo);
896 950 
897/**951/**
898- * @brief Obtains a drag event based on the specified drag and drop information.952+ * @brief Obtains a drag event based on the specified drag and drop information. The drag event can then be used to
899- * The drag event can then be used to obtain the drag result and the drag behavior, please note953+ * obtain the drag result.
900- * other info is not included in such a drag event.
901 *954 *
902- * @param dragAndDropInfo Indicates the drag and drop information returned by the drag status listener.955+ * @param dragAndDropInfo Drag and drop information returned by the drag status listener.
903- * @return Returns an <b>ArkUI_DragEvent</b> object; returns null if an error occurs.956+ * @return **ArkUI_DragEvent** object, or null if an error occurs.
904 * @since 12957 * @since 12
905 */958 */
906ArkUI_DragEvent* OH_ArkUI_DragAndDropInfo_GetDragEvent(ArkUI_DragAndDropInfo* dragAndDropInfo);959ArkUI_DragEvent* OH_ArkUI_DragAndDropInfo_GetDragEvent(ArkUI_DragAndDropInfo* dragAndDropInfo);
907 960 
908/**961/**
909- * @brief Initiates a drag action through the specified drag action object.962+ * @brief Initiates a drag action through the specified **DragAction** object.
910 *963 *
911- * @param dragAction Indicates a drag action object.964+ * @param dragAction Drag action object.
912- * @return Returns the result code.965+ * @return Result code.
913- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.966+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
914- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.967+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
915 * @since 12968 * @since 12
916 */969 */
917int32_t OH_ArkUI_StartDrag(ArkUI_DragAction* dragAction);970int32_t OH_ArkUI_StartDrag(ArkUI_DragAction* dragAction);
918 971 
919/**972/**
920- * @brief Request to delay the drop end handling for a while to wait until the process result973+ * @brief Requests deferred processing of the drag end event, allowing the application to asynchronously confirm the
921- * is really conformed by application, the result need to be notified back to system through974+ * operation result. The application must pass the final result back to the system via the
922- * {@link OH_ArkUI_NotifyDragResult} interface. And when all the handling done, the975+ * {@link OH_ArkUI_NotifyDragResult} API, and call {@link OH_ArkUI_NotifyDragEndPendingDone} after all processing is
923- * {@link OH_ArkUI_NotifyDragEndPendingDone} should be called.976+ * completed. The maximum waiting time is 2 seconds.
924- * Please be aware, the maximum pending time is 2 seconds;
925 *977 *
926- * @param event Indicates the pointer to an <b>ArkUI_DragEvent</b> object.978+ * @param event Pointer to the target **ArkUI_DragEvent** object.
927- * @param requestIdentify Indicates the Identify for the request initiated by this method, it's a number generated979+ * @param requestIdentify System-generated request identifier, which is an output parameter and must point to a valid
928- by system automatically, and it's an out parameter too, so one valid address needed.980+ * address.
929- * @return Returns the result code.981+ * @return Result code.
930- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.982+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
931- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.983+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
932- * Returns {@link ARKUI_ERROR_CODE_DRAG_DROP_OPERATION_NOT_ALLOWED} if current is not during the drop handing.984+ * <br>Returns {@link ARKUI_ERROR_CODE_DRAG_DROP_OPERATION_NOT_ALLOWED} if the operation is not allowed at the
985+ * current stage.
933 * @since 19986 * @since 19
934 */987 */
935int32_t OH_ArkUI_DragEvent_RequestDragEndPending(ArkUI_DragEvent* event, int32_t* requestIdentify);988int32_t OH_ArkUI_DragEvent_RequestDragEndPending(ArkUI_DragEvent* event, int32_t* requestIdentify);
936 989 
937/**990/**
938- * @brief Notify the system final drag result, the request identify will be checked, it should be the same991+ * @brief Notifies the system of the final drag result. The system will verify whether the request identifier matches
939- * as the one returned by {@link OH_ArkUI_DragEvent_RequestDragEndPending} interface, if it's not,992+ * that returned by {@link OH_ArkUI_DragEvent_RequestDragEndPending}. If they do not match, this call will be ignored.
940- * the calling will be ignored.
941 *993 *
942- * @param requestIdentify The identify returned by {@link OH_ArkUI_DragEvent_RequestDragEndPending} interface.994+ * @param requestIdentify Identifier returned by {@link OH_ArkUI_DragEvent_RequestDragEndPending}.
943- * @param result Indicates the drag result.995+ * @param result Enumerated value of the drag result (of the {@link ArkUI_DragResult} type).
944- * @return Returns the result code.996+ * @return Result code.
945- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.997+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
946- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.998+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
947- * Returns {@link ARKUI_ERROR_CODE_DRAG_DROP_OPERATION_NOT_ALLOWED} if current is not during the drop handing.999+ * <br>Returns {@link ARKUI_ERROR_CODE_DRAG_DROP_OPERATION_NOT_ALLOWED} if the operation is not allowed at the
1000+ * current stage.
948 * @since 191001 * @since 19
949 */1002 */
950int32_t OH_ArkUI_NotifyDragResult(int32_t requestIdentify, ArkUI_DragResult result);1003int32_t OH_ArkUI_NotifyDragResult(int32_t requestIdentify, ArkUI_DragResult result);
951 1004 
952/**1005/**
953- * @brief Notify the drop behavior proposal, it can be CUT or COPY, please note that, it just be a proposal,1006+ * @brief Notifies the drag initiator of the operation type of the current drop. The drag initiator can call
954- * the drag source might ignore it. And the request identity will be checked, it should be the same as1007+ * {@link OH_ArkUI_DragEvent_GetDropOperation} in the drag end callback to obtain the operation type of the current
955- * the one returned by {@link OH_ArkUI_DragEvent_RequestDragEndPending}, if it's not, the calling will be ignored.1008+ * drop and perform custom processing. The drag initiator can also ignore the notification. If the drag operation fails,
1009+ * the action type of the current drop is unreliable. In this case, the action type obtained by calling
1010+ * {@link OH_ArkUI_DragEvent_GetDropOperation} is always **ARKUI_DROP_OPERATION_COPY**. The system will verify whether
1011+ * the value of **requestIdentity** is the same as that returned by {@link OH_ArkUI_DragEvent_RequestDragEndPending}.
1012+ * If they are different, this API call does not take effect.
956 *1013 *
957 * @param requestIdentity The identity returned by {@link OH_ArkUI_DragEvent_RequestDragEndPending} interface.1014 * @param requestIdentity The identity returned by {@link OH_ArkUI_DragEvent_RequestDragEndPending} interface.
958- * @param operation Indicates the drop behavior.1015+ * @param operation Operation type of the current drop.
959- * @return Returns the result code.1016+ * @return Result code.
960- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation setting is successful.1017+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
961- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.1018+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
962- * Returns {@link ARKUI_ERROR_CODE_DRAG_DROP_OPERATION_NOT_ALLOWED} if the call of this method is not1019+ * <br>Returns {@link ARKUI_ERROR_CODE_DRAG_DROP_OPERATION_NOT_ALLOWED} if the API is not called in the drop phase.
963- * during the drop handing phase.
964 * @since 241020 * @since 24
965 */1021 */
966int32_t OH_ArkUI_NotifySuggestedDropOperation(int32_t requestIdentity, ArkUI_DropOperation operation);1022int32_t OH_ArkUI_NotifySuggestedDropOperation(int32_t requestIdentity, ArkUI_DropOperation operation);
967 1023 
968/**1024/**
969- * @brief Notify that whether to use custom drop animation to replace the system default drop animation.1025+ * @brief Notifies the system whether to disable the default drop animation. If the drag fails, the default drop
970- * By default, the system uses a spread animation to indicate a failed drop and a shrink fade animation1026+ * animation is diffusion. If the drag succeeds, the default drop animation is shrinking and fading. Calling this API
971- * to indicate a successful drop. You can call this method to notify that disable the default animation,1027+ * can disable the default animation and implement a custom drop animation as required. The system will verify whether
972- * and implement new animation as you want. And the request identity will be checked, it should be the same as1028+ * the value of **requestIdentity** is the same as that returned by {@link OH_ArkUI_DragEvent_RequestDragEndPending}.
973- * the one returned by {@link OH_ArkUI_DragEvent_RequestDragEndPending}, if it's not, the calling will be ignored.1029+ * If they are different, this API call does not take effect.
974 *1030 *
975 * @param requestIdentity The identity returned by {@link OH_ArkUI_DragEvent_RequestDragEndPending} interface.1031 * @param requestIdentity The identity returned by {@link OH_ArkUI_DragEvent_RequestDragEndPending} interface.
976- * @param disable Indicates whether to disable default drop animtion, true for disabled, false for enabled.1032+ * @param disable Whether to disable the default drop animation. **true** if disable; **false** otherwise.
977- * @return Returns the result code.1033+ * @return Result code.
978- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.1034+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
979- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.1035+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
980- * Returns {@link ARKUI_ERROR_CODE_DRAG_DROP_OPERATION_NOT_ALLOWED} if the call of this method is not1036+ * <br>Returns {@link ARKUI_ERROR_CODE_DRAG_DROP_OPERATION_NOT_ALLOWED} if the API is not called in the drop phase.
981- * during the drop handing phase.
982 * @since 241037 * @since 24
983 */1038 */
984int32_t OH_ArkUI_NotifyDisableDefaultDropAnimation(int32_t requestIdentity, bool disable);1039int32_t OH_ArkUI_NotifyDisableDefaultDropAnimation(int32_t requestIdentity, bool disable);
985 1040 
986/**1041/**
987- * @brief Notify the system all handling done, the drag end pending can be finished.1042+ * @brief Notifies the system that all asynchronous processing has been completed and the drag end pending state can be
1043+ * terminated.
988 *1044 *
989- * @param requestIdentify The identify returned by {@link OH_ArkUI_DragEvent_RequestDragEndPending} interface.1045+ * @param requestIdentify Identifier returned by {@link OH_ArkUI_DragEvent_RequestDragEndPending}.
990- * @return Returns the result code.1046+ * @return Result code.
991- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.1047+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
992- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.1048+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
993- * Returns {@link ARKUI_ERROR_CODE_DRAG_DROP_OPERATION_NOT_ALLOWED} if current is not during the drop handing.1049+ * <br>Returns {@link ARKUI_ERROR_CODE_DRAG_DROP_OPERATION_NOT_ALLOWED} if the operation is not allowed at the
1050+ * current stage.
994 * @since 191051 * @since 19
995 */1052 */
996int32_t OH_ArkUI_NotifyDragEndPendingDone(int32_t requestIdentify);1053int32_t OH_ArkUI_NotifyDragEndPendingDone(int32_t requestIdentify);
997 1054 
998-/**1055+ /**
999- * @brief Use this method to obtain the application bundle name of the drag-and-drop initiator, you need1056+ * @brief Sets whether the drop-disallowed badge can be displayed.
1000- * to pass a character array for receiving the string and explicitly specify the array length. It is1057+ *
1001- * recommended that the array length be no less than 128 characters. If the length cannot accommodate1058+ * @param uiContext Pointer to the UI instance.
1002- * the actual bundle name length, the ERROR result will be returned.1059+ * @param enabled Whether the drop-disallowed badge can be displayed. The value **true** means that the drop-
1003- * @param event Indicates the pointer to an <b>ArkUI_DragEvent</b> object.1060+ * disallowed badge can be displayed, and **false** means the opposite.
1004- * @param bundleName A string array used to receive the source application's bundle name.1061+ * @return Result code.
1005- * @param length Use this to explicitly specify the length of the incoming string array.1062+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
1006- * It is recommended to be bigger than 128.1063+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
1007- * @return Returns the result code.1064+ * @since 20
1008- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.1065+ */
1009- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
1010- * @since 20
1011- */
1012-ArkUI_ErrorCode OH_ArkUI_DragEvent_GetDragSource(ArkUI_DragEvent* event, char *bundleName, int32_t length);
1013- 
1014-/**
1015- * @brief Call this method to determine whether the current drag and drop operation is cross-device.
1016- *
1017- * @param event Indicates the pointer to an <b>ArkUI_DragEvent</b> object.
1018- * @param isRemote Boolean pointer to receive the result.
1019- * @return Returns the result code.
1020- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
1021- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
1022- * @since 20
1023- */
1024-ArkUI_ErrorCode OH_ArkUI_DragEvent_IsRemote(ArkUI_DragEvent* event, bool* isRemote);
1025- 
1026-/**
1027- * @brief Sets whether to enable the display of a disallow status icon.
1028- *
1029- * Typically, when a component can receive or process data dragged by the user, or when it declares to the
1030- * system that data should be processed in COPY way by setting ARKUI_DROP_OPERATION_COPY through
1031- * {@link OH_ArkUI_DragEvent_SetSuggestedDropOperation}, the system will display
1032- * a plus sign together with the data number on the upper-left corner of the dragged object; if setting
1033- * ARKUI_DROP_OPERATION_MOVE to the system to declare that data should be processed in CUT way, the system will only
1034- * display the data number on the upper-left corner of the dragged object.
1035- *
1036- * In some cases, when the system determines or the component explicitly declares that it cannot handle the
1037- * data that the user is dragging, the system displays a badge icon in the same way as it does for DragBehavior.MOVE.
1038- * So if you want to show the more clearly status, you can call this method on the UI instance in advance to force
1039- * the system to display a clear prohibition icon on the upper left corner in such cases, and the user can clearly
1040- * know that data cannot be dropped here.
1041- *
1042- * @param uiContext Pointer to a UI instance.
1043- * @param enabled Whether to enable the display of the disallow badge icon.
1044- * @return Returns the result code.
1045- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
1046- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
1047- * @since 20
1048- */
1049ArkUI_ErrorCode OH_ArkUI_EnableDropDisallowedBadge(ArkUI_ContextHandle uiContext, bool enabled);1066ArkUI_ErrorCode OH_ArkUI_EnableDropDisallowedBadge(ArkUI_ContextHandle uiContext, bool enabled);
1050 1067 
1051#ifdef __cplusplus1068#ifdef __cplusplus
@@ -1053,4 +1070,4 @@ ArkUI_ErrorCode OH_ArkUI_EnableDropDisallowedBadge(ArkUI_ContextHandle uiContext
1053#endif1070#endif
1054 1071 
1055#endif // ARKUI_NATIVE_DRAG_AND_DROP_H1072#endif // ARKUI_NATIVE_DRAG_AND_DROP_H
1056-/** @} */1073+/** @} */
Markui/ace_engine/native/native_interface_focus.h+33-26
@@ -25,7 +25,8 @@
25/**25/**
26 * @file native_interface_focus.h26 * @file native_interface_focus.h
27 *27 *
28- * @brief Declares the APIs used to control the focus system.28+ * @brief Declares APIs for focus management, mainly used for actively transferring focus, managing the default focus
29+ * transfer behavior, and controlling the focus activation state.
29 *30 *
30 * @library libace_ndk.z.so31 * @library libace_ndk.z.so
31 * @syscap SystemCapability.ArkUI.ArkUI.Full32 * @syscap SystemCapability.ArkUI.ArkUI.Full
@@ -44,65 +45,71 @@ extern "C" {
44#endif45#endif
45 46 
46/**47/**
47- * @brief Determines the priority of key event processing when component cannot handle the key event.48+ * @brief Enumerates the key event processing priority modes.
48 *49 *
49 * @since 1550 * @since 15
50 */51 */
51typedef enum {52typedef enum {
52- /** Key events are used to move focus. */53+ /**
54+ * Key events are used for focus navigation.
55+ */
53 ARKUI_KEY_PROCESSING_MODE_FOCUS_NAVIGATION = 0,56 ARKUI_KEY_PROCESSING_MODE_FOCUS_NAVIGATION = 0,
54- /** Key events bubble up to ancestors. */57+ /**
58+ * Key events are passed up to ancestor components.
59+ */
55 ARKUI_KEY_PROCESSING_MODE_FOCUS_ANCESTOR_EVENT,60 ARKUI_KEY_PROCESSING_MODE_FOCUS_ANCESTOR_EVENT,
56} ArkUI_KeyProcessingMode;61} ArkUI_KeyProcessingMode;
57 62 
58/**63/**
59- * @brief Apply focus for a specific node.64+ * @brief Requests focus for a specific node.
60 *65 *
61- * @param node The node.66+ * @param node Node.
62- * @return The error code.67+ * @return Result code.
63- * {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.68+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
64- * {@link ARKUI_ERROR_CODE_FOCUS_NON_FOCUSABLE} if the node is not focusable.69+ * <br>Returns {@link ARKUI_ERROR_CODE_FOCUS_NON_FOCUSABLE} if the node cannot receive focus.
65- * {@link ARKUI_ERROR_CODE_FOCUS_NON_FOCUSABLE_ANCESTOR} if the node has unfocusable ancestor.70+ * <br>Returns {@link ARKUI_ERROR_CODE_FOCUS_NON_FOCUSABLE_ANCESTOR} if the ancestor node cannot receive focus.
66- * {@link ARKUI_ERROR_CODE_FOCUS_NON_EXISTENT} if the node is not exists.71+ * <br>Returns {@link ARKUI_ERROR_CODE_FOCUS_NON_EXISTENT} if the node does not exist.
67 * @since 1572 * @since 15
68 */73 */
69ArkUI_ErrorCode OH_ArkUI_FocusRequest(ArkUI_NodeHandle node);74ArkUI_ErrorCode OH_ArkUI_FocusRequest(ArkUI_NodeHandle node);
70 75 
71/**76/**
72- * @brief Clear current focus to root scope.77+ * @brief Clears the focus to the root container node.
73 *78 *
74- * @param uiContext Indicates the pointer to a UI instance.79+ * @param uiContext UI instance object pointer.
75 * @since 1580 * @since 15
76 */81 */
77void OH_ArkUI_FocusClear(ArkUI_ContextHandle uiContext);82void OH_ArkUI_FocusClear(ArkUI_ContextHandle uiContext);
78 83 
79/**84/**
80- * @brief Set the focus active state in current window, the focus node would show its focus box.85+ * @brief Sets the focus activation state for the current page. When activated, the focused node displays a focus box.
81 *86 *
82- * @param uiContext Indicates the pointer to a UI instance.87+ * @param uiContext UI instance object pointer.
83- * @param isActive Set the state to be active or inactive.88+ * @param isActive Whether to enter or exit the focus activation state. The value **true** means to enter the focus
84- * @param isAutoInactive When touch event or mouse-pressed event triggerd,89+ * activation state, and **false** means to exit the focus activation state.
85- * "true" indicates to set state to inactive,90+ * @param isAutoInactive Whether to automatically exit the focus active state on touch or mouse down events. **true**:
86- * "false" indicates to maintain the state until relative API is called.91+ * Automatically exit the focus active state. **false**: Maintain the current state until the corresponding setting
92+ * API is called.
87 * @since 1593 * @since 15
88 */94 */
89void OH_ArkUI_FocusActivate(ArkUI_ContextHandle uiContext, bool isActive, bool isAutoInactive);95void OH_ArkUI_FocusActivate(ArkUI_ContextHandle uiContext, bool isActive, bool isAutoInactive);
90 96 
91/**97/**
92- * @brief Set the focus transfer behaviour when current focus view changes.98+ * @brief Configures the focus transfer behavior when pages are switched.
93 *99 *
94- * @param uiContext Indicates the pointer to a UI instance.100+ * @param uiContext UI instance object pointer.
95- * @param autoTransfer Indicates whether to transfer focus when focus view show.101+ * @param autoTransfer Whether to automatically transfer focus when pages are switched. The value **true** means to
102+ * automatically transfer focus when pages are switched, and **false** means the opposite.
96 * @since 15103 * @since 15
97 */104 */
98void OH_ArkUI_FocusSetAutoTransfer(ArkUI_ContextHandle uiContext, bool autoTransfer);105void OH_ArkUI_FocusSetAutoTransfer(ArkUI_ContextHandle uiContext, bool autoTransfer);
99 106 
100 107 
101/**108/**
102- * @brief Set the priority of key event processing when component cannot handle the key event.109+ * @brief Sets the mode for processing key events.
103 *110 *
104- * @param uiContext Indicates the pointer to a UI instance.111+ * @param uiContext UI instance object pointer.
105- * @param mode Indicates the key processing mode.112+ * @param mode Key event processing priority mode.
106 * @since 15113 * @since 15
107*/114*/
108void OH_ArkUI_FocusSetKeyProcessingMode(ArkUI_ContextHandle uiContext, ArkUI_KeyProcessingMode mode);115void OH_ArkUI_FocusSetKeyProcessingMode(ArkUI_ContextHandle uiContext, ArkUI_KeyProcessingMode mode);
@@ -111,4 +118,4 @@ void OH_ArkUI_FocusSetKeyProcessingMode(ArkUI_ContextHandle uiContext, ArkUI_Key
111#endif118#endif
112 119 
113#endif // ARKUI_NATIVE_INTERFACE_FOCUS_H120#endif // ARKUI_NATIVE_INTERFACE_FOCUS_H
114-/** @} */121+/** @} */
Markui/ace_engine/native/native_key_event.h+564-233
@@ -25,7 +25,7 @@
25/**25/**
26 * @file native_key_event.h26 * @file native_key_event.h
27 *27 *
28- * @brief Declares the APIs related to native key events.28+ * @brief Declares the APIs of **NativeKeyEvent**.
29 *29 *
30 * @library libace_ndk.z.so30 * @library libace_ndk.z.so
31 * @syscap SystemCapability.ArkUI.ArkUI.Full31 * @syscap SystemCapability.ArkUI.ArkUI.Full
@@ -46,376 +46,656 @@ extern "C" {
46#endif46#endif
47 47 
48/**48/**
49- * @brief Defines an enum for the key codes in key events.49+ * @brief Enumerates the key codes for key events.
50 *50 *
51 * @since 1451 * @since 14
52 */52 */
53typedef enum {53typedef enum {
54- /** Unknown (or unrecognized) key **/54+ /**
55+ * Unknown key
56+ */
55 ARKUI_KEYCODE_UNKNOWN = -1,57 ARKUI_KEYCODE_UNKNOWN = -1,
56- /** Function (Fn) key **/58+ /**
59+ * Function (Fn) key
60+ */
57 ARKUI_KEYCODE_FN = 0,61 ARKUI_KEYCODE_FN = 0,
58- /** Volume Up key **/62+ /**
63+ * Volume Up key
64+ */
59 ARKUI_KEYCODE_VOLUME_UP = 16,65 ARKUI_KEYCODE_VOLUME_UP = 16,
60- /** Volume Down key **/66+ /**
67+ * Volume Down key
68+ */
61 ARKUI_KEYCODE_VOLUME_DOWN = 17,69 ARKUI_KEYCODE_VOLUME_DOWN = 17,
62- /** Power key **/70+ /**
71+ * Power key
72+ */
63 ARKUI_KEYCODE_POWER = 18,73 ARKUI_KEYCODE_POWER = 18,
64- /** Shutter key **/74+ /**
75+ * Camera key
76+ */
65 ARKUI_KEYCODE_CAMERA = 19,77 ARKUI_KEYCODE_CAMERA = 19,
66- /** Speaker Mute key **/78+ /**
79+ * Speaker Mute key
80+ */
67 ARKUI_KEYCODE_VOLUME_MUTE = 22,81 ARKUI_KEYCODE_VOLUME_MUTE = 22,
68- /** Mute key **/82+ /**
83+ * Mute key
84+ */
69 ARKUI_KEYCODE_MUTE = 23,85 ARKUI_KEYCODE_MUTE = 23,
70- /** Brightness Up key **/86+ /**
87+ * Brightness Up key.
88+ */
71 ARKUI_KEYCODE_BRIGHTNESS_UP = 40,89 ARKUI_KEYCODE_BRIGHTNESS_UP = 40,
72- /** Brightness Down key **/90+ /**
91+ * Brightness Down key.
92+ */
73 ARKUI_KEYCODE_BRIGHTNESS_DOWN = 41,93 ARKUI_KEYCODE_BRIGHTNESS_DOWN = 41,
74- /** Key 0 **/94+ /**
95+ * Key 0
96+ */
75 ARKUI_KEYCODE_0 = 2000,97 ARKUI_KEYCODE_0 = 2000,
76- /** Key 1 **/98+ /**
99+ * Key 1
100+ */
77 ARKUI_KEYCODE_1 = 2001,101 ARKUI_KEYCODE_1 = 2001,
78- /** Key 2 **/102+ /**
103+ * Key 2
104+ */
79 ARKUI_KEYCODE_2 = 2002,105 ARKUI_KEYCODE_2 = 2002,
80- /** Key 3 **/106+ /**
107+ * Key 3
108+ */
81 ARKUI_KEYCODE_3 = 2003,109 ARKUI_KEYCODE_3 = 2003,
82- /** Key 4 **/110+ /**
111+ * Key 4
112+ */
83 ARKUI_KEYCODE_4 = 2004,113 ARKUI_KEYCODE_4 = 2004,
84- /** Key 5 **/114+ /**
115+ * Key 5
116+ */
85 ARKUI_KEYCODE_5 = 2005,117 ARKUI_KEYCODE_5 = 2005,
86- /** Key 6 **/118+ /**
119+ * Key 6
120+ */
87 ARKUI_KEYCODE_6 = 2006,121 ARKUI_KEYCODE_6 = 2006,
88- /** Key 7 **/122+ /**
123+ * Key 7
124+ */
89 ARKUI_KEYCODE_7 = 2007,125 ARKUI_KEYCODE_7 = 2007,
90- /** Key 8 **/126+ /**
127+ * Key 8
128+ */
91 ARKUI_KEYCODE_8 = 2008,129 ARKUI_KEYCODE_8 = 2008,
92- /** Key 9 **/130+ /**
131+ * Key 9
132+ */
93 ARKUI_KEYCODE_9 = 2009,133 ARKUI_KEYCODE_9 = 2009,
94- /** Key + **/134+ /**
135+ * Key +
136+ */
95 ARKUI_KEYCODE_STAR = 2010,137 ARKUI_KEYCODE_STAR = 2010,
96- /** Key # **/138+ /**
139+ * Key #
140+ */
97 ARKUI_KEYCODE_POUND = 2011,141 ARKUI_KEYCODE_POUND = 2011,
98- /** Up key on D-pad **/142+ /**
143+ * Up key on D-pad.
144+ */
99 ARKUI_KEYCODE_DPAD_UP = 2012,145 ARKUI_KEYCODE_DPAD_UP = 2012,
100- /** Down key on D-pad **/146+ /**
147+ * Down key on D-pad.
148+ */
101 ARKUI_KEYCODE_DPAD_DOWN = 2013,149 ARKUI_KEYCODE_DPAD_DOWN = 2013,
102- /** Left key on D-pad **/150+ /**
151+ * Left key on D-pad.
152+ */
103 ARKUI_KEYCODE_DPAD_LEFT = 2014,153 ARKUI_KEYCODE_DPAD_LEFT = 2014,
104- /** Right key on D-pad **/154+ /**
155+ * Right key on D-pad.
156+ */
105 ARKUI_KEYCODE_DPAD_RIGHT = 2015,157 ARKUI_KEYCODE_DPAD_RIGHT = 2015,
106- /** OK key on D-pad **/158+ /**
159+ * Center key on D-pad.
160+ */
107 ARKUI_KEYCODE_DPAD_CENTER = 2016,161 ARKUI_KEYCODE_DPAD_CENTER = 2016,
108- /** Key A **/162+ /**
163+ * Key A
164+ */
109 ARKUI_KEYCODE_A = 2017,165 ARKUI_KEYCODE_A = 2017,
110- /** Key B **/166+ /**
167+ * Key B
168+ */
111 ARKUI_KEYCODE_B = 2018,169 ARKUI_KEYCODE_B = 2018,
112- /** Key C **/170+ /**
171+ * Key C
172+ */
113 ARKUI_KEYCODE_C = 2019,173 ARKUI_KEYCODE_C = 2019,
114- /** Key D **/174+ /**
175+ * Key D
176+ */
115 ARKUI_KEYCODE_D = 2020,177 ARKUI_KEYCODE_D = 2020,
116- /** Key E **/178+ /**
179+ * Key E
180+ */
117 ARKUI_KEYCODE_E = 2021,181 ARKUI_KEYCODE_E = 2021,
118- /** Key F **/182+ /**
183+ * Key F
184+ */
119 ARKUI_KEYCODE_F = 2022,185 ARKUI_KEYCODE_F = 2022,
120- /** Key G **/186+ /**
187+ * Key G
188+ */
121 ARKUI_KEYCODE_G = 2023,189 ARKUI_KEYCODE_G = 2023,
122- /** Key H **/190+ /**
191+ * Key H
192+ */
123 ARKUI_KEYCODE_H = 2024,193 ARKUI_KEYCODE_H = 2024,
124- /** Key I **/194+ /**
195+ * Key I
196+ */
125 ARKUI_KEYCODE_I = 2025,197 ARKUI_KEYCODE_I = 2025,
126- /** Key J **/198+ /**
199+ * Key J
200+ */
127 ARKUI_KEYCODE_J = 2026,201 ARKUI_KEYCODE_J = 2026,
128- /** Key K **/202+ /**
203+ * Key K
204+ */
129 ARKUI_KEYCODE_K = 2027,205 ARKUI_KEYCODE_K = 2027,
130- /** Key L **/206+ /**
207+ * Key L
208+ */
131 ARKUI_KEYCODE_L = 2028,209 ARKUI_KEYCODE_L = 2028,
132- /** Key M **/210+ /**
211+ * Key M
212+ */
133 ARKUI_KEYCODE_M = 2029,213 ARKUI_KEYCODE_M = 2029,
134- /** Key N **/214+ /**
215+ * Key N
216+ */
135 ARKUI_KEYCODE_N = 2030,217 ARKUI_KEYCODE_N = 2030,
136- /** Key O **/218+ /**
219+ * Key O
220+ */
137 ARKUI_KEYCODE_O = 2031,221 ARKUI_KEYCODE_O = 2031,
138- /** Key P **/222+ /**
223+ * Key P
224+ */
139 ARKUI_KEYCODE_P = 2032,225 ARKUI_KEYCODE_P = 2032,
140- /** Key R **/226+ /**
227+ * Key Q
228+ */
141 ARKUI_KEYCODE_Q = 2033,229 ARKUI_KEYCODE_Q = 2033,
142 /** Key R **/230 /** Key R **/
143 ARKUI_KEYCODE_R = 2034,231 ARKUI_KEYCODE_R = 2034,
144- /** Key S **/232+ /**
233+ * Key S
234+ */
145 ARKUI_KEYCODE_S = 2035,235 ARKUI_KEYCODE_S = 2035,
146- /** Key T **/236+ /**
237+ * Key T
238+ */
147 ARKUI_KEYCODE_T = 2036,239 ARKUI_KEYCODE_T = 2036,
148- /** Key U **/240+ /**
241+ * Key U
242+ */
149 ARKUI_KEYCODE_U = 2037,243 ARKUI_KEYCODE_U = 2037,
150- /** Key V **/244+ /**
245+ * Key V
246+ */
151 ARKUI_KEYCODE_V = 2038,247 ARKUI_KEYCODE_V = 2038,
152- /** Key W **/248+ /**
249+ * Key W
250+ */
153 ARKUI_KEYCODE_W = 2039,251 ARKUI_KEYCODE_W = 2039,
154- /** Key X **/252+ /**
253+ * Key X
254+ */
155 ARKUI_KEYCODE_X = 2040,255 ARKUI_KEYCODE_X = 2040,
156- /** Key Y **/256+ /**
257+ * Key Y
258+ */
157 ARKUI_KEYCODE_Y = 2041,259 ARKUI_KEYCODE_Y = 2041,
158- /** Key Z **/260+ /**
261+ * Key Z
262+ */
159 ARKUI_KEYCODE_Z = 2042,263 ARKUI_KEYCODE_Z = 2042,
160- /** Key , **/264+ /**
265+ * Key ,
266+ */
161 ARKUI_KEYCODE_COMMA = 2043,267 ARKUI_KEYCODE_COMMA = 2043,
162- /** Key . **/268+ /**
269+ * Key .
270+ */
163 ARKUI_KEYCODE_PERIOD = 2044,271 ARKUI_KEYCODE_PERIOD = 2044,
164- /** Left Alt key **/272+ /**
273+ * Left Alt key
274+ */
165 ARKUI_KEYCODE_ALT_LEFT = 2045,275 ARKUI_KEYCODE_ALT_LEFT = 2045,
166- /** Right Alt key **/276+ /**
277+ * Right Alt key
278+ */
167 ARKUI_KEYCODE_ALT_RIGHT = 2046,279 ARKUI_KEYCODE_ALT_RIGHT = 2046,
168- /** Left Shift key **/280+ /**
281+ * Left Shift key
282+ */
169 ARKUI_KEYCODE_SHIFT_LEFT = 2047,283 ARKUI_KEYCODE_SHIFT_LEFT = 2047,
170- /** Right Shift key **/284+ /**
285+ * Right Shift key
286+ */
171 ARKUI_KEYCODE_SHIFT_RIGHT = 2048,287 ARKUI_KEYCODE_SHIFT_RIGHT = 2048,
172- /** Tab key **/288+ /**
289+ * Tab key
290+ */
173 ARKUI_KEYCODE_TAB = 2049,291 ARKUI_KEYCODE_TAB = 2049,
174- /** Space key **/292+ /**
293+ * Space key
294+ */
175 ARKUI_KEYCODE_SPACE = 2050,295 ARKUI_KEYCODE_SPACE = 2050,
176- /** Symbol key **/296+ /**
297+ * Symbol key
298+ */
177 ARKUI_KEYCODE_SYM = 2051,299 ARKUI_KEYCODE_SYM = 2051,
178- /** Explorer key, used to start the explorer application **/300+ /**
301+ * Explorer key, which is used to start the explorer application
302+ */
179 ARKUI_KEYCODE_EXPLORER = 2052,303 ARKUI_KEYCODE_EXPLORER = 2052,
180- /** Email key, used to start the email application **/304+ /**
305+ * Email key, which is used to start the email application
306+ */
181 ARKUI_KEYCODE_ENVELOPE = 2053,307 ARKUI_KEYCODE_ENVELOPE = 2053,
182- /** Enter key **/308+ /**
309+ * Enter key
310+ */
183 ARKUI_KEYCODE_ENTER = 2054,311 ARKUI_KEYCODE_ENTER = 2054,
184- /** Backspace key **/312+ /**
313+ * Delete key
314+ */
185 ARKUI_KEYCODE_DEL = 2055,315 ARKUI_KEYCODE_DEL = 2055,
186- /** Key ` **/316+ /**
317+ * Key `
318+ */
187 ARKUI_KEYCODE_GRAVE = 2056,319 ARKUI_KEYCODE_GRAVE = 2056,
188- /** Key - **/320+ /**
321+ * Key -
322+ */
189 ARKUI_KEYCODE_MINUS = 2057,323 ARKUI_KEYCODE_MINUS = 2057,
190- /** Key = **/324+ /**
325+ * Key =
326+ */
191 ARKUI_KEYCODE_EQUALS = 2058,327 ARKUI_KEYCODE_EQUALS = 2058,
192- /** Key [ **/328+ /**
329+ * Key [
330+ */
193 ARKUI_KEYCODE_LEFT_BRACKET = 2059,331 ARKUI_KEYCODE_LEFT_BRACKET = 2059,
194- /** Key ]**/332+ /**
333+ * Key ]
334+ */
195 ARKUI_KEYCODE_RIGHT_BRACKET = 2060,335 ARKUI_KEYCODE_RIGHT_BRACKET = 2060,
196- /** Key \\ **/336+ /**
337+ * Key \
338+ */
197 ARKUI_KEYCODE_BACKSLASH = 2061,339 ARKUI_KEYCODE_BACKSLASH = 2061,
198- /** Key ; **/340+ /**
341+ * Key ;
342+ */
199 ARKUI_KEYCODE_SEMICOLON = 2062,343 ARKUI_KEYCODE_SEMICOLON = 2062,
200- /** Key ' **/344+ /**
345+ * Key '
346+ */
201 ARKUI_KEYCODE_APOSTROPHE = 2063,347 ARKUI_KEYCODE_APOSTROPHE = 2063,
202- /** Key / **/348+ /**
349+ * Key /
350+ */
203 ARKUI_KEYCODE_SLASH = 2064,351 ARKUI_KEYCODE_SLASH = 2064,
204- /** Key @ **/352+ /**
353+ * Key @
354+ */
205 ARKUI_KEYCODE_AT = 2065,355 ARKUI_KEYCODE_AT = 2065,
206- /** Key + **/356+ /**
357+ * Key +
358+ */
207 ARKUI_KEYCODE_PLUS = 2066,359 ARKUI_KEYCODE_PLUS = 2066,
208- /** Menu key **/360+ /**
361+ * Menu key
362+ */
209 ARKUI_KEYCODE_MENU = 2067,363 ARKUI_KEYCODE_MENU = 2067,
210- /** Page Up key **/364+ /**
365+ * Page Up key
366+ */
211 ARKUI_KEYCODE_PAGE_UP = 2068,367 ARKUI_KEYCODE_PAGE_UP = 2068,
212- /** Page Down key **/368+ /**
369+ * Page Down key
370+ */
213 ARKUI_KEYCODE_PAGE_DOWN = 2069,371 ARKUI_KEYCODE_PAGE_DOWN = 2069,
214- /** ESC key **/372+ /**
373+ * ESC key.
374+ */
215 ARKUI_KEYCODE_ESCAPE = 2070,375 ARKUI_KEYCODE_ESCAPE = 2070,
216- /** Delete key **/376+ /**
377+ * Forward Delete key
378+ */
217 ARKUI_KEYCODE_FORWARD_DEL = 2071,379 ARKUI_KEYCODE_FORWARD_DEL = 2071,
218- /** Left Ctrl key **/380+ /**
381+ * Left Ctrl key
382+ */
219 ARKUI_KEYCODE_CTRL_LEFT = 2072,383 ARKUI_KEYCODE_CTRL_LEFT = 2072,
220- /** Right Ctrl key **/384+ /**
385+ * Right Ctrl key
386+ */
221 ARKUI_KEYCODE_CTRL_RIGHT = 2073,387 ARKUI_KEYCODE_CTRL_RIGHT = 2073,
222- /** Caps Lock key **/388+ /**
389+ * Caps Lock key
390+ */
223 ARKUI_KEYCODE_CAPS_LOCK = 2074,391 ARKUI_KEYCODE_CAPS_LOCK = 2074,
224- /** Scroll Lock key **/392+ /**
393+ * Scroll Lock key
394+ */
225 ARKUI_KEYCODE_SCROLL_LOCK = 2075,395 ARKUI_KEYCODE_SCROLL_LOCK = 2075,
226- /** Left Meta key **/396+ /**
397+ * Left Meta key
398+ */
227 ARKUI_KEYCODE_META_LEFT = 2076,399 ARKUI_KEYCODE_META_LEFT = 2076,
228- /** Right Meta key **/400+ /**
401+ * Right Meta key
402+ */
229 ARKUI_KEYCODE_META_RIGHT = 2077,403 ARKUI_KEYCODE_META_RIGHT = 2077,
230- /** Function key **/404+ /**
405+ * Function key
406+ */
231 ARKUI_KEYCODE_FUNCTION = 2078,407 ARKUI_KEYCODE_FUNCTION = 2078,
232- /** System Request/Print Screen key **/408+ /**
409+ * System Request/Print Screen key
410+ */
233 ARKUI_KEYCODE_SYSRQ = 2079,411 ARKUI_KEYCODE_SYSRQ = 2079,
234- /** Break/Pause key **/412+ /**
413+ * Break/Pause key
414+ */
235 ARKUI_KEYCODE_BREAK = 2080,415 ARKUI_KEYCODE_BREAK = 2080,
236- /** Move to Home key **/416+ /**
417+ * Move to Home key
418+ */
237 ARKUI_KEYCODE_MOVE_HOME = 2081,419 ARKUI_KEYCODE_MOVE_HOME = 2081,
238- /** Move to End key **/420+ /**
421+ * Move to End key
422+ */
239 ARKUI_KEYCODE_MOVE_END = 2082,423 ARKUI_KEYCODE_MOVE_END = 2082,
240- /** Insert key **/424+ /**
425+ * Insert key
426+ */
241 ARKUI_KEYCODE_INSERT = 2083,427 ARKUI_KEYCODE_INSERT = 2083,
242- /** Forward key **/428+ /**
429+ * Forward key
430+ */
243 ARKUI_KEYCODE_FORWARD = 2084,431 ARKUI_KEYCODE_FORWARD = 2084,
244- /** Play key **/432+ /**
433+ * Play key
434+ */
245 ARKUI_KEYCODE_MEDIA_PLAY = 2085,435 ARKUI_KEYCODE_MEDIA_PLAY = 2085,
246- /** Pause key **/436+ /**
437+ * Pause key
438+ */
247 ARKUI_KEYCODE_MEDIA_PAUSE = 2086,439 ARKUI_KEYCODE_MEDIA_PAUSE = 2086,
248- /** Close key **/440+ /**
441+ * Close key
442+ */
249 ARKUI_KEYCODE_MEDIA_CLOSE = 2087,443 ARKUI_KEYCODE_MEDIA_CLOSE = 2087,
250- /** Eject key **/444+ /**
445+ * Eject key
446+ */
251 ARKUI_KEYCODE_MEDIA_EJECT = 2088,447 ARKUI_KEYCODE_MEDIA_EJECT = 2088,
252- /** Record key **/448+ /**
449+ * Record key
450+ */
253 ARKUI_KEYCODE_MEDIA_RECORD = 2089,451 ARKUI_KEYCODE_MEDIA_RECORD = 2089,
254- /** F1 key **/452+ /**
453+ * F1 key
454+ */
255 ARKUI_KEYCODE_F1 = 2090,455 ARKUI_KEYCODE_F1 = 2090,
256- /** F2 key **/456+ /**
457+ * F2 key
458+ */
257 ARKUI_KEYCODE_F2 = 2091,459 ARKUI_KEYCODE_F2 = 2091,
258- /** F3 key **/460+ /**
461+ * F3 key
462+ */
259 ARKUI_KEYCODE_F3 = 2092,463 ARKUI_KEYCODE_F3 = 2092,
260- /** F4 key **/464+ /**
465+ * F4 key
466+ */
261 ARKUI_KEYCODE_F4 = 2093,467 ARKUI_KEYCODE_F4 = 2093,
262- /** F5 key **/468+ /**
469+ * F5 key
470+ */
263 ARKUI_KEYCODE_F5 = 2094,471 ARKUI_KEYCODE_F5 = 2094,
264- /** F6 key **/472+ /**
473+ * F6 key
474+ */
265 ARKUI_KEYCODE_F6 = 2095,475 ARKUI_KEYCODE_F6 = 2095,
266- /** F7 key **/476+ /**
477+ * F7 key
478+ */
267 ARKUI_KEYCODE_F7 = 2096,479 ARKUI_KEYCODE_F7 = 2096,
268- /** F8 key **/480+ /**
481+ * F8 key
482+ */
269 ARKUI_KEYCODE_F8 = 2097,483 ARKUI_KEYCODE_F8 = 2097,
270- /** F9 key **/484+ /**
485+ * F9 key
486+ */
271 ARKUI_KEYCODE_F9 = 2098,487 ARKUI_KEYCODE_F9 = 2098,
272- /** F10 key **/488+ /**
489+ * F10 key
490+ */
273 ARKUI_KEYCODE_F10 = 2099,491 ARKUI_KEYCODE_F10 = 2099,
274- /** F11 key **/492+ /**
493+ * F11 key
494+ */
275 ARKUI_KEYCODE_F11 = 2100,495 ARKUI_KEYCODE_F11 = 2100,
276- /** F12 key **/496+ /**
497+ * F12 key
498+ */
277 ARKUI_KEYCODE_F12 = 2101,499 ARKUI_KEYCODE_F12 = 2101,
278- /** Number Lock key on numeric keypad **/500+ /**
501+ * Number Lock key on numeric keypad
502+ */
279 ARKUI_KEYCODE_NUM_LOCK = 2102,503 ARKUI_KEYCODE_NUM_LOCK = 2102,
280- /** Key 0 on numeric keypad **/504+ /**
505+ * Key 0 on numeric keypad
506+ */
281 ARKUI_KEYCODE_NUMPAD_0 = 2103,507 ARKUI_KEYCODE_NUMPAD_0 = 2103,
282- /** Key 1 on numeric keypad **/508+ /**
509+ * Key 1 on numeric keypad
510+ */
283 ARKUI_KEYCODE_NUMPAD_1 = 2104,511 ARKUI_KEYCODE_NUMPAD_1 = 2104,
284- /** Key 2 on numeric keypad **/512+ /**
513+ * Key 2 on numeric keypad
514+ */
285 ARKUI_KEYCODE_NUMPAD_2 = 2105,515 ARKUI_KEYCODE_NUMPAD_2 = 2105,
286- /** Key 3 on numeric keypad **/516+ /**
517+ * Key 3 on numeric keypad
518+ */
287 ARKUI_KEYCODE_NUMPAD_3 = 2106,519 ARKUI_KEYCODE_NUMPAD_3 = 2106,
288- /** Key 4 on numeric keypad **/520+ /**
521+ * Key 4 on numeric keypad
522+ */
289 ARKUI_KEYCODE_NUMPAD_4 = 2107,523 ARKUI_KEYCODE_NUMPAD_4 = 2107,
290- /** Key 5 on numeric keypad **/524+ /**
525+ * Key 5 on numeric keypad
526+ */
291 ARKUI_KEYCODE_NUMPAD_5 = 2108,527 ARKUI_KEYCODE_NUMPAD_5 = 2108,
292- /** Key 6 on numeric keypad **/528+ /**
529+ * Key 6 on numeric keypad
530+ */
293 ARKUI_KEYCODE_NUMPAD_6 = 2109,531 ARKUI_KEYCODE_NUMPAD_6 = 2109,
294- /** Key 7 on numeric keypad **/532+ /**
533+ * Key 7 on numeric keypad
534+ */
295 ARKUI_KEYCODE_NUMPAD_7 = 2110,535 ARKUI_KEYCODE_NUMPAD_7 = 2110,
296- /** Key 8 on numeric keypad **/536+ /**
537+ * Key 8 on numeric keypad
538+ */
297 ARKUI_KEYCODE_NUMPAD_8 = 2111,539 ARKUI_KEYCODE_NUMPAD_8 = 2111,
298- /** Key 9 on numeric keypad **/540+ /**
541+ * Key 9 on numeric keypad
542+ */
299 ARKUI_KEYCODE_NUMPAD_9 = 2112,543 ARKUI_KEYCODE_NUMPAD_9 = 2112,
300- /** Key / on numeric keypad **/544+ /**
545+ * Key / on numeric keypad
546+ */
301 ARKUI_KEYCODE_NUMPAD_DIVIDE = 2113,547 ARKUI_KEYCODE_NUMPAD_DIVIDE = 2113,
302- /** Key * on numeric keypad **/548+ /**
549+ * Key * on numeric keypad
550+ */
303 ARKUI_KEYCODE_NUMPAD_MULTIPLY = 2114,551 ARKUI_KEYCODE_NUMPAD_MULTIPLY = 2114,
304- /** Key - on numeric keypad **/552+ /**
553+ * Key - on numeric keypad
554+ */
305 ARKUI_KEYCODE_NUMPAD_SUBTRACT = 2115,555 ARKUI_KEYCODE_NUMPAD_SUBTRACT = 2115,
306- /** Key + on numeric keypad **/556+ /**
557+ * Key + on numeric keypad
558+ */
307 ARKUI_KEYCODE_NUMPAD_ADD = 2116,559 ARKUI_KEYCODE_NUMPAD_ADD = 2116,
308- /** Key . on numeric keypad **/560+ /**
561+ * Key . on numeric keypad
562+ */
309 ARKUI_KEYCODE_NUMPAD_DOT = 2117,563 ARKUI_KEYCODE_NUMPAD_DOT = 2117,
310- /** Key , on numeric keypad **/564+ /**
565+ * Key , on numeric keypad
566+ */
311 ARKUI_KEYCODE_NUMPAD_COMMA = 2118,567 ARKUI_KEYCODE_NUMPAD_COMMA = 2118,
312- /** Enter key on numeric keypad **/568+ /**
569+ * Enter key on numeric keypad
570+ */
313 ARKUI_KEYCODE_NUMPAD_ENTER = 2119,571 ARKUI_KEYCODE_NUMPAD_ENTER = 2119,
314- /** Key = on numeric keypad **/572+ /**
573+ * Key = on numeric keypad
574+ */
315 ARKUI_KEYCODE_NUMPAD_EQUALS = 2120,575 ARKUI_KEYCODE_NUMPAD_EQUALS = 2120,
316- /** Key ( on numeric keypad **/576+ /**
577+ * Key ( on numeric keypad
578+ */
317 ARKUI_KEYCODE_NUMPAD_LEFT_PAREN = 2121,579 ARKUI_KEYCODE_NUMPAD_LEFT_PAREN = 2121,
318- /** Key ) on numeric keypad **/580+ /**
581+ * Key ) on numeric keypad
582+ */
319 ARKUI_KEYCODE_NUMPAD_RIGHT_PAREN = 2122,583 ARKUI_KEYCODE_NUMPAD_RIGHT_PAREN = 2122,
320 /**584 /**
321 * Joystick key A585 * Joystick key A
322 * @since 15586 * @since 15
323- */587+ */
324 ARKUI_KEYCODE_BUTTON_A = 2301,588 ARKUI_KEYCODE_BUTTON_A = 2301,
325 /**589 /**
326 * Joystick key B590 * Joystick key B
327 * @since 15591 * @since 15
328- */592+ */
329 ARKUI_KEYCODE_BUTTON_B = 2302,593 ARKUI_KEYCODE_BUTTON_B = 2302,
330 /**594 /**
331 * Joystick key X595 * Joystick key X
332 * @since 15596 * @since 15
333- */597+ */
334 ARKUI_KEYCODE_BUTTON_X = 2304,598 ARKUI_KEYCODE_BUTTON_X = 2304,
335 /**599 /**
336 * Joystick key Y600 * Joystick key Y
337 * @since 15601 * @since 15
338- */602+ */
339 ARKUI_KEYCODE_BUTTON_Y = 2305,603 ARKUI_KEYCODE_BUTTON_Y = 2305,
340 /**604 /**
341 * Joystick key L1605 * Joystick key L1
342 * @since 15606 * @since 15
343- */607+ */
344 ARKUI_KEYCODE_BUTTON_L1 = 2307,608 ARKUI_KEYCODE_BUTTON_L1 = 2307,
345 /**609 /**
346 * Joystick key R1610 * Joystick key R1
347 * @since 15611 * @since 15
348- */612+ */
349 ARKUI_KEYCODE_BUTTON_R1 = 2308,613 ARKUI_KEYCODE_BUTTON_R1 = 2308,
350 /**614 /**
351 * Joystick key L2615 * Joystick key L2
352 * @since 15616 * @since 15
353- */617+ */
354 ARKUI_KEYCODE_BUTTON_L2 = 2309,618 ARKUI_KEYCODE_BUTTON_L2 = 2309,
355 /**619 /**
356 * Joystick key R2620 * Joystick key R2
357 * @since 15621 * @since 15
358- */622+ */
359 ARKUI_KEYCODE_BUTTON_R2 = 2310,623 ARKUI_KEYCODE_BUTTON_R2 = 2310,
360 /**624 /**
361 * Joystick key Select625 * Joystick key Select
362 * @since 15626 * @since 15
363- */627+ */
364 ARKUI_KEYCODE_BUTTON_SELECT = 2311,628 ARKUI_KEYCODE_BUTTON_SELECT = 2311,
365 /**629 /**
366 * Joystick key Start630 * Joystick key Start
367 * @since 15631 * @since 15
368- */632+ */
369 ARKUI_KEYCODE_BUTTON_START = 2312,633 ARKUI_KEYCODE_BUTTON_START = 2312,
370 /**634 /**
371 * Joystick key Mode635 * Joystick key Mode
372 * @since 15636 * @since 15
373- */637+ */
374 ARKUI_KEYCODE_BUTTON_MODE = 2313,638 ARKUI_KEYCODE_BUTTON_MODE = 2313,
375 /**639 /**
376 * Joystick key THUMBL640 * Joystick key THUMBL
377 * @since 15641 * @since 15
378- */642+ */
379 ARKUI_KEYCODE_BUTTON_THUMBL = 2314,643 ARKUI_KEYCODE_BUTTON_THUMBL = 2314,
380 /**644 /**
381 * Joystick key THUMBR645 * Joystick key THUMBR
382 * @since 15646 * @since 15
383- */647+ */
384 ARKUI_KEYCODE_BUTTON_THUMBR = 2315,648 ARKUI_KEYCODE_BUTTON_THUMBR = 2315,
385} ArkUI_KeyCode;649} ArkUI_KeyCode;
386 650 
387/**651/**
388- * @brief Defines an enum for the key event types.652+ * @brief Enumerates the types of key events.
389 *653 *
390 * @since 14654 * @since 14
391 */655 */
392typedef enum {656typedef enum {
393- /** Unknown type **/657+ /**
658+ * Unknown type.
659+ */
394 ARKUI_KEY_EVENT_UNKNOWN = -1,660 ARKUI_KEY_EVENT_UNKNOWN = -1,
395- /** Pressing of a key **/661+ /**
662+ * Key press.
663+ */
396 ARKUI_KEY_EVENT_DOWN = 0,664 ARKUI_KEY_EVENT_DOWN = 0,
397- /** Release of a key **/665+ /**
666+ * Release of a key.
667+ */
398 ARKUI_KEY_EVENT_UP = 1,668 ARKUI_KEY_EVENT_UP = 1,
399- /** Long press of a key **/669+ /**
670+ * Long press of a key.
671+ */
400 ARKUI_KEY_EVENT_LONG_PRESS = 2,672 ARKUI_KEY_EVENT_LONG_PRESS = 2,
401- /** Click of a key **/673+ /**
674+ * Click of a key.
675+ */
402 ARKUI_KEY_EVENT_CLICK = 3,676 ARKUI_KEY_EVENT_CLICK = 3,
403} ArkUI_KeyEventType;677} ArkUI_KeyEventType;
404 678 
405/**679/**
406- * @brief Defines an enum for the types of devices that trigger a key event.680+ * @brief Enumerates the types of input devices that trigger key events.
407 *681 *
408 * @since 14682 * @since 14
409 */683 */
410typedef enum {684typedef enum {
411- /** Unknown type **/685+ /**
686+ * Unknown type.
687+ */
412 ARKUI_KEY_SOURCE_UNKNOWN = 0,688 ARKUI_KEY_SOURCE_UNKNOWN = 0,
413- /** Mouse **/689+ /**
690+ * Mouse.
691+ */
414 ARKUI_KEY_SOURCE_TYPE_MOUSE = 1,692 ARKUI_KEY_SOURCE_TYPE_MOUSE = 1,
415- /** Keyboard **/693+ /**
694+ * Keyboard.
695+ */
416 ARKUI_KEY_SOURCE_TYPE_KEYBOARD = 4,696 ARKUI_KEY_SOURCE_TYPE_KEYBOARD = 4,
417 /**697 /**
418- * @brief Joystick.698+ * @brief Game controller.
419 *699 *
420 * @since 15700 * @since 15
421 */701 */
@@ -423,187 +703,238 @@ typedef enum {
423} ArkUI_KeySourceType;703} ArkUI_KeySourceType;
424 704 
425/**705/**
426- * @brief Defines an enum for key intentions.706+ * @brief Enumerates the intentions corresponding to key events.
427 *707 *
428 * @since 14708 * @since 14
429 */709 */
430typedef enum {710typedef enum {
431- /** Unknown intention **/711+ /**
712+ * Unknown intention.
713+ */
432 ARKUI_KEY_INTENSION_UNKNOWN = -1,714 ARKUI_KEY_INTENSION_UNKNOWN = -1,
433- /**Upward**/715+ /**
716+ * Upward.
717+ */
434 ARKUI_KEY_INTENSION_UP = 1,718 ARKUI_KEY_INTENSION_UP = 1,
435- /** Downward **/719+ /**
720+ * Downward.
721+ */
436 ARKUI_KEY_INTENSION_DOWN = 2,722 ARKUI_KEY_INTENSION_DOWN = 2,
437- /** Leftward **/723+ /**
724+ * Leftward.
725+ */
438 ARKUI_KEY_INTENSION_LEFT = 3,726 ARKUI_KEY_INTENSION_LEFT = 3,
439- /** Rightward **/727+ /**
728+ * Rightward.
729+ */
440 ARKUI_KEY_INTENSION_RIGHT = 4,730 ARKUI_KEY_INTENSION_RIGHT = 4,
441- /** Select **/731+ /**
732+ * Select.
733+ */
442 ARKUI_KEY_INTENSION_SELECT = 5,734 ARKUI_KEY_INTENSION_SELECT = 5,
443 /** Escape **/735 /** Escape **/
444 ARKUI_KEY_INTENSION_ESCAPE = 6,736 ARKUI_KEY_INTENSION_ESCAPE = 6,
445- /** Back**/737+ /**
738+ * Back.
739+ */
446 ARKUI_KEY_INTENSION_BACK = 7,740 ARKUI_KEY_INTENSION_BACK = 7,
447- /** Forward **/741+ /**
742+ * Forward.
743+ */
448 ARKUI_KEY_INTENSION_FORWARD = 8,744 ARKUI_KEY_INTENSION_FORWARD = 8,
449- /** Menu **/745+ /**
746+ * Menu.
747+ */
450 ARKUI_KEY_INTENSION_MENU = 9,748 ARKUI_KEY_INTENSION_MENU = 9,
451- /** Home **/749+ /**
750+ * Home page.
751+ */
452 ARKUI_KEY_INTENSION_HOME = 10,752 ARKUI_KEY_INTENSION_HOME = 10,
453- /** Page up **/753+ /**
754+ * Previous.
755+ */
454 ARKUI_KEY_INTENSION_PAGE_UP = 11,756 ARKUI_KEY_INTENSION_PAGE_UP = 11,
455- /** Page down **/757+ /**
758+ * Next.
759+ */
456 ARKUI_KEY_INTENSION_PAGE_DOWN = 12,760 ARKUI_KEY_INTENSION_PAGE_DOWN = 12,
457- /** Zoom out **/761+ /**
762+ * Zoom out.
763+ */
458 ARKUI_KEY_INTENSION_ZOOM_OUT = 13,764 ARKUI_KEY_INTENSION_ZOOM_OUT = 13,
459- /** Zoom in **/765+ /**
766+ * Zoom in.
767+ */
460 ARKUI_KEY_INTENSION_ZOOM_IN = 14,768 ARKUI_KEY_INTENSION_ZOOM_IN = 14,
461 769 
462 /** Play or pause **/770 /** Play or pause **/
463 ARKUI_KEY_INTENTION_MEDIA_PLAY_PAUSE = 100,771 ARKUI_KEY_INTENTION_MEDIA_PLAY_PAUSE = 100,
464- /** Fast-forward **/772+ /**
773+ * Fast-forward.
774+ */
465 ARKUI_KEY_INTENTION_MEDIA_FAST_FORWARD = 101,775 ARKUI_KEY_INTENTION_MEDIA_FAST_FORWARD = 101,
466- /** Fast playback **/776+ /**
777+ * Fast playback.
778+ */
467 ARKUI_KEY_INTENTION_MEDIA_FAST_PLAYBACK = 103,779 ARKUI_KEY_INTENTION_MEDIA_FAST_PLAYBACK = 103,
468- /** Play next **/780+ /**
781+ * Play the next media asset.
782+ */
469 ARKUI_KEY_INTENTION_MEDIA_NEXT = 104,783 ARKUI_KEY_INTENTION_MEDIA_NEXT = 104,
470- /** Play previous **/784+ /**
785+ * Play the previous media asset.
786+ */
471 ARKUI_KEY_INTENTION_MEDIA_PREVIOUS = 105,787 ARKUI_KEY_INTENTION_MEDIA_PREVIOUS = 105,
472- /** Mute **/788+ /**
789+ * Mute.
790+ */
473 ARKUI_KEY_INTENTION_MEDIA_MUTE = 106,791 ARKUI_KEY_INTENTION_MEDIA_MUTE = 106,
474- /** Volume up **/792+ /**
793+ * Volume up.
794+ */
475 ARKUI_KEY_INTENTION_VOLUME_UP = 107,795 ARKUI_KEY_INTENTION_VOLUME_UP = 107,
476- /** Volume down **/796+ /**
797+ * Volume down.
798+ */
477 ARKUI_KEY_INTENTION_VOLUME_DOWN = 108,799 ARKUI_KEY_INTENTION_VOLUME_DOWN = 108,
478 800 
479- /** Answer a call **/801+ /**
802+ * Answer a call.
803+ */
480 ARKUI_KEY_INTENTION_CALL = 200,804 ARKUI_KEY_INTENTION_CALL = 200,
481- /** Camera **/805+ /**
806+ * Take a photo.
807+ */
482 ARKUI_KEY_INTENTION_CAMERA = 300,808 ARKUI_KEY_INTENTION_CAMERA = 300,
483} ArkUI_KeyIntension;809} ArkUI_KeyIntension;
484 810 
485/**811/**
486- * @brief Obtains the type of a key event.812+ * @brief Obtains the type of the specified key event.
487 *813 *
488- * @param event Pointer to an <b>ArkUI_UIInputEvent</b> object.814+ * @param event Pointer to the target **ArkUI_UIInputEvent** object.
489- * @return Returns the key event type.815+ * @return Key event type.
490 * @since 14816 * @since 14
491 */817 */
492ArkUI_KeyEventType OH_ArkUI_KeyEvent_GetType(const ArkUI_UIInputEvent* event);818ArkUI_KeyEventType OH_ArkUI_KeyEvent_GetType(const ArkUI_UIInputEvent* event);
493 819 
494/**820/**
495- * @brief Obtains the key code from a key event.821+ * @brief Obtains the key code from the specified key event.
496 *822 *
497- * @param event Pointer to an <b>ArkUI_UIInputEvent</b> object.823+ * @param event Pointer to the target **ArkUI_UIInputEvent** object.
498- * @return Returns the key code.824+ * @return Key code.
499 * @since 14825 * @since 14
500 */826 */
501int32_t OH_ArkUI_KeyEvent_GetKeyCode(const ArkUI_UIInputEvent* event);827int32_t OH_ArkUI_KeyEvent_GetKeyCode(const ArkUI_UIInputEvent* event);
502 828 
503/**829/**
504- * @brief Obtains the key value from a key event.830+ * @brief Obtains the key value from the specified key event.
505 *831 *
506- * @param event Pointer to an <b>ArkUI_UIInputEvent</b> object.832+ * @param event Pointer to the target **ArkUI_UIInputEvent** object.
507- * @return Returns the key value.833+ * @return Key value.
508 * @since 14834 * @since 14
509 */835 */
510const char *OH_ArkUI_KeyEvent_GetKeyText(const ArkUI_UIInputEvent* event);836const char *OH_ArkUI_KeyEvent_GetKeyText(const ArkUI_UIInputEvent* event);
511 837 
512/**838/**
513- * @brief Obtains the type of device that triggers a key event.839+ * @brief Obtains the type of input device that triggers the specified key event.
514 *840 *
515- * @param event Pointer to an <b>ArkUI_UIInputEvent</b> object.841+ * @param event Pointer to the target **ArkUI_UIInputEvent** object.
516- * @return Returns the device type.842+ * @return Input device type.
517 * @since 14843 * @since 14
518 */844 */
519ArkUI_KeySourceType OH_ArkUI_KeyEvent_GetKeySource(const ArkUI_UIInputEvent* event);845ArkUI_KeySourceType OH_ArkUI_KeyEvent_GetKeySource(const ArkUI_UIInputEvent* event);
520 846 
521/**847/**
522- * @brief Prevents a key event from bubbling up.848+ * @brief Stops the specified key event from bubbling upwards or downwards.
523 *849 *
524- * @param event Pointer to an <b>ArkUI_UIInputEvent</b> object.850+ * @param event Pointer to the target **ArkUI_UIInputEvent** object.
525- * @param stopPropagation Whether to stop event propagation.851+ * @param stopPropagation Whether to stop event propagation. The value **true** means to stop event propagation, and **
852+ * false** means the opposite.
526 * @since 14853 * @since 14
527 */854 */
528void OH_ArkUI_KeyEvent_StopPropagation(const ArkUI_UIInputEvent* event, bool stopPropagation);855void OH_ArkUI_KeyEvent_StopPropagation(const ArkUI_UIInputEvent* event, bool stopPropagation);
529 856 
530/**857/**
531- * @brief Obtains the intention code associated with a key event.858+ * @brief Obtains the intention code associated with the specified key event.
532 *859 *
533- * @param event Pointer to an <b>ArkUI_UIInputEvent</b> object.860+ * @param event Pointer to the target **ArkUI_UIInputEvent** object.
534- * @return Returns the intention code associated with the key event.861+ * @return Intention code associated with the key event.
535 * @since 14862 * @since 14
536 */863 */
537ArkUI_KeyIntension OH_ArkUI_KeyEvent_GetKeyIntensionCode(const ArkUI_UIInputEvent* event);864ArkUI_KeyIntension OH_ArkUI_KeyEvent_GetKeyIntensionCode(const ArkUI_UIInputEvent* event);
538 865 
539/**866/**
540- * @brief Obtains the Unicode value associated with a key event.867+ * @brief Obtains the Unicode value of the specified key event. Non-space basic Latin characters in the 0x0021-0x007E
541- * Non-space basic Latin characters in the 0x0021-0x007E range are supported. Characters with a value of 0 are not868+ * range are supported. Characters with a value of 0 are not supported. In the case of key combination, this API
542- * supported. In the case of key combination, this API returns the Unicode value of the key corresponding to the key869+ * returns the Unicode value of the key corresponding to the key event.
543- * event.
544 *870 *
545- * @param event Pointer to an <b>ArkUI_UIInputEvent</b> object.871+ * @param event Pointer to the target **ArkUI_UIInputEvent** object.
546- * @return Returns the Unicode value.872+ * @return Unicode value.
547 * @since 14873 * @since 14
548 */874 */
549uint32_t OH_ArkUI_KeyEvent_GetUnicode(const ArkUI_UIInputEvent* event);875uint32_t OH_ArkUI_KeyEvent_GetUnicode(const ArkUI_UIInputEvent* event);
550 876 
551/**877/**
552- * @brief Sets whether a key event is consumed in the key event callback.878+ * @brief Sets whether the specified key event is consumed in the key event callback.
553 *879 *
554- * @param event Pointer to an <b>ArkUI_UIInputEvent</b> object.880+ * @param event Pointer to the target **ArkUI_UIInputEvent** object.
555- * @param isConsumed Whether the event is consumed.881+ * @param isConsumed Whether the key event is consumed by the callback. The value **true** means that the key event is
882+ * consumed, and **false** the opposite.
556 * @since 14883 * @since 14
557 */884 */
558void OH_ArkUI_KeyEvent_SetConsumed(const ArkUI_UIInputEvent* event, bool isConsumed);885void OH_ArkUI_KeyEvent_SetConsumed(const ArkUI_UIInputEvent* event, bool isConsumed);
559 886 
560/**887/**
561- * @brief Dispatch key event to a specific component node.888+ * @brief Dispatches the specified key event to a specific node.
562 *889 *
563- * @param node Indicates the pointer to a component node.890+ * @param node Target node.
564- * @param event Pointer to an <b>ArkUI_UIInputEvent</b> object.891+ * @param event Pointer to the target **ArkUI_UIInputEvent** object.
565- * @since 15892+ * @since 16
566 */893 */
567void OH_ArkUI_KeyEvent_Dispatch(ArkUI_NodeHandle node, const ArkUI_UIInputEvent* event);894void OH_ArkUI_KeyEvent_Dispatch(ArkUI_NodeHandle node, const ArkUI_UIInputEvent* event);
568 895 
569/**896/**
570- * @brief Get the Num Lock state of the key event.897+ * @brief Obtains the state of the NumLock key when the specified key event occurs.
571 *898 *
572- * @param event Pointer to an <b>ArkUI_UIInputEvent</b> object.899+ * @param event Pointer to the target **ArkUI_UIInputEvent** object.
573- * @param state Return whether the Num Lock is on.900+ * @param state Output parameter that returns the state of the NumLock key. The value **true** indicates an activated
574- * @return Returns the result code.901+ * state, and **false** indicates an inactivated state.
575- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.902+ * @return Result code.
576- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.903+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
904+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
577 * @since 19905 * @since 19
578 */906 */
579ArkUI_ErrorCode OH_ArkUI_KeyEvent_IsNumLockOn(const ArkUI_UIInputEvent* event, bool* state);907ArkUI_ErrorCode OH_ArkUI_KeyEvent_IsNumLockOn(const ArkUI_UIInputEvent* event, bool* state);
580 908 
581/**909/**
582- * @brief Get the Caps Lock state of the key event.910+ * @brief Obtains the state of the CapsLock key when the specified key event occurs.
583 *911 *
584- * @param event Pointer to an <b>ArkUI_UIInputEvent</b> object.912+ * @param event Pointer to the target **ArkUI_UIInputEvent** object.
585- * @param state Return whether the Caps Lock is on.913+ * @param state Output parameter that returns the state of the CapsLock key. The value **true** indicates an activated
586- * @return Returns the result code.914+ * state, and **false** indicates an inactivated state.
587- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.915+ * @return Result code.
588- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.916+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
917+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
589 * @since 19918 * @since 19
590 */919 */
591ArkUI_ErrorCode OH_ArkUI_KeyEvent_IsCapsLockOn(const ArkUI_UIInputEvent* event, bool* state);920ArkUI_ErrorCode OH_ArkUI_KeyEvent_IsCapsLockOn(const ArkUI_UIInputEvent* event, bool* state);
592 921 
593/**922/**
594- * @brief Get the Scroll Lock state of the key event.923+ * @brief Obtains the state of the ScrollLock key when the specified key event occurs.
595 *924 *
596- * @param event Pointer to an <b>ArkUI_UIInputEvent</b> object.925+ * @param event Pointer to the target **ArkUI_UIInputEvent** object.
597- * @param state Return whether the Scroll Lock is on.926+ * @param state Output parameter that returns the state of the ScrollLock key. The value **true** indicates an
598- * @return Returns the result code.927+ * activated state, and **false** indicates an inactivated state.
599- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.928+ * @return Result code.
600- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.929+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
930+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
601 * @since 19931 * @since 19
602 */932 */
603ArkUI_ErrorCode OH_ArkUI_KeyEvent_IsScrollLockOn(const ArkUI_UIInputEvent* event, bool* state);933ArkUI_ErrorCode OH_ArkUI_KeyEvent_IsScrollLockOn(const ArkUI_UIInputEvent* event, bool* state);
934+ 
604#ifdef __cplusplus935#ifdef __cplusplus
605-};936+}
606#endif937#endif
607 938 
608#endif // ARKUI_NATIVE_KEY_EVENT_H939#endif // ARKUI_NATIVE_KEY_EVENT_H
609-/** @} */940+/** @} */
Markui/ace_engine/native/native_node.h+333-341
@@ -214,28 +214,33 @@ typedef enum {
214 NODE_HEIGHT,214 NODE_HEIGHT,
215 /**215 /**
216 * @brief Defines the background color attribute, which can be set, reset, and obtained as required through APIs.216 * @brief Defines the background color attribute, which can be set, reset, and obtained as required through APIs.
217- *217+ * <br>Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:
218- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n218+ * <br>.value[0].u32: background color, in 0xARGB format. For example, 0xFFFF0000 indicates red.
219- * .value[0].u32: background color. The value is in 0xARGB format. For example, 0xFFFF0000 indicates red.\n219+ * <br>Format of the return value {@link ArkUI_AttributeItem}:
220- * \n220+ * <br>.value[0].u32: background color, in 0xARGB format. For example, 0xFFFF0000 indicates red.
221- * Format of the return value {@link ArkUI_AttributeItem}:\n
222- * .value[0].u32: background color. The value is in 0xARGB format. For example, 0xFFFF0000 indicates red.\n
223 *221 *
224 */222 */
225 NODE_BACKGROUND_COLOR,223 NODE_BACKGROUND_COLOR,
226 /**224 /**
227 * @brief Defines the background image attribute, which can be set, reset, and obtained as required through APIs.225 * @brief Defines the background image attribute, which can be set, reset, and obtained as required through APIs.
228- *226+ * <br>Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:
229- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n227+ * <br>.string: image address. In API version 22 and earlier versions, the value can be a network image resource
230- * .string: image address;\n228+ * address, local image resource address, Base64 image, or {@link PixelMap}, but cannot be an animated image such
231- * .value[0]?.i32: whether to repeat the image. Optional. The parameter type is {@link ArkUI_ImageRepeat}.229+ * as an {@link SVG}, GIF, or WebP image. In API version 23 and later versions, animated images of the WebP and GIF
232- * .object: The parameter type is {@link ArkUI_DrawableDescriptor}. Either .string or .object must be set.\n230+ * types are supported. Only the first frame of the animated image is displayed. Other types of animated images are
233- * The default value is <b>ARKUI_IMAGE_REPEAT_NONE</b>.\n231+ * not supported.
234- * \n232+ * <br>.value[0]?.i32: whether to repeat the image. Optional. The parameter type is {@link ArkUI_ImageRepeat}. The
235- * Format of the return value {@link ArkUI_AttributeItem}:\n233+ * default value is **ARKUI_IMAGE_REPEAT_NONE**.
236- * .string: image address;\n234+ * <br>.object: **PixelMap** object. The parameter type is {@link ArkUI_DrawableDescriptor}.
237- * .value[0].i32: whether to repeat the image. The parameter type is {@link ArkUI_ImageRepeat}.\n235+ * <br>Format of the return value {@link ArkUI_AttributeItem}:
238- * .object: The parameter type is {@link ArkUI_DrawableDescriptor}.\n236+ * <br>.string: image address. In API version 22 and earlier versions, the value can be network image resource
237+ * addresses, local image resource addresses, Base64 strings, or PixelMap resources, but cannot be addresses of SVG
238+ * images, or animated images such as GIF and WebP. In API version 23 and later versions, animated images of the
239+ * WebP and GIF types are supported. Only the first frame of the animated image is displayed. Other types of
240+ * animated images are not supported.
241+ * <br>.value[0].i32: whether to repeat the image. The parameter type is {@link ArkUI_ImageRepeat}.
242+ * <br>.object: **PixelMap** object. The parameter type is {@link ArkUI_DrawableDescriptor}.
243+ * <br>Either **.object** or **.string** must be set.
239 *244 *
240 */245 */
241 NODE_BACKGROUND_IMAGE,246 NODE_BACKGROUND_IMAGE,
@@ -272,12 +277,12 @@ typedef enum {
272 NODE_ID,277 NODE_ID,
273 /**278 /**
274 * @brief Defines the interactivity attribute, which can be set, reset, and obtained as required through APIs.279 * @brief Defines the interactivity attribute, which can be set, reset, and obtained as required through APIs.
275- *280+ * <br>Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:
276- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n281+ * <br>.value[0].i32: The value **true** means that the component can interact with users, and **false** means the
277- * .value[0].i32: The value <b>true</b> means that the component can interact with users, and <b>false</b> means the opposite.\n282+ * opposite.
278- * \n283+ * <br>Format of the return value {@link ArkUI_AttributeItem}:
279- * Format of the return value {@link ArkUI_AttributeItem}:\n284+ * <br>.value[0].i32: The value **1** means that the component can interact with users, and **0** means the
280- * .value[0].i32: The value <b>1</b> means that the component can interact with users, and <b>0</b> means the opposite. \n285+ * opposite.
281 *286 *
282 */287 */
283 NODE_ENABLED,288 NODE_ENABLED,
@@ -513,27 +518,23 @@ typedef enum {
513 */518 */
514 NODE_BORDER_STYLE,519 NODE_BORDER_STYLE,
515 /**520 /**
516- * @brief Defines the z-index attribute for the stack sequence.521+ * @brief Defines the z-index attribute for the stack sequence. This attribute can be set, reset, and obtained as
517- * This attribute can be set, reset, and obtained as required through APIs.522+ * required through APIs.
518- *523+ * <br>Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:
519- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n524+ * <br>.value[0].i32: z-index value.
520- * .value[0].i32: z-index value. \n525+ * <br>Format of the return value {@link ArkUI_AttributeItem}:
521- * \n526+ * <br>.value[0].i32: z-index value.
522- * Format of the return value {@link ArkUI_AttributeItem}:\n
523- * .value[0].i32: z-index value. \n
524 *527 *
525 */528 */
526 NODE_Z_INDEX,529 NODE_Z_INDEX,
527 /**530 /**
528 * @brief Defines the visibility attribute, which can be set, reset, and obtained as required through APIs.531 * @brief Defines the visibility attribute, which can be set, reset, and obtained as required through APIs.
529- *532+ * <br>Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:
530- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n533+ * <br>.value[0].i32: whether to show or hide the component. The parameter type is {@link ArkUI_Visibility}. The
531- * .value[0].i32: whether to show or hide the component. The parameter type is {@link ArkUI_Visibility}.534+ * default value is **ARKUI_VISIBILITY_VISIBLE**.
532- * The default value is <b>ARKUI_VISIBILITY_VISIBLE</b>. \n535+ * <br>Format of the return value {@link ArkUI_AttributeItem}:
533- * \n536+ * <br>.value[0].i32: whether the component is shown or hidden. The parameter type is {@link ArkUI_Visibility}. The
534- * Format of the return value {@link ArkUI_AttributeItem}:\n537+ * default value is **ARKUI_VISIBILITY_VISIBLE**.
535- * .value[0].i32: whether to show or hide the component. The parameter type is {@link ArkUI_Visibility}.
536- * The default value is <b>ARKUI_VISIBILITY_VISIBLE</b>. \n
537 *538 *
538 */539 */
539 NODE_VISIBILITY,540 NODE_VISIBILITY,
@@ -643,14 +644,12 @@ typedef enum {
643 NODE_TRANSFORM,644 NODE_TRANSFORM,
644 /**645 /**
645 * @brief Defines the hit test behavior attribute, which can be set, reset, and obtained as required through APIs.646 * @brief Defines the hit test behavior attribute, which can be set, reset, and obtained as required through APIs.
646- *647+ * <br>Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:
647- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n648+ * <br>.value[0].i32: hit test mode. The parameter type is {@link ArkUI_HitTestMode}. The default value is **
648- * .value[0].i32: hit test mode. The parameter type is {@link ArkUI_HitTestMode}.649+ * ARKUI_HIT_TEST_MODE_DEFAULT**.
649- * The default value is <b>ARKUI_HIT_TEST_MODE_DEFAULT</b>. \n650+ * <br>Format of the return value {@link ArkUI_AttributeItem}:
650- * \n651+ * <br>.value[0].i32: hit test mode. The parameter type is **ArkUI_HitTestMode**. The default value is **
651- * Format of the return value {@link ArkUI_AttributeItem}:\n652+ * ARKUI_HIT_TEST_MODE_DEFAULT**.
652- * .value[0].i32: hit test mode. The parameter type is {@link ArkUI_HitTestMode}.
653- * The default value is <b>ARKUI_HIT_TEST_MODE_DEFAULT</b>. \n
654 *653 *
655 */654 */
656 NODE_HIT_TEST_BEHAVIOR,655 NODE_HIT_TEST_BEHAVIOR,
@@ -707,28 +706,24 @@ typedef enum {
707 */706 */
708 NODE_CUSTOM_SHADOW,707 NODE_CUSTOM_SHADOW,
709 /**708 /**
710- * @brief Defines the background image width and height.709+ * @brief Defines the background image size attribute, which can be set, reset, and obtained as required through
711- * This attribute can be set, reset, and obtained as required through APIs.710+ * APIs.
712- *711+ * <br>Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:
713- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n712+ * <br>.value[0].f32: width of the image. The value range is [0, +∞), and the unit is vp.
714- * .value[0].f32: width of the image. The value range is [0, +∞), and the unit is vp. \n713+ * <br>.value[1].f32: height of the image. The value range is [0, +∞), and the unit is vp.
715- * .value[1].f32: height of the image. The value range is [0, +∞), and the unit is vp. \n714+ * <br>Format of the return value {@link ArkUI_AttributeItem}:
716- * \n715+ * <br>.value[0].f32: width of the image, in vp.
717- * Format of the return value {@link ArkUI_AttributeItem}:\n716+ * <br>.value[1].f32: height of the image, in vp.
718- * .value[0].f32: width of the image, in vp. \n
719- * .value[1].f32: height of the image, in vp. \n
720 *717 *
721 */718 */
722 NODE_BACKGROUND_IMAGE_SIZE,719 NODE_BACKGROUND_IMAGE_SIZE,
723 /**720 /**
724- * @brief Defines the background image size.721+ * @brief Defines the background image size with style. This attribute can be set, reset, and obtained as required
725- * This attribute can be set, reset, and obtained as required through APIs.722+ * through APIs.
726- *723+ * <br>Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:
727- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n724+ * <br>.value[0].i32: size of the background image. The value is an enumerated value of {@link ArkUI_ImageSize}.
728- * .value[0].i32: size of the background image. The value is an enum of {@link ArkUI_ImageSize}. \n725+ * <br>Format of the return value {@link ArkUI_AttributeItem}:
729- * \n726+ * <br>.value[0].i32: size of the background image. The value is an enumerated value of {@link ArkUI_ImageSize}.
730- * Format of the return value {@link ArkUI_AttributeItem}:\n
731- * .value[0].i32: size of the background image. The value is an enum of {@link ArkUI_ImageSize}. \n
732 *727 *
733 */728 */
734 NODE_BACKGROUND_IMAGE_SIZE_WITH_STYLE,729 NODE_BACKGROUND_IMAGE_SIZE_WITH_STYLE,
@@ -911,84 +906,79 @@ typedef enum {
911 NODE_MOVE_TRANSITION,906 NODE_MOVE_TRANSITION,
912 907 
913 /**908 /**
914- * @brief Defines the focus attribute, which can be set, reset, and obtained as required through APIs.909+ * @brief Defines the focus attribute, which can be set, reset, and obtained as required through APIs. Format of
915- *910+ * the {@link ArkUI_AttributeItem} parameter for setting the attribute:
916- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n911+ * <br>.value[0].i32: The value **1** indicates focusable, and **0** indicates not focusable. The default value is *
917- * .value[0].i32: The parameter type is 1 or 0.912+ * *0**.
918- * \n913+ * <br>Format of the return value {@link ArkUI_AttributeItem}:
919- * Format of the return value {@link ArkUI_AttributeItem}:\n914+ * <br>.value[0].i32: The value **1** indicates focusable, and **0** indicates not focusable.
920- * .value[0].i32: The parameter type is 1 or 0.
921 *915 *
922 */916 */
923 NODE_FOCUSABLE,917 NODE_FOCUSABLE,
924 918 
925 /**919 /**
926 * @brief Defines the default focus attribute, which can be set, reset, and obtained as required through APIs.920 * @brief Defines the default focus attribute, which can be set, reset, and obtained as required through APIs.
927- *921+ * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:
928- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n922+ * <br>value[0].i32: The value **1** indicates that the target is the default focus, and **0** indicates that it is
929- * value[0].i32: The parameter type is 1 or 0.923+ * not the default focus.
930- * \n924+ * <br>Format of the return value {@link ArkUI_AttributeItem}:
931- * Format of the return value {@link ArkUI_AttributeItem}:\n925+ * <br>value[0].i32: The value **1** indicates that the target is the default focus, and **0** indicates that it is
932- * value[0].i32: The parameter type is 1 or 0.926+ * not the default focus.
933 *927 *
934 */928 */
935 NODE_DEFAULT_FOCUS,929 NODE_DEFAULT_FOCUS,
936 930 
937 /**931 /**
938 * @brief Defines the touch target attribute, which can be set, reset, and obtained as required through APIs.932 * @brief Defines the touch target attribute, which can be set, reset, and obtained as required through APIs.
939- *933+ * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:
940- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n934+ * <br>.data[0].f32: X coordinate of the touch point relative to the upper left corner of the component, in vp.
941- * .data[0].f32: X coordinate of the touch point relative to the upper left corner of the component, in vp. \n935+ * <br>.data[1].f32: Y coordinate of the touch point relative to the upper left corner of the component, in vp.
942- * .data[1].f32: Y coordinate of the touch point relative to the upper left corner of the component, in vp. \n936+ * <br>.data[2].f32: width of the touch target, in percentage.
943- * .data[2].f32: width of the touch target, in %. \n937+ * <br>.data[3].f32: height of the touch target, in percentage.
944- * .data[3].f32: height of the touch target, in %. \n938+ * <br>.data[4...].f32: Multiple touch targets can be set. The sequence of the parameters is the same as the
945- * .data[4...].f32: Multiple touch targets can be set. The sequence of the parameters is the same as the preceding.939+ * preceding.
946- * \n940+ * <br>Format of the return value {@link ArkUI_AttributeItem}:
947- * Format of the return value {@link ArkUI_AttributeItem}:\n941+ * <br>.data[0].f32: X coordinate of the touch point relative to the upper left corner of the component, in vp.
948- * .data[0].f32: X coordinate of the touch point relative to the upper left corner of the component, in vp. \n942+ * <br>.data[1].f32: Y coordinate of the touch point relative to the upper left corner of the component, in vp.
949- * .data[1].f32: Y coordinate of the touch point relative to the upper left corner of the component, in vp. \n943+ * <br>.data[2].f32: width of the touch target, in percentage.
950- * .data[2].f32: width of the touch target, in %. \n944+ * <br>.data[3].f32: height of the touch target, in percentage.
951- * .data[3].f32: height of the touch target, in %. \n945+ * <br>.data[4...].f32: Multiple touch targets can be set. The sequence of the parameters is the same as the
952- * .data[4...].f32: Multiple touch targets can be set. The sequence of the parameters is the same as the preceding.946+ * preceding.
947+ * <br>Note: During configuration, the data array can contain any number of values (all will be accepted), but only
948+ * the first 20 values can be retrieved.
953 *949 *
954 */950 */
955 NODE_RESPONSE_REGION,951 NODE_RESPONSE_REGION,
956 952 
957 /**953 /**
958- * @brief Defines the overlay attribute, which can be set, reset, and obtained as required through APIs.954+ * @brief Defines the overlay attribute. This attribute can be set, reset, and obtained as required through APIs.
955+ * You can set the overlay content through .string or .object, with .string having higher priority. Format of the
956+ * {@link ArkUI_AttributeItem} parameter for setting the attribute:
957+ * <br>.string: mask text.
958+ * <br>.value[0]?.i32: position of the overlay relative to the component. Optional. The parameter type is
959+ * {@link ArkUI_Alignment}. The default value is **ARKUI_ALIGNMENT_TOP_START**.
960+ * <br>.value[1]?.f32: offset of the overlay relative to the upper left corner of itself on the x-axis, in vp.
961+ * Optional. The default value is **0** vp.
962+ * <br>.value[2]? .f32: offset of the overlay relative to the upper left corner of itself on the y-axis, in vp.
963+ * Optional. The default value is **0** vp.
964+ * <br>.value[3]?.i32: layout direction of the overlay. Optional. The parameter type is {@link ArkUI_Direction}.
965+ * The default value is **ARKUI_DIRECTION_LTR**.
966+ * <br>In most scenarios, this parameter should be set to **Auto**, which allows the system to automatically handle
967+ * the layout direction. If specific directions need to be maintained in certain scenarios, set this parameter to **
968+ * LTR** (left-to-right) or **RTL** (right-to-left). It is supported since API version 21.
969+ * <br>.object: node tree used for overlay. The parameter type is {@link ArkUI_NodeHandle}, and the default value
970+ * is **nullptr**. It is supported since API version 21.
971+ * <br>Format of the return value {@link ArkUI_AttributeItem}:
972+ * <br>.string: mask text.
973+ * <br>.value[0].i32: position of the overlay relative to the component. The parameter type is
974+ * {@link ArkUI_Alignment}. The default value is **ARKUI_ALIGNMENT_TOP_START**.
975+ * <br>.value[1].f32: offset of the overlay relative to the upper left corner of itself on the x-axis, in vp.
976+ * <br>.value[2].f32: offset of the overlay relative to the upper left corner of itself on the y-axis, in vp.
977+ * <br>.value[3].i32: layout direction of the overlay. The parameter type is {@link ArkUI_Direction}. The default
978+ * value is **ARKUI_DIRECTION_LTR**. It is supported since API version 21.
979+ * <br>.object: node tree used for overlay. The parameter type is {@link ArkUI_NodeHandle}. It is supported since
980+ * API version 21.
959 *981 *
960- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n
961- * You can set the overlay content through .string or .object as follow, and .string has higher priority.
962- * .string: mask text.\n
963- * .value[0]?.i32: position of the overlay relative to the component. Optional.
964- * The parameter type is {@link ArkUI_Alignment}.
965- * The default value is <b>ARKUI_ALIGNMENT_TOP_START.</b> \n
966- * .value[1]?.f32: offset of the overlay relative to the upper left corner of itself on the x-axis, in vp. Optional. \n
967- * .value[2]?.f32: offset of the overlay relative to the upper left corner of itself on the y-axis, in vp. Optional.
968- * \n
969- * .value[3]?.i32: the layout direction.
970- * The parameter type is {@link ArkUI_Direction}, supported since API 21.
971- * The default value is <b>ARKUI_DIRECTION_LTR.</b> \n
972- * In most cases, this parameter should be set to Auto, this allowing the system to handle
973- * the layout direction automatically. If you need to keep a specific direction in any situation, set it to
974- * either LTR (Left-to-Right) or RTL (Right-to-Left). Optional.
975- * \n
976- * .object: the node tree used as the overlay.
977- * The parameter type is {@link ArkUI_NodeHandle}.
978- * The default value is <b>nullptr.</b> \n
979- * this parameter is conflict with .string, and it has lower priority than .string.
980- * \n
981- * Format of the return value {@link ArkUI_AttributeItem}:\n
982- * .string: mask text.\n
983- * .value[0].i32: position of the overlay relative to the component.
984- * The parameter type is {@link ArkUI_Alignment}.
985- * The default value is <b>ARKUI_ALIGNMENT_TOP_START.</b> \n
986- * .value[1].f32: offset of the overlay relative to the upper left corner of itself on the x-axis, in vp. \n
987- * .value[2].f32: offset of the overlay relative to the upper left corner of itself on the y-axis, in vp.
988- * .value[3].i32: the layout direction.
989- * The parameter type is {@link ArkUI_Direction}, supported since API 21.
990- * The default value is <b>ARKUI_DIRECTION_LTR.</b> \n
991- * .object: the overlay node handle. \n
992 */982 */
993 NODE_OVERLAY,983 NODE_OVERLAY,
994 /**984 /**
@@ -1295,26 +1285,26 @@ typedef enum {
1295 NODE_MARK_ANCHOR,1285 NODE_MARK_ANCHOR,
1296 1286 
1297 /**1287 /**
1298- * @brief Defines the position of the background image in the component, that is, the coordinates relative to1288+ * @brief Defines the position of the background image in the component, that is, the coordinates relative to the
1299- * the upper left corner of the component. This attribute can be set, reset, and obtained as required through APIs.1289+ * upper left corner of the component. This attribute can be set, reset, and obtained as required through APIs.
1290+ * <br>Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:
1291+ * <br>.value[0].f32: position along the x-axis, in px.
1292+ * <br>.value[1].f32: position along the y-axis, in px.
1293+ * <br>.value[2].?i32: alignment mode. The parameter type is {@link ArkUI_Alignment}. The default value is **
1294+ * ARKUI_ALIGNMENT_TOP_START**.
1295+ * <br>.value[3].?i32: layout direction. The parameter type is {@link ArkUI_Direction}. The default value is **
1296+ * ARKUI_DIRECTION_AUTO**.
1297+ * <br>In most scenarios, this parameter should be set to **AUTO**, which allows the system to automatically handle
1298+ * the layout direction. If specific directions need to be maintained in certain scenarios, set this parameter to **
1299+ * LTR** (left-to-right) or **RTL** (right-to-left).
1300+ * <br>Format of the return value {@link ArkUI_AttributeItem}:
1301+ * <br>.value[0].f32: position along the x-axis, in px.
1302+ * <br>.value[1].f32: position along the y-axis, in px.
1303+ * <br>.value[2].i32: alignment mode. The parameter type is {@link ArkUI_Alignment}. The default value is **
1304+ * ARKUI_ALIGNMENT_TOP_START**.
1305+ * <br>.value[3].i32: layout direction. The parameter type is {@link ArkUI_Direction}. The default value is **
1306+ * ARKUI_DIRECTION_AUTO**.
1300 *1307 *
1301- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n
1302- * .value[0].f32: position along the x-axis, in px. \n
1303- * .value[1].f32: position along the y-axis, in px. \n
1304- * .value[2].?i32: the alignment mode. The data type is {@link ArkUI_Alignment}, and supported since API 21.
1305- * The default value is <b>ARKUI_ALIGNMENT_TOP_START</b>. \n
1306- * .value[3].?i32: the direction. The type is {@link ArkUI_Direction}, and supported since API 21.
1307- * The default value is <b>ARKUI_DIRECTION_AUTO</b>. \n
1308- * In most cases, this parameter should be set to Auto, this allowing the system to handle
1309- * the layout direction automatically. If you need to keep a specific direction in any situation, set it to
1310- * either LTR (Left-to-Right) or RTL (Right-to-Left). Optional.
1311- * Format of the return value {@link ArkUI_AttributeItem}:\n
1312- * .value[0].f32: position along the x-axis, in px. \n
1313- * .value[1].f32: position along the y-axis, in px. \n
1314- * .value[2].i32: the alignment mode. The data type is {@link ArkUI_Alignment}, and supported since API 21.
1315- * The default value is <b>ARKUI_ALIGNMENT_TOP_START</b>. \n
1316- * .value[3].i32: the direction. The type is {@link ArkUI_Direction}, and supported since API 21.
1317- * The default value is <b>ARKUI_DIRECTION_AUTO</b>. \n
1318 */1308 */
1319 NODE_BACKGROUND_IMAGE_POSITION,1309 NODE_BACKGROUND_IMAGE_POSITION,
1320 /**1310 /**
@@ -1435,15 +1425,15 @@ typedef enum {
1435 NODE_ACCESSIBILITY_DESCRIPTION,1425 NODE_ACCESSIBILITY_DESCRIPTION,
1436 1426 
1437 /**1427 /**
1438- * @brief Defines the focused state. This attribute can be set and obtained as required through APIs.1428+ * @brief Defines the component focus status. This attribute can be set and obtained as required through APIs.
1439- * @note Setting the parameter to <b>0</b> shifts focus from the currently focused component on the current level1429+ * <br>Note: Setting the parameter to **0** shifts focus from the currently focused component on the current level
1440 * of the page to the root container.1430 * of the page to the root container.
1441- * 1431+ * <br>Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:
1442- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n1432+ * <br>.value[0].i32: The value **1** indicates that the component gains focus and **0** indicates that the
1443- * .value[0].i32: The parameter type is 1 or 0.1433+ * component loses focus.
1444- * \n1434+ * <br>Format of the return value {@link ArkUI_AttributeItem}:
1445- * Format of the return value {@link ArkUI_AttributeItem}:\n1435+ * <br>.value[0].i32: The value **1** indicates that the component gains focus and **0** indicates that the
1446- * .value[0].i32: The parameter type is 1 or 0.1436+ * component loses focus.
1447 *1437 *
1448 */1438 */
1449 NODE_FOCUS_STATUS,1439 NODE_FOCUS_STATUS,
@@ -1726,14 +1716,13 @@ typedef enum {
1726 NODE_LAYOUT_RECT,1716 NODE_LAYOUT_RECT,
1727 1717 
1728 /**1718 /**
1729- * @brief Whether the current component supports click-to-focus capability,1719+ * @brief Sets whether the component is focusable on touch. This attribute can be set, reset, and obtained as
1730- * which can be set, reset, and obtained as required through APIs.1720+ * required through APIs. Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:
1731- *1721+ * <br>.value[0].i32: whether the component is focusable on touch. The value **1** means that the component is
1732- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n1722+ * focusable on touch, and **0** means the opposite.
1733- * .value[0].i32: The parameter type is 1 or 0.1723+ * <br>Format of the return value {@link ArkUI_AttributeItem}:
1734- * \n1724+ * <br>.value[0].i32: whether the component is focusable on touch. The value **1** means that the component is
1735- * Format of the return value {@link ArkUI_AttributeItem}:\n1725+ * focusable on touch, and **0** means the opposite.
1736- * .value[0].i32: The parameter type is 1 or 0.
1737 *1726 *
1738 */1727 */
1739 NODE_FOCUS_ON_TOUCH,1728 NODE_FOCUS_ON_TOUCH,
@@ -1850,29 +1839,22 @@ typedef enum {
1850 1839 
1851 /**1840 /**
1852 * @brief Defines the visible area ratio (visible area/total area of the component) threshold for invoking the1841 * @brief Defines the visible area ratio (visible area/total area of the component) threshold for invoking the
1853- * visible area change event of the component.1842+ * visible area change event of the component. Format of the {@link ArkUI_AttributeItem} parameter for setting the
1854- *1843+ * attribute:
1855- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n1844+ * <br>.value[...].f32: threshold array. The value ranges from 0 to 1.
1856- * .value[...].f32: threshold array. The value range is 0 to 1.1845+ * <br>Format of the return value {@link ArkUI_AttributeItem}:
1857- * \n1846+ * <br>.value[...].f32: threshold array.
1858- * Format of the return value {@link ArkUI_AttributeItem}:\n
1859- * .value[...].f32: threshold array. \n
1860 *1847 *
1861 * @since 121848 * @since 12
1862 */1849 */
1863 /**1850 /**
1864- * @brief Defines the visible area ratio (visible area/total area of the component) threshold for invoking the1851+ * visible area change event of the component. Format of the {@link ArkUI_AttributeItem} parameter for setting the
1865- * visible area change event of the component, this enum extends the configuration capbility.1852+ * attribute:
1866- *1853+ * <br>.value[...].f32: threshold array. The value ranges from 0 to 1.
1867- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n1854+ * <br>.object: The parameter type is {@link ArkUI_VisibleAreaEventOptions}.
1868- * .value[...].f32: threshold array. The value range is 0 to 1.1855+ * <br>Format of the return value {@link ArkUI_AttributeItem}:
1869- * .?object: pass in one {@link ArkUI_VisibleAreaEventOptions} objcet for configging the ratio or other options.1856+ * <br>.value[...].f32: threshold array.
1870- * Please note, when use this param, the ratios set through .value[...].f32 will be ignored, and the update1857+ * <br>.object: The return type is {@link ArkUI_VisibleAreaEventOptions}.
1871- * interval from it is always ignored too.
1872- * \n
1873- * Format of the return value {@link ArkUI_AttributeItem}:\n
1874- * .value[...].f32: threshold array. \n
1875- * .object: the {@link ArkUI_VisibleAreaEventOptions} objcet.
1876 *1858 *
1877 * @since 221859 * @since 22
1878 */1860 */
@@ -1904,38 +1886,34 @@ typedef enum {
1904 NODE_UNIQUE_ID = 95,1886 NODE_UNIQUE_ID = 95,
1905 1887 
1906 /**1888 /**
1907- * @brief Set the current component system focus box style.1889+ * @brief Sets the style of the system focus box for this component.
1908- *1890+ * <br>Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:
1909- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute: \n1891+ * <br>.value[0].f32: distance between the focus box and the edge of the component
1910- * .value[0].f32: The distance between the focus box and the edge of the component. \n1892+ * <br>A positive number indicates the outside, and a negative number indicates the inside.
1911- * Positive numbers represent the outer side, negative numbers represent the inner side. \n1893+ * <br>The value cannot be in percentage.
1912- * Percentage is not supported. \n1894+ * <br>.value[1].f32: width of the focus box. Negative numbers and percentages are not supported.
1913- * .value[1].f32: Focus box width. Negative numbers and percentages are not supported. \n1895+ * <br>.value[2].u32: color of the focus box.
1914- * .value[2].u32: Focus box color. \n
1915- * \n
1916 *1896 *
1917 */1897 */
1918 NODE_FOCUS_BOX = 96,1898 NODE_FOCUS_BOX = 96,
1919 1899 
1920 /**1900 /**
1921- * @brief Defines the moving distance limit for the component-bound tap gesture.1901+ * @brief Defines the moving distance limit for the component-bound tap gesture. This attribute can be set as
1922- * This attribute can be set as required through APIs.1902+ * required through APIs.
1923- *1903+ * <br>Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:
1924- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n1904+ * <br>.value[0].f32: allowed moving distance of a finger, in vp.
1925- * .value[0].f32: allowed moving distance of a finger, in vp. \n
1926 *1905 *
1927 */1906 */
1928 NODE_CLICK_DISTANCE = 97,1907 NODE_CLICK_DISTANCE = 97,
1929 1908 
1930 /**1909 /**
1931- * @brief Sets whether the focus can be placed on this component.1910+ * @brief Sets whether the focus can be placed on this component. This attribute can be set, reset, and obtained as
1932- * This attribute can be set, reset, and obtained as required through APIs.1911+ * required through APIs. Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:
1933- *1912+ * <br>.value[0].i32: whether the focus can be placed on the current component. The value **1** means that the
1934- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n1913+ * focus can be placed on the current component, and **0** means the opposite. The default value is **0**.
1935- * .value[0].i32: whether the focus can be placed on the current component. The parameter type is 1 or 0.1914+ * <br>Format of the return value {@link ArkUI_AttributeItem}:
1936- * \n1915+ * <br>.value[0].i32: whether the focus can be placed on the current component. The value **1** means that the
1937- * Format of the return value {@link ArkUI_AttributeItem}:\n1916+ * focus can be placed on the current component, and **0** means the opposite.
1938- * .value[0].i32: whether the focus can be placed on the current component. The parameter type is 1 or 0.
1939 *1917 *
1940 * @since 141918 * @since 14
1941 */1919 */
@@ -1983,34 +1961,28 @@ typedef enum {
1983 NODE_BACKGROUND_IMAGE_RESIZABLE_WITH_SLICE = 100,1961 NODE_BACKGROUND_IMAGE_RESIZABLE_WITH_SLICE = 100,
1984 1962 
1985 /**1963 /**
1986- * @brief Sets the next focus node.1964+ * @brief Sets the next focus node. Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:
1987- *1965+ * <br>.value[0].i32: focus movement direction, as defined in {@link ArkUI_FocusMove}.
1988- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute: \n1966+ * <br>.object: next focus node. The parameter type is {@link ArkUI_NodeHandle}.
1989- * .value[0].i32: focus movement direction, as defined in {@link ArkUI_FocusMove}.
1990- * .object: next focus node. The parameter type is {@link ArkUI_NodeHandle}.\n
1991- * \n
1992 *1967 *
1993 * @since 181968 * @since 18
1994 */1969 */
1995 NODE_NEXT_FOCUS = 101,1970 NODE_NEXT_FOCUS = 101,
1996 1971 
1997 /**1972 /**
1998- * @brief Sets the parameters for visible area change events.1973+ * @brief Sets the threshold ratio for triggering a visible area change event.
1999- *1974+ * <br>Note: The visible area change callback is not a real-time callback. The actual callback interval may differ
2000- * @note The visible area change callback is not a real-time callback. The actual callback interval may differ from1975+ * from the expected interval due to system load and other factors. The interval between two visible area change
2001- * the expected interval due to system load and other factors.1976+ * callbacks will not be less than the expected update interval. If the provided expected interval is too short,
2002- * The interval between two visible area change callbacks will not be less than the expected update interval. If the1977+ * the actual callback interval will be determined by the system load. By default, the interval threshold of the
2003- * provided expected interval is too short, the actual callback interval will be determined by the system load.1978+ * visible area change callback includes 0. This means that, if the provided threshold is [0.5], the effective
2004- * By default, the interval threshold of the visible area change callback includes 0. This means that,1979+ * threshold will be [0.0, 0.5].
2005- * if the provided threshold is [0.5], the effective threshold will be [0.0, 0.5].1980+ * <br>Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:
2006- *1981+ * <br>.object: parameters for visible area change events. The parameter type is
2007- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n1982+ * {@link ArkUI_VisibleAreaEventOptions}.
2008- * .object: parameters for visible area change events.1983+ * <br>Format of the return value {@link ArkUI_AttributeItem}:
2009- * The parameter type is {@link ArkUI_VisibleAreaEventOptions}. \n1984+ * <br>.object: parameters for visible area change events. The parameter type is
2010- * \n1985+ * {@link ArkUI_VisibleAreaEventOptions}.
2011- * Format of the return value {@link ArkUI_AttributeItem}:\n
2012- * .object: parameters for visible area change events.
2013- * The parameter type is {@link ArkUI_VisibleAreaEventOptions}. \n
2014 *1986 *
2015 * @since 171987 * @since 17
2016 */1988 */
@@ -2142,18 +2114,18 @@ typedef enum {
2142 NODE_PIXEL_ROUND = 109,2114 NODE_PIXEL_ROUND = 109,
2143 2115 
2144 /**2116 /**
2145- * @brief Set whether to enable the default click sound effect for this component.2117+ * @brief Sets whether the component enables the default click sound effect. This API takes effect only on TVs. If
2146- * It only takes effect on supported devices, such as TV. Whether it can produce sound depends on the device's2118+ * the default click sound effect is enabled on other devices, the sound effect is not played. Whether the sound
2147- * sound-related settings. For example, sound effects will not be played in silent mode.2119+ * can be played depends on the sound settings of the device. For example, the sound effect is not played in mute
2148- *2120+ * mode.
2149- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n2121+ * <br>Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:
2150- * .value[0].i32: The parameter value is either 1 or 0. 1 indicates the default click sound effect is enabled,2122+ * <br>.value[0].i32: The value can be **1** or **0**. The value **1** indicates that the default click sound
2151- * while 0 indicates it is disabled. The default value is 1.\n2123+ * effect is enabled, and the value **0** indicates that the default click sound effect is disabled. The default
2152- * \n2124+ * value is **1**.
2153- * Format of the return value {@link ArkUI_AttributeItem}:\n2125+ * <br>Format of the return value {@link ArkUI_AttributeItem}:
2154- * .value[0].i32: Indicates whether the default click sound effect is enabled for this node.\n2126+ * <br>.value[0].i32: whether the default click sound effect is enabled for the node. The value can be **1** or **0*
2155- * The parameter value is either 1 or 0. 1 indicates the default click sound effect is enabled,2127+ * *. The value **1** indicates that the default click sound effect is enabled, and the value **0** indicates that
2156- * while 0 indicates it is disabled.\n2128+ * the default click sound effect is disabled.
2157 *2129 *
2158 * @since 242130 * @since 24
2159 */2131 */
@@ -2175,101 +2147,113 @@ typedef enum {
2175 NODE_MOTION_PATH = 111,2147 NODE_MOTION_PATH = 111,
2176 2148 
2177 /**2149 /**
2178- * @brief Defines the hover effect applied when the component is hovered over. This attribute can be set, reset, and obtained as required through APIs.2150+ * @brief Defines the hover effect applied when the component is hovered over. This attribute can be set, reset,
2179- *2151+ * and obtained as required through APIs.
2180- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute: \n2152+ * <br>Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:
2181- * .value[0].i32: Hover effect applied when the component is hovered over.2153+ * <br>.value[0].i32: hover effect applied when the component is hovered over. The parameter type is
2182- * The parameter type is {@link ArkUI_HoverEffect}. The default value is <b>ARKUI_HOVER_EFFECT_AUTO</b>. \n2154+ * {@link ArkUI_HoverEffect}. The default value is **ARKUI_HOVER_EFFECT_AUTO**.
2183- * \n2155+ * <br>Format of the return value {@link ArkUI_AttributeItem}:
2184- * Format of the return value {@link ArkUI_AttributeItem}: \n2156+ * <br>.value[0].i32: hover effect applied when the component is hovered over. The parameter type is
2185- * .value[0].i32: Hover effect applied when the component is hovered over.2157+ * {@link ArkUI_HoverEffect}.
2186- * The parameter type is {@link ArkUI_HoverEffect}. \n
2187 *2158 *
2188 * @since 232159 * @since 23
2189 */2160 */
2190 NODE_HOVER_EFFECT = 112,2161 NODE_HOVER_EFFECT = 112,
2191 2162 
2192 /**2163 /**
2193- * @brief Configures the container as a focus group with the specified identifier. This attribute can be set, reset, and obtained as required through APIs.2164+ * @brief Configures the container as a focus group with the specified identifier. This attribute can be set, reset,
2194- *2165+ * and obtained as required through APIs.
2195- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute: \n2166+ * <br>Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:
2196- * .string: focus scope identifier. \n2167+ * <br>.string: focus scope identifier.
2197- * .value[0]?.i32: whether the scope is a focus group. The default value is <b>0</b>. The value is <b>1</b> or <b>0</b>. \n2168+ * <br>.value[0].i32: whether the scope is a focus group. The default value is **0**. The value can be **1** or **0*
2198- * .value[1]?.i32: whether arrow keys can move focus outside the focus group. This setting only takes effect when <b>isGroup</b> is <b>true</b>. The default value is <b>1</b>.2169+ * *. The value **1** indicates that the component is set as a focus group. The value **0** indicates that the
2199- * The value is <b>1</b> or <b>0</b>. \n2170+ * component is not set as a focus group.
2200- * \n2171+ * <br>.value[1].i32: whether arrow keys can move focus from inside the focus group to outside. This setting only
2201- * Format of the return value {@link ArkUI_AttributeItem}:\n2172+ * takes effect when **isGroup** is **true**. The default value is **1**. The value can be **1** or **0**. The
2202- * .string: focus scope identifier. \n2173+ * value **1** indicates that arrow keys can move focus from inside the focus group to outside, and the value **0**
2203- * .value[0]?.i32: whether the scope is a focus group. The default value is <b>0</b>. The value is <b>1</b> or <b>0</b>. \n2174+ * indicates that arrow keys cannot move focus from inside the focus group to outside.
2204- * .value[1]?.i32: whether arrow keys can move focus outside the focus group. This setting only takes effect when <b>isGroup</b> is <b>true</b>. The default value is <b>1</b>.2175+ * <br>Format of the return value {@link ArkUI_AttributeItem}:
2205- * The value is <b>1</b> or <b>0</b>. \n2176+ * <br>.string: focus scope identifier.
2177+ * <br>.value[0].i32: whether the scope is a focus group. The default value is **0**. The value can be **1** or **0*
2178+ * *. The value **1** indicates that the component is set as a focus group. The value **0** indicates that the
2179+ * component is not set as a focus group.
2180+ * <br>.value[1].i32: whether arrow keys can move focus from inside the focus group to outside. This setting only
2181+ * takes effect when **isGroup** is **true**. The default value is **1**. The value can be **1** or **0**. The
2182+ * value **1** indicates that arrow keys can move focus from inside the focus group to outside, and the value **0**
2183+ * indicates that arrow keys cannot move focus from inside the focus group to outside.
2206 *2184 *
2207 * @since 232185 * @since 23
2208 */2186 */
2209 NODE_FOCUS_SCOPE_ID = 113,2187 NODE_FOCUS_SCOPE_ID = 113,
2210 2188 
2211 /**2189 /**
2212- * @brief Sets the component focus priority within a specific focus scope. This attribute can be set, reset, and obtained as required through APIs.2190+ * @brief Sets the component focus priority within a specific focus scope. This attribute can be set, reset, and
2213- *2191+ * obtained as required through APIs.
2214- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute: \n2192+ * <br>Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:
2215- * .string: focus scope identifier. \n2193+ * <br>.string: focus scope identifier.
2216- * .value[0]?.i32: focus priority within the focus scope. The parameter type is {@link ArkUI_FocusPriority}.2194+ * <br>.value[0].i32: focus priority within the focus scope. The parameter type is {@link ArkUI_FocusPriority}. The
2217- * The default value is <b>ARKUI_FOCUS_PRIORITY_AUTO</b>. \n2195+ * default value is **ARKUI_FOCUS_PRIORITY_AUTO**.
2218- * \n2196+ * <br>Format of the return value {@link ArkUI_AttributeItem}:
2219- * Format of the return value {@link ArkUI_AttributeItem}:\n2197+ * <br>.string: focus scope identifier.
2220- * .string: focus scope identifier. \n2198+ * <br>.value[0].i32: focus scope priority. The parameter type is {@link ArkUI_FocusPriority}.
2221- * .value[0]?.i32: focus priority within the focus scope. The parameter type is {@link ArkUI_FocusPriority}. \n
2222 *2199 *
2223 * @since 232200 * @since 23
2224 */2201 */
2225 NODE_FOCUS_SCOPE_PRIORITY = 114,2202 NODE_FOCUS_SCOPE_PRIORITY = 114,
2226 2203 
2227 /**2204 /**
2228- * @brief Sets the distance threshold for click events. This attribute can be set, reset, and obtained as required through APIs.2205+ * @brief Sets the distance threshold for click events. This attribute can be set, reset, and obtained as required
2206+ * through APIs.
2207+ * <br>Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:
2208+ * <br>.value[0].f32: movement threshold for click events. Value range: (0, +∞) Default value: **+∞**.
2209+ * <br>Unit: vp.
2229 *2210 *
2230- * @note If finger movement exceeds the preset distance limit, click event recognition will fail.2211+ * <br>Format of the return value {@link ArkUI_AttributeItem}:
2231- *2212+ * <br>.value[0].f32: movement threshold for click events.
2232- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute: \n
2233- * .value[0].f32: distance threshold for click events.
2234- * \n
2235- * Format of the return value {@link ArkUI_AttributeItem}: \n
2236- * .value[0].f32: distance threshold for click events. \n
2237 *2213 *
2238 * @since 232214 * @since 23
2239 */2215 */
2240 NODE_ON_CLICK_EVENT_DISTANCE_THRESHOLD = 115,2216 NODE_ON_CLICK_EVENT_DISTANCE_THRESHOLD = 115,
2241 2217 
2242 /**2218 /**
2243- * @brief Defines the component event response region. This attribute can be set, reset, and obtained as required through APIs.2219+ * @brief Defines the component event response region. This attribute can be set, reset, and obtained as required
2244- *2220+ * through APIs.
2245- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n2221+ * <br>Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:
2246- * .data[0].i32: input tool type for the response region, specified using the {@link ArkUI_ResponseRegionSupportedTool} enum. Default value: <b>ARKUI_RESPONSE_REGIN_SUPPORTED_TOOL_ALL</b>.2222+ * <br>.data[0].i32: event tool type for the response region. The parameter type is
2247- * .data[1].f32: x-coordinate of the pointer position relative to the upper left corner of the component, in vp. \n2223+ * {@link ArkUI_ResponseRegionSupportedTool}. Default value: **ARKUI_RESPONSE_REGIN_SUPPORTED_TOOL_ALL**.
2248- * .data[2].f32: y-coordinate of the pointer position relative to the upper left corner of the component, in vp. \n2224+ * <br>.data[1].f32: X coordinate of the pointer position relative to the upper left corner of the component, in vp.
2249- * .data[3].f32: width of the response region. The value is a percentage. \n2225+ * The default value is **0.0**.
2250- * .data[4].f32: height of the response region. The value is a percentage. \n2226+ * <br>.data[2].f32: Y coordinate of the pointer position relative to the upper left corner of the component, in vp.
2251- * .data[5...].f32: additional response regions in the same parameter order. \n2227+ * The default value is **0.0**.
2252- * \n2228+ * <br>.data[3].f32: width of the response region, in percentage. The default value is **100.0**.
2253- * Format of the return value {@link ArkUI_AttributeItem}:\n2229+ * <br>.data[4].f32: height of the response region, in percentage. The default value is **100.0**.
2254- * .data[0].i32: input tool type for the response region, specified using the {@link ArkUI_ResponseRegionSupportedTool} enum. Default value: <b>ARKUI_RESPONSE_REGIN_SUPPORTED_TOOL_ALL</b>.2230+ * <br>.data[5...].f32: additional response regions in the same parameter order.
2255- * .data[1].f32: x-coordinate of the pointer position relative to the upper left corner of the component, in vp. \n2231+ * <br>Format of the return value {@link ArkUI_AttributeItem}:
2256- * .data[2].f32: y-coordinate of the pointer position relative to the upper left corner of the component, in vp. \n2232+ * <br>.data[0].i32: event tool type for the response region. The parameter type is
2257- * .data[3].f32: width of the response region. The value is a percentage. \n2233+ * {@link ArkUI_ResponseRegionSupportedTool}. Default value: **ARKUI_RESPONSE_REGIN_SUPPORTED_TOOL_ALL**.
2258- * .data[4].f32: height of the response region. The value is a percentage. \n2234+ * <br>.data[1].f32: X coordinate of the pointer position relative to the upper left corner of the component, in vp.
2259- * .data[5...].f32: additional response regions in the same parameter order.2235+ * The default value is **0.0**.
2236+ * <br>.data[2].f32: Y coordinate of the pointer position relative to the upper left corner of the component, in vp.
2237+ * The default value is **0.0**.
2238+ * <br>.data[3].f32: width of the response region, in percentage. The default value is **100.0**.
2239+ * <br>.data[4].f32: height of the response region, in percentage. The default value is **100.0**.
2240+ * <br>.data[5...].f32: additional response regions in the same parameter order.
2241+ * <br>Note: During configuration, the data array can contain any number of values (all will be accepted), but only
2242+ * 20 values can be retrieved. The order of the retrieved data array may be different from that of the settings.
2260 *2243 *
2261 * @since 232244 * @since 23
2262 */2245 */
2263 NODE_RESPONSE_REGION_LIST = 116,2246 NODE_RESPONSE_REGION_LIST = 116,
2264 2247 
2265 /**2248 /**
2266- * @brief Defines the event monopolization attribute. This attribute can be set, reset, and obtained as required through APIs.2249+ * @brief Defines the event monopolization attribute. This attribute can be set, reset, and obtained as required
2267- *2250+ * through APIs.
2268- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute: \n2251+ * <br>Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:
2269- * .value[0].i32: Boolean value (1 or 0).2252+ * <br>.value[0].i32: The value can be **1** or **0**. The value **1** indicates that the component exclusively
2270- * \n2253+ * handles events. The value **0** indicates that the component does not exclusively handle events.
2271- * Format of the return value {@link ArkUI_AttributeItem}: \n2254+ * <br>Format of the return value {@link ArkUI_AttributeItem}:
2272- * .value[0].i32: Boolean value (1 or 0).2255+ * <br>.value[0].i32: The value can be **1** or **0**. The value **1** indicates that the component exclusively
2256+ * handles events. The value **0** indicates that the component does not exclusively handle events.
2273 *2257 *
2274 * @since 232258 * @since 23
2275 */2259 */
@@ -11747,8 +11731,8 @@ ArkUI_NodeHandle OH_ArkUI_NodeEvent_GetNodeHandle(ArkUI_NodeEvent* event);
11747/**11731/**
11748 * @brief Obtains input event (for example, touch event) data for a component event.11732 * @brief Obtains input event (for example, touch event) data for a component event.
11749 *11733 *
11750- * @param event Indicates the pointer to the component event.11734+ * @param event Pointer to the component event.
11751- * @return Returns the pointer to the input event data.11735+ * @return Pointer to the input event data.
11752 * @since 1211736 * @since 12
11753 */11737 */
11754ArkUI_UIInputEvent* OH_ArkUI_NodeEvent_GetInputEvent(ArkUI_NodeEvent* event);11738ArkUI_UIInputEvent* OH_ArkUI_NodeEvent_GetInputEvent(ArkUI_NodeEvent* event);
@@ -11839,11 +11823,11 @@ int32_t OH_ArkUI_NodeEvent_GetStringValue(ArkUI_NodeEvent* event, int32_t index,
11839int32_t OH_ArkUI_NodeEvent_SetReturnNumberValue(ArkUI_NodeEvent* event, ArkUI_NumberValue* value, int32_t size);11823int32_t OH_ArkUI_NodeEvent_SetReturnNumberValue(ArkUI_NodeEvent* event, ArkUI_NumberValue* value, int32_t size);
11840 11824 
11841/**11825/**
11842- * @brief Obtains a <b>ArkUI_TouchTestInfo</b> object from the specified <b>ArkUI_NodeEvent</b> object.11826+ * @brief Obtains the touch test information in a component event.
11843 *11827 *
11844 * @param {pointer} nodeEvent Indicates the pointer to an <b>ArkUI_NodeEvent</b> object.11828 * @param {pointer} nodeEvent Indicates the pointer to an <b>ArkUI_NodeEvent</b> object.
徐学军6月19日

违反规范:5.2.2.2《C API 注释标签必须遵守注解定义》 这里写成了 @param {pointer} nodeEvent@param 标签后应直接跟参数名,插入 {pointer} 会破坏标签语法,文档工具也无法稳定把说明绑定到 nodeEvent。 请改为合法的 @param nodeEvent ... 形式,把类型信息放到自然语言描述里。

likedislike
zouqianshun
zouqianshun
6月23日 评论:
11845- * @return Returns the pointer to an <b>ArkUI_TouchTestInfo</b> object.11829+ * @return Pointer to the {@link ArkUI_TouchTestInfo} object. If the input parameter is invalid or is not touch test
11846- * Returns <b>null</b> if the parameter passed in is invalid or is not a touch test info.11830+ * information, **null** is returned.
11847 * @since 2211831 * @since 22
11848 */11832 */
11849ArkUI_TouchTestInfo* OH_ArkUI_NodeEvent_GetTouchTestInfo(ArkUI_NodeEvent* nodeEvent);11833ArkUI_TouchTestInfo* OH_ArkUI_NodeEvent_GetTouchTestInfo(ArkUI_NodeEvent* nodeEvent);
@@ -13416,14 +13400,14 @@ ArkUI_ErrorCode OH_ArkUI_AddSupportedUIStates(ArkUI_NodeHandle node, int32_t uiS
13416 void (statesChangeHandler)(int32_t currentStates, void* userData), bool excludeInner, void* userData);13400 void (statesChangeHandler)(int32_t currentStates, void* userData), bool excludeInner, void* userData);
13417 13401 
13418/**13402/**
13419- * @brief Removes registered UI states. When all states registered using <b>OH_ArkUI_AddSupportedUIStates</b>13403+ * @brief Removes registered UI states. When all states registered using **OH_ArkUI_AddSupportedUIStates** are removed,
13420- * are removed, the registered <b>stateChangeHandler</b> will no longer be executed.13404+ * the registered **stateChangeHandler** will no longer be executed.
13421- * 13405+ *
13422 * @param node Target node.13406 * @param node Target node.
13423 * @param uiStates Target UI states to be removed.13407 * @param uiStates Target UI states to be removed.
13424- * @return Returns the result code.13408+ * @return Result code.
13425- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.13409+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
13426- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.13410+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
13427 * @since 2013411 * @since 20
13428 */13412 */
13429ArkUI_ErrorCode OH_ArkUI_RemoveSupportedUIStates(ArkUI_NodeHandle node, int32_t uiStates);13413ArkUI_ErrorCode OH_ArkUI_RemoveSupportedUIStates(ArkUI_NodeHandle node, int32_t uiStates);
@@ -13532,58 +13516,66 @@ int32_t OH_ArkUI_SetForceDarkConfig(ArkUI_ContextHandle uiContext, bool forceDar
13532 uint32_t (*colorInvertFunc)(uint32_t color));13516 uint32_t (*colorInvertFunc)(uint32_t color));
13533 13517 
13534/**13518/**
13535- * @brief Register common event callback of target node.13519+ * @brief Registers a basic event callback for the target node.
13536 *13520 *
13537- * @param node The ArkUI-NodeHandle pointer.13521+ * Currently, the following event types are supported: **NODE_ON_CLICK_EVENT**, **NODE_TOUCH_EVENT**,
13538- * @param eventType Indicates the type of event to set.13522+ * **NODE_EVENT_ON_APPEAR**, **NODE_EVENT_ON_DISAPPEAR**, **NODE_ON_KEY_EVENT**, **NODE_ON_FOCUS**, **NODE_ON_BLUR**,
13539- * @param userData Indicates the pointer to the custom data.13523+ * **NODE_ON_HOVER**, **NODE_ON_MOUSE**, and **NODE_ON_SIZE_CHANGE**. For details, see @{link ArkUI_NodeEventType}.
13540- * @param callback Indicates the event callback function.13524+ *
13541- * @return Returns the result code.13525+ * @param node Target node.
13542- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.13526+ * @param eventType Event type.
13543- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function params is invalid.13527+ * @param userData User-defined data pointer for processing custom data within the callback function. You are
13544- * Returns {@link ARKUI_ERROR_CODE_NODE_UNSUPPORTED_EVENT_TYPE} Function parameter eventType is not supported.13528+ * responsible for ensuring the validity of the data when the custom function is executed.
13529+ * @param callback User-defined callback function.
13530+ * @return Result code.
13531+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
13532+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
13533+ * <br>Returns {@link ARKUI_ERROR_CODE_NODE_UNSUPPORTED_EVENT_TYPE} if the event type is not supported.
13545 * @since 2113534 * @since 21
13546 */13535 */
13547int32_t OH_ArkUI_NativeModule_RegisterCommonEvent(ArkUI_NodeHandle node, ArkUI_NodeEventType eventType,13536int32_t OH_ArkUI_NativeModule_RegisterCommonEvent(ArkUI_NodeHandle node, ArkUI_NodeEventType eventType,
13548 void* userData, void (*callback)(ArkUI_NodeEvent* event));13537 void* userData, void (*callback)(ArkUI_NodeEvent* event));
13549 13538 
13550/**13539/**
13551- * @brief Unregister common event callback of target node.13540+ * @brief Unregisters the basic event callback for the target node.
13552 *13541 *
13553- * @param node The ArkUI-NodeHandle pointer.13542+ * For details about the supported event types, see {@link OH_ArkUI_NativeModule_RegisterCommonEvent}.
13554- * @param eventType Indicates the type of event to set.13543+ *
13555- * @return Returns the result code.13544+ * @param node Target node.
13556- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.13545+ * @param eventType Event type.
13557- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function params is invalid.13546+ * @return Result code.
13558- * Returns {@link ARKUI_ERROR_CODE_NODE_UNSUPPORTED_EVENT_TYPE} Function parameter eventType is not supported.13547+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
13548+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
13549+ * <br>Returns {@link ARKUI_ERROR_CODE_NODE_UNSUPPORTED_EVENT_TYPE} if the event type is not supported.
13559 * @since 2113550 * @since 21
13560 */13551 */
13561int32_t OH_ArkUI_NativeModule_UnregisterCommonEvent(ArkUI_NodeHandle node, ArkUI_NodeEventType eventType);13552int32_t OH_ArkUI_NativeModule_UnregisterCommonEvent(ArkUI_NodeHandle node, ArkUI_NodeEventType eventType);
13562 13553 
13563/**13554/**
13564- * @brief Register common visible area approximate change event callback of target node.13555+ * @brief Registers a basic event callback for visible area changes with a constrained callback interval.
13565 *13556 *
13566- * @param node The ArkUI-NodeHandle pointer.13557+ * @param node Target node.
13567- * @param ratios Threshold array representing the visible area of the component.13558+ * @param ratios Array of threshold ratios, representing the visible area of the component.
13568- * @param size The size of the ratios.13559+ * @param size Size of the array of threshold ratios.
13569- * @param expectedUpdateInterval The expected calculation interval for developers.13560+ * @param expectedUpdateInterval Expected calculation interval.
13570- * @param userData Indicates the pointer to the custom data.13561+ * @param userData User-defined data pointer for processing custom data within the callback function. You are
13571- * @param callback Indicates the event callback function.13562+ * responsible for ensuring the validity of the data when the custom function is executed.
13572- * @return Returns the result code.13563+ * @param callback User-defined callback function.
13573- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.13564+ * @return Result code.
13574- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function params is invalid.13565+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
13566+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
13575 * @since 2113567 * @since 21
13576 */13568 */
13577int32_t OH_ArkUI_NativeModule_RegisterCommonVisibleAreaApproximateChangeEvent(ArkUI_NodeHandle node, float* ratios,13569int32_t OH_ArkUI_NativeModule_RegisterCommonVisibleAreaApproximateChangeEvent(ArkUI_NodeHandle node, float* ratios,
13578 int32_t size, float expectedUpdateInterval, void* userData, void (*callback)(ArkUI_NodeEvent* event));13570 int32_t size, float expectedUpdateInterval, void* userData, void (*callback)(ArkUI_NodeEvent* event));
13579 13571 
13580/**13572/**
13581- * @brief Unregister common visible area approximate change event callback of target node.13573+ * @brief Unregisters the basic event callback for visible area changes with a constrained callback interval.
13582 *13574 *
13583- * @param node The ArkUI-NodeHandle pointer.13575+ * @param node Target node.
13584- * @return Returns the result code.13576+ * @return Result code.
13585- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.13577+ * <br>Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
13586- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function params is invalid.13578+ * <br>Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
13587 * @since 2113579 * @since 21
13588 */13580 */
13589int32_t OH_ArkUI_NativeModule_UnregisterCommonVisibleAreaApproximateChangeEvent(ArkUI_NodeHandle node);13581int32_t OH_ArkUI_NativeModule_UnregisterCommonVisibleAreaApproximateChangeEvent(ArkUI_NodeHandle node);
Markui/ace_engine/native/ui_input_event.h+1492-1504
Azh-cn/arkui/ace_engine/native/drag_and_drop.h+1017-0
@@ -0,0 +1,1017 @@
1+/*
2+ * Copyright (c) 2024 Huawei Device Co., Ltd.
3+ * Licensed under the Apache License, Version 2.0 (the "License");
4+ * you may not use this file except in compliance with the License.
5+ * You may obtain a copy of the License at
6+ *
7+ * http://www.apache.org/licenses/LICENSE-2.0
8+ *
9+ * Unless required by applicable law or agreed to in writing, software
10+ * distributed under the License is distributed on an "AS IS" BASIS,
11+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ * See the License for the specific language governing permissions and
13+ * limitations under the License.
14+ */
15+ 
16+/**
17+ * @addtogroup ArkUI_NativeModule
18+ * @{
19+ *
20+ * @brief Provides drag and drop APIs of ArkUI on the native side.
21+ *
22+ * @since 12
23+ */
24+ 
25+/**
26+ * @file drag_and_drop.h
27+ *
28+ * @brief Declares the APIs of **NativeDrag**.
29+ *
30+ * @library libace_ndk.z.so
31+ * @kit ArkUI
32+ * @syscap SystemCapability.ArkUI.ArkUI.Full
33+ * @since 12
34+ */
35+ 
36+#ifndef ARKUI_NATIVE_DRAG_AND_DROP_H
37+ 
38+#define ARKUI_NATIVE_DRAG_AND_DROP_H
39+ 
40+#include <stdint.h>
41+ 
42+#include "native_type.h"
43+ 
44+#include "database/udmf/udmf.h"
45+ 
46+#include "multimedia/image_framework/image/pixelmap_native.h"
47+ 
48+#ifdef __cplusplus
49+extern "C" {
50+#endif
51+ 
52+/**
53+ * @brief 拖拽结果定义,由数据接收方设置,并由系统传递给数据拖出方,拖出方可感知接收方对数据的处理结果。
54+ *
55+ * @since 12
56+ */
57+typedef enum {
58+ /**
59+ * 拖拽处理成功。
60+ */
61+ ARKUI_DRAG_RESULT_SUCCESSFUL = 0,
62+ 
63+ /**
64+ * 拖拽处理失败。
65+ */
66+ ARKUI_DRAG_RESULT_FAILED,
67+ 
68+ /**
69+ * 拖拽处理取消。
70+ */
71+ ARKUI_DRAG_RESULT_CANCELED
72+} ArkUI_DragResult;
73+ 
74+/**
75+ * @brief 定义拖拽释放时的数据处理方式,影响角标的显示。当设置为复制行为时角标显示加号,设置为剪切行为时角标不显示加号。
76+ *
77+ * @since 12
78+ */
79+typedef enum {
80+ /**
81+ * 复制行为。
82+ */
83+ ARKUI_DROP_OPERATION_COPY = 0,
84+ 
85+ /**
86+ * 剪切行为。
87+ */
88+ ARKUI_DROP_OPERATION_MOVE
89+} ArkUI_DropOperation;
90+ 
91+/**
92+ * @brief 定义拖拽发起前的长按交互阶段的变化状态。
93+ *
94+ * @since 12
95+ */
96+typedef enum {
97+ /**
98+ * Unknown.
99+ */
100+ ARKUI_PRE_DRAG_STATUS_UNKNOWN = -1,
101+ 
102+ /**
103+ * 拖拽手势启动阶段。
104+ */
105+ ARKUI_PRE_DRAG_STATUS_ACTION_DETECTING,
106+ 
107+ /**
108+ * 拖拽准备完成,可发起拖拽阶段。
109+ */
110+ ARKUI_PRE_DRAG_STATUS_READY_TO_TRIGGER_DRAG,
111+ 
112+ /**
113+ * 拖拽浮起动效发起阶段。
114+ */
115+ ARKUI_PRE_DRAG_STATUS_PREVIEW_LIFT_STARTED,
116+ 
117+ /**
118+ * 拖拽浮起动效结束阶段。
119+ */
120+ ARKUI_PRE_DRAG_STATUS_PREVIEW_LIFT_FINISHED,
121+ 
122+ /**
123+ * 拖拽落回动效发起阶段。
124+ */
125+ ARKUI_PRE_DRAG_STATUS_PREVIEW_LANDING_STARTED,
126+ 
127+ /**
128+ * 拖拽落回动效结束阶段。
129+ */
130+ ARKUI_PRE_DRAG_STATUS_PREVIEW_LANDING_FINISHED,
131+ 
132+ /**
133+ * 拖拽浮起落位动效中断。
134+ */
135+ ARKUI_PRE_DRAG_STATUS_CANCELED_BEFORE_DRAG
136+} ArkUI_PreDragStatus;
137+ 
138+/**
139+ * @brief 拖拽预览缩放模式。
140+ *
141+ * @since 12
142+ */
143+typedef enum {
144+ /**
145+ * 系统根据拖拽场景自动改变跟手点位置,根据规则自动对拖拽背板图进行缩放变换等。
146+ */
147+ ARKUI_DRAG_PREVIEW_SCALE_AUTO = 0,
148+ 
149+ /**
150+ * 禁用系统对拖拽背板图的缩放行为。
151+ */
152+ ARKUI_DRAG_PREVIEW_SCALE_DISABLED
153+} ArkUI_DragPreviewScaleMode;
154+ 
155+/**
156+ * @brief 拖拽状态。
157+ *
158+ * @since 12
159+ */
160+typedef enum {
161+ /**
162+ * Unknown.
163+ */
164+ ARKUI_DRAG_STATUS_UNKNOWN = -1,
165+ 
166+ /**
167+ * 拖拽开始。
168+ */
169+ ARKUI_DRAG_STATUS_STARTED,
170+ 
171+ /**
172+ * 拖拽结束。
173+ */
174+ ARKUI_DRAG_STATUS_ENDED
175+} ArkUI_DragStatus;
176+ 
177+/**
178+ * @brief 定义组件事件的通用结构类型。
179+ *
180+ * @since 12
181+ */
182+typedef struct ArkUI_NodeEvent ArkUI_NodeEvent;
183+ 
184+/**
185+ * @brief native UI的上下文实例对象。
186+ *
187+ * @since 12
188+ */
189+typedef struct ArkUI_Context ArkUI_Context;
190+ 
191+/**
192+ * @brief 定义ArkUI native UI的上下文实例对象指针定义。
193+ *
194+ * @since 12
195+ */
196+typedef struct ArkUI_Context* ArkUI_ContextHandle;
197+ 
198+/**
199+ * @brief 拖拽事件。
200+ *
201+ * @since 12
202+ */
203+typedef struct ArkUI_DragEvent ArkUI_DragEvent;
204+ 
205+/**
206+ * @brief 定义拖拽跟手图的相关自定义参数。
207+ *
208+ * @since 12
209+ */
210+typedef struct ArkUI_DragPreviewOption ArkUI_DragPreviewOption;
211+ 
212+/**
213+ * @brief 拖拽行为,用于主动发起拖拽。
214+ *
215+ * @since 12
216+ */
217+typedef struct ArkUI_DragAction ArkUI_DragAction;
218+ 
219+/**
220+ * @brief 主动发起拖拽后,通过拖拽状态监听返回的系统拖拽相关数据。
221+ *
222+ * @since 12
223+ */
224+typedef struct ArkUI_DragAndDropInfo ArkUI_DragAndDropInfo;
225+ 
226+/**
227+ * @brief 从 NodeEvent 中获取DragEvent。
228+ *
229+ * @param nodeEvent ArkUI_NodeEvent事件指针。
230+ * @return ArkUI_DragEvent 事件指针,当传入的 NodeEvent 无效或不是拖拽相关的事件时,则返回空。
231+ * @since 12
232+ */
233+ArkUI_DragEvent* OH_ArkUI_NodeEvent_GetDragEvent(ArkUI_NodeEvent* nodeEvent);
234+ 
235+/**
236+ * @brief 获取预览拖拽事件状态。
237+ *
238+ * @param nodeEvent ArkUI_NodeEvent节点对象。
239+ * @return ArkUI_PreDragStatus 拖拽发起前交互状态。
240+ * @since 12
241+ */
242+ArkUI_PreDragStatus OH_ArkUI_NodeEvent_GetPreDragStatus(ArkUI_NodeEvent* nodeEvent);
243+ 
244+/**
245+ * @brief 设置是否禁用松手时的系统默认动效,默认不禁用,通常在应用需要自定义落位动效时配置。
246+ *
247+ * @param event ArkUI_DragEvent事件指针。
248+ * @param disable 是否禁用松手时的系统默认动效,true禁用,false不禁用。
249+ * @return 错误码。
250+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
251+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
252+ * @since 12
253+ */
254+int32_t OH_ArkUI_DragEvent_DisableDefaultDropAnimation(ArkUI_DragEvent* event, bool disable);
255+ 
256+/**
257+ * @brief 设置数据处理方式。
258+ *
259+ * @param event ArkUI_DragEvent事件指针。
260+ * @param dropOperation 角标显示状态的类型。
261+ * @return 错误码。
262+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
263+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
264+ * @since 12
265+ */
266+int32_t OH_ArkUI_DragEvent_SetSuggestedDropOperation(ArkUI_DragEvent* event, ArkUI_DropOperation dropOperation);
267+ 
268+/**
269+ * @brief 设置拖拽事件的结果。
270+ *
271+ * @param event ArkUI_DragEvent事件指针。
272+ * @param result 拖拽数据处理结果。
273+ * @return 错误码。
274+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
275+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
276+ * @since 12
277+ */
278+int32_t OH_ArkUI_DragEvent_SetDragResult(ArkUI_DragEvent* event, ArkUI_DragResult result);
279+ 
280+/**
281+ * @brief 向ArkUI_DragEvent中设置拖拽数据。
282+ *
283+ * @param event ArkUI_DragEvent事件指针。
284+ * @param data 拖拽数据。
285+ * @return 错误码。
286+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
287+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
288+ * @since 12
289+ */
290+int32_t OH_ArkUI_DragEvent_SetData(ArkUI_DragEvent* event, OH_UdmfData* data);
291+ 
292+/**
293+ * @brief 使用此方法为系统提供一个数据加载参数,而不是直接提供一个完整的数据对象。当用户拖拽到目标应用程序并落入时,系统将使用dataLoadParams请求数据。可以极大地提高拖拽大量数据的效率,
294+ * 以及目标应用程序中处理落入数据的效率。此方法应始终优先于{@link OH_ArkUI_DragEvent_SetData}使用。请参考<b>udmf.h</b>中的
295+ * {@link OH_UdmfDataLoadParams_Create}了解如何创建和准备数据加载参数。该方法与{@link OH_ArkUI_DragEvent_SetData}存在冲突,系统始终以最后调用的方法为准。
296+ *
297+ * @param event ArkUI_DragEvent事件指针。
298+ * @param dataLoadParams 落入操作时使用的数据加载参数。
299+ * @return 错误码。
300+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
301+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
302+ * @since 20
303+ */
304+ArkUI_ErrorCode OH_ArkUI_DragEvent_SetDataLoadParams(ArkUI_DragEvent* event, OH_UdmfDataLoadParams* dataLoadParams);
305+ 
306+/**
307+ * @brief 从ArkUI_DragEvent中获取拖拽默认相关数据。
308+ *
309+ * @param event ArkUI_DragEvent事件指针。
310+ * @param data OH_UdmfData 拖拽的数据指针,应用在接收时需通过 {@link OH_UdmfData_Create} 方法创建一个用于接收数据的指针。
311+ * @return 错误码。
312+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
313+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
314+ * @since 12
315+ */
316+int32_t OH_ArkUI_DragEvent_GetUdmfData(ArkUI_DragEvent* event, OH_UdmfData *data);
317+ 
318+/**
319+ * @brief 从ArkUI_DragEvent中获取所拖拽的数据类型种类个数。
320+ *
321+ * @param event ArkUI_DragEvent事件指针。
322+ * @param count 出参,返回所拖拽数据的类型的数量。
323+ * @return 错误码。
324+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
325+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
326+ * @since 12
327+ */
328+int32_t OH_ArkUI_DragEvent_GetDataTypeCount(ArkUI_DragEvent* event, int32_t* count);
329+ 
330+/**
331+ * @brief 从ArkUI_DragEvent中获取拖拽数据的类型列表。
332+ *
333+ * @param event ArkUI_DragEvent事件指针。
334+ * @param eventTypeArray Indicates the list of the drag data types. You need to create a string array first.
335+ * @param length 数组总长度,不应少于使用{@link OH_ArkUI_DragEvent_GetDataTypeCount}获取到的数量。
336+ * @param maxStrLen 拖拽数据类型的最大字符串长度。
337+ * @return 错误码。
338+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
339+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
340+ * <br>{@link ARKUI_ERROR_CODE_BUFFER_SIZE_ERROR} 传入的缓冲区大小异常。
341+ * @since 12
342+ */
343+int32_t OH_ArkUI_DragEvent_GetDataTypes(
344+ ArkUI_DragEvent *event, char *eventTypeArray[], int32_t length, int32_t maxStrLen);
345+ 
346+/**
347+ * @brief 从ArkUI_DragEvent中获取拖拽结果。
348+ *
349+ * @param event ArkUI_DragEvent事件指针。
350+ * @param result 出参,返回拖拽事件对应的拖拽结果。
351+ * @return 错误码。
352+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
353+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
354+ * @since 12
355+ */
356+int32_t OH_ArkUI_DragEvent_GetDragResult(ArkUI_DragEvent* event, ArkUI_DragResult* result);
357+ 
358+/**
359+ * @brief 从ArkUI_DragEvent中获取数据处理方式。
360+ *
361+ * @param event ArkUI_DragEvent事件指针。
362+ * @param operation 数据的处理方式.
363+ * @return 错误码。
364+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
365+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
366+ * <br>可能原因: 1. 参数为空或event非有效的DragEvent.
367+ * @since 12
368+ */
369+int32_t OH_ArkUI_DragEvent_GetDropOperation(ArkUI_DragEvent* event, ArkUI_DropOperation* operation);
370+ 
371+/**
372+ * @brief 从ArkUI_DragEvent中获取预览图跟手点的x轴坐标。
373+ *
374+ * @param event ArkUI_DragEvent事件指针。
375+ * @return float 返回拖拽跟手点的x轴坐标,单位为px,传入参数无效时返回默认值0
376+ * @since 12
377+ */
378+float OH_ArkUI_DragEvent_GetPreviewTouchPointX(ArkUI_DragEvent* event);
379+ 
380+/**
381+ * @brief 从ArkUI_DragEvent中获取预览图跟手点的y轴坐标。
382+ *
383+ * @param event ArkUI_DragEvent事件指针。
384+ * @return float 返回拖拽跟手点的y轴坐标,单位px,传入参数无效时返回默认值0
385+ * @since 12
386+ */
387+float OH_ArkUI_DragEvent_GetPreviewTouchPointY(ArkUI_DragEvent* event);
388+ 
389+/**
390+ * @brief 从ArkUI_DragEvent中获取预览图的宽。
391+ *
392+ * @param event ArkUI_DragEvent事件指针。
393+ * @return float 返回拖拽跟手图宽度,单位为px,传入参数无效时返回默认值0
394+ * @since 12
395+ */
396+float OH_ArkUI_DragEvent_GetPreviewRectWidth(ArkUI_DragEvent* event);
397+ 
398+/**
399+ * @brief 从ArkUI_DragEvent中获取预览图的高。
400+ *
401+ * @param event ArkUI_DragEvent事件指针。
402+ * @return float 返回拖拽跟手图高度,单位为px,传入参数无效时返回默认值0
403+ * @since 12
404+ */
405+float OH_ArkUI_DragEvent_GetPreviewRectHeight(ArkUI_DragEvent* event);
406+ 
407+/**
408+ * @brief 从ArkUI_DragEvent中获取跟手点相对于window的x轴坐标。
409+ *
410+ * @param event ArkUI_DragEvent事件指针。
411+ * @return float 返回跟手点相对于window的x轴坐标,单位为px,传入参数无效时返回默认值0
412+ * @since 12
413+ */
414+float OH_ArkUI_DragEvent_GetTouchPointXToWindow(ArkUI_DragEvent* event);
415+ 
416+/**
417+ * @brief 从ArkUI_DragEvent中获取跟手点相对于window的y轴坐标。
418+ *
419+ * @param event ArkUI_DragEvent事件指针。
420+ * @return float 返回跟手点相对于window的y轴坐标,单位为px,传入参数无效时返回默认值0
421+ * @since 12
422+ */
423+float OH_ArkUI_DragEvent_GetTouchPointYToWindow(ArkUI_DragEvent* event);
424+ 
425+/**
426+ * @brief 从ArkUI_DragEvent中获取跟手点相对于当前Display的x轴坐标。
427+ *
428+ * @param event ArkUI_DragEvent事件指针。
429+ * @return float 返回拖拽跟手点相对于当前Display的x轴坐标,单位为px,传入参数无效时返回默认值0
430+ * @since 12
431+ */
432+float OH_ArkUI_DragEvent_GetTouchPointXToDisplay(ArkUI_DragEvent* event);
433+ 
434+/**
435+ * @brief 从ArkUI_DragEvent中获取跟手点相对于当前Display的y轴坐标。
436+ *
437+ * @param event ArkUI_DragEvent事件指针。
438+ * @return float 返回拖拽跟手点相对于当前Display的y轴坐标,单位为px,传入参数无效时返回默认值0
439+ * @since 12
440+ */
441+float OH_ArkUI_DragEvent_GetTouchPointYToDisplay(ArkUI_DragEvent* event);
442+ 
443+/**
444+ * @brief 从ArkUI_DragEvent中获取跟手点相对于全局屏幕的x轴坐标。
445+ *
446+ * @param event ArkUI_DragEvent事件指针。
447+ * @return float 返回拖拽跟手点相对于全局Display的x轴坐标,单位为px,传入参数无效时返回默认值0
448+ * @since 20
449+ */
450+float OH_ArkUI_DragEvent_GetTouchPointXToGlobalDisplay(ArkUI_DragEvent* event);
451+ 
452+/**
453+ * @brief 从ArkUI_DragEvent中获取跟手点相对于全局屏幕的y轴坐标。
454+ *
455+ * @param event ArkUI_DragEvent事件指针。
456+ * @return float 返回拖拽跟手点相对于全局Display的y轴坐标,单位为px,传入参数无效时返回默认值0
457+ * @since 20
458+ */
459+float OH_ArkUI_DragEvent_GetTouchPointYToGlobalDisplay(ArkUI_DragEvent* event);
460+ 
461+/**
462+ * @brief 获取当前拖拽的x轴方向拖动速度。
463+ *
464+ * @param event ArkUI_DragEvent事件指针。
465+ * @return float 返回当前拖拽的x轴方向移动速度,单位为px/s,传入参数无效时返回默认值0
466+ * @since 12
467+ */
468+float OH_ArkUI_DragEvent_GetVelocityX(ArkUI_DragEvent* event);
469+ 
470+/**
471+ * @brief 获取当前拖拽的y轴方向拖动速度。
472+ *
473+ * @param event ArkUI_DragEvent事件指针。
474+ * @return float 返回当前拖拽的y轴方向移动速度,单位为px/s,传入参数无效时返回默认值0
475+ * @since 12
476+ */
477+float OH_ArkUI_DragEvent_GetVelocityY(ArkUI_DragEvent* event);
478+ 
479+/**
480+ * @brief 获取当前拖拽的主方向拖动速度。
481+ *
482+ * @param event ArkUI_DragEvent事件指针。
483+ * @return float 返回当前拖拽移动速度,单位为px/s,传入参数无效时返回默认值0
484+ * @since 12
485+ */
486+float OH_ArkUI_DragEvent_GetVelocity(ArkUI_DragEvent* event);
487+ 
488+/**
489+ * @brief 获取功能键按压状态。
490+ *
491+ * @param event ArkUI_DragEvent事件指针。
492+ * @param keys 返回当前处于按下状态的修饰键组合(Ctrl、Shift和Alt),应用可通过位运算进行判断。
493+ * @return 错误码。
494+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
495+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
496+ * @since 12
497+ */
498+int32_t OH_ArkUI_DragEvent_GetModifierKeyStates(ArkUI_DragEvent* event, uint64_t* keys);
499+ 
500+/**
501+ * @brief 获取当前拖拽事件发生时所在的屏幕ID,不支持当eventType为NODE_ON_DRAG_END时获取。
502+ *
503+ * @param event ArkUI_DragEvent事件指针。
504+ * @param displayId 返回当前拖拽事件发生时所在的屏幕ID。
505+ * @return 错误码。
506+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
507+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
508+ * @since 20
509+ */
510+ArkUI_ErrorCode OH_ArkUI_DragEvent_GetDisplayId(ArkUI_DragEvent* event, int32_t* displayId);
511+ 
512+/**
513+ * @brief 使用指定的同步参数开始数据同步。
514+ *
515+ * @param event ArkUI_DragEvent事件指针。
516+ * @param options OH_UdmfGetDataParams参数指针。
517+ * @param key 返回数据设置成功之后的key值,字符串长度不小于{@link UDMF_KEY_BUFFER_LEN}。
518+ * @param keyLen 表示key字符串的长度。
519+ * @return 错误码。
520+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
521+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
522+ * @since 15
523+ */
524+int32_t OH_ArkUI_DragEvent_StartDataLoading(
525+ ArkUI_DragEvent* event, OH_UdmfGetDataParams* options, char* key, unsigned int keyLen);
526+ 
527+/**
528+ * @brief 取消正在进行的数据同步。
529+ *
530+ * @param uiContext UI实例对象指针。
531+ * @param key 表示数据的key值并通过 {@link OH_ArkUI_DragEvent_StartDataLoading} 返回。
532+ * @return 错误码。
533+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
534+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
535+ * @since 15
536+ */
537+int32_t OH_ArkUI_CancelDataLoading(ArkUI_ContextHandle uiContext, const char* key);
538+ 
539+/**
540+ * @brief 设置是否在执行{@link NODE_ON_DROP}之前禁用数据预获取过程。系统将重试获取数据,直到达到最大时间限制(目前为2.4秒),这对跨设备的拖动操作非常有用,因为它有助于系统稳定通信。然而,对于
541+ * {@link OH_ArkUI_DragEvent_StartDataLoading}方法而言,这一特性显得多余。该方法采用异步机制获取数据,因此在NODE_ON_DROP中使用
542+ * {@link OH_ArkUI_DragEvent_StartDataLoading}时,为了避免在NODE_ON_DROP执行前意外获取数据,必须将此字段设置为true
543+ *
544+ * @param node 组件节点指针。
545+ * @param disabled 表示是禁用数据预取过程。true表示禁止,false表示不禁止。
546+ * @return 错误码。
547+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
548+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
549+ * @since 15
550+ */
551+int32_t OH_ArkUI_DisableDropDataPrefetchOnNode(ArkUI_NodeHandle node, bool disabled);
552+ 
553+/**
554+ * @brief 控制是否使能严格dragEvent上报,建议开启;默认是不开启的;当不开启时,从父组件拖移进子组件时,父组件并不会收到leave的通知;而开启之后,只要前后两个组件发生变化,上一个组件就会收到leave,
555+ * 新的组件收到enter通知;该配置与具体的UI实例相关,需要通过传入一个当前UI实例上的一个具体的组件节点来关联。
556+ *
557+ * @param node 组件节点指针。
558+ * @param enabled 是否开启严格上报。true表示开启严格上报,false表示关闭严格上报。
559+ * @return 错误码。
560+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
561+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
562+ * @since 12
563+ */
564+int32_t OH_ArkUI_SetDragEventStrictReportWithNode(ArkUI_NodeHandle node, bool enabled);
565+ 
566+/**
567+ * @brief 控制是否使能严格dragEvent上报,建议开启;默认是不开启的;当不开启时,从父组件拖移进子组件时,父组件并不会收到leave的通知;而开启之后,只要前后两个组件发生变化,上一个组件就会收到leave,
568+ * 新的组件收到enter通知;该配置与具体的UI实例相关,可通过传入一个UI实例进行关联。
569+ *
570+ * @param uiContext UI实例指针。
571+ * @param enabled 是否开启严格上报。true表示开启严格上报,false表示关闭严格上报。
572+ * @return 错误码。
573+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
574+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
575+ * @since 12
576+ */
577+int32_t OH_ArkUI_SetDragEventStrictReportWithContext(ArkUI_ContextHandle uiContext, bool enabled);
578+ 
579+/**
580+ * @brief 配置组件允许接受落入的数据类型,该接口会重置通过 {@link OH_ArkUI_DisallowNodeAnyDropDataTypes} 或
581+ * {@link OH_ArkUI_AllowNodeAllDropDataTypes}进行的配置。
582+ *
583+ * @param node 组件节点指针。
584+ * @param typesArray Indicates the array of types of data that can be dropped.
585+ * @param count 数组的长度。
586+ * @return 错误码。
587+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
588+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
589+ * @since 12
590+ */
591+int32_t OH_ArkUI_SetNodeAllowedDropDataTypes(ArkUI_NodeHandle node, const char* typesArray[], int32_t count);
592+ 
593+/**
594+ * @brief 配置组件不允许接受任何数据类型,该接口会重置通过{@link OH_ArkUI_SetNodeAllowedDropDataTypes}配置的数据类型。
595+ *
596+ * @param node 组件节点指针。
597+ * @return 错误码。
598+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
599+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
600+ * @since 12
601+ */
602+int32_t OH_ArkUI_DisallowNodeAnyDropDataTypes(ArkUI_NodeHandle node);
603+ 
604+/**
605+ * @brief 配置组件允许接受任意数据类型,该接口会重置通过{@link OH_ArkUI_SetNodeAllowedDropDataTypes}配置的数据类型。
606+ *
607+ * @param node 组件节点指针。
608+ * @return 错误码。
609+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
610+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
611+ * @since 12
612+ */
613+int32_t OH_ArkUI_AllowNodeAllDropDataTypes(ArkUI_NodeHandle node);
614+ 
615+/**
616+ * @brief 设置该组件是否允许进行拖拽。
617+ *
618+ * @param node 组件节点指针。
619+ * @param enabled 是否支持拖出。true表示支持拖出,false表示不支持拖出。
620+ * @return 错误码。
621+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
622+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
623+ * @since 12
624+ */
625+int32_t OH_ArkUI_SetNodeDraggable(ArkUI_NodeHandle node, bool enabled);
626+ 
627+/**
628+ * @brief 设置组件在被拖拽时的自定义跟手图。
629+ *
630+ * @param node 目标组件节点指针。
631+ * @param preview 自定义跟手图,使用 pixelmap 格式。
632+ * @return 错误码。
633+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
634+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
635+ * @since 12
636+ */
637+int32_t OH_ArkUI_SetNodeDragPreview(ArkUI_NodeHandle node, OH_PixelmapNative* preview);
638+ 
639+/**
640+ * @brief Creates an ArkUI_DragPreviewOption对象。
641+ *
642+ * @return ArkUI_DragPreviewOption对象。
643+ * @since 12
644+ */
645+ArkUI_DragPreviewOption* OH_ArkUI_CreateDragPreviewOption(void);
646+ 
647+/**
648+ * @brief 销毁跟手图自定义参数对象实例。
649+ *
650+ * @param option 自定义参数。
651+ * @since 12
652+ */
653+void OH_ArkUI_DragPreviewOption_Dispose(ArkUI_DragPreviewOption* option);
654+ 
655+/**
656+ * @brief 设置拖拽跟手图是否根据系统定义自动进行缩放。
657+ *
658+ * @param option 自定义参数。
659+ * @param scaleMode 设置组件拖拽过程中的跟手图缩放模式。
660+ * @return 错误码。
661+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
662+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
663+ * @since 12
664+ */
665+int32_t OH_ArkUI_DragPreviewOption_SetScaleMode(ArkUI_DragPreviewOption* option, ArkUI_DragPreviewScaleMode scaleMode);
666+ 
667+/**
668+ * @brief 设置跟手图背板默认的投影效果,默认不开启。
669+ *
670+ * @param option 自定义参数。
671+ * @param enabled 是否使用默认投影效果。true表示使用默认投影效果,false表示不使用默认投影效果。
672+ * @return 错误码。
673+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
674+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
675+ * @since 12
676+ */
677+int32_t OH_ArkUI_DragPreviewOption_SetDefaultShadowEnabled(ArkUI_DragPreviewOption* option, bool enabled);
678+ 
679+/**
680+ * @brief 设置跟手图背板默认的圆角效果(默认圆角半径为12.0vp),默认不开启。
681+ *
682+ * @param option 自定义参数。
683+ * @param enabled 是否开启圆角效果显示。true表示开启圆角效果显示,false表示不开启圆角效果显示。
684+ * @return 错误码。
685+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
686+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
687+ * @since 12
688+ */
689+int32_t OH_ArkUI_DragPreviewOption_SetDefaultRadiusEnabled(ArkUI_DragPreviewOption* option, bool enabled);
690+ 
691+/**
692+ * @brief 设置跟手图背板是否显示角标,开启后,系统会根据拖拽数量自动进行角标显示。
693+ *
694+ * @param option 自定义参数。
695+ * @param enabled 是否开启角标显示。true表示开启角标显示,false表示不开启角标显示。
696+ * @return 错误码。
697+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
698+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
699+ * @since 12
700+ */
701+int32_t OH_ArkUI_DragPreviewOption_SetNumberBadgeEnabled(ArkUI_DragPreviewOption* option, bool enabled);
702+ 
703+/**
704+ * @brief 强制显示角标的数量,覆盖{@link OH_ArkUI_DragPreviewOption_SetNumberBadgeEnabled}设置的值。
705+ *
706+ * @param option 自定义参数。
707+ * @param forcedNumber 角标的数量。
708+ * @return 错误码。
709+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
710+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
711+ * @since 12
712+ */
713+int32_t OH_ArkUI_DragPreviewOption_SetBadgeNumber(ArkUI_DragPreviewOption* option, uint32_t forcedNumber);
714+ 
715+/**
716+ * @brief 配置是否开启点按时的默认动画。
717+ *
718+ * @param option 自定义参数。
719+ * @param enabled 是否开启默认点按效果。true表示开启默认点按效果,false表示不开启默认点按效果。
720+ * @return 错误码。
721+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
722+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
723+ * @since 12
724+ */
725+int32_t OH_ArkUI_DragPreviewOption_SetDefaultAnimationBeforeLiftingEnabled(
726+ ArkUI_DragPreviewOption* option, bool enabled);
727+ 
728+/**
729+ * @brief 将构造的ArkUI_DragPreviewOption设置给组件。
730+ *
731+ * @param node 组件节点指针。
732+ * @param option 自定义参数。
733+ * @return 错误码。
734+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
735+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
736+ * @since 12
737+ */
738+int32_t OH_ArkUI_SetNodeDragPreviewOption(ArkUI_NodeHandle node, ArkUI_DragPreviewOption* option);
739+ 
740+/**
741+ * @brief 创建一个拖拽操作对象,该对象需与一个UI实例相关联,可通过传入一个当前UI实例的某个组件节点来指定。
742+ *
743+ * @param node 组件节点指针。
744+ * @return ArkUI_DragAction对象指针,如果创建失败,则返回空。
745+ * @since 12
746+ */
747+ArkUI_DragAction* OH_ArkUI_CreateDragActionWithNode(ArkUI_NodeHandle node);
748+ 
749+/**
750+ * @brief 创建一个拖拽操作对象,该对象需与一个UI实例相关联,可通过传入一个UI实例指针来关联。
751+ *
752+ * @param uiContext UI实例对象指针。
753+ * @return ArkUI_DragAction对象,如果创建失败,则返回空。
754+ * @since 12
755+ */
756+ArkUI_DragAction* OH_ArkUI_CreateDragActionWithContext(ArkUI_ContextHandle uiContext);
757+ 
758+/**
759+ * @brief 销毁创建的 ArkUI_DragAction 对象。
760+ *
761+ * @param dragAction 拖拽行为对象。
762+ * @since 12
763+ */
764+void OH_ArkUI_DragAction_Dispose(ArkUI_DragAction* dragAction);
765+ 
766+/**
767+ * @brief 设置手指ID,当屏幕上仅有一只手指在操作时,手指ID为0;一般情况下,配置0即可。
768+ *
769+ * @param dragAction 拖拽行为对象。
770+ * @param pointer 手指ID,范围09。取值超出时默认置为-1
771+ * @return 错误码。
772+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
773+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
774+ * @since 12
775+ */
776+int32_t OH_ArkUI_DragAction_SetPointerId(ArkUI_DragAction* dragAction, int32_t pointer);
777+ 
778+/**
779+ * @brief 设置拖拽跟手图,只能使用 pixelmap 格式对象。
780+ *
781+ * @param dragAction 拖拽行为对象。
782+ * @param pixelmapArray Indicates the array of the drag previews to set, which must be pixel maps.
783+ * @param size 拖拽跟手图数量。
784+ * @return 错误码。
785+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
786+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
787+ * @since 12
788+ */
789+int32_t OH_ArkUI_DragAction_SetPixelMaps(
790+ ArkUI_DragAction* dragAction, OH_PixelmapNative* pixelmapArray[], int32_t size);
791+ 
792+/**
793+ * @brief 设置跟手点,相对于设置的第一个pixelmap的左上角。
794+ *
795+ * @param dragAction 拖拽行为对象。
796+ * @param x 跟手点坐标x值,单位为px。
797+ * @return 错误码。
798+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
799+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
800+ * @since 12
801+ */
802+int32_t OH_ArkUI_DragAction_SetTouchPointX(ArkUI_DragAction* dragAction, float x);
803+ 
804+/**
805+ * @brief 设置跟手点,相对于设置的第一个pixelmap的左上角。
806+ *
807+ * @param dragAction 拖拽行为对象。
808+ * @param y 跟手点坐标y值,单位为px。
809+ * @return 错误码。
810+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
811+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
812+ * @since 12
813+ */
814+int32_t OH_ArkUI_DragAction_SetTouchPointY(ArkUI_DragAction* dragAction, float y);
815+ 
816+/**
817+ * @brief 设置拖拽数据。
818+ *
819+ * @param dragAction 拖拽行为对象。
820+ * @param data 拖拽数据。
821+ * @return 错误码。
822+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
823+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
824+ * @since 12
825+ */
826+int32_t OH_ArkUI_DragAction_SetData(ArkUI_DragAction* dragAction, OH_UdmfData* data);
827+ 
828+/**
829+ * @brief 使用此方法为系统提供一个数据加载参数,而不是直接提供一个完整的数据对象。当用户拖拽到目标应用程序并落入时,系统将使用dataLoadParams请求数据。可以极大地提高拖拽大量数据的效率,
830+ * 以及目标应用程序中处理落入数据的效率。此方法应始终优先于{@link OH_ArkUI_DragAction_SetData}使用。请参考<b>udmf.h</b>中的
831+ * {@link OH_UdmfDataLoadParams_Create}了解如何创建和准备数据加载参数。该方法与{@link OH_ArkUI_DragAction_SetData}存在冲突,系统始终以最后调用的方法为准。
832+ *
833+ * @param dragAction 拖拽行为对象。
834+ * @param dataLoadParams 在落入操作时使用的数据加载参数。
835+ * @return 错误码。
836+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
837+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
838+ * @since 20
839+ */
840+ArkUI_ErrorCode OH_ArkUI_DragAction_SetDataLoadParams(ArkUI_DragAction* dragAction,
841+ OH_UdmfDataLoadParams* dataLoadParams);
842+ 
843+/**
844+ * @brief 将构造的ArkUI_DragPreviewOption设置给ArkUI_DragAction。
845+ *
846+ * @param dragAction 拖拽行为对象。
847+ * @param option 自定义参数。
848+ * @return 错误码。
849+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
850+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
851+ * @since 12
852+ */
853+int32_t OH_ArkUI_DragAction_SetDragPreviewOption(ArkUI_DragAction* dragAction, ArkUI_DragPreviewOption* option);
854+ 
855+/**
856+ * @brief 注册拖拽状态监听回调,该回调可感知到拖拽已经发起或用户松手结束的状态,可通过该监听获取到落入方对数据的接收处理是否成功。
857+ *
858+ * @param dragAction 拖拽行为对象。
859+ * @param userData 应用自定义数据。
860+ * @param listener 状态监听回调,回调触发时,系统会返回一个拖拽状态对象指针,该指针会在回调执行完成后被销毁,应用不应再持有。
861+ * @return 错误码。
862+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
863+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
864+ * @since 12
865+ */
866+int32_t OH_ArkUI_DragAction_RegisterStatusListener(ArkUI_DragAction* dragAction, void* userData,
867+ void(*listener)(ArkUI_DragAndDropInfo* dragAndDropInfo, void* userData));
868+ 
869+/**
870+ * @brief 解注册拖拽状态监听回调。
871+ *
872+ * @param dragAction 拖拽行为对象。
873+ * @since 12
874+ */
875+void OH_ArkUI_DragAction_UnregisterStatusListener(ArkUI_DragAction* dragAction);
876+ 
877+/**
878+ * @brief 获取{@link ArkUI_DragAction}发起拖拽的状态,获取异常时返回 ArkUI_DRAG_STATUS_UNKNOWN。
879+ *
880+ * @param dragAndDropInfo 拖拽状态监听返回的拖拽相关信息。
881+ * @return ArkUI_DragStatus 拖拽状态,如果获取失败,返回默认值 ArkUI_DRAG_STATUS_UNKNOWN。
882+ * @since 12
883+ */
884+ArkUI_DragStatus OH_ArkUI_DragAndDropInfo_GetDragStatus(ArkUI_DragAndDropInfo* dragAndDropInfo);
885+ 
886+/**
887+ * @brief 通过dragAndDropInfo获取到DragEvent,可通过DragEvent获取释放结果等。
888+ *
889+ * @param dragAndDropInfo 拖拽状态监听返回的拖拽相关信息。
890+ * @return ArkUI_DragEvent 拖拽事件,如果获取失败,则返回空。
891+ * @since 12
892+ */
893+ArkUI_DragEvent* OH_ArkUI_DragAndDropInfo_GetDragEvent(ArkUI_DragAndDropInfo* dragAndDropInfo);
894+ 
895+/**
896+ * @brief 通过构造的DragAction对象发起拖拽。
897+ *
898+ * @param dragAction 拖拽action对象。
899+ * @return 错误码。
900+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
901+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
902+ * @since 12
903+ */
904+int32_t OH_ArkUI_StartDrag(ArkUI_DragAction* dragAction);
905+ 
906+/**
907+ * @brief 请求延迟处理拖拽结束事件,等待应用程序确认操作结果。应用程序需通过 {@link OH_ArkUI_NotifyDragResult}接口将最终结果回传至系统,并在所有处理完成后调用
908+ * {@link OH_ArkUI_NotifyDragEndPendingDone}。最大等待时间为2秒。
909+ *
910+ * @param event 指向 <b>ArkUI_DragEvent</b> 对象的指针。
911+ * @param requestIdentify 系统自动生成的请求标识符,是一个输出参数,需要为一个有效的地址。
912+ * @return 错误码。
913+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
914+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
915+ * <br>{@link ARKUI_ERROR_CODE_DRAG_DROP_OPERATION_NOT_ALLOWED} 当前阶段不允许该操作。
916+ * @since 19
917+ */
918+int32_t OH_ArkUI_DragEvent_RequestDragEndPending(ArkUI_DragEvent* event, int32_t* requestIdentify);
919+ 
920+/**
921+ * @brief 通知系统最终拖拽结果。系统会校验请求标识符是否与{@link OH_ArkUI_DragEvent_RequestDragEndPending}返回的一致,不一致则忽略本次调用。
922+ *
923+ * @param requestIdentify 由 {@link OH_ArkUI_DragEvent_RequestDragEndPending} 返回的标识符。
924+ * @param result 拖拽结果枚举值({@link ArkUI_DragResult} 类型)。
925+ * @return 错误码。
926+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
927+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
928+ * <br>{@link ARKUI_ERROR_CODE_DRAG_DROP_OPERATION_NOT_ALLOWED} 当前阶段不允许该操作。
929+ * @since 19
930+ */
931+int32_t OH_ArkUI_NotifyDragResult(int32_t requestIdentify, ArkUI_DragResult result);
932+ 
933+/**
934+ * @brief 通知拖拽发起方本次落入的行为类型。拖拽发起方可以在拖拽结束的回调中调用{@link OH_ArkUI_DragEvent_GetDropOperation}获取本次落入的行为类型,进行自定义处理。也可以选择忽略该通知,
935+ * 不进行处理。拖拽失败时,本次落入的行为类型不可信,此时调用{@link OH_ArkUI_DragEvent_GetDropOperation}获取到的行为类型恒为ARKUI_DROP_OPERATION_COPY。
936+ * 系统会校验requestIdentity是否与{@link OH_ArkUI_DragEvent_RequestDragEndPending}返回的一致,不一致则本次调用不生效。
937+ *
938+ * @param requestIdentity The identity returned by {@link OH_ArkUI_DragEvent_RequestDragEndPending} interface.
939+ * @param operation 落入行为类型{@link ArkUI_DropOperation}。
940+ * @return 错误码。
941+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
942+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
943+ * <br>{@link ARKUI_ERROR_CODE_DRAG_DROP_OPERATION_NOT_ALLOWED} 函数未在落入阶段调用。
944+ * @since 24
945+ */
946+int32_t OH_ArkUI_NotifySuggestedDropOperation(int32_t requestIdentity, ArkUI_DropOperation operation);
947+ 
948+/**
949+ * @brief 通知系统是否禁用默认的落入动画。拖拽失败时,默认的落入动画为扩散动画,拖拽成功时默认的落入动画为收缩淡出动画。调用此方法可禁用默认动画,根据需要实现自定义落入动画。系统会校验requestIdentity是否与
950+ * {@link OH_ArkUI_DragEvent_RequestDragEndPending}返回的一致,不一致则本次调用不生效。
951+ *
952+ * @param requestIdentity The identity returned by {@link OH_ArkUI_DragEvent_RequestDragEndPending} interface.
953+ * @param disable 通知是否禁用系统默认落入动画。true表示禁用系统默认落入动画,false表示使用系统默认落入动画。
954+ * @return 错误码。
955+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
956+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
957+ * <br>{@link ARKUI_ERROR_CODE_DRAG_DROP_OPERATION_NOT_ALLOWED} 函数未在落入阶段调用。
958+ * @since 24
959+ */
960+int32_t OH_ArkUI_NotifyDisableDefaultDropAnimation(int32_t requestIdentity, bool disable);
961+ 
962+/**
963+ * @brief 通知系统所有异步处理已完成,可结束拖拽结束挂起状态。
964+ *
965+ * @param requestIdentify 由 {@link OH_ArkUI_DragEvent_RequestDragEndPending} 返回的标识符。
966+ * @return 错误码。
967+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
968+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
969+ * <br>{@link ARKUI_ERROR_CODE_DRAG_DROP_OPERATION_NOT_ALLOWED} 当前阶段不允许该操作。
970+ * @since 19
971+ */
972+int32_t OH_ArkUI_NotifyDragEndPendingDone(int32_t requestIdentify);
973+ 
974+/**
975+ * @brief 获取拖拽发起方的应用包名信息,需要传递一个字符数组来接收包名字符串,并显式指明数组长度,该数组长度不小于128个字符。
976+ *
977+ * @param event 指向<b>ArkUI_DragEvent</b>对象的指针。
978+ * @param bundleName 用来接收拖起方包名的字符串数组,长度不应小于128个字符。
979+ * @param length 用来显式指明传入的字符串数组长度,不应小于128个字符。
980+ * @return 错误码。
981+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
982+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
983+ * @since 20
984+ */
985+ArkUI_ErrorCode OH_ArkUI_DragEvent_GetDragSource(ArkUI_DragEvent* event, char *bundleName, int32_t length);
986+ 
987+/**
988+ * @brief 判断当前的拖拽操作是否是跨设备拖拽。
989+ *
990+ * @param event 指向<b>ArkUI_DragEvent</b>对象的指针。
991+ * @param isRemote 布尔变量指针,用来接收是否是跨设备拖拽。true表示是跨设备拖拽,false表示非跨设备拖拽。
992+ * @return 错误码。
993+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
994+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
995+ * @since 20
996+ */
997+ArkUI_ErrorCode OH_ArkUI_DragEvent_IsRemote(ArkUI_DragEvent* event, bool* isRemote);
998+ 
999+/**
1000+ * @brief 设置是否可以显示禁用角标。
1001+ *
1002+ * @param uiContext UI实例对象指针。
1003+ * @param enabled 是否可以显示禁用角标。true表示可以显示禁用角标,false表示不可以显示禁用角标。
1004+ * @return 错误码。
1005+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
1006+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
1007+ * @since 20
1008+ */
1009+ArkUI_ErrorCode OH_ArkUI_EnableDropDisallowedBadge(ArkUI_ContextHandle uiContext, bool enabled);
1010+ 
1011+#ifdef __cplusplus
1012+};
1013+#endif
1014+ 
1015+#endif // ARKUI_NATIVE_DRAG_AND_DROP_H
1016+ 
1017+/** @} */
Azh-cn/arkui/ace_engine/native/native_interface_focus.h+121-0
@@ -0,0 +1,121 @@
1+/*
2+ * Copyright (c) 2025 Huawei Device Co., Ltd.
3+ * Licensed under the Apache License, Version 2.0 (the "License");
4+ * you may not use this file except in compliance with the License.
5+ * You may obtain a copy of the License at
6+ *
7+ * http://www.apache.org/licenses/LICENSE-2.0
8+ *
9+ * Unless required by applicable law or agreed to in writing, software
10+ * distributed under the License is distributed on an "AS IS" BASIS,
11+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ * See the License for the specific language governing permissions and
13+ * limitations under the License.
14+ */
15+ 
16+/**
17+ * @addtogroup ArkUI_NativeModule
18+ * @{
19+ *
20+ * @brief Provides focus capabilities of ArkUI on the native side, such as focus transfer operaions.
21+ *
22+ * @since 15
23+ */
24+ 
25+/**
26+ * @file native_interface_focus.h
27+ *
28+ * @brief Declares APIs for focus management, mainly used for actively transferring focus, managing the default focus
29+ * transfer behavior, and controlling the focus activation state.
30+ *
31+ * @library libace_ndk.z.so
32+ * @syscap SystemCapability.ArkUI.ArkUI.Full
33+ * @kit ArkUI
34+ * @since 15
35+ */
36+ 
37+#ifndef ARKUI_NATIVE_INTERFACE_FOCUS_H
38+ 
39+#define ARKUI_NATIVE_INTERFACE_FOCUS_H
40+ 
41+#include "napi/native_api.h"
42+ 
43+#include "native_type.h"
44+ 
45+#ifdef __cplusplus
46+extern "C" {
47+#endif
48+ 
49+/**
50+ * @brief 按键事件处理的优先级。
51+ *
52+ * @since 15
53+ */
54+typedef enum {
55+ /**
56+ * 按键事件用于移动焦点。
57+ */
58+ ARKUI_KEY_PROCESSING_MODE_FOCUS_NAVIGATION = 0,
59+ 
60+ /**
61+ * 按键事件向上传递给祖先组件。
62+ */
63+ ARKUI_KEY_PROCESSING_MODE_FOCUS_ANCESTOR_EVENT
64+} ArkUI_KeyProcessingMode;
65+ 
66+/**
67+ * @brief 为特定节点请求焦点。
68+ *
69+ * @param node 节点。
70+ * @return 错误码。
71+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 请求成功。
72+ * <br>{@link ARKUI_ERROR_CODE_FOCUS_NON_FOCUSABLE} 节点无法获得焦点。
73+ * <br>{@link ARKUI_ERROR_CODE_FOCUS_NON_FOCUSABLE_ANCESTOR} 祖先节点无法获得焦点。
74+ * <br>{@link ARKUI_ERROR_CODE_FOCUS_NON_EXISTENT} 节点不存在。
75+ * @since 15
76+ */
77+ArkUI_ErrorCode OH_ArkUI_FocusRequest(ArkUI_NodeHandle node);
78+ 
79+/**
80+ * @brief 将当前焦点清除到根容器节点。
81+ *
82+ * @param uiContext UI实例对象指针。
83+ * @since 15
84+ */
85+void OH_ArkUI_FocusClear(ArkUI_ContextHandle uiContext);
86+ 
87+/**
88+ * @brief 设置当前界面的焦点激活态,获焦节点显示焦点框。
89+ *
90+ * @param uiContext UI实例对象指针。
91+ * @param isActive 设置是否进入/退出焦点激活态。true表示进入焦点激活态,false表示退出焦点激活态。
92+ * @param isAutoInactive 当触摸事件或鼠标按下事件触发时,"true" 表示将状态设置为退出焦点激活态,"false" 表示在调用对应设置API前,保持当前状态。
93+ * @since 15
94+ */
95+void OH_ArkUI_FocusActivate(ArkUI_ContextHandle uiContext, bool isActive, bool isAutoInactive);
96+ 
97+/**
98+ * @brief 设置页面切换时,焦点转移行为。
99+ *
100+ * @param uiContext UI实例对象指针。
101+ * @param autoTransfer 页面切换时,是否转移焦点。true表示页面切换时转移焦点,false表示页面切换时焦点不转移。
102+ * @since 15
103+ */
104+void OH_ArkUI_FocusSetAutoTransfer(ArkUI_ContextHandle uiContext, bool autoTransfer);
105+ 
106+/**
107+ * @brief 设置按键事件处理的优先级。
108+ *
109+ * @param uiContext UI实例对象指针。
110+ * @param mode 按键事件处理的优先级。
111+ * @since 15
112+*/
113+void OH_ArkUI_FocusSetKeyProcessingMode(ArkUI_ContextHandle uiContext, ArkUI_KeyProcessingMode mode);
114+ 
115+#ifdef __cplusplus
116+};
117+#endif
118+ 
119+#endif // ARKUI_NATIVE_INTERFACE_FOCUS_H
120+ 
121+/** @} */
Azh-cn/arkui/ace_engine/native/native_key_event.h+1116-0
@@ -0,0 +1,1116 @@
1+/*
2+ * Copyright (c) 2024 Huawei Device Co., Ltd.
3+ * Licensed under the Apache License, Version 2.0 (the "License");
4+ * you may not use this file except in compliance with the License.
5+ * You may obtain a copy of the License at
6+ *
7+ * http://www.apache.org/licenses/LICENSE-2.0
8+ *
9+ * Unless required by applicable law or agreed to in writing, software
10+ * distributed under the License is distributed on an "AS IS" BASIS,
11+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ * See the License for the specific language governing permissions and
13+ * limitations under the License.
14+ */
15+ 
16+/**
17+ * @addtogroup ArkUI_NativeModule
18+ * @{
19+ *
20+ * @brief Provides the general key event APIs of ArkUI on the native side.
21+ *
22+ * @since 14
23+ */
24+ 
25+/**
26+ * @file native_key_event.h
27+ *
28+ * @brief Declares the APIs of **NativeKeyEvent**.
29+ *
30+ * @library libace_ndk.z.so
31+ * @syscap SystemCapability.ArkUI.ArkUI.Full
32+ * @kit ArkUI
33+ * @since 14
34+ */
35+ 
36+#ifndef ARKUI_NATIVE_KEY_EVENT_H
37+ 
38+#define ARKUI_NATIVE_KEY_EVENT_H
39+ 
40+#include <stdint.h>
41+ 
42+#include "native_type.h"
43+ 
44+#include "ui_input_event.h"
45+ 
46+#ifdef __cplusplus
47+extern "C" {
48+#endif
49+ 
50+#ifdef __cplusplus
51+};
52+#endif
53+ 
54+/**
55+ * @brief 按键事件的键码。
56+ *
57+ * @since 14
58+ */
59+typedef enum {
60+ /**
61+ * 未知按键。
62+ */
63+ ARKUI_KEYCODE_UNKNOWN = -1,
64+ 
65+ /**
66+ * 功能(Fn)键。
67+ */
68+ ARKUI_KEYCODE_FN = 0,
69+ 
70+ /**
71+ * 音量增加键。
72+ */
73+ ARKUI_KEYCODE_VOLUME_UP = 16,
74+ 
75+ /**
76+ * 音量减小键。
77+ */
78+ ARKUI_KEYCODE_VOLUME_DOWN = 17,
79+ 
80+ /**
81+ * 电源键。
82+ */
83+ ARKUI_KEYCODE_POWER = 18,
84+ 
85+ /**
86+ * 拍照键。
87+ */
88+ ARKUI_KEYCODE_CAMERA = 19,
89+ 
90+ /**
91+ * 扬声器静音键。
92+ */
93+ ARKUI_KEYCODE_VOLUME_MUTE = 22,
94+ 
95+ /**
96+ * 话筒静音键。
97+ */
98+ ARKUI_KEYCODE_MUTE = 23,
99+ 
100+ /**
101+ * 亮度调节按键,调亮。
102+ */
103+ ARKUI_KEYCODE_BRIGHTNESS_UP = 40,
104+ 
105+ /**
106+ * 亮度调节按键,调暗。
107+ */
108+ ARKUI_KEYCODE_BRIGHTNESS_DOWN = 41,
109+ 
110+ /**
111+ * 按键'0'
112+ */
113+ ARKUI_KEYCODE_0 = 2000,
114+ 
115+ /**
116+ * 按键'1'
117+ */
118+ ARKUI_KEYCODE_1 = 2001,
119+ 
120+ /**
121+ * 按键'2'
122+ */
123+ ARKUI_KEYCODE_2 = 2002,
124+ 
125+ /**
126+ * 按键'3'
127+ */
128+ ARKUI_KEYCODE_3 = 2003,
129+ 
130+ /**
131+ * 按键'4'
132+ */
133+ ARKUI_KEYCODE_4 = 2004,
134+ 
135+ /**
136+ * 按键'5'
137+ */
138+ ARKUI_KEYCODE_5 = 2005,
139+ 
140+ /**
141+ * 按键'6'
142+ */
143+ ARKUI_KEYCODE_6 = 2006,
144+ 
145+ /**
146+ * 按键'7'
147+ */
148+ ARKUI_KEYCODE_7 = 2007,
149+ 
150+ /**
151+ * 按键'8'
152+ */
153+ ARKUI_KEYCODE_8 = 2008,
154+ 
155+ /**
156+ * 按键'9'
157+ */
158+ ARKUI_KEYCODE_9 = 2009,
159+ 
160+ /**
161+ * 按键'+'
162+ */
163+ ARKUI_KEYCODE_STAR = 2010,
164+ 
165+ /**
166+ * 按键'#'
167+ */
168+ ARKUI_KEYCODE_POUND = 2011,
169+ 
170+ /**
171+ * 导航键,向上。
172+ */
173+ ARKUI_KEYCODE_DPAD_UP = 2012,
174+ 
175+ /**
176+ * 导航键,向下。
177+ */
178+ ARKUI_KEYCODE_DPAD_DOWN = 2013,
179+ 
180+ /**
181+ * 导航键,向左。
182+ */
183+ ARKUI_KEYCODE_DPAD_LEFT = 2014,
184+ 
185+ /**
186+ * 导航键,向右。
187+ */
188+ ARKUI_KEYCODE_DPAD_RIGHT = 2015,
189+ 
190+ /**
191+ * 导航键,确定键。
192+ */
193+ ARKUI_KEYCODE_DPAD_CENTER = 2016,
194+ 
195+ /**
196+ * 按键'A'
197+ */
198+ ARKUI_KEYCODE_A = 2017,
199+ 
200+ /**
201+ * 按键'B'
202+ */
203+ ARKUI_KEYCODE_B = 2018,
204+ 
205+ /**
206+ * 按键'C'
207+ */
208+ ARKUI_KEYCODE_C = 2019,
209+ 
210+ /**
211+ * 按键'D'
212+ */
213+ ARKUI_KEYCODE_D = 2020,
214+ 
215+ /**
216+ * 按键'E'
217+ */
218+ ARKUI_KEYCODE_E = 2021,
219+ 
220+ /**
221+ * 按键'F'
222+ */
223+ ARKUI_KEYCODE_F = 2022,
224+ 
225+ /**
226+ * 按键'G'
227+ */
228+ ARKUI_KEYCODE_G = 2023,
229+ 
230+ /**
231+ * 按键'H'
232+ */
233+ ARKUI_KEYCODE_H = 2024,
234+ 
235+ /**
236+ * 按键'I'
237+ */
238+ ARKUI_KEYCODE_I = 2025,
239+ 
240+ /**
241+ * 按键'J'
242+ */
243+ ARKUI_KEYCODE_J = 2026,
244+ 
245+ /**
246+ * 按键'K'
247+ */
248+ ARKUI_KEYCODE_K = 2027,
249+ 
250+ /**
251+ * 按键'L'
252+ */
253+ ARKUI_KEYCODE_L = 2028,
254+ 
255+ /**
256+ * 按键'M'
257+ */
258+ ARKUI_KEYCODE_M = 2029,
259+ 
260+ /**
261+ * 按键'N'
262+ */
263+ ARKUI_KEYCODE_N = 2030,
264+ 
265+ /**
266+ * 按键'O'
267+ */
268+ ARKUI_KEYCODE_O = 2031,
269+ 
270+ /**
271+ * 按键'P'
272+ */
273+ ARKUI_KEYCODE_P = 2032,
274+ 
275+ /**
276+ * 按键'Q'
277+ */
278+ ARKUI_KEYCODE_Q = 2033,
279+ 
280+ /**
281+ * 按键'R'
282+ */
283+ ARKUI_KEYCODE_R = 2034,
284+ 
285+ /**
286+ * 按键'S'
287+ */
288+ ARKUI_KEYCODE_S = 2035,
289+ 
290+ /**
291+ * 按键'T'
292+ */
293+ ARKUI_KEYCODE_T = 2036,
294+ 
295+ /**
296+ * 按键'U'
297+ */
298+ ARKUI_KEYCODE_U = 2037,
299+ 
300+ /**
301+ * 按键'V'
302+ */
303+ ARKUI_KEYCODE_V = 2038,
304+ 
305+ /**
306+ * 按键'W'
307+ */
308+ ARKUI_KEYCODE_W = 2039,
309+ 
310+ /**
311+ * 按键'X'
312+ */
313+ ARKUI_KEYCODE_X = 2040,
314+ 
315+ /**
316+ * 按键'Y'
317+ */
318+ ARKUI_KEYCODE_Y = 2041,
319+ 
320+ /**
321+ * 按键'Z'
322+ */
323+ ARKUI_KEYCODE_Z = 2042,
324+ 
325+ /**
326+ * 按键','
327+ */
328+ ARKUI_KEYCODE_COMMA = 2043,
329+ 
330+ /**
331+ * 按键'.'
332+ */
333+ ARKUI_KEYCODE_PERIOD = 2044,
334+ 
335+ /**
336+ * 左Alt键。
337+ */
338+ ARKUI_KEYCODE_ALT_LEFT = 2045,
339+ 
340+ /**
341+ * 右Alt键。
342+ */
343+ ARKUI_KEYCODE_ALT_RIGHT = 2046,
344+ 
345+ /**
346+ * 左Shift键。
347+ */
348+ ARKUI_KEYCODE_SHIFT_LEFT = 2047,
349+ 
350+ /**
351+ * 右Shift键。
352+ */
353+ ARKUI_KEYCODE_SHIFT_RIGHT = 2048,
354+ 
355+ /**
356+ * Tab键。
357+ */
358+ ARKUI_KEYCODE_TAB = 2049,
359+ 
360+ /**
361+ * 空格键。
362+ */
363+ ARKUI_KEYCODE_SPACE = 2050,
364+ 
365+ /**
366+ * 符号修改器按键。
367+ */
368+ ARKUI_KEYCODE_SYM = 2051,
369+ 
370+ /**
371+ * 浏览器功能键,此键用于启动浏览器应用程序。
372+ */
373+ ARKUI_KEYCODE_EXPLORER = 2052,
374+ 
375+ /**
376+ * 电子邮件功能键,此键用于启动电子邮件应用程序。
377+ */
378+ ARKUI_KEYCODE_ENVELOPE = 2053,
379+ 
380+ /**
381+ * 回车键。
382+ */
383+ ARKUI_KEYCODE_ENTER = 2054,
384+ 
385+ /**
386+ * 退格键。
387+ */
388+ ARKUI_KEYCODE_DEL = 2055,
389+ 
390+ /**
391+ * 按键'`'
392+ */
393+ ARKUI_KEYCODE_GRAVE = 2056,
394+ 
395+ /**
396+ * 按键'-'
397+ */
398+ ARKUI_KEYCODE_MINUS = 2057,
399+ 
400+ /**
401+ * 按键'='
402+ */
403+ ARKUI_KEYCODE_EQUALS = 2058,
404+ 
405+ /**
406+ * 按键'['
407+ */
408+ ARKUI_KEYCODE_LEFT_BRACKET = 2059,
409+ 
410+ /**
411+ * 按键']'
412+ */
413+ ARKUI_KEYCODE_RIGHT_BRACKET = 2060,
414+ 
415+ /**
416+ * 按键'\'。
417+ */
418+ ARKUI_KEYCODE_BACKSLASH = 2061,
419+ 
420+ /**
421+ * 按键';'
422+ */
423+ ARKUI_KEYCODE_SEMICOLON = 2062,
424+ 
425+ /**
426+ * 按键''' (单引号)。
427+ */
428+ ARKUI_KEYCODE_APOSTROPHE = 2063,
429+ 
430+ /**
431+ * 按键'/'
432+ */
433+ ARKUI_KEYCODE_SLASH = 2064,
434+ 
435+ /**
436+ * Key @
437+ */
438+ ARKUI_KEYCODE_AT = 2065,
439+ 
440+ /**
441+ * 按键'+'
442+ */
443+ ARKUI_KEYCODE_PLUS = 2066,
444+ 
445+ /**
446+ * 菜单键。
447+ */
448+ ARKUI_KEYCODE_MENU = 2067,
449+ 
450+ /**
451+ * 向上翻页键。
452+ */
453+ ARKUI_KEYCODE_PAGE_UP = 2068,
454+ 
455+ /**
456+ * 向下翻页键。
457+ */
458+ ARKUI_KEYCODE_PAGE_DOWN = 2069,
459+ 
460+ /**
461+ * ESC键。
462+ */
463+ ARKUI_KEYCODE_ESCAPE = 2070,
464+ 
465+ /**
466+ * 删除键。
467+ */
468+ ARKUI_KEYCODE_FORWARD_DEL = 2071,
469+ 
470+ /**
471+ * 左Ctrl键。
472+ */
473+ ARKUI_KEYCODE_CTRL_LEFT = 2072,
474+ 
475+ /**
476+ * 右Ctrl键。
477+ */
478+ ARKUI_KEYCODE_CTRL_RIGHT = 2073,
479+ 
480+ /**
481+ * 大写锁定键。
482+ */
483+ ARKUI_KEYCODE_CAPS_LOCK = 2074,
484+ 
485+ /**
486+ * 滚动锁定键。
487+ */
488+ ARKUI_KEYCODE_SCROLL_LOCK = 2075,
489+ 
490+ /**
491+ * 左元修改器键。
492+ */
493+ ARKUI_KEYCODE_META_LEFT = 2076,
494+ 
495+ /**
496+ * 右元修改器键。
497+ */
498+ ARKUI_KEYCODE_META_RIGHT = 2077,
499+ 
500+ /**
501+ * 功能键。
502+ */
503+ ARKUI_KEYCODE_FUNCTION = 2078,
504+ 
505+ /**
506+ * 系统请求/打印屏幕键。
507+ */
508+ ARKUI_KEYCODE_SYSRQ = 2079,
509+ 
510+ /**
511+ * Break/Pause键。
512+ */
513+ ARKUI_KEYCODE_BREAK = 2080,
514+ 
515+ /**
516+ * 光标移动到开始键。
517+ */
518+ ARKUI_KEYCODE_MOVE_HOME = 2081,
519+ 
520+ /**
521+ * 光标移动到末尾键。
522+ */
523+ ARKUI_KEYCODE_MOVE_END = 2082,
524+ 
525+ /**
526+ * 插入键。
527+ */
528+ ARKUI_KEYCODE_INSERT = 2083,
529+ 
530+ /**
531+ * 前进键。
532+ */
533+ ARKUI_KEYCODE_FORWARD = 2084,
534+ 
535+ /**
536+ * 多媒体键,播放。
537+ */
538+ ARKUI_KEYCODE_MEDIA_PLAY = 2085,
539+ 
540+ /**
541+ * 多媒体键,暂停。
542+ */
543+ ARKUI_KEYCODE_MEDIA_PAUSE = 2086,
544+ 
545+ /**
546+ * 多媒体键,关闭。
547+ */
548+ ARKUI_KEYCODE_MEDIA_CLOSE = 2087,
549+ 
550+ /**
551+ * 多媒体键,弹出。
552+ */
553+ ARKUI_KEYCODE_MEDIA_EJECT = 2088,
554+ 
555+ /**
556+ * 多媒体键,录音。
557+ */
558+ ARKUI_KEYCODE_MEDIA_RECORD = 2089,
559+ 
560+ /**
561+ * 按键'F1'
562+ */
563+ ARKUI_KEYCODE_F1 = 2090,
564+ 
565+ /**
566+ * 按键'F2'
567+ */
568+ ARKUI_KEYCODE_F2 = 2091,
569+ 
570+ /**
571+ * 按键'F3'
572+ */
573+ ARKUI_KEYCODE_F3 = 2092,
574+ 
575+ /**
576+ * 按键'F4'
577+ */
578+ ARKUI_KEYCODE_F4 = 2093,
579+ 
580+ /**
581+ * 按键'F5'
582+ */
583+ ARKUI_KEYCODE_F5 = 2094,
584+ 
585+ /**
586+ * 按键'F6'
587+ */
588+ ARKUI_KEYCODE_F6 = 2095,
589+ 
590+ /**
591+ * 按键'F7'
592+ */
593+ ARKUI_KEYCODE_F7 = 2096,
594+ 
595+ /**
596+ * 按键'F8'
597+ */
598+ ARKUI_KEYCODE_F8 = 2097,
599+ 
600+ /**
601+ * 按键'F9'
602+ */
603+ ARKUI_KEYCODE_F9 = 2098,
604+ 
605+ /**
606+ * 按键'F10'
607+ */
608+ ARKUI_KEYCODE_F10 = 2099,
609+ 
610+ /**
611+ * 按键'F11'
612+ */
613+ ARKUI_KEYCODE_F11 = 2100,
614+ 
615+ /**
616+ * 按键'F12'
617+ */
618+ ARKUI_KEYCODE_F12 = 2101,
619+ 
620+ /**
621+ * 小键盘锁。
622+ */
623+ ARKUI_KEYCODE_NUM_LOCK = 2102,
624+ 
625+ /**
626+ * 小键盘按键'0'
627+ */
628+ ARKUI_KEYCODE_NUMPAD_0 = 2103,
629+ 
630+ /**
631+ * 小键盘按键'1'
632+ */
633+ ARKUI_KEYCODE_NUMPAD_1 = 2104,
634+ 
635+ /**
636+ * 小键盘按键'2'
637+ */
638+ ARKUI_KEYCODE_NUMPAD_2 = 2105,
639+ 
640+ /**
641+ * 小键盘按键'3'
642+ */
643+ ARKUI_KEYCODE_NUMPAD_3 = 2106,
644+ 
645+ /**
646+ * 小键盘按键'4'
647+ */
648+ ARKUI_KEYCODE_NUMPAD_4 = 2107,
649+ 
650+ /**
651+ * 小键盘按键'5'
652+ */
653+ ARKUI_KEYCODE_NUMPAD_5 = 2108,
654+ 
655+ /**
656+ * 小键盘按键'6'
657+ */
658+ ARKUI_KEYCODE_NUMPAD_6 = 2109,
659+ 
660+ /**
661+ * 小键盘按键'7'
662+ */
663+ ARKUI_KEYCODE_NUMPAD_7 = 2110,
664+ 
665+ /**
666+ * 小键盘按键'8'
667+ */
668+ ARKUI_KEYCODE_NUMPAD_8 = 2111,
669+ 
670+ /**
671+ * 小键盘按键'9'
672+ */
673+ ARKUI_KEYCODE_NUMPAD_9 = 2112,
674+ 
675+ /**
676+ * 小键盘按键'/'
677+ */
678+ ARKUI_KEYCODE_NUMPAD_DIVIDE = 2113,
679+ 
680+ /**
681+ * 小键盘按键'*'
682+ */
683+ ARKUI_KEYCODE_NUMPAD_MULTIPLY = 2114,
684+ 
685+ /**
686+ * 小键盘按键'-'
687+ */
688+ ARKUI_KEYCODE_NUMPAD_SUBTRACT = 2115,
689+ 
690+ /**
691+ * 小键盘按键'+'
692+ */
693+ ARKUI_KEYCODE_NUMPAD_ADD = 2116,
694+ 
695+ /**
696+ * 小键盘按键'.'
697+ */
698+ ARKUI_KEYCODE_NUMPAD_DOT = 2117,
699+ 
700+ /**
701+ * 小键盘按键','
702+ */
703+ ARKUI_KEYCODE_NUMPAD_COMMA = 2118,
704+ 
705+ /**
706+ * 小键盘按键回车。
707+ */
708+ ARKUI_KEYCODE_NUMPAD_ENTER = 2119,
709+ 
710+ /**
711+ * 小键盘按键'='
712+ */
713+ ARKUI_KEYCODE_NUMPAD_EQUALS = 2120,
714+ 
715+ /**
716+ * 小键盘按键'('
717+ */
718+ ARKUI_KEYCODE_NUMPAD_LEFT_PAREN = 2121,
719+ 
720+ /**
721+ * 小键盘按键')'
722+ */
723+ ARKUI_KEYCODE_NUMPAD_RIGHT_PAREN = 2122,
724+ 
725+ /**
726+ * 游戏手柄按键'A'
727+ * @since 15
728+ */
729+ ARKUI_KEYCODE_BUTTON_A = 2301,
730+ 
731+ /**
732+ * 游戏手柄按键'B'
733+ * @since 15
734+ */
735+ ARKUI_KEYCODE_BUTTON_B = 2302,
736+ 
737+ /**
738+ * 游戏手柄按键'X'
739+ * @since 15
740+ */
741+ ARKUI_KEYCODE_BUTTON_X = 2304,
742+ 
743+ /**
744+ * 游戏手柄按键'Y'
745+ * @since 15
746+ */
747+ ARKUI_KEYCODE_BUTTON_Y = 2305,
748+ 
749+ /**
750+ * 游戏手柄按键'L1'
751+ * @since 15
752+ */
753+ ARKUI_KEYCODE_BUTTON_L1 = 2307,
754+ 
755+ /**
756+ * 游戏手柄按键'R1'
757+ * @since 15
758+ */
759+ ARKUI_KEYCODE_BUTTON_R1 = 2308,
760+ 
761+ /**
762+ * 游戏手柄按键'L2'
763+ * @since 15
764+ */
765+ ARKUI_KEYCODE_BUTTON_L2 = 2309,
766+ 
767+ /**
768+ * 游戏手柄按键'R2'
769+ * @since 15
770+ */
771+ ARKUI_KEYCODE_BUTTON_R2 = 2310,
772+ 
773+ /**
774+ * 游戏手柄按键'Select'
775+ * @since 15
776+ */
777+ ARKUI_KEYCODE_BUTTON_SELECT = 2311,
778+ 
779+ /**
780+ * 游戏手柄按键'Start'
781+ * @since 15
782+ */
783+ ARKUI_KEYCODE_BUTTON_START = 2312,
784+ 
785+ /**
786+ * 游戏手柄按键'Mode'
787+ * @since 15
788+ */
789+ ARKUI_KEYCODE_BUTTON_MODE = 2313,
790+ 
791+ /**
792+ * 游戏手柄按键'THUMBL'
793+ * @since 15
794+ */
795+ ARKUI_KEYCODE_BUTTON_THUMBL = 2314,
796+ 
797+ /**
798+ * 游戏手柄按键'THUMBR'
799+ * @since 15
800+ */
801+ ARKUI_KEYCODE_BUTTON_THUMBR = 2315
802+} ArkUI_KeyCode;
803+ 
804+/**
805+ * @brief 按键的类型。
806+ *
807+ * @since 14
808+ */
809+typedef enum {
810+ /**
811+ * 未知类型。
812+ */
813+ ARKUI_KEY_EVENT_UNKNOWN = -1,
814+ 
815+ /**
816+ * 按键按下。
817+ */
818+ ARKUI_KEY_EVENT_DOWN = 0,
819+ 
820+ /**
821+ * 按键松开。
822+ */
823+ ARKUI_KEY_EVENT_UP = 1,
824+ 
825+ /**
826+ * 按键长按。
827+ */
828+ ARKUI_KEY_EVENT_LONG_PRESS = 2,
829+ 
830+ /**
831+ * 按键点击。
832+ */
833+ ARKUI_KEY_EVENT_CLICK = 3
834+} ArkUI_KeyEventType;
835+ 
836+/**
837+ * @brief 触发当前按键的输入设备类型。
838+ *
839+ * @since 14
840+ */
841+typedef enum {
842+ /**
843+ * 未知类型。
844+ */
845+ ARKUI_KEY_SOURCE_UNKNOWN = 0,
846+ 
847+ /**
848+ * 鼠标。
849+ */
850+ ARKUI_KEY_SOURCE_TYPE_MOUSE = 1,
851+ 
852+ /**
853+ * 键盘。
854+ */
855+ ARKUI_KEY_SOURCE_TYPE_KEYBOARD = 4,
856+ 
857+ /**
858+ * @brief 游戏手柄。
859+ *
860+ * @since 15
861+ */
862+ ARKUI_KEY_SOURCE_TYPE_JOYSTICK = 5
863+} ArkUI_KeySourceType;
864+ 
865+/**
866+ * @brief 按键对应的意图。
867+ *
868+ * @since 14
869+ */
870+typedef enum {
871+ /**
872+ * 未知意图。
873+ */
874+ ARKUI_KEY_INTENSION_UNKNOWN = -1,
875+ 
876+ /**
877+ * 向上。
878+ */
879+ ARKUI_KEY_INTENSION_UP = 1,
880+ 
881+ /**
882+ * 向下。
883+ */
884+ ARKUI_KEY_INTENSION_DOWN = 2,
885+ 
886+ /**
887+ * 向左。
888+ */
889+ ARKUI_KEY_INTENSION_LEFT = 3,
890+ 
891+ /**
892+ * 向右。
893+ */
894+ ARKUI_KEY_INTENSION_RIGHT = 4,
895+ 
896+ /**
897+ * 选中。
898+ */
899+ ARKUI_KEY_INTENSION_SELECT = 5,
900+ 
901+ /**
902+ * 返回。
903+ */
904+ ARKUI_KEY_INTENSION_ESCAPE = 6,
905+ 
906+ /**
907+ * 后退。
908+ */
909+ ARKUI_KEY_INTENSION_BACK = 7,
910+ 
911+ /**
912+ * 前进。
913+ */
914+ ARKUI_KEY_INTENSION_FORWARD = 8,
915+ 
916+ /**
917+ * 菜单。
918+ */
919+ ARKUI_KEY_INTENSION_MENU = 9,
920+ 
921+ /**
922+ * 主页。
923+ */
924+ ARKUI_KEY_INTENSION_HOME = 10,
925+ 
926+ /**
927+ * 上一页。
928+ */
929+ ARKUI_KEY_INTENSION_PAGE_UP = 11,
930+ 
931+ /**
932+ * 下一页。
933+ */
934+ ARKUI_KEY_INTENSION_PAGE_DOWN = 12,
935+ 
936+ /**
937+ * 缩小。
938+ */
939+ ARKUI_KEY_INTENSION_ZOOM_OUT = 13,
940+ 
941+ /**
942+ * 放大。
943+ */
944+ ARKUI_KEY_INTENSION_ZOOM_IN = 14,
945+ 
946+ /**
947+ * 播放/暂停。
948+ */
949+ ARKUI_KEY_INTENTION_MEDIA_PLAY_PAUSE = 100,
950+ 
951+ /**
952+ * 快进。
953+ */
954+ ARKUI_KEY_INTENTION_MEDIA_FAST_FORWARD = 101,
955+ 
956+ /**
957+ * 快速播放。
958+ */
959+ ARKUI_KEY_INTENTION_MEDIA_FAST_PLAYBACK = 103,
960+ 
961+ /**
962+ * 下一首。
963+ */
964+ ARKUI_KEY_INTENTION_MEDIA_NEXT = 104,
965+ 
966+ /**
967+ * 上一首。
968+ */
969+ ARKUI_KEY_INTENTION_MEDIA_PREVIOUS = 105,
970+ 
971+ /**
972+ * 静音。
973+ */
974+ ARKUI_KEY_INTENTION_MEDIA_MUTE = 106,
975+ 
976+ /**
977+ * 音量增加。
978+ */
979+ ARKUI_KEY_INTENTION_VOLUME_UP = 107,
980+ 
981+ /**
982+ * 音量降低。
983+ */
984+ ARKUI_KEY_INTENTION_VOLUME_DOWN = 108,
985+ 
986+ /**
987+ * 接听电话。
988+ */
989+ ARKUI_KEY_INTENTION_CALL = 200,
990+ 
991+ /**
992+ * 拍照。
993+ */
994+ ARKUI_KEY_INTENTION_CAMERA = 300
995+} ArkUI_KeyIntension;
996+ 
997+/**
998+ * @brief 获取按键的类型。
999+ *
1000+ * @param event ArkUI_UIInputEvent事件指针。
1001+ * @return ArkUI_KeyEventType 按键的类型。
1002+ * @since 14
1003+ */
1004+ArkUI_KeyEventType OH_ArkUI_KeyEvent_GetType(const ArkUI_UIInputEvent* event);
1005+ 
1006+/**
1007+ * @brief 获取按键的键码。
1008+ *
1009+ * @param event ArkUI_UIInputEvent事件指针。
1010+ * @return 按键的键码。
1011+ * @since 14
1012+ */
1013+int32_t OH_ArkUI_KeyEvent_GetKeyCode(const ArkUI_UIInputEvent* event);
1014+ 
1015+/**
1016+ * @brief 获取按键的键值。
1017+ *
1018+ * @param event ArkUI_UIInputEvent事件指针。
1019+ * @return 按键的键值。
1020+ * @since 14
1021+ */
1022+const char *OH_ArkUI_KeyEvent_GetKeyText(const ArkUI_UIInputEvent* event);
1023+ 
1024+/**
1025+ * @brief 获取当前按键的输入设备类型。
1026+ *
1027+ * @param event ArkUI_UIInputEvent事件指针。
1028+ * @return ArkUI_KeySourceType 当前按键的输入设备类型。
1029+ * @since 14
1030+ */
1031+ArkUI_KeySourceType OH_ArkUI_KeyEvent_GetKeySource(const ArkUI_UIInputEvent* event);
1032+ 
1033+/**
1034+ * @brief 阻塞事件冒泡传递。
1035+ *
1036+ * @param event ArkUI_UIInputEvent事件指针。
1037+ * @param stopPropagation 表示是否阻止事件冒泡。true表示阻止事件冒泡,false表示不阻止事件冒泡。
1038+ * @since 14
1039+ */
1040+void OH_ArkUI_KeyEvent_StopPropagation(const ArkUI_UIInputEvent* event, bool stopPropagation);
1041+ 
1042+/**
1043+ * @brief 获取按键对应的意图。
1044+ *
1045+ * @param event ArkUI_UIInputEvent事件指针。
1046+ * @return ArkUI_KeyIntension 按键对应的意图。
1047+ * @since 14
1048+ */
1049+ArkUI_KeyIntension OH_ArkUI_KeyEvent_GetKeyIntensionCode(const ArkUI_UIInputEvent* event);
1050+ 
1051+/**
1052+ * @brief 获取按键的Unicode码值。支持范围为非空格的基本拉丁字符:0x0021-0x007E,不支持字符为0。组合键场景下,返回当前keyEvent对应按键的Unicode码值。
1053+ *
1054+ * @param event ArkUI_UIInputEvent事件指针。
1055+ * @return Unicode码值。
1056+ * @since 14
1057+ */
1058+uint32_t OH_ArkUI_KeyEvent_GetUnicode(const ArkUI_UIInputEvent* event);
1059+ 
1060+/**
1061+ * @brief 在按键事件回调中,设置事件是否被该回调消费。
1062+ *
1063+ * @param event ArkUI_UIInputEvent事件指针。
1064+ * @param isConsumed 事件是否被该回调消费。true表示事件被消费,false表示事件未被消费。
1065+ * @since 14
1066+ */
1067+void OH_ArkUI_KeyEvent_SetConsumed(const ArkUI_UIInputEvent* event, bool isConsumed);
1068+ 
1069+/**
1070+ * @brief 将按键事件分发到特定组件节点。
1071+ *
1072+ * @param node 指定的节点。
1073+ * @param event ArkUI_UIInputEvent事件指针。
1074+ * @since 16
1075+ */
1076+void OH_ArkUI_KeyEvent_Dispatch(ArkUI_NodeHandle node, const ArkUI_UIInputEvent* event);
1077+ 
1078+/**
1079+ * @brief 获取按键事件发生时NumLock的状态。
1080+ *
1081+ * @param event ArkUI_UIInputEvent事件指针。
1082+ * @param state 输出参数,返回NumLock的状态。true表示处于激活状态,false表示处于未激活状态。
1083+ * @return 错误码。
1084+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
1085+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
1086+ * @since 19
1087+ */
1088+ArkUI_ErrorCode OH_ArkUI_KeyEvent_IsNumLockOn(const ArkUI_UIInputEvent* event, bool* state);
1089+ 
1090+/**
1091+ * @brief 获取按键事件发生时CapsLock的状态。
1092+ *
1093+ * @param event ArkUI_UIInputEvent事件指针。
1094+ * @param state 输出参数,返回CapsLock的状态。true表示处于激活状态,false表示处于未激活状态。
1095+ * @return 错误码。
1096+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
1097+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
1098+ * @since 19
1099+ */
1100+ArkUI_ErrorCode OH_ArkUI_KeyEvent_IsCapsLockOn(const ArkUI_UIInputEvent* event, bool* state);
1101+ 
1102+/**
1103+ * @brief 获取按键事件发生时ScrollLock的状态。
1104+ *
1105+ * @param event ArkUI_UIInputEvent事件指针。
1106+ * @param state 输出参数,返回ScrollLock的状态。true表示处于激活状态,false表示处于未激活状态。
1107+ * @return 错误码。
1108+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
1109+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
1110+ * @since 19
1111+ */
1112+ArkUI_ErrorCode OH_ArkUI_KeyEvent_IsScrollLockOn(const ArkUI_UIInputEvent* event, bool* state);
1113+ 
1114+#endif // ARKUI_NATIVE_KEY_EVENT_H
1115+ 
1116+/** @} */
Mzh-cn/arkui/ace_engine/native/native_node.h+302-380
@@ -183,7 +183,7 @@ typedef struct {
183} ArkUI_AttributeItem;183} ArkUI_AttributeItem;
184 184 
185/**185/**
186- * @brief Defines the ArkUI style attributes that can be set on the native side.186+ * @brief 定义ArkUI在Native侧可以设置的属性样式集合。
187 *187 *
188 * @since 12188 * @since 12
189 */189 */
@@ -211,29 +211,28 @@ typedef enum {
211 */211 */
212 NODE_HEIGHT,212 NODE_HEIGHT,
213 /**213 /**
214- * @brief Defines the background color attribute, which can be set, reset, and obtained as required through APIs.214+ * @brief 背景色属性,支持属性设置,属性重置和属性获取接口。
215- *215+ * <br>作为属性设置方法参数、属性获取方法返回值{@link ArkUI_AttributeItem}格式如下。
216- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n216+ * <br>**参数:**
217- * .value[0].u32: background color. The value is in 0xARGB format. For example, 0xFFFF0000 indicates red.\n217+ * <br><b>.value[0].u32</b>:背景色数值,0xargb格式,形如 `0xFFFF0000` 表示红色。
218- * \n218+ * <br>**返回:**
219- * Format of the return value {@link ArkUI_AttributeItem}:\n219+ * <br><b>.value[0].u32</b>:背景色数值,0xargb格式,形如 `0xFFFF0000` 表示红色。
220- * .value[0].u32: background color. The value is in 0xARGB format. For example, 0xFFFF0000 indicates red.\n
221 *220 *
222 */221 */
223 NODE_BACKGROUND_COLOR,222 NODE_BACKGROUND_COLOR,
224 /**223 /**
225- * @brief Defines the background image attribute, which can be set, reset, and obtained as required through APIs.224+ * @brief 背景色图片属性,支持属性设置,属性重置和属性获取接口。
226- *225+ * <br>作为属性设置方法参数、属性获取方法返回值{@link ArkUI_AttributeItem}格式如下。
227- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n226+ * <br>**参数:**
228- * .string: image address;\n227+ * <br><b>.string</b>:图片地址。API version 22及之前版本,支持网络图片资源地址、本地图片资源地址、Base64和{@link PixelMap}资源,不支持{@link svg}图片、
229- * .value[0]?.i32: whether to repeat the image. Optional. The parameter type is {@link ArkUI_ImageRepeat}.228+ * gif和webp等类型的动图。从API version 23开始,新增支持webp和gif类型的动图,显示动图第一帧,不支持其他类型的动图。
230- * .object: The parameter type is {@link ArkUI_DrawableDescriptor}. Either .string or .object must be set.\n229+ * <br><b>.value[0]?.i32</b>:可选值,repeat参数,参数类型{@link ArkUI_ImageRepeat},默认值为ARKUI_IMAGE_REPEAT_NONE。
231- * The default value is <b>ARKUI_IMAGE_REPEAT_NONE</b>.\n230+ * <br><b>.object</b>:PixelMap图片数据,参数类型为{@link ArkUI_DrawableDescriptor}。`.object`参数和`.string`参数二选一,不可同时设置。
232- * \n231+ * <br>**返回:**
233- * Format of the return value {@link ArkUI_AttributeItem}:\n232+ * <br><b>.string</b>:图片地址。API version 22及之前版本,支持网络图片资源地址、本地图片资源地址、Base64和PixelMap资源,不支持svg图片、gif和webp等类型的动图。从API
234- * .string: image address;\n233+ * version 23开始,新增支持webp和gif类型的动图,显示动图第一帧,不支持其他类型的动图。
235- * .value[0].i32: whether to repeat the image. The parameter type is {@link ArkUI_ImageRepeat}.\n234+ * <br><b>.value[0].i32</b>:repeat参数,参数类型{@link ArkUI_ImageRepeat}
236- * .object: The parameter type is {@link ArkUI_DrawableDescriptor}.\n235+ * <br><b>.object</b>:PixelMap图片数据,参数类型为{@link ArkUI_DrawableDescriptor}
237 *236 *
238 */237 */
239 NODE_BACKGROUND_IMAGE,238 NODE_BACKGROUND_IMAGE,
@@ -269,13 +268,12 @@ typedef enum {
269 */268 */
270 NODE_ID,269 NODE_ID,
271 /**270 /**
272- * @brief Defines the interactivity attribute, which can be set, reset, and obtained as required through APIs.271+ * @brief 设置组件是否可交互,支持属性设置,属性重置和属性获取。
273- *272+ * <br>作为属性设置方法参数、属性获取方法返回值{@link ArkUI_AttributeItem}格式如下。
274- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n273+ * <br>**参数:**
275- * .value[0].i32: The value <b>true</b> means that the component can interact with users, and <b>false</b> means the opposite.\n274+ * <br><b>.value[0].i32</b>false表示不可交互,true表示可交互。
276- * \n275+ * <br>**返回:**
277- * Format of the return value {@link ArkUI_AttributeItem}:\n276+ * <br><b>.value[0].i32</b>:0表示不可交互,1表示可交互。
278- * .value[0].i32: The value <b>1</b> means that the component can interact with users, and <b>0</b> means the opposite. \n
279 *277 *
280 */278 */
281 NODE_ENABLED,279 NODE_ENABLED,
@@ -511,27 +509,22 @@ typedef enum {
511 */509 */
512 NODE_BORDER_STYLE,510 NODE_BORDER_STYLE,
513 /**511 /**
514- * @brief Defines the z-index attribute for the stack sequence.512+ * @brief 组件的堆叠顺序属性,支持属性设置,属性重置和属性获取接口。
515- * This attribute can be set, reset, and obtained as required through APIs.513+ * <br>作为属性设置方法参数、属性获取方法返回值{@link ArkUI_AttributeItem}格式如下。
516- *514+ * <br>**参数:**
517- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n515+ * <br><b>.value[0].i32</b>:堆叠顺序数值。
518- * .value[0].i32: z-index value. \n516+ * <br>**返回:**
519- * \n517+ * <br><b>.value[0].i32</b>:堆叠顺序数值。
520- * Format of the return value {@link ArkUI_AttributeItem}:\n
521- * .value[0].i32: z-index value. \n
522 *518 *
523 */519 */
524 NODE_Z_INDEX,520 NODE_Z_INDEX,
525 /**521 /**
526- * @brief Defines the visibility attribute, which can be set, reset, and obtained as required through APIs.522+ * @brief 组件是否可见属性,支持属性设置,属性重置和属性获取接口。
527- *523+ * <br>作为属性设置方法参数、属性获取方法返回值{@link ArkUI_AttributeItem}格式如下。
528- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n524+ * <br>**参数:**
529- * .value[0].i32: whether to show or hide the component. The parameter type is {@link ArkUI_Visibility}.525+ * <br><b>.value[0].i32</b>:控制当前组件显示或隐藏,参数类型{@link ArkUI_Visibility},默认值为ARKUI_VISIBILITY_VISIBLE。
530- * The default value is <b>ARKUI_VISIBILITY_VISIBLE</b>. \n526+ * <br>**返回:**
531- * \n527+ * <br><b>.value[0].i32</b>:控制当前组件显示或隐藏,参数类型{@link ArkUI_Visibility},默认值为ARKUI_VISIBILITY_VISIBLE。
532- * Format of the return value {@link ArkUI_AttributeItem}:\n
533- * .value[0].i32: whether to show or hide the component. The parameter type is {@link ArkUI_Visibility}.
534- * The default value is <b>ARKUI_VISIBILITY_VISIBLE</b>. \n
535 *528 *
536 */529 */
537 NODE_VISIBILITY,530 NODE_VISIBILITY,
@@ -640,15 +633,12 @@ typedef enum {
640 */633 */
641 NODE_TRANSFORM,634 NODE_TRANSFORM,
642 /**635 /**
643- * @brief Defines the hit test behavior attribute, which can be set, reset, and obtained as required through APIs.636+ * @brief 触摸测试类型,支持属性设置,属性重置和属性获取接口。
644- *637+ * <br>作为属性设置方法参数、属性获取方法返回值{@link ArkUI_AttributeItem}格式如下。
645- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n638+ * <br>**参数:**
646- * .value[0].i32: hit test mode. The parameter type is {@link ArkUI_HitTestMode}.639+ * <br><b>.value[0].i32</b>:控制当前组件的触摸测试类型,参数类型{@link ArkUI_HitTestMode},默认值为ARKUI_HIT_TEST_MODE_DEFAULT。
647- * The default value is <b>ARKUI_HIT_TEST_MODE_DEFAULT</b>. \n640+ * <br>**返回:**
648- * \n641+ * <br><b>.value[0].i32</b>:控制当前组件的触摸测试类型,参数类型{@link ArkUI_HitTestMode},默认值为ARKUI_HIT_TEST_MODE_DEFAULT。
649- * Format of the return value {@link ArkUI_AttributeItem}:\n
650- * .value[0].i32: hit test mode. The parameter type is {@link ArkUI_HitTestMode}.
651- * The default value is <b>ARKUI_HIT_TEST_MODE_DEFAULT</b>. \n
652 *642 *
653 */643 */
654 NODE_HIT_TEST_BEHAVIOR,644 NODE_HIT_TEST_BEHAVIOR,
@@ -705,28 +695,24 @@ typedef enum {
705 */695 */
706 NODE_CUSTOM_SHADOW,696 NODE_CUSTOM_SHADOW,
707 /**697 /**
708- * @brief Defines the background image width and height.698+ * @brief 背景图片的宽高属性,支持属性设置,属性重置和属性获取接口。
709- * This attribute can be set, reset, and obtained as required through APIs.699+ * <br>作为属性设置方法参数、属性获取方法返回值{@link ArkUI_AttributeItem}格式如下。
710- *700+ * <br>**参数:**
711- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n701+ * <br><b>.value[0].f32</b>:图片的宽度值,取值范围`[0,+∞)`,单位为vp。
712- * .value[0].f32: width of the image. The value range is [0, +∞), and the unit is vp. \n702+ * <br><b>.value[1].f32</b>:图片的高度值,取值范围`[0,+∞)`,单位为vp
713- * .value[1].f32: height of the image. The value range is [0, +∞), and the unit is vp. \n703+ * <br>**返回:**
714- * \n704+ * <br><b>.value[0].f32</b>:图片的宽度值,单位为vp。
715- * Format of the return value {@link ArkUI_AttributeItem}:\n705+ * <br><b>.value[1].f32</b>:图片的高度值,单位为vp。
716- * .value[0].f32: width of the image, in vp. \n
717- * .value[1].f32: height of the image, in vp. \n
718 *706 *
719 */707 */
720 NODE_BACKGROUND_IMAGE_SIZE,708 NODE_BACKGROUND_IMAGE_SIZE,
721 /**709 /**
722- * @brief Defines the background image size.710+ * @brief 背景图片的宽高样式属性,支持属性设置,属性重置和属性获取接口。
723- * This attribute can be set, reset, and obtained as required through APIs.711+ * <br>作为属性设置方法参数、属性获取方法返回值{@link ArkUI_AttributeItem}格式如下。
724- *712+ * <br>**参数:**
725- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n713+ * <br><b>.value[0].i32</b>:背景图片的宽高样式,取{@link ArkUI_ImageSize}枚举值。
726- * .value[0].i32: size of the background image. The value is an enum of {@link ArkUI_ImageSize}. \n714+ * <br>**返回:**
727- * \n715+ * <br><b>.value[0].i32</b>:背景图片的宽高样式,取{@link ArkUI_ImageSize}枚举值。
728- * Format of the return value {@link ArkUI_AttributeItem}:\n
729- * .value[0].i32: size of the background image. The value is an enum of {@link ArkUI_ImageSize}. \n
730 *716 *
731 */717 */
732 NODE_BACKGROUND_IMAGE_SIZE_WITH_STYLE,718 NODE_BACKGROUND_IMAGE_SIZE_WITH_STYLE,
@@ -909,84 +895,68 @@ typedef enum {
909 NODE_MOVE_TRANSITION,895 NODE_MOVE_TRANSITION,
910 896 
911 /**897 /**
912- * @brief Defines the focus attribute, which can be set, reset, and obtained as required through APIs.898+ * @brief 获焦属性,支持属性设置,属性重置和属性获取。
913- *899+ * <br>作为属性设置方法参数、属性获取方法返回值{@link ArkUI_AttributeItem}格式如下。
914- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n900+ * <br>**参数:**
915- * .value[0].i32: The parameter type is 1 or 0.901+ * <br><b>.value[0].i32</b>:参数类型为1表示可获焦,为0表示不可获焦。默认为不可获焦。
916- * \n902+ * <br>**返回:**
917- * Format of the return value {@link ArkUI_AttributeItem}:\n903+ * <br><b>.value[0].i32</b>:参数类型为1表示可获焦,为0表示不可获焦。
918- * .value[0].i32: The parameter type is 1 or 0.
919 *904 *
920 */905 */
921 NODE_FOCUSABLE,906 NODE_FOCUSABLE,
922 907 
923 /**908 /**
924- * @brief Defines the default focus attribute, which can be set, reset, and obtained as required through APIs.909+ * @brief 默认焦点属性,支持属性设置,属性重置和属性获取。
925- *910+ * <br>作为属性设置方法参数、属性获取方法返回值{@link ArkUI_AttributeItem}格式如下。
926- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n911+ * <br>**参数:**
927- * value[0].i32: The parameter type is 1 or 0.912+ * <br><b>.value[0].i32</b>:参数值为1表示是默认焦点,为0表示不是默认焦点。
928- * \n913+ * <br>**返回:**
929- * Format of the return value {@link ArkUI_AttributeItem}:\n914+ * <br><b>.value[0].i32</b>:参数值为1表示是默认焦点,为0表示不是默认焦点。
930- * value[0].i32: The parameter type is 1 or 0.
931 *915 *
932 */916 */
933 NODE_DEFAULT_FOCUS,917 NODE_DEFAULT_FOCUS,
934 918 
935 /**919 /**
936- * @brief Defines the touch target attribute, which can be set, reset, and obtained as required through APIs.920+ * @brief 触摸热区属性,支持属性设置,属性重置和属性获取。
937- *921+ * <br>作为属性设置方法参数、属性获取方法返回值{@link ArkUI_AttributeItem}格式如下。
938- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n922+ * <br>**说明:**
939- * .data[0].f32: X coordinate of the touch point relative to the upper left corner of the component, in vp. \n923+ * <br>设置时data数据大小无数量限制,均可以设置成功,但仅支持获取到前20个。
940- * .data[1].f32: Y coordinate of the touch point relative to the upper left corner of the component, in vp. \n924+ * <br>**参数:**
941- * .data[2].f32: width of the touch target, in %. \n925+ * <br><b>.data[0].f32</b>:触摸点相对于组件左上角的x轴坐标,单位为vp。
942- * .data[3].f32: height of the touch target, in %. \n926+ * <br><b>.data[1].f32</b>:触摸点相对于组件左上角的y轴坐标,单位为vp。
943- * .data[4...].f32: Multiple touch targets can be set. The sequence of the parameters is the same as the preceding.927+ * <br><b>.data[2].f32</b>:触摸热区的宽度,单位为百分比。
944- * \n928+ * <br><b>.data[3].f32</b>:触摸热区的高度,单位为百分比。
945- * Format of the return value {@link ArkUI_AttributeItem}:\n929+ * <br><b>.data[4...].f32</b>:可以设置多个手势响应区域,顺序和上述一致。
946- * .data[0].f32: X coordinate of the touch point relative to the upper left corner of the component, in vp. \n930+ * <br>**返回:**
947- * .data[1].f32: Y coordinate of the touch point relative to the upper left corner of the component, in vp. \n931+ * <br><b>.data[0].f32</b>:触摸点相对于组件左上角的x轴坐标,单位为vp
948- * .data[2].f32: width of the touch target, in %. \n932+ * <br><b>.data[1].f32</b>:触摸点相对于组件左上角的y轴坐标,单位为vp。
949- * .data[3].f32: height of the touch target, in %. \n933+ * <br><b>.data[2].f32</b>:触摸热区的宽度,单位为百分比。
950- * .data[4...].f32: Multiple touch targets can be set. The sequence of the parameters is the same as the preceding.934+ * <br><b>.data[3].f32</b>:触摸热区的高度,单位为百分比。
935+ * <br><b>.data[4...].f32</b>:可以设置多个手势响应区域,顺序和上述一致。
951 *936 *
952 */937 */
953 NODE_RESPONSE_REGION,938 NODE_RESPONSE_REGION,
954 939 
955 /**940 /**
956- * @brief Defines the overlay attribute, which can be set, reset, and obtained as required through APIs.941+ * @brief 定义遮罩属性,支持属性设置,属性重置和属性获取。开发者可以通过如下.string或.object设置浮层内容,.string有更高的优先级。
942+ * <br>作为属性设置方法参数、属性获取方法返回值{@link ArkUI_AttributeItem}格式如下。
943+ * <br>**参数:**
944+ * <br><b>.string</b>:遮罩文本。
945+ * <br><b>.value[0]?.i32</b>:可选值,浮层相对于组件的位置,参数类型{@link ArkUI_Alignment},默认值为ARKUI_ALIGNMENT_TOP_START。
946+ * <br><b>.value[1]?.f32</b>:可选值,浮层基于自身左上角的偏移量X,单位为vp,默认值为0vp。
947+ * <br><b>.value[2]?.f32</b>:可选值,浮层基于自身左上角的偏移量Y,单位为vp,默认值为0vp。
948+ * <br><b>.value[3]?.i32</b>:可选值,浮层的布局方向,参数类型{@link ArkUI_Direction},默认值为ARKUI_DIRECTION_LTR。
949+ * <br>在大部分场景下,这个参数都应该被设置成Auto,这个模式允许系统自动处理布局方向,如果在某些场景下需要保持特定的方向,设置这个属性为LTR(Left-to-Right)或者RTL(Right-to-Left)。
950+ * 从API version 21开始支持。
951+ * <br><b>.object</b>:用于overlay的节点树,参数类型为{@link ArkUI_NodeHandle},默认值为nullptr。从API version 21开始支持。
952+ * <br>**返回:**
953+ * <br><b>.string</b>:遮罩文本。
954+ * <br><b>.value[0].i32</b>:浮层相对于组件的位置,参数类型{@link ArkUI_Alignment},默认值为ARKUI_ALIGNMENT_TOP_START。
955+ * <br><b>.value[1].f32</b>:浮层基于自身左上角的偏移量X,单位为vp。
956+ * <br><b>.value[2].f32</b>:浮层基于自身左上角的偏移量Y,单位为vp。
957+ * <br><b>.value[3].i32</b>:浮层的布局方向,参数类型{@link ArkUI_Direction},默认值为ARKUI_DIRECTION_LTR。从API version 21开始支持。
958+ * <br><b>.object</b>:用于overlay的节点树,参数类型为{@link ArkUI_NodeHandle}。从API version 21开始支持。
957 *959 *
958- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n
959- * You can set the overlay content through .string or .object as follow, and .string has higher priority.
960- * .string: mask text.\n
961- * .value[0]?.i32: position of the overlay relative to the component. Optional.
962- * The parameter type is {@link ArkUI_Alignment}.
963- * The default value is <b>ARKUI_ALIGNMENT_TOP_START.</b> \n
964- * .value[1]?.f32: offset of the overlay relative to the upper left corner of itself on the x-axis, in vp. Optional. \n
965- * .value[2]?.f32: offset of the overlay relative to the upper left corner of itself on the y-axis, in vp. Optional.
966- * \n
967- * .value[3]?.i32: the layout direction.
968- * The parameter type is {@link ArkUI_Direction}, supported since API 21.
969- * The default value is <b>ARKUI_DIRECTION_LTR.</b> \n
970- * In most cases, this parameter should be set to Auto, this allowing the system to handle
971- * the layout direction automatically. If you need to keep a specific direction in any situation, set it to
972- * either LTR (Left-to-Right) or RTL (Right-to-Left). Optional.
973- * \n
974- * .object: the node tree used as the overlay.
975- * The parameter type is {@link ArkUI_NodeHandle}.
976- * The default value is <b>nullptr.</b> \n
977- * this parameter is conflict with .string, and it has lower priority than .string.
978- * \n
979- * Format of the return value {@link ArkUI_AttributeItem}:\n
980- * .string: mask text.\n
981- * .value[0].i32: position of the overlay relative to the component.
982- * The parameter type is {@link ArkUI_Alignment}.
983- * The default value is <b>ARKUI_ALIGNMENT_TOP_START.</b> \n
984- * .value[1].f32: offset of the overlay relative to the upper left corner of itself on the x-axis, in vp. \n
985- * .value[2].f32: offset of the overlay relative to the upper left corner of itself on the y-axis, in vp.
986- * .value[3].i32: the layout direction.
987- * The parameter type is {@link ArkUI_Direction}, supported since API 21.
988- * The default value is <b>ARKUI_DIRECTION_LTR.</b> \n
989- * .object: the overlay node handle. \n
990 */960 */
991 NODE_OVERLAY,961 NODE_OVERLAY,
992 /**962 /**
@@ -1293,26 +1263,21 @@ typedef enum {
1293 NODE_MARK_ANCHOR,1263 NODE_MARK_ANCHOR,
1294 1264 
1295 /**1265 /**
1296- * @brief Defines the position of the background image in the component, that is, the coordinates relative to1266+ * @brief 背景图在组件中显示位置,即相对于组件左上角的坐标,支持属性设置,属性重置和属性获取接口。
1297- * the upper left corner of the component. This attribute can be set, reset, and obtained as required through APIs.1267+ * <br>作为属性设置方法参数、属性获取方法返回值{@link ArkUI_AttributeItem}格式如下。
1268+ * <br>**参数:**
1269+ * <br><b>.value[0].f32</b>:x轴位置,单位为px。
1270+ * <br><b>.value[1].f32</b>:y轴位置,单位为px。
1271+ * <br><b>.value[2]?.i32</b>:可选值,对齐方式,参数类型{@link ArkUI_Alignment},默认值为ARKUI_ALIGNMENT_TOP_START。该参数从API version
1272+ * 21开始支持。
1273+ * <br><b>.value[3]?.i32</b>:可选值,布局方向,参数类型{@link ArkUI_Direction},默认值为ARKUI_DIRECTION_AUTO。多数场景下建议设置为AUTO,
1274+ * 由系统自动处理布局方向;若需要固定方向,可设置为LTR或RTL。该参数从API version 21开始支持。
1275+ * <br>**返回:**
1276+ * <br><b>.value[0].f32</b>:x轴位置,单位为px。
1277+ * <br><b>.value[1].f32</b>:y轴位置,单位为px。
1278+ * <br><b>.value[2].i32</b>:对齐方式,参数类型{@link ArkUI_Alignment}。该返回值从API version 21开始支持。
1279+ * <br><b>.value[3].i32</b>:布局方向,参数类型{@link ArkUI_Direction}。该返回值从API version 21开始支持。
1298 *1280 *
1299- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n
1300- * .value[0].f32: position along the x-axis, in px. \n
1301- * .value[1].f32: position along the y-axis, in px. \n
1302- * .value[2].?i32: the alignment mode. The data type is {@link ArkUI_Alignment}, and supported since API 21.
1303- * The default value is <b>ARKUI_ALIGNMENT_TOP_START</b>. \n
1304- * .value[3].?i32: the direction. The type is {@link ArkUI_Direction}, and supported since API 21.
1305- * The default value is <b>ARKUI_DIRECTION_AUTO</b>. \n
1306- * In most cases, this parameter should be set to Auto, this allowing the system to handle
1307- * the layout direction automatically. If you need to keep a specific direction in any situation, set it to
1308- * either LTR (Left-to-Right) or RTL (Right-to-Left). Optional.
1309- * Format of the return value {@link ArkUI_AttributeItem}:\n
1310- * .value[0].f32: position along the x-axis, in px. \n
1311- * .value[1].f32: position along the y-axis, in px. \n
1312- * .value[2].i32: the alignment mode. The data type is {@link ArkUI_Alignment}, and supported since API 21.
1313- * The default value is <b>ARKUI_ALIGNMENT_TOP_START</b>. \n
1314- * .value[3].i32: the direction. The type is {@link ArkUI_Direction}, and supported since API 21.
1315- * The default value is <b>ARKUI_DIRECTION_AUTO</b>. \n
1316 */1281 */
1317 NODE_BACKGROUND_IMAGE_POSITION,1282 NODE_BACKGROUND_IMAGE_POSITION,
1318 /**1283 /**
@@ -1433,15 +1398,14 @@ typedef enum {
1433 NODE_ACCESSIBILITY_DESCRIPTION,1398 NODE_ACCESSIBILITY_DESCRIPTION,
1434 1399 
1435 /**1400 /**
1436- * @brief Defines the focused state. This attribute can be set and obtained as required through APIs.1401+ * @brief 组件获取焦点属性,支持属性设置,属性获取。
1437- * @note Setting the parameter to <b>0</b> shifts focus from the currently focused component on the current level1402+ * <br>作为属性设置方法参数、属性获取方法返回值{@link ArkUI_AttributeItem}格式如下。
1438- * of the page to the root container.1403+ * <br>**说明:**
1439- * 1404+ * <br>设置参数为0时,当前层级页面获焦组件失焦,焦点转移到根容器上。
1440- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n1405+ * <br>**参数:**
1441- * .value[0].i32: The parameter type is 1 or 0.1406+ * <br><b>.value[0].i32</b>:参数值为1表示组件获焦,为0表示组件失焦。
1442- * \n1407+ * <br>**返回:**
1443- * Format of the return value {@link ArkUI_AttributeItem}:\n1408+ * <br><b>.value[0].i32</b>:参数值为1表示组件获焦,为0表示组件失焦。
1444- * .value[0].i32: The parameter type is 1 or 0.
1445 *1409 *
1446 */1410 */
1447 NODE_FOCUS_STATUS,1411 NODE_FOCUS_STATUS,
@@ -1724,14 +1688,12 @@ typedef enum {
1724 NODE_LAYOUT_RECT,1688 NODE_LAYOUT_RECT,
1725 1689 
1726 /**1690 /**
1727- * @brief Whether the current component supports click-to-focus capability,1691+ * @brief 设置当前组件是否支持点击获焦能力,支持属性设置,属性重置和属性获取。
1728- * which can be set, reset, and obtained as required through APIs.1692+ * <br>作为属性设置方法参数、属性获取方法返回值{@link ArkUI_AttributeItem}格式如下。
1729- *1693+ * <br>**参数:**
1730- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n1694+ * <br><b>.value[0].i32</b>:参数值为1表示支持点击获焦,为0表示不支持点击获焦。
1731- * .value[0].i32: The parameter type is 1 or 0.1695+ * <br>**返回:**
1732- * \n1696+ * <br><b>.value[0].i32</b>:参数值为1表示支持点击获焦,为0表示不支持点击获焦。
1733- * Format of the return value {@link ArkUI_AttributeItem}:\n
1734- * .value[0].i32: The parameter type is 1 or 0.
1735 *1697 *
1736 */1698 */
1737 NODE_FOCUS_ON_TOUCH,1699 NODE_FOCUS_ON_TOUCH,
@@ -1848,29 +1810,22 @@ typedef enum {
1848 1810 
1849 /**1811 /**
1850 * @brief Defines the visible area ratio (visible area/total area of the component) threshold for invoking the1812 * @brief Defines the visible area ratio (visible area/total area of the component) threshold for invoking the
1851- * visible area change event of the component.1813+ * visible area change event of the component. Format of the {@link ArkUI_AttributeItem} parameter for setting the
1852- *1814+ * attribute:
1853- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n1815+ * <br>.value[...].f32: threshold array. The value ranges from 0 to 1.
1854- * .value[...].f32: threshold array. The value range is 0 to 1.1816+ * <br>Format of the return value {@link ArkUI_AttributeItem}:
1855- * \n1817+ * <br>.value[...].f32: threshold array.
1856- * Format of the return value {@link ArkUI_AttributeItem}:\n
1857- * .value[...].f32: threshold array. \n
1858 *1818 *
1859 * @since 121819 * @since 12
1860 */1820 */
1861 /**1821 /**
1862- * @brief Defines the visible area ratio (visible area/total area of the component) threshold for invoking the1822+ * visible area change event of the component. Format of the {@link ArkUI_AttributeItem} parameter for setting the
1863- * visible area change event of the component, this enum extends the configuration capbility.1823+ * attribute:
1864- *1824+ * <br>.value[...].f32: threshold array. The value ranges from 0 to 1.
1865- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n1825+ * <br>.object: The parameter type is {@link ArkUI_VisibleAreaEventOptions}.
1866- * .value[...].f32: threshold array. The value range is 0 to 1.1826+ * <br>Format of the return value {@link ArkUI_AttributeItem}:
1867- * .?object: pass in one {@link ArkUI_VisibleAreaEventOptions} objcet for configging the ratio or other options.1827+ * <br>.value[...].f32: threshold array.
1868- * Please note, when use this param, the ratios set through .value[...].f32 will be ignored, and the update1828+ * <br>.object: The return type is {@link ArkUI_VisibleAreaEventOptions}.
1869- * interval from it is always ignored too.
1870- * \n
1871- * Format of the return value {@link ArkUI_AttributeItem}:\n
1872- * .value[...].f32: threshold array. \n
1873- * .object: the {@link ArkUI_VisibleAreaEventOptions} objcet.
1874 *1829 *
1875 * @since 221830 * @since 22
1876 */1831 */
@@ -1902,38 +1857,32 @@ typedef enum {
1902 NODE_UNIQUE_ID = 95,1857 NODE_UNIQUE_ID = 95,
1903 1858 
1904 /**1859 /**
1905- * @brief Set the current component system focus box style.1860+ * @brief 设置当前组件系统焦点框样式。
1906- *1861+ * <br>作为属性设置方法参数{@link ArkUI_AttributeItem}格式如下。
1907- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute: \n1862+ * <br>**参数:**
1908- * .value[0].f32: The distance between the focus box and the edge of the component. \n1863+ * <br><b>.value[0].f32</b>:焦点框相对组件边缘的距离。正数代表外侧,负数代表内侧。不支持百分比。
1909- * Positive numbers represent the outer side, negative numbers represent the inner side. \n1864+ * <br><b>.value[1].f32</b>:焦点框宽度。不支持负数和百分比。
1910- * Percentage is not supported. \n1865+ * <br><b>.value[2].u32</b>:焦点框颜色。
1911- * .value[1].f32: Focus box width. Negative numbers and percentages are not supported. \n
1912- * .value[2].u32: Focus box color. \n
1913- * \n
1914 *1866 *
1915 */1867 */
1916 NODE_FOCUS_BOX = 96,1868 NODE_FOCUS_BOX = 96,
1917 1869 
1918 /**1870 /**
1919- * @brief Defines the moving distance limit for the component-bound tap gesture.1871+ * @brief 组件所绑定的点击手势移动距离限制,支持属性设置。
1920- * This attribute can be set as required through APIs.1872+ * <br>作为属性设置方法参数{@link ArkUI_AttributeItem}格式如下。
1921- *1873+ * <br>**参数:**
1922- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n1874+ * <br><b>.value[0].f32</b>:表示识别点击手势时允许手指在该范围内移动,单位为vp。
1923- * .value[0].f32: allowed moving distance of a finger, in vp. \n
1924 *1875 *
1925 */1876 */
1926 NODE_CLICK_DISTANCE = 97,1877 NODE_CLICK_DISTANCE = 97,
1927 1878 
1928 /**1879 /**
1929- * @brief Sets whether the focus can be placed on this component.1880+ * @brief 控制焦点是否能停在当前组件,支持属性设置,属性重置和属性获取。
1930- * This attribute can be set, reset, and obtained as required through APIs.1881+ * <br>作为属性设置方法参数、属性获取方法返回值{@link ArkUI_AttributeItem}格式如下。
1931- *1882+ * <br>**参数:**
1932- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n1883+ * <br><b>.value[0].i32</b>:参数值为1表示焦点能停在当前组件,为0表示焦点不能停在当前组件。默认值为0。
1933- * .value[0].i32: whether the focus can be placed on the current component. The parameter type is 1 or 0.1884+ * <br>**返回:**
1934- * \n1885+ * <br><b>.value[0].i32</b>:参数值为1表示焦点停在当前组件,为0表示焦点未停在当前组件。
1935- * Format of the return value {@link ArkUI_AttributeItem}:\n
1936- * .value[0].i32: whether the focus can be placed on the current component. The parameter type is 1 or 0.
1937 *1886 *
1938 * @since 141887 * @since 14
1939 */1888 */
@@ -1981,34 +1930,26 @@ typedef enum {
1981 NODE_BACKGROUND_IMAGE_RESIZABLE_WITH_SLICE = 100,1930 NODE_BACKGROUND_IMAGE_RESIZABLE_WITH_SLICE = 100,
1982 1931 
1983 /**1932 /**
1984- * @brief Sets the next focus node.1933+ * @brief 设置下一个走焦节点。
1985- *1934+ * <br>作为属性设置方法参数{@link ArkUI_AttributeItem}格式如下。
1986- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute: \n1935+ * <br>**参数:**
1987- * .value[0].i32: focus movement direction, as defined in {@link ArkUI_FocusMove}.1936+ * <br><b>.value[0].i32</b>:走焦类型,定义在{@link ArkUI_FocusMove}
1988- * .object: next focus node. The parameter type is {@link ArkUI_NodeHandle}.\n1937+ * <br><b>.object</b>:下一个焦点。参数类型为{@link ArkUI_NodeHandle}
1989- * \n
1990 *1938 *
1991 * @since 181939 * @since 18
1992 */1940 */
1993 NODE_NEXT_FOCUS = 101,1941 NODE_NEXT_FOCUS = 101,
1994 1942 
1995 /**1943 /**
1996- * @brief Sets the parameters for visible area change events.1944+ * @brief 设置可见区域变化监听的参数。
1997- *1945+ * <br>作为属性设置方法参数、属性获取方法返回值{@link ArkUI_AttributeItem}格式如下。
1998- * @note The visible area change callback is not a real-time callback. The actual callback interval may differ from1946+ * <br>**说明:**
1999- * the expected interval due to system load and other factors.1947+ * <br>非实时回调,实际回调与预期间隔可能存在差别。两次可见区域回调的时间间隔不小于预期更新间隔。当开发者设置的预期间隔过小时,由系统负载决定实际回调间隔时间。当前接口的可见区域回调阈值默认包含0。例如,开发者设置回调阈值为[
2000- * The interval between two visible area change callbacks will not be less than the expected update interval. If the1948+ * 0.5],实际生效的阈值为[0.0, 0.5]。
2001- * provided expected interval is too short, the actual callback interval will be determined by the system load.1949+ * <br>**参数:**
2002- * By default, the interval threshold of the visible area change callback includes 0. This means that,1950+ * <br><b>.object</b>:参数类型为{@link ArkUI_VisibleAreaEventOptions}。
2003- * if the provided threshold is [0.5], the effective threshold will be [0.0, 0.5].1951+ * <br>**返回:**
2004- *1952+ * <br><b>.object</b>:参数类型为{@link ArkUI_VisibleAreaEventOptions}。
2005- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n
2006- * .object: parameters for visible area change events.
2007- * The parameter type is {@link ArkUI_VisibleAreaEventOptions}. \n
2008- * \n
2009- * Format of the return value {@link ArkUI_AttributeItem}:\n
2010- * .object: parameters for visible area change events.
2011- * The parameter type is {@link ArkUI_VisibleAreaEventOptions}. \n
2012 *1953 *
2013 * @since 171954 * @since 17
2014 */1955 */
@@ -2140,18 +2081,12 @@ typedef enum {
2140 NODE_PIXEL_ROUND = 109,2081 NODE_PIXEL_ROUND = 109,
2141 2082 
2142 /**2083 /**
2143- * @brief Set whether to enable the default click sound effect for this component.2084+ * @brief 设置组件是否启用默认点击音效。此功能仅在TV上生效,在其他设备上启用默认点击音效也不会播放音效。是否能够发音依赖设备声音相关的设置,如静音模式下不会播放音效。
2144- * It only takes effect on supported devices, such as TV. Whether it can produce sound depends on the device's2085+ * <br>作为属性设置方法参数、属性获取方法返回值{@link ArkUI_AttributeItem}格式如下。
2145- * sound-related settings. For example, sound effects will not be played in silent mode.2086+ * <br>**参数:**
2146- *2087+ * <br><b>.value[0].i32</b>:参数取值为1或0,1表示启用默认点击音效,0表示禁用默认点击音效,默认值为1。
2147- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n2088+ * <br>**返回:**
2148- * .value[0].i32: The parameter value is either 1 or 0. 1 indicates the default click sound effect is enabled,2089+ * <br><b>.value[0].i32</b>:表示此节点是否启用了默认的点击音效。参数取值为101表示启用默认点击音效,0表示禁用默认点击音效。
2149- * while 0 indicates it is disabled. The default value is 1.\n
2150- * \n
2151- * Format of the return value {@link ArkUI_AttributeItem}:\n
2152- * .value[0].i32: Indicates whether the default click sound effect is enabled for this node.\n
2153- * The parameter value is either 1 or 0. 1 indicates the default click sound effect is enabled,
2154- * while 0 indicates it is disabled.\n
2155 *2090 *
2156 * @since 242091 * @since 24
2157 */2092 */
@@ -2173,101 +2108,94 @@ typedef enum {
2173 NODE_MOTION_PATH = 111,2108 NODE_MOTION_PATH = 111,
2174 2109 
2175 /**2110 /**
2176- * @brief Defines the hover effect applied when the component is hovered over. This attribute can be set, reset, and obtained as required through APIs.2111+ * @brief 定义组件被悬停时的效果。该属性可根据需要通过API进行设置、重置和获取。
2177- *2112+ * <br>作为属性设置方法参数、属性获取方法返回值{@link ArkUI_AttributeItem}格式如下。
2178- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute: \n2113+ * <br>**参数:**
2179- * .value[0].i32: Hover effect applied when the component is hovered over.2114+ * <br><b>.value[0].i32</b>:组件在悬停状态下的悬停效果。参数类型为{@link ArkUI_HoverEffect}。默认值为ARKUI_HOVER_EFFECT_AUTO。
2180- * The parameter type is {@link ArkUI_HoverEffect}. The default value is <b>ARKUI_HOVER_EFFECT_AUTO</b>. \n2115+ * <br>**返回:**
2181- * \n2116+ * <br><b>.value[0].i32</b>:组件在悬停状态下的悬停效果。参数类型为{@link ArkUI_HoverEffect}。
2182- * Format of the return value {@link ArkUI_AttributeItem}: \n
2183- * .value[0].i32: Hover effect applied when the component is hovered over.
2184- * The parameter type is {@link ArkUI_HoverEffect}. \n
2185 *2117 *
2186 * @since 232118 * @since 23
2187 */2119 */
2188 NODE_HOVER_EFFECT = 112,2120 NODE_HOVER_EFFECT = 112,
2189 2121 
2190 /**2122 /**
2191- * @brief Configures the container as a focus group with the specified identifier. This attribute can be set, reset, and obtained as required through APIs.2123+ * @brief 将容器设置为具有特定标识符的焦点组,支持属性设置、属性重置和属性获取接口。
2192- *2124+ * <br>作为属性设置方法参数、属性获取方法返回值{@link ArkUI_AttributeItem}格式如下。
2193- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute: \n2125+ * <br>**参数:**
2194- * .string: focus scope identifier. \n2126+ * <br><b>.string</b>:焦点作用域标识符。
2195- * .value[0]?.i32: whether the scope is a focus group. The default value is <b>0</b>. The value is <b>1</b> or <b>0</b>. \n2127+ * <br><b>.value[0].i32</b>:该作用域是否为焦点组,默认值为0。取值范围为10。1表示设置为焦点组,0表示组件未被设置为焦点组。
2196- * .value[1]?.i32: whether arrow keys can move focus outside the focus group. This setting only takes effect when <b>isGroup</b> is <b>true</b>. The default value is <b>1</b>.2128+ * <br><b>.value[1].i32</b>:箭头键是否可以将焦点从焦点组内部移至外部,仅当isGroup为true时有效,默认值为1。取值范围为1或0。1表示箭头键可以将焦点从焦点组内部移至外部,
2197- * The value is <b>1</b> or <b>0</b>. \n2129+ * 0表示箭头键无法将焦点从焦点组内部移至外部。
2198- * \n2130+ * <br>**返回:**
2199- * Format of the return value {@link ArkUI_AttributeItem}:\n2131+ * <br><b>.string</b>:焦点作用域标识符。
2200- * .string: focus scope identifier. \n2132+ * <br><b>.value[0].i32</b>:该作用域是否为焦点组,默认值为0。取值范围为1或0。1表示设置为焦点组,0表示组件未被设置为焦点组。
2201- * .value[0]?.i32: whether the scope is a focus group. The default value is <b>0</b>. The value is <b>1</b> or <b>0</b>. \n2133+ * <br><b>.value[1].i32</b>:箭头键是否可以将焦点从焦点组内部移至外部,仅当isGroup为true时有效,默认值为1。取值范围为1或0。1表示箭头键可以将焦点从焦点组内部移至外部,
2202- * .value[1]?.i32: whether arrow keys can move focus outside the focus group. This setting only takes effect when <b>isGroup</b> is <b>true</b>. The default value is <b>1</b>.2134+ * 0表示箭头键无法将焦点从焦点组内部移至外部。
2203- * The value is <b>1</b> or <b>0</b>. \n
2204 *2135 *
2205 * @since 232136 * @since 23
2206 */2137 */
2207 NODE_FOCUS_SCOPE_ID = 113,2138 NODE_FOCUS_SCOPE_ID = 113,
2208 2139 
2209 /**2140 /**
2210- * @brief Sets the component focus priority within a specific focus scope. This attribute can be set, reset, and obtained as required through APIs.2141+ * @brief 设置组件在特定焦点作用域内的焦点优先级,支持属性设置、属性重置和属性获取接口。
2211- *2142+ * <br>作为属性设置方法参数、属性获取方法返回值{@link ArkUI_AttributeItem}格式如下。
2212- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute: \n2143+ * <br>**参数:**
2213- * .string: focus scope identifier. \n2144+ * <br><b>.string</b>:焦点作用域标识符。
2214- * .value[0]?.i32: focus priority within the focus scope. The parameter type is {@link ArkUI_FocusPriority}.2145+ * <br><b>.value[0].i32</b>:焦点作用域内获焦优先级。参数类型为{@link ArkUI_FocusPriority}。默认值为ARKUI_FOCUS_PRIORITY_AUTO。
2215- * The default value is <b>ARKUI_FOCUS_PRIORITY_AUTO</b>. \n2146+ * <br>**返回:**
2216- * \n2147+ * <br><b>.string</b>:焦点作用域标识符。
2217- * Format of the return value {@link ArkUI_AttributeItem}:\n2148+ * <br><b>.value[0].i32</b>:焦点作用域优先级。参数类型为{@link ArkUI_FocusPriority}
2218- * .string: focus scope identifier. \n
2219- * .value[0]?.i32: focus priority within the focus scope. The parameter type is {@link ArkUI_FocusPriority}. \n
2220 *2149 *
2221 * @since 232150 * @since 23
2222 */2151 */
2223 NODE_FOCUS_SCOPE_PRIORITY = 114,2152 NODE_FOCUS_SCOPE_PRIORITY = 114,
2224 2153 
2225 /**2154 /**
2226- * @brief Sets the distance threshold for click events. This attribute can be set, reset, and obtained as required through APIs.2155+ * @brief 设置点击事件的距离阈值,支持属性设置、属性重置和属性获取接口。
2227- *2156+ * <br>作为属性设置方法参数、属性获取方法返回值{@link ArkUI_AttributeItem}格式如下。
2228- * @note If finger movement exceeds the preset distance limit, click event recognition will fail.2157+ * <br>**参数:**
2229- *2158+ * <br><b>.value[0].f32</b>:点击事件移动阈值。取值范围(0, +∞)。默认值为+∞,单位vp。
2230- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute: \n2159+ * <br>**返回:**
2231- * .value[0].f32: distance threshold for click events.2160+ * <br><b>.value[0].f32</b>:点击事件移动阈值。
2232- * \n
2233- * Format of the return value {@link ArkUI_AttributeItem}: \n
2234- * .value[0].f32: distance threshold for click events. \n
2235 *2161 *
2236 * @since 232162 * @since 23
2237 */2163 */
2238 NODE_ON_CLICK_EVENT_DISTANCE_THRESHOLD = 115,2164 NODE_ON_CLICK_EVENT_DISTANCE_THRESHOLD = 115,
2239 2165 
2240 /**2166 /**
2241- * @brief Defines the component event response region. This attribute can be set, reset, and obtained as required through APIs.2167+ * @brief 设置组件事件的响应区域,支持属性设置,属性重置和属性获取接口。
2242- *2168+ * <br>作为属性设置方法参数、属性获取方法返回值{@link ArkUI_AttributeItem}格式如下。
2243- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n2169+ * <br>**说明:**
2244- * .data[0].i32: input tool type for the response region, specified using the {@link ArkUI_ResponseRegionSupportedTool} enum. Default value: <b>ARKUI_RESPONSE_REGIN_SUPPORTED_TOOL_ALL</b>.2170+ * <br>设置时data数据大小无数量限制,均可以设置成功,但仅支持获取到20个。获取到的data数组顺序与设置顺序可能存在差异。
2245- * .data[1].f32: x-coordinate of the pointer position relative to the upper left corner of the component, in vp. \n2171+ * <br>**参数:**
2246- * .data[2].f32: y-coordinate of the pointer position relative to the upper left corner of the component, in vp. \n2172+ * <br><b>.data[0].i32</b>:适用于此响应区域的事件工具类型。参数类型为{@link ArkUI_ResponseRegionSupportedTool}。默认值:
2247- * .data[3].f32: width of the response region. The value is a percentage. \n2173+ * ARKUI_RESPONSE_REGIN_SUPPORTED_TOOL_ALL。
2248- * .data[4].f32: height of the response region. The value is a percentage. \n2174+ * <br><b>.data[1].f32</b>:触摸点相对于组件左上角的x轴坐标,默认值:0.0,单位为vp。
2249- * .data[5...].f32: additional response regions in the same parameter order. \n2175+ * <br><b>.data[2].f32</b>:触摸点相对于组件左上角的y轴坐标,默认值:0.0,单位为vp。
2250- * \n2176+ * <br><b>.data[3].f32</b>:触摸热区的宽度,默认值:100.0,单位为百分比。
2251- * Format of the return value {@link ArkUI_AttributeItem}:\n2177+ * <br><b>.data[4].f32</b>:触摸热区的高度,默认值:100.0,单位为百分比。
2252- * .data[0].i32: input tool type for the response region, specified using the {@link ArkUI_ResponseRegionSupportedTool} enum. Default value: <b>ARKUI_RESPONSE_REGIN_SUPPORTED_TOOL_ALL</b>.2178+ * <br><b>.data[5...].f32</b>:可以设置多个手势响应区域,顺序和上述一致。
2253- * .data[1].f32: x-coordinate of the pointer position relative to the upper left corner of the component, in vp. \n2179+ * <br>**返回:**
2254- * .data[2].f32: y-coordinate of the pointer position relative to the upper left corner of the component, in vp. \n2180+ * <br><b>.data[0].i32</b>:适用于此响应区域的事件工具类型。参数类型为{@link ArkUI_ResponseRegionSupportedTool}。默认值:
2255- * .data[3].f32: width of the response region. The value is a percentage. \n2181+ * ARKUI_RESPONSE_REGIN_SUPPORTED_TOOL_ALL。
2256- * .data[4].f32: height of the response region. The value is a percentage. \n2182+ * <br><b>.data[1].f32</b>:触摸点相对于组件左上角的x轴坐标,默认值:0.0,单位为vp。
2257- * .data[5...].f32: additional response regions in the same parameter order.2183+ * <br><b>.data[2].f32</b>:触摸点相对于组件左上角的y轴坐标,默认值:0.0,单位为vp。
2184+ * <br><b>.data[3].f32</b>:触摸热区的宽度,默认值:100.0,单位为百分比。
2185+ * <br><b>.data[4].f32</b>:触摸热区的高度,默认值:100.0,单位为百分比。
2186+ * <br><b>.data[5...].f32</b>:可以设置多个手势响应区域,顺序和上述一致。
2258 *2187 *
2259 * @since 232188 * @since 23
2260 */2189 */
2261 NODE_RESPONSE_REGION_LIST = 116,2190 NODE_RESPONSE_REGION_LIST = 116,
2262 2191 
2263 /**2192 /**
2264- * @brief Defines the event monopolization attribute. This attribute can be set, reset, and obtained as required through APIs.2193+ * @brief 定义独占事件属性,该属性可根据需要通过API进行设置、重置和获取。
2265- *2194+ * <br>作为属性设置方法参数、属性获取方法返回值{@link ArkUI_AttributeItem}格式如下。
2266- * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute: \n2195+ * <br>**参数:**
2267- * .value[0].i32: Boolean value (1 or 0).2196+ * <br><b>.value[0].i32</b>:取值范围为10。1表示设置组件独占,0表示组件未设置独占属性。
2268- * \n2197+ * <br>**返回:**
2269- * Format of the return value {@link ArkUI_AttributeItem}: \n2198+ * <br><b>.value[0].i32</b>:取值范围为1或0。1表示设置组件独占,0表示组件未设置独占属性。
2270- * .value[0].i32: Boolean value (1 or 0).
2271 *2199 *
2272 * @since 232200 * @since 23
2273 */2201 */
@@ -11523,10 +11451,10 @@ int32_t OH_ArkUI_NodeEvent_GetTargetId(ArkUI_NodeEvent* event);
11523ArkUI_NodeHandle OH_ArkUI_NodeEvent_GetNodeHandle(ArkUI_NodeEvent* event);11451ArkUI_NodeHandle OH_ArkUI_NodeEvent_GetNodeHandle(ArkUI_NodeEvent* event);
11524 11452 
11525/**11453/**
11526- * @brief Obtains input event (for example, touch event) data for a component event.11454+ * @brief 获取组件事件中的输入事件(如触碰事件)数据。
11527 *11455 *
11528- * @param event Indicates the pointer to the component event.11456+ * @param event 组件事件指针。
11529- * @return Returns the pointer to the input event data.11457+ * @return ArkUI_UIInputEvent 输入事件数据指针。
11530 * @since 1211458 * @since 12
11531 */11459 */
11532ArkUI_UIInputEvent* OH_ArkUI_NodeEvent_GetInputEvent(ArkUI_NodeEvent* event);11460ArkUI_UIInputEvent* OH_ArkUI_NodeEvent_GetInputEvent(ArkUI_NodeEvent* event);
@@ -11617,11 +11545,10 @@ int32_t OH_ArkUI_NodeEvent_GetStringValue(ArkUI_NodeEvent* event, int32_t index,
11617int32_t OH_ArkUI_NodeEvent_SetReturnNumberValue(ArkUI_NodeEvent* event, ArkUI_NumberValue* value, int32_t size);11545int32_t OH_ArkUI_NodeEvent_SetReturnNumberValue(ArkUI_NodeEvent* event, ArkUI_NumberValue* value, int32_t size);
11618 11546 
11619/**11547/**
11620- * @brief Obtains a <b>ArkUI_TouchTestInfo</b> object from the specified <b>ArkUI_NodeEvent</b> object.11548+ * @brief 获取组件事件中的触摸测试信息。
11621 *11549 *
11622 * @param {pointer} nodeEvent Indicates the pointer to an <b>ArkUI_NodeEvent</b> object.11550 * @param {pointer} nodeEvent Indicates the pointer to an <b>ArkUI_NodeEvent</b> object.
徐学军6月17日

违反规范:5.2.2.2《C API 注释标签必须遵守注解定义》 这里写成了 @param {pointer} nodeEvent@param 标签后应直接跟参数名,插入 {pointer} 会破坏标签语法,文档工具也无法把说明稳定绑定到 nodeEvent 参数。 请改为合法的 @param nodeEvent ... 形式,把类型信息放到自然语言描述里。

likedislike
zouqianshun
zouqianshun
6月18日 评论:
11623- * @return Returns the pointer to an <b>ArkUI_TouchTestInfo</b> object.11551+ * @return 返回指向{@link ArkUI_TouchTestInfo}对象的指针。若传入的参数无效或并非触摸测试信息,则返回null。
11624- * Returns <b>null</b> if the parameter passed in is invalid or is not a touch test info.
11625 * @since 2211552 * @since 22
11626 */11553 */
11627ArkUI_TouchTestInfo* OH_ArkUI_NodeEvent_GetTouchTestInfo(ArkUI_NodeEvent* nodeEvent);11554ArkUI_TouchTestInfo* OH_ArkUI_NodeEvent_GetTouchTestInfo(ArkUI_NodeEvent* nodeEvent);
@@ -13188,48 +13115,38 @@ int32_t OH_ArkUI_GetNodeSnapshotSizeLimitation(int32_t* maxWidth, int32_t* maxHe
13188int32_t OH_ArkUI_NodeUtils_GetPositionToParent(ArkUI_NodeHandle node, ArkUI_IntOffset* globalOffset);13115int32_t OH_ArkUI_NodeUtils_GetPositionToParent(ArkUI_NodeHandle node, ArkUI_IntOffset* globalOffset);
13189 13116 
13190/**13117/**
13191- * @brief Adds the UI state style supported by the component. To handle states change efficiently, need to specify the13118+ * @brief 设置组件支持的{@link 多态样式}状态。为了更高效地处理,需传入所关注的状态值及对应的状态处理函数,当关注的状态发生时,处理函数会被执行。可在回调中根据当前状态调整UI样式。当在同一个节点上多次调用该方法时,
13192- * states of interest and the corresponding handler. When a state of interest occurs, the handler will be executed.13119+ * 将以最后一次传入的状态及处理函数为准。有些类型的组件节点,系统内部已有对某些状态的默认处理。例如,Button组件默认具备对PRESSED状态的样式变化,当在此类组件上使用此方法自定义状态处理时,会先应用系统默认样式变化,
13193- * - You can adjust the UI style based on the current state within the callback. If this API is called multiple13120+ * 再执行自定义的样式处理,最终效果为两者叠加。可以通过指定excludeInner为true来禁用系统内部的默认样式效果,但这通常取决于系统内部实现规范是否允许。当调用该函数时,
13194- * times on the same node, the last set of states and handler will take precedence.13121+ * 传入的statesChangeHandler函数会立即执行一次,且无需特意注册对NORMAL状态的监听,只要注册了非NORMAL状态,当状态从任意状态变化回NORMAL时,系统都会进行回调,以便应用进行样式复原。
13195- * - Some component types have default system handling for certain states. For example, the <b>Button</b>
13196- * component has a default style effect for the PRESSED state. When custom state handling is implemented on such
13197- * components, the default style effect will be applied first, followed by the custom style changes, resulting in
13198- * a combined effect. To disable the default style effects, set <b>excludeInner</b> to <b>true</b>, if this is allowed
13199- * by the system implementation.
13200- * - And when this API is called, the provided handler function will be executed immediately.
13201- * - There is no need to explicitly register a listener for the NORMAL state. Once a non-NORMAL state is registered,
13202- * the system will automatically notify your application when the state changes back to NORMAL.
13203 *13122 *
13204- * @param node Target node.13123+ * @param node 目标节点。
13205- * @param uiStates Target UI states to be handled on the node.13124+ * @param uiStates 目标节点需要处理的目标UI状态。所有目标UI状态的组合结果可以通过“\|”操作来计算。例如:targetUIStates = ArkUI_UIState::PRESSED \|
13206- * The combined result of all target UI states can be calculated using the <b>|</b> operator.13125+ * ArkUI_UIState::FOCUSED。
13207- * Example: <b>targetUIStates = ArkUI_UIState::PRESSED | ArkUI_UIState::FOCUSED</b>.
13208 * @param statesChangeHandler Handler for UI state changes.13126 * @param statesChangeHandler Handler for UI state changes.
13209- * It rturns the current UI status. The value is the result of combining all current state enum values using the13127+ * It rturns the current UI status. The value is the result of combining all current state enum values using the
13210- * <b>|</b> operator. You can determine the state using the <b>&</b> operator.13128+ * <b>|</b> operator. You can determine the state using the <b>&</b> operator.
13211- * Example: <b>if (currentStates & ArkUI_UIState::PRESSED == ArkUI_UIState::PRESSED)</b>.13129+ * Example: <b>if (currentStates & ArkUI_UIState::PRESSED == ArkUI_UIState::PRESSED)</b>.
13212- * However, for checking the normal state, use the equality operator directly.13130+ * However, for checking the normal state, use the equality operator directly.
13213- * Example: <b>if (currentStates == ArkUI_UIState::NORMAL)</b>.13131+ * Example: <b>if (currentStates == ArkUI_UIState::NORMAL)</b>.
13214- * @param excludeInner Whether to disable the default state styles.13132+ * @param excludeInner 禁止内部默认状态样式的标志。​​true​​表示禁用系统内部的默认样式,false表示不禁用。
13215- * @param userData Custom data used in the <b>statesChangeHandler</b> callback.13133+ * @param userData statesChangeHandler回调函数中使用的自定义数据。
13216- * @return Returns the result code.13134+ * @return 错误码。
13217- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.13135+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
13218- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.13136+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
13219 * @since 2013137 * @since 20
13220 */13138 */
13221ArkUI_ErrorCode OH_ArkUI_AddSupportedUIStates(ArkUI_NodeHandle node, int32_t uiStates,13139ArkUI_ErrorCode OH_ArkUI_AddSupportedUIStates(ArkUI_NodeHandle node, int32_t uiStates,
13222 void (statesChangeHandler)(int32_t currentStates, void* userData), bool excludeInner, void* userData);13140 void (statesChangeHandler)(int32_t currentStates, void* userData), bool excludeInner, void* userData);
13223 13141 
13224/**13142/**
13225- * @brief Removes registered UI states. When all states registered using <b>OH_ArkUI_AddSupportedUIStates</b>13143+ * @brief 删除注册的状态处理。当通过OH_ArkUI_AddSupportedUIStates注册的状态都被删除时,所注册的stateChangeHandler也不会再被执行。
13226- * are removed, the registered <b>stateChangeHandler</b> will no longer be executed.13144+ *
13227- * 13145+ * @param node 目标节点。
13228- * @param node Target node.13146+ * @param uiStates 节点需要删除的目标UI状态。
13229- * @param uiStates Target UI states to be removed.13147+ * @return 错误码。
13230- * @return Returns the result code.13148+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
13231- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.13149+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
13232- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
13233 * @since 2013150 * @since 20
13234 */13151 */
13235ArkUI_ErrorCode OH_ArkUI_RemoveSupportedUIStates(ArkUI_NodeHandle node, int32_t uiStates);13152ArkUI_ErrorCode OH_ArkUI_RemoveSupportedUIStates(ArkUI_NodeHandle node, int32_t uiStates);
@@ -13338,58 +13255,63 @@ int32_t OH_ArkUI_SetForceDarkConfig(ArkUI_ContextHandle uiContext, bool forceDar
13338 uint32_t (*colorInvertFunc)(uint32_t color));13255 uint32_t (*colorInvertFunc)(uint32_t color));
13339 13256 
13340/**13257/**
13341- * @brief Register common event callback of target node.13258+ * @brief 注册目标节点的基础事件回调。
13342 *13259 *
13343- * @param node The ArkUI-NodeHandle pointer.13260+ * 当前支持的事件类型如下: 参考{@link ArkUI_NodeEventType}中的NODE_ON_CLICK_EVENT、NODE_TOUCH_EVENT、NODE_EVENT_ON_APPEAR、
13344- * @param eventType Indicates the type of event to set.13261+ * NODE_EVENT_ON_DISAPPEAR、NODE_ON_KEY_EVENT、NODE_ON_FOCUS、NODE_ON_BLUR、NODE_ON_HOVER、NODE_ON_MOUSE、NODE_ON_SIZE_CHANGE。
13345- * @param userData Indicates the pointer to the custom data.13262+ *
13346- * @param callback Indicates the event callback function.13263+ * @param node 目标节点。
13347- * @return Returns the result code.13264+ * @param eventType 事件类型。
13348- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.13265+ * @param userData 开发者自定义的数据指针,以便在回调函数中处理自定义数据,需确保自定义函数执行时数据有效。
13349- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function params is invalid.13266+ * @param callback 开发者自定义的回调函数。
13350- * Returns {@link ARKUI_ERROR_CODE_NODE_UNSUPPORTED_EVENT_TYPE} Function parameter eventType is not supported.13267+ * @return 错误码。
13268+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
13269+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
13270+ * <br>{@link ARKUI_ERROR_CODE_NODE_UNSUPPORTED_EVENT_TYPE} 暂不支持该事件类型。
13351 * @since 2113271 * @since 21
13352 */13272 */
13353int32_t OH_ArkUI_NativeModule_RegisterCommonEvent(ArkUI_NodeHandle node, ArkUI_NodeEventType eventType,13273int32_t OH_ArkUI_NativeModule_RegisterCommonEvent(ArkUI_NodeHandle node, ArkUI_NodeEventType eventType,
13354 void* userData, void (*callback)(ArkUI_NodeEvent* event));13274 void* userData, void (*callback)(ArkUI_NodeEvent* event));
13355 13275 
13356/**13276/**
13357- * @brief Unregister common event callback of target node.13277+ * @brief 注销目标节点的基础事件回调。
13358 *13278 *
13359- * @param node The ArkUI-NodeHandle pointer.13279+ * 当前支持的事件类型请参考{@link OH_ArkUI_NativeModule_RegisterCommonEvent}。
13360- * @param eventType Indicates the type of event to set.13280+ *
13361- * @return Returns the result code.13281+ * @param node 目标节点。
13362- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.13282+ * @param eventType 事件类型。
13363- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function params is invalid.13283+ * @return 错误码。
13364- * Returns {@link ARKUI_ERROR_CODE_NODE_UNSUPPORTED_EVENT_TYPE} Function parameter eventType is not supported.13284+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
13285+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
13286+ * <br>{@link ARKUI_ERROR_CODE_NODE_UNSUPPORTED_EVENT_TYPE} 暂不支持该事件类型。
13365 * @since 2113287 * @since 21
13366 */13288 */
13367int32_t OH_ArkUI_NativeModule_UnregisterCommonEvent(ArkUI_NodeHandle node, ArkUI_NodeEventType eventType);13289int32_t OH_ArkUI_NativeModule_UnregisterCommonEvent(ArkUI_NodeHandle node, ArkUI_NodeEventType eventType);
13368 13290 
13369/**13291/**
13370- * @brief Register common visible area approximate change event callback of target node.13292+ * @brief 注册限制回调间隔的可见区域变化的基础事件回调。
13371 *13293 *
13372- * @param node The ArkUI-NodeHandle pointer.13294+ * @param node 目标节点。
13373- * @param ratios Threshold array representing the visible area of the component.13295+ * @param ratios 阈值数组,表示组件的可见区域。
13374- * @param size The size of the ratios.13296+ * @param size 阈值数组的大小。
13375- * @param expectedUpdateInterval The expected calculation interval for developers.13297+ * @param expectedUpdateInterval 开发人员预期的计算间隔。
13376- * @param userData Indicates the pointer to the custom data.13298+ * @param userData 开发者自定义的数据指针,以便在回调函数中处理自定义数据,需确保自定义函数执行时数据有效。
13377- * @param callback Indicates the event callback function.13299+ * @param callback 开发者自定义的回调函数。
13378- * @return Returns the result code.13300+ * @return 错误码。
13379- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.13301+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
13380- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function params is invalid.13302+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
13381 * @since 2113303 * @since 21
13382 */13304 */
13383int32_t OH_ArkUI_NativeModule_RegisterCommonVisibleAreaApproximateChangeEvent(ArkUI_NodeHandle node, float* ratios,13305int32_t OH_ArkUI_NativeModule_RegisterCommonVisibleAreaApproximateChangeEvent(ArkUI_NodeHandle node, float* ratios,
13384 int32_t size, float expectedUpdateInterval, void* userData, void (*callback)(ArkUI_NodeEvent* event));13306 int32_t size, float expectedUpdateInterval, void* userData, void (*callback)(ArkUI_NodeEvent* event));
13385 13307 
13386/**13308/**
13387- * @brief Unregister common visible area approximate change event callback of target node.13309+ * @brief 注销限制回调间隔的可见区域变化的基础事件回调。
13388 *13310 *
13389- * @param node The ArkUI-NodeHandle pointer.13311+ * @param node 目标节点。
13390- * @return Returns the result code.13312+ * @return 错误码。
13391- * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.13313+ * <br>{@link ARKUI_ERROR_CODE_NO_ERROR} 成功。
13392- * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function params is invalid.13314+ * <br>{@link ARKUI_ERROR_CODE_PARAM_INVALID} 函数参数异常。
13393 * @since 2113315 * @since 21
13394 */13316 */
13395int32_t OH_ArkUI_NativeModule_UnregisterCommonVisibleAreaApproximateChangeEvent(ArkUI_NodeHandle node);13317int32_t OH_ArkUI_NativeModule_UnregisterCommonVisibleAreaApproximateChangeEvent(ArkUI_NodeHandle node);
Azh-cn/arkui/ace_engine/native/ui_input_event.h+2344-0