diff --git a/en/application-dev/reference/apis/js-apis-arkui-UIContext.md b/en/application-dev/reference/apis/js-apis-arkui-UIContext.md index 3862eeefb3dbb77c6171512c424af27e4f623eb8..59d38206114407df5e3e220060274da684707cee 100644 --- a/en/application-dev/reference/apis/js-apis-arkui-UIContext.md +++ b/en/application-dev/reference/apis/js-apis-arkui-UIContext.md @@ -139,6 +139,8 @@ animateTo(value: AnimateParam, event: () => void): void Applies a transition animation for state changes. +**System capability**: SystemCapability.ArkUI.ArkUI.Full + Since API version 9, this API is supported in ArkTS widgets. **Parameters** @@ -216,11 +218,13 @@ showAlertDialog(options: AlertDialogParamWithConfirm | AlertDialogParamWithButto Shows an alert dialog box. +**System capability**: SystemCapability.ArkUI.ArkUI.Full + **Parameters** -| Name | Type | Description| -| ---- | --------------- | -------- | -| options | [AlertDialogParamWithConfirm](../arkui-ts/ts-methods-alert-dialog-box.md#alertdialogparamwithconfirm) \| [AlertDialogParamWithButtons](../arkui-ts/ts-methods-alert-dialog-box.md#alertdialogparamwithbuttons) | Defines and displays the **\** component.| +| Name | Type | Mandatory| Description| +| ---- | --------------- | -------- | -------- | +| options | [AlertDialogParamWithConfirm](../arkui-ts/ts-methods-alert-dialog-box.md#alertdialogparamwithconfirm) \| [AlertDialogParamWithButtons](../arkui-ts/ts-methods-alert-dialog-box.md#alertdialogparamwithbuttons) | Yes| Defines and displays the **\** component.| **Example** @@ -252,9 +256,11 @@ showActionSheet(value: ActionSheetOptions): void Defines and shows the action sheet. +**System capability**: SystemCapability.ArkUI.ArkUI.Full + **ActionSheetOptions parameters** -| Name | Type | Mandatory | Description | +| Name | Type | Mandatory | Description | | ---------- | -------------------------- | ------- | ----------------------------- | | title | [Resource](../arkui-ts/ts-types.md#resource) \| string | Yes | Title of the dialog box.| | message | [Resource](../arkui-ts/ts-types.md#resource) \| string | Yes | Content of the dialog box. | @@ -267,7 +273,7 @@ Defines and shows the action sheet. **SheetInfo parameters** -| Name| Type | Mandatory| Description | +| Name| Type | Mandatory| Description | | ------ | ------------------------------------------------------------ | ---- | ----------------- | | title | [ResourceStr](../arkui-ts/ts-types.md#resourcestr) | Yes | Text of the option. | | icon | [ResourceStr](../arkui-ts/ts-types.md#resourcestr) | No | Sheet icon. By default, no icon is displayed. | @@ -320,22 +326,24 @@ showDatePickerDialog(options: DatePickerDialogOptions): void Shows a date picker dialog box. +**System capability**: SystemCapability.ArkUI.ArkUI.Full + **DatePickerDialogOptions parameters** -| Name| Type| Mandatory| Default Value| Description| -| -------- | -------- | -------- | -------- | -------- | -| start | Date | No| Date('1970-1-1') | Start date of the picker.| -| end | Date | No| Date('2100-12-31') | End date of the picker.| -| selected | Date | No| Current system date| Selected date.| -| lunar | boolean | No| false | Whether to display the lunar calendar.| -| showTime | boolean | No| false | Whether to display the time item.| -| useMilitaryTime | boolean | No| false | Whether to display time in 24-hour format.| -| disappearTextStyle | [PickerTextStyle](../arkui-ts/ts-basic-components-datepicker.md#pickertextstyle10) | No| - | Font color, font size, and font width for the top and bottom items.| -| textStyle | [PickerTextStyle](../arkui-ts/ts-basic-components-datepicker.md#pickertextstyle10) | No| - | Font color, font size, and font width of all items except the top, bottom, and selected items.| -| selectedTextStyle | [PickerTextStyle](../arkui-ts/ts-basic-components-datepicker.md#pickertextstyle10) | No| - | Font color, font size, and font width of the selected item.| -| onAccept | (value: [DatePickerResult](../arkui-ts/ts-basic-components-datepicker.md#datepickerresult)) => void | No| - | Callback invoked when the OK button in the dialog box is clicked.| -| onCancel | () => void | No| - | Callback invoked when the Cancel button in the dialog box is clicked.| -| onChange | (value: [DatePickerResult](../arkui-ts/ts-basic-components-datepicker.md#datepickerresult)) => void | No| - | Callback invoked when the selected item in the picker changes.| +| Name| Type| Mandatory| Description| +| -------- | -------- | -------- | -------- | +| start | Date | No| Start date of the picker.
Default value: **Date('1970-1-1')**| +| end | Date | No| End date of the picker.
Default value: **Date('2100-12-31')**| +| selected | Date | No| Selected date.
Default value: current system date| +| lunar | boolean | No| Whether to display the lunar calendar.
Default value: **false**| +| showTime | boolean | No| Whether to display the time item.
Default value: **false**| +| useMilitaryTime | boolean | No| Whether to display time in 24-hour format.
Default value: **false**| +| disappearTextStyle | [PickerTextStyle](../arkui-ts/ts-basic-components-datepicker.md#pickertextstyle10) | No| Font color, font size, and font width for the top and bottom items.| +| textStyle | [PickerTextStyle](../arkui-ts/ts-basic-components-datepicker.md#pickertextstyle10) | No| Font color, font size, and font width of all items except the top, bottom, and selected items.| +| selectedTextStyle | [PickerTextStyle](../arkui-ts/ts-basic-components-datepicker.md#pickertextstyle10) | No| Font color, font size, and font width of the selected item.| +| onAccept | (value: [DatePickerResult](../arkui-ts/ts-basic-components-datepicker.md#datepickerresult)) => void | No| Callback invoked when the OK button in the dialog box is clicked.| +| onCancel | () => void | No| Callback invoked when the Cancel button in the dialog box is clicked.| +| onChange | (value: [DatePickerResult](../arkui-ts/ts-basic-components-datepicker.md#datepickerresult)) => void | No| Callback invoked when the selected item in the picker changes.| **Example** @@ -365,6 +373,8 @@ showTimePickerDialog(options: TimePickerDialogOptions): void Shows a time picker dialog box. +**System capability**: SystemCapability.ArkUI.ArkUI.Full + **TimePickerDialogOptions parameters** | Name| Type| Mandatory| Description| @@ -404,9 +414,11 @@ showTextPickerDialog(options: TextPickerDialogOptions): void Shows a text picker in the given settings. +**System capability**: SystemCapability.ArkUI.ArkUI.Full + **TextPickerDialogOptions parameters** -| Name| Type| Mandatory| Description| +| Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | | range | string[] \| [Resource](../arkui-ts/ts-types.md#resource)\|[TextPickerRangeContent](../arkui-ts/ts-basic-components-textpicker.md#textpickerrangecontent10)[] | Yes| Data selection range of the picker. This parameter cannot be set to an empty array. If set to an empty array, it will not be displayed.| | selected | number | No| Index of the selected item.
Default value: **0**| @@ -507,7 +519,7 @@ In the following API examples, you must first use [getFont()](#getfont) in **UIC ### registerFont -registerFont(options: FontOptions): void +registerFont(options: font.FontOptions): void Registers a custom font with the font manager. @@ -515,9 +527,9 @@ Registers a custom font with the font manager. **Parameters** -| Name | Type | Mandatory | Description | -| ------- | --------------------------- | ---- | ----------- | -| options | [FontOptions](js-apis-font.md#fontoptions) | Yes | Information about the custom font to register.| +| Name | Type | Mandatory| Description | +| ------- | ----------------------------------------------- | ---- | ---------------------- | +| options | [font.FontOptions](js-apis-font.md#fontoptions) | Yes | Information about the custom font to register.| **Example** @@ -528,13 +540,61 @@ font.registerFont({ familySrc: '/font/medium.ttf' }); ``` +### getStstemFontList + +getSystemFontList(): Array\ + +Obtains the list of supported fonts. + +**System capability**: SystemCapability.ArkUI.ArkUI.Full + +**Return value** + +| Type | Description | +| -------------- | ------------------ | +| Array\ | List of supported fonts.| + +**Example** + +```ts +let font = uiContext.getFont(); +font.getSystemFontList() +``` + +### getFontByName + +getFontByName(fontName: string): font.FontInfo + +Obtains information about a system font based on the font name. + +**System capability**: SystemCapability.ArkUI.ArkUI.Full + +**Parameters** + +| Name | Type | Mandatory| Description | +| -------- | ------ | ---- | -------------- | +| fontName | string | Yes | System font name.| + +**Return value** + +| Type | Description | +| ------------------------------------ | -------------- | +| [FontInfo](js-apis-font.md#fontinfo) | Information about the system font.| + +**Example** + +```ts +let font = uiContext.getFont(); +font.getFontByName('Sans Italic') +``` + ## ComponentUtils In the following API examples, you must first use [getComponentUtils()](#getcomponentutils) in **UIContext** to obtain a **ComponentUtils** instance, and then call the APIs using the obtained instance. ### getRectangleById -getRectangleById(key: string): ComponentInfo +getRectangleById(id: string): componentUtils.ComponentInfo Obtains the size, position, translation, scaling, rotation, and affine matrix information of the specified component. @@ -544,7 +604,7 @@ Obtains the size, position, translation, scaling, rotation, and affine matrix in | Name| Type | Mandatory| Description | | ------ | ------ | ---- | ---------------- | -| key | string | Yes | Unique component ID.| +| id | string | Yes | Unique component ID.| **Return value** @@ -567,7 +627,7 @@ In the following API examples, you must first use [getUIInspector()](#getuiinspe ### createComponentObserver -createComponentObserver(id: string): ComponentObserver +createComponentObserver(id: string): inspector.ComponentObserver Creates an observer for the specified component. @@ -581,8 +641,8 @@ Creates an observer for the specified component. **Return value** -| Type | Description | -| --------------------------------------- | -------------------------------------------------- | +| Type | Description | +| ------------------------------------------------------------ | -------------------------------------------------- | | [ComponentObserver](js-apis-arkui-inspector.md#componentobserver) | Component observer, which is used to register and unregister listeners for completion of component layout or drawing.| **Example** @@ -598,7 +658,7 @@ In the following API examples, you must first use [getMediaQuery()](#getmediaque ### matchMediaSync -matchMediaSync(condition: string): MediaQueryListener +matchMediaSync(condition: string): mediaQuery.MediaQueryListener Sets the media query criteria and returns the corresponding listening handle. @@ -629,7 +689,7 @@ In the following API examples, you must first use [getRouter()](#getrouter) in * ### pushUrl -pushUrl(options: RouterOptions): Promise<void> +pushUrl(options: router.RouterOptions): Promise<void> Navigates to a specified page in the application. @@ -637,9 +697,9 @@ Navigates to a specified page in the application. **Parameters** -| Name | Type | Mandatory | Description | -| ------- | ------------------------------- | ---- | --------- | -| options | [RouterOptions](js-apis-router.md#routeroptions) | Yes | Page routing parameters.| +| Name | Type | Mandatory| Description | +| ------- | ------------------------------------------------------- | ---- | ------------------ | +| options | [router.RouterOptions](js-apis-router.md#routeroptions) | Yes | Page routing parameters.| **Return value** @@ -661,26 +721,24 @@ For details about the error codes, see [Router Error Codes](../errorcodes/errorc ```ts let router = uiContext.getRouter(); -router.pushUrl({ - url: 'pages/routerpage2', - params: { - data1: 'message', - data2: { - data3: [123, 456, 789] +try { + router.pushUrl({ + url: 'pages/routerpage2', + params: { + data1: 'message', + data2: { + data3: [123, 456, 789] + } } - } -}) - .then(() => { - // success - }) - .catch(err => { - console.error(`pushUrl failed, code is ${err.code}, message is ${err.message}`); }) +} catch (err) { + console.error(`pushUrl failed, code is ${err.code}, message is ${err.message}`); +} ``` ### pushUrl -pushUrl(options: RouterOptions, callback: AsyncCallback<void>): void +pushUrl(options: router.RouterOptions, callback: AsyncCallback<void>): void Navigates to a specified page in the application. @@ -690,7 +748,7 @@ Navigates to a specified page in the application. | Name | Type | Mandatory | Description | | ------- | ------------------------------- | ---- | --------- | -| options | [RouterOptions](js-apis-router.md#routeroptions) | Yes | Page routing parameters.| +| options | [router.RouterOptions](js-apis-router.md#routeroptions) | Yes | Page routing parameters.| | callback | AsyncCallback<void> | Yes | Callback used to return the result. | **Error codes** @@ -726,7 +784,7 @@ router.pushUrl({ ### pushUrl -pushUrl(options: RouterOptions, mode: RouterMode): Promise<void> +pushUrl(options: router.RouterOptions, mode: router.RouterMode): Promise<void> Navigates to a specified page in the application. @@ -734,10 +792,10 @@ Navigates to a specified page in the application. **Parameters** -| Name | Type | Mandatory | Description | -| ------- | ------------------------------- | ---- | ---------- | -| options | [RouterOptions](js-apis-router.md#routeroptions) | Yes | Page routing parameters. | -| mode | [RouterMode](js-apis-router.md#routermode9) | Yes | Routing mode.| +| Name | Type | Mandatory| Description | +| ------- | ------------------------------------------------------- | ---- | -------------------- | +| options | [router.RouterOptions](js-apis-router.md#routeroptions) | Yes | Page routing parameters. | +| mode | [router.RouterMode](js-apis-router.md#routermode9) | Yes | Routing mode.| **Return value** @@ -759,26 +817,24 @@ For details about the error codes, see [Router Error Codes](../errorcodes/errorc ```ts let router = uiContext.getRouter(); -router.pushUrl({ - url: 'pages/routerpage2', - params: { - data1: 'message', - data2: { - data3: [123, 456, 789] +try { + router.pushUrl({ + url: 'pages/routerpage2', + params: { + data1: 'message', + data2: { + data3: [123, 456, 789] + } } - } -}, router.RouterMode.Standard) - .then(() => { - // success - }) - .catch(err => { - console.error(`pushUrl failed, code is ${err.code}, message is ${err.message}`); - }) + }, router.RouterMode.Standard) +} catch (err) { + console.error(`pushUrl failed, code is ${err.code}, message is ${err.message}`); +} ``` ### pushUrl -pushUrl(options: RouterOptions, mode: RouterMode, callback: AsyncCallback<void>): void +pushUrl(options: router.RouterOptions, mode: router.RouterMode, callback: AsyncCallback<void>): void Navigates to a specified page in the application. @@ -788,8 +844,8 @@ Navigates to a specified page in the application. | Name | Type | Mandatory | Description | | ------- | ------------------------------- | ---- | ---------- | -| options | [RouterOptions](js-apis-router.md#routeroptions) | Yes | Page routing parameters. | -| mode | [RouterMode](js-apis-router.md#routermode9) | Yes | Routing mode.| +| options | [router.RouterOptions](js-apis-router.md#routeroptions) | Yes | Page routing parameters. | +| mode | [router.RouterMode](js-apis-router.md#routermode9) | Yes | Routing mode.| | callback | AsyncCallback<void> | Yes | Callback used to return the result. | **Error codes** @@ -825,17 +881,17 @@ router.pushUrl({ ### replaceUrl -replaceUrl(options: RouterOptions): Promise<void> +replaceUrl(options: router.RouterOptions): Promise<void> Replaces the current page with another one in the application and destroys the current page. -**System capability**: SystemCapability.ArkUI.ArkUI.Lite +**System capability**: SystemCapability.ArkUI.ArkUI.Full **Parameters** -| Name | Type | Mandatory| Description | -| ------- | ------------------------------- | ---- | ------------------ | -| options | [RouterOptions](js-apis-router.md#routeroptions) | Yes | Description of the new page.| +| Name | Type | Mandatory| Description | +| ------- | ------------------------------------------------------- | ---- | ------------------ | +| options | [router.RouterOptions](js-apis-router.md#routeroptions) | Yes | Description of the new page.| **Return value** @@ -856,33 +912,31 @@ For details about the error codes, see [Router Error Codes](../errorcodes/errorc ```ts let router = uiContext.getRouter(); -router.replaceUrl({ - url: 'pages/detail', - params: { - data1: 'message' - } -}) - .then(() => { - // success - }) - .catch(err => { - console.error(`replaceUrl failed, code is ${err.code}, message is ${err.message}`); +try { + router.replaceUrl({ + url: 'pages/detail', + params: { + data1: 'message' + } }) +} catch (err) { + console.error(`replaceUrl failed, code is ${err.code}, message is ${err.message}`); +} ``` ### replaceUrl -replaceUrl(options: RouterOptions, callback: AsyncCallback<void>): void +replaceUrl(options: router.RouterOptions, callback: AsyncCallback<void>): void Replaces the current page with another one in the application and destroys the current page. -**System capability**: SystemCapability.ArkUI.ArkUI.Lite +**System capability**: SystemCapability.ArkUI.ArkUI.Full **Parameters** | Name | Type | Mandatory| Description | | ------- | ------------------------------- | ---- | ------------------ | -| options | [RouterOptions](js-apis-router.md#routeroptions) | Yes | Description of the new page.| +| options | [router.RouterOptions](js-apis-router.md#routeroptions) | Yes | Description of the new page.| | callback | AsyncCallback<void> | Yes | Callback used to return the result. | **Error codes** @@ -914,18 +968,18 @@ router.replaceUrl({ ### replaceUrl -replaceUrl(options: RouterOptions, mode: RouterMode): Promise<void> +replaceUrl(options: router.RouterOptions, mode: router.RouterMode): Promise<void> Replaces the current page with another one in the application and destroys the current page. -**System capability**: SystemCapability.ArkUI.ArkUI.Lite +**System capability**: SystemCapability.ArkUI.ArkUI.Full **Parameters** -| Name | Type | Mandatory | Description | -| ------- | ------------------------------- | ---- | ---------- | -| options | [RouterOptions](js-apis-router.md#routeroptions) | Yes | Description of the new page. | -| mode | [RouterMode](js-apis-router.md#routermode9) | Yes | Routing mode.| +| Name | Type | Mandatory| Description | +| ------- | ------------------------------------------------------- | ---- | -------------------- | +| options | [router.RouterOptions](js-apis-router.md#routeroptions) | Yes | Description of the new page. | +| mode | [router.RouterMode](js-apis-router.md#routermode9) | Yes | Routing mode.| **Return value** @@ -946,34 +1000,32 @@ For details about the error codes, see [Router Error Codes](../errorcodes/errorc ```ts let router = uiContext.getRouter(); -router.replaceUrl({ - url: 'pages/detail', - params: { - data1: 'message' - } -}, router.RouterMode.Standard) - .then(() => { - // success - }) - .catch(err => { - console.error(`replaceUrl failed, code is ${err.code}, message is ${err.message}`); - }) +try { + router.replaceUrl({ + url: 'pages/detail', + params: { + data1: 'message' + } + }, router.RouterMode.Standard) +} catch (err) { + console.error(`replaceUrl failed, code is ${err.code}, message is ${err.message}`); +} ``` ### replaceUrl -replaceUrl(options: RouterOptions, mode: RouterMode, callback: AsyncCallback<void>): void +replaceUrl(options: router.RouterOptions, mode: router.RouterMode, callback: AsyncCallback<void>): void Replaces the current page with another one in the application and destroys the current page. -**System capability**: SystemCapability.ArkUI.ArkUI.Lite +**System capability**: SystemCapability.ArkUI.ArkUI.Full **Parameters** | Name | Type | Mandatory | Description | | ------- | ------------------------------- | ---- | ---------- | -| options | [RouterOptions](js-apis-router.md#routeroptions) | Yes | Description of the new page. | -| mode | [RouterMode](js-apis-router.md#routermode9) | Yes | Routing mode.| +| options | [router.RouterOptions](js-apis-router.md#routeroptions) | Yes | Description of the new page. | +| mode | [router.RouterMode](js-apis-router.md#routermode9) | Yes | Routing mode.| | callback | AsyncCallback<void> | Yes | Callback used to return the result. | **Error codes** @@ -1005,7 +1057,7 @@ router.replaceUrl({ ### pushNamedRoute -pushNamedRoute(options: NamedRouterOptions): Promise<void> +pushNamedRoute(options: router.NamedRouterOptions): Promise<void> Navigates to a page using the named route. This API uses a promise to return the result. @@ -1013,9 +1065,9 @@ Navigates to a page using the named route. This API uses a promise to return the **Parameters** -| Name | Type | Mandatory | Description | -| ------- | ------------------------------- | ---- | --------- | -| options | [NamedRouterOptions](js-apis-router.md#namedrouteroptions10) | Yes | Page routing parameters.| +| Name | Type | Mandatory| Description | +| ------- | ------------------------------------------------------------ | ---- | ------------------ | +| options | [router.NamedRouterOptions](js-apis-router.md#namedrouteroptions10) | Yes | Page routing parameters.| **Return value** @@ -1037,28 +1089,26 @@ For details about the error codes, see [Router Error Codes](../errorcodes/errorc ```ts let router = uiContext.getRouter(); -router.pushNamedRoute({ - name: 'myPage', - params: { - data1: 'message', - data2: { - data3: [123, 456, 789] +try { + router.pushNamedRoute({ + name: 'myPage', + params: { + data1: 'message', + data2: { + data3: [123, 456, 789] + } } - } -}) - .then(() => { - // success - }) - .catch(err => { - console.error(`pushNamedRoute failed, code is ${err.code}, message is ${err.message}`); }) +} catch (err) { + console.error(`pushNamedRoute failed, code is ${err.code}, message is ${err.message}`); +} ``` ### pushNamedRoute -pushNamedRoute(options: NamedRouterOptions, callback: AsyncCallback<void>): void +pushNamedRoute(options: router.NamedRouterOptions, callback: AsyncCallback<void>): void -Navigates to a page using the named route. This API uses an asynchronous callback to return the result. +Navigates to a page using the named route. This API uses a promise to return the result. **System capability**: SystemCapability.ArkUI.ArkUI.Full @@ -1066,7 +1116,7 @@ Navigates to a page using the named route. This API uses an asynchronous callbac | Name | Type | Mandatory | Description | | ------- | ------------------------------- | ---- | --------- | -| options | [NamedRouterOptions](js-apis-router.md#namedrouteroptions10) | Yes | Page routing parameters.| +| options | [router.NamedRouterOptions](js-apis-router.md#namedrouteroptions10) | Yes | Page routing parameters.| | callback | AsyncCallback<void> | Yes | Callback used to return the result. | **Error codes** @@ -1101,7 +1151,7 @@ router.pushNamedRoute({ ``` ### pushNamedRoute -pushNamedRoute(options: NamedRouterOptions, mode: RouterMode): Promise<void> +pushNamedRoute(options: router.NamedRouterOptions, mode: router.RouterMode): Promise<void> Navigates to a page using the named route. This API uses a promise to return the result. @@ -1109,10 +1159,10 @@ Navigates to a page using the named route. This API uses a promise to return the **Parameters** -| Name | Type | Mandatory | Description | -| ------- | ------------------------------- | ---- | ---------- | -| options | [NamedRouterOptions](js-apis-router.md#namedrouteroptions10) | Yes | Page routing parameters. | -| mode | [RouterMode](js-apis-router.md#routermode9) | Yes | Routing mode.| +| Name | Type | Mandatory| Description | +| ------- | ------------------------------------------------------------ | ---- | -------------------- | +| options | [router.NamedRouterOptions](js-apis-router.md#namedrouteroptions10) | Yes | Page routing parameters. | +| mode | [router.RouterMode](js-apis-router.md#routermode9) | Yes | Routing mode.| **Return value** @@ -1134,28 +1184,26 @@ For details about the error codes, see [Router Error Codes](../errorcodes/errorc ```ts let router = uiContext.getRouter(); -router.pushNamedRoute({ - name: 'myPage', - params: { - data1: 'message', - data2: { - data3: [123, 456, 789] +try { + router.pushNamedRoute({ + name: 'myPage', + params: { + data1: 'message', + data2: { + data3: [123, 456, 789] + } } - } -}, router.RouterMode.Standard) - .then(() => { - // success - }) - .catch(err => { - console.error(`pushNamedRoute failed, code is ${err.code}, message is ${err.message}`); - }) + }, router.RouterMode.Standard) +} catch (err) { + console.error(`pushNamedRoute failed, code is ${err.code}, message is ${err.message}`); +} ``` ### pushNamedRoute -pushNamedRoute(options: NamedRouterOptions, mode: RouterMode, callback: AsyncCallback<void>): void +pushNamedRoute(options: router.NamedRouterOptions, mode: RouterMode, callback: AsyncCallback<void>): void -Navigates to a page using the named route. This API uses an asynchronous callback to return the result. +Navigates to a page using the named route. This API uses a promise to return the result. **System capability**: SystemCapability.ArkUI.ArkUI.Full @@ -1163,8 +1211,8 @@ Navigates to a page using the named route. This API uses an asynchronous callbac | Name | Type | Mandatory | Description | | ------- | ------------------------------- | ---- | ---------- | -| options | [NamedRouterOptions](js-apis-router.md#namedrouteroptions10) | Yes | Page routing parameters. | -| mode | [RouterMode](js-apis-router.md#routermode9) | Yes | Routing mode.| +| options | [router.NamedRouterOptions](js-apis-router.md#namedrouteroptions10) | Yes | Page routing parameters. | +| mode | [router.RouterMode](js-apis-router.md#routermode9) | Yes | Routing mode.| | callback | AsyncCallback<void> | Yes | Callback used to return the result. | **Error codes** @@ -1200,7 +1248,7 @@ router.pushNamedRoute({ ### replaceNamedRoute -replaceNamedRoute(options: NamedRouterOptions): Promise<void> +replaceNamedRoute(options: router.NamedRouterOptions): Promise<void> Replaces the current page with another one using the named route and destroys the current page. This API uses a promise to return the result. @@ -1208,9 +1256,9 @@ Replaces the current page with another one using the named route and destroys th **Parameters** -| Name | Type | Mandatory| Description | -| ------- | ------------------------------- | ---- | ------------------ | -| options | [NamedRouterOptions](js-apis-router.md#namedrouteroptions10) | Yes | Description of the new page.| +| Name | Type | Mandatory| Description | +| ------- | ------------------------------------------------------------ | ---- | ------------------ | +| options | [router.NamedRouterOptions](js-apis-router.md#namedrouteroptions10) | Yes | Description of the new page.| **Return value** @@ -1224,32 +1272,30 @@ For details about the error codes, see [Router Error Codes](../errorcodes/errorc | ID | Error Message| | --------- | ------- | -| 100001 | if UI execution context not found. | +| 100001 | if UI execution context not found, only throw in standard system. | | 100004 | if the named route is not exist. | **Example** ```ts let router = uiContext.getRouter(); -router.replaceNamedRoute({ - name: 'myPage', - params: { - data1: 'message' - } -}) - .then(() => { - // success - }) - .catch(err => { - console.error(`replaceNamedRoute failed, code is ${err.code}, message is ${err.message}`); +try { + router.replaceNamedRoute({ + name: 'myPage', + params: { + data1: 'message' + } }) +} catch (err) { + console.error(`replaceNamedRoute failed, code is ${err.code}, message is ${err.message}`); +} ``` ### replaceNamedRoute -replaceNamedRoute(options: NamedRouterOptions, callback: AsyncCallback<void>): void +replaceNamedRoute(options: router.NamedRouterOptions, callback: AsyncCallback<void>): void -Replaces the current page with another one using the named route and destroys the current page. This API uses an asynchronous callback to return the result. +Replaces the current page with another one using the named route and destroys the current page. This API uses a promise to return the result. **System capability**: SystemCapability.ArkUI.ArkUI.Full @@ -1257,7 +1303,7 @@ Replaces the current page with another one using the named route and destroys th | Name | Type | Mandatory| Description | | ------- | ------------------------------- | ---- | ------------------ | -| options | [NamedRouterOptions](js-apis-router.md#namedrouteroptions10) | Yes | Description of the new page.| +| options | [router.NamedRouterOptions](js-apis-router.md#namedrouteroptions10) | Yes | Description of the new page.| | callback | AsyncCallback<void> | Yes | Callback used to return the result. | **Error codes** @@ -1266,7 +1312,7 @@ For details about the error codes, see [Router Error Codes](../errorcodes/errorc | ID | Error Message| | --------- | ------- | -| 100001 | if UI execution context not found. | +| 100001 | if UI execution context not found, only throw in standard system. | | 100004 | if the named route is not exist. | **Example** @@ -1289,7 +1335,7 @@ router.replaceNamedRoute({ ### replaceNamedRoute -replaceNamedRoute(options: NamedRouterOptions, mode: RouterMode): Promise<void> +replaceNamedRoute(options: router.NamedRouterOptions, mode: router.RouterMode): Promise<void> Replaces the current page with another one using the named route and destroys the current page. This API uses a promise to return the result. @@ -1297,10 +1343,10 @@ Replaces the current page with another one using the named route and destroys th **Parameters** -| Name | Type | Mandatory | Description | -| ------- | ------------------------------- | ---- | ---------- | -| options | [NamedRouterOptions](js-apis-router.md#namedrouteroptions10) | Yes | Description of the new page. | -| mode | [RouterMode](js-apis-router.md#routermode9) | Yes | Routing mode.| +| Name | Type | Mandatory| Description | +| ------- | ------------------------------------------------------------ | ---- | -------------------- | +| options | [router.NamedRouterOptions](js-apis-router.md#namedrouteroptions10) | Yes | Description of the new page. | +| mode | [router.RouterMode](js-apis-router.md#routermode9) | Yes | Routing mode.| **Return value** @@ -1315,32 +1361,30 @@ For details about the error codes, see [Router Error Codes](../errorcodes/errorc | ID | Error Message| | --------- | ------- | -| 100001 | if can not get the delegate. | +| 100001 | if UI execution context not found, only throw in standard system. | | 100004 | if the named route is not exist. | **Example** ```ts let router = uiContext.getRouter(); -router.replaceNamedRoute({ - name: 'myPage', - params: { - data1: 'message' - } -}, router.RouterMode.Standard) - .then(() => { - // success - }) - .catch(err => { - console.error(`replaceNamedRoute failed, code is ${err.code}, message is ${err.message}`); - }) +try { + router.replaceNamedRoute({ + name: 'myPage', + params: { + data1: 'message' + } + }, router.RouterMode.Standard) +} catch (err) { + console.error(`replaceNamedRoute failed, code is ${err.code}, message is ${err.message}`); +} ``` ### replaceNamedRoute -replaceNamedRoute(options: NamedRouterOptions, mode: RouterMode, callback: AsyncCallback<void>): void +replaceNamedRoute(options: router.NamedRouterOptions, mode: router.RouterMode, callback: AsyncCallback<void>): void -Replaces the current page with another one using the named route and destroys the current page. This API uses an asynchronous callback to return the result. +Replaces the current page with another one using the named route and destroys the current page. This API uses a promise to return the result. **System capability**: SystemCapability.ArkUI.ArkUI.Full @@ -1348,8 +1392,8 @@ Replaces the current page with another one using the named route and destroys th | Name | Type | Mandatory | Description | | ------- | ------------------------------- | ---- | ---------- | -| options | [NamedRouterOptions](js-apis-router.md#namedrouteroptions10) | Yes | Description of the new page. | -| mode | [RouterMode](js-apis-router.md#routermode9) | Yes | Routing mode.| +| options | [router.NamedRouterOptions](js-apis-router.md#namedrouteroptions10) | Yes | Description of the new page. | +| mode | [router.RouterMode](js-apis-router.md#routermode9) | Yes | Routing mode.| | callback | AsyncCallback<void> | Yes | Callback used to return the result. | **Error codes** @@ -1358,7 +1402,7 @@ For details about the error codes, see [Router Error Codes](../errorcodes/errorc | ID | Error Message| | --------- | ------- | -| 100001 | if UI execution context not found. | +| 100001 | if UI execution context not found, only throw in standard system. | | 100004 | if the named route is not exist. | **Example** @@ -1381,7 +1425,7 @@ router.replaceNamedRoute({ ### back -back(options?: RouterOptions ): void +back(options: router.RouterOptions ): void Returns to the previous page or a specified page. @@ -1389,9 +1433,9 @@ Returns to the previous page or a specified page. **Parameters** -| Name | Type | Mandatory| Description | -| ------- | ------------------------------- | ---- | ------------------------------------------------------------ | -| options | [RouterOptions](js-apis-router.md#routeroptions) | No | Description of the page. The **url** parameter indicates the URL of the page to return to. If the specified page does not exist in the page stack, the application does not respond. If no URL is set, the application returns to the previous page, and the page is not rebuilt. The page in the page stack is not reclaimed. It will be reclaimed after being popped up.| +| Name | Type | Mandatory| Description | +| ------- | ------------------------------------------------------- | ---- | ------------------------------------------------------------ | +| options | [router.RouterOptions](js-apis-router.md#routeroptions) | Yes | Description of the page. The **url** parameter indicates the URL of the page to return to. If the specified page does not exist in the page stack, the application does not respond. If no URL is set, the application returns to the previous page, and the page is not rebuilt. The page in the page stack is not reclaimed. It will be reclaimed after being popped up.| **Example** @@ -1439,7 +1483,7 @@ console.log('pages stack size = ' + size); ### getState -getState(): RouterState +getState(): router.RouterState Obtains state information about the current page. @@ -1463,7 +1507,7 @@ console.log('current path = ' + page.path); ### showAlertBeforeBackPage -showAlertBeforeBackPage(options: EnableAlertOptions): void +showAlertBeforeBackPage(options: router.EnableAlertOptions): void Enables the display of a confirm dialog box before returning to the previous page. @@ -1471,9 +1515,9 @@ Enables the display of a confirm dialog box before returning to the previous pag **Parameters** -| Name | Type | Mandatory | Description | -| ------- | ---------------------------------------- | ---- | --------- | -| options | [EnableAlertOptions](js-apis-router.md#enablealertoptions) | Yes | Description of the dialog box.| +| Name | Type | Mandatory| Description | +| ------- | ------------------------------------------------------------ | ---- | ------------------ | +| options | [router.EnableAlertOptions](js-apis-router.md#enablealertoptions) | Yes | Description of the dialog box.| **Error codes** @@ -1538,7 +1582,7 @@ In the following API examples, you must first use [getPromptAction()](#getprompt ### showToast -showToast(options: ShowToastOptions): void +showToast(options: promptAction.ShowToastOptions): void Shows a toast. @@ -1546,9 +1590,9 @@ Shows a toast. **Parameters** -| Name | Type | Mandatory | Description | -| ------- | ------------------------------------- | ---- | ------- | -| options | [ShowToastOptions](js-apis-promptAction.md#showtoastoptions) | Yes | Toast options.| +| Name | Type | Mandatory| Description | +| ------- | ------------------------------------------------------------ | ---- | -------------- | +| options | [promptAction.ShowToastOptions](js-apis-promptAction.md#showtoastoptions) | Yes | Toast options.| **Error codes** @@ -1574,7 +1618,7 @@ try { ### showDialog -showDialog(options: ShowDialogOptions, callback: AsyncCallback<ShowDialogSuccessResponse<): void +showDialog(options: promptAction.ShowDialogOptions, callback: AsyncCallback<promptAction.ShowDialogSuccessResponse<): void Shows a dialog box. This API uses an asynchronous callback to return the result. @@ -1582,10 +1626,10 @@ Shows a dialog box. This API uses an asynchronous callback to return the result. **Parameters** -| Name | Type | Mandatory | Description | -| -------- | ---------------------------------------- | ---- | ------------ | -| options | [ShowDialogOptions](js-apis-promptAction.md#showdialogoptions) | Yes | Dialog box options.| -| callback | AsyncCallback<[ShowDialogSuccessResponse](js-apis-promptAction.md#showdialogsuccessresponse)> | Yes | Callback used to return the dialog box response result. | +| Name | Type | Mandatory| Description | +| -------- | ------------------------------------------------------------ | ---- | ------------------------ | +| options | [promptAction.ShowDialogOptions](js-apis-promptAction.md#showdialogoptions) | Yes | Dialog box options.| +| callback | AsyncCallback<[promptAction.ShowDialogSuccessResponse](js-apis-promptAction.md#showdialogsuccessresponse)> | Yes | Callback used to return the dialog box response result. | **Error codes** @@ -1627,7 +1671,7 @@ try { ### showDialog -showDialog(options: ShowDialogOptions): Promise<ShowDialogSuccessResponse> +showDialog(options: promptAction.ShowDialogOptions): Promise<promptAction.ShowDialogSuccessResponse> Shows a dialog box. This API uses a promise to return the result synchronously. @@ -1635,15 +1679,15 @@ Shows a dialog box. This API uses a promise to return the result synchronously. **Parameters** -| Name | Type | Mandatory | Description | -| ------- | --------------------------------------- | ---- | ------ | -| options | [ShowDialogOptions](js-apis-promptAction.md#showdialogoptions) | Yes | Dialog box options.| +| Name | Type | Mandatory| Description | +| ------- | ------------------------------------------------------------ | ---- | ------------ | +| options | [promptAction.ShowDialogOptions](js-apis-promptAction.md#showdialogoptions) | Yes | Dialog box options.| **Return value** -| Type | Description | -| ---------------------------------------- | -------- | -| Promise<[ShowDialogSuccessResponse](js-apis-promptAction.md#showdialogsuccessresponse)> | Promise used to return the dialog box response result.| +| Type | Description | +| ------------------------------------------------------------ | ---------------- | +| Promise<[promptAction.ShowDialogSuccessResponse](js-apis-promptAction.md#showdialogsuccessresponse)> | Promise used to return the dialog box response result.| **Error codes** @@ -1685,7 +1729,7 @@ try { ### showActionMenu -showActionMenu(options: ActionMenuOptions, callback: AsyncCallback<ActionMenuSuccessResponse>):void +showActionMenu(options: promptAction.ActionMenuOptions, callback:promptAction.ActionMenuSuccessResponse):void Shows an action menu. This API uses an asynchronous callback to return the result. @@ -1693,10 +1737,10 @@ Shows an action menu. This API uses an asynchronous callback to return the resul **Parameters** -| Name | Type | Mandatory | Description | -| -------- | ---------------------------------------- | ---- | --------- | -| options | [ActionMenuOptions](js-apis-promptAction.md#actionmenuoptions) | Yes | Action menu options. | -| callback | AsyncCallback<[ActionMenuSuccessResponse](js-apis-promptAction.md#actionmenusuccessresponse)> | Yes | Callback used to return the action menu response result.| +| Name | Type | Mandatory| Description | +| -------- | ------------------------------------------------------------ | ---- | ------------------ | +| options | [promptAction.ActionMenuOptions](js-apis-promptAction.md#actionmenuoptions) | Yes | Action menu options. | +| callback | [promptAction.ActionMenuSuccessResponse](js-apis-promptAction.md#actionmenusuccessresponse) | Yes | Callback used to return the action menu response result.| **Error codes** @@ -1737,7 +1781,7 @@ try { ### showActionMenu -showActionMenu(options: ActionMenuOptions): Promise<ActionMenuSuccessResponse> +showActionMenu(options: promptAction.ActionMenuOptions): Promise<promptAction.ActionMenuSuccessResponse> Shows an action menu. This API uses a promise to return the result synchronously. @@ -1745,15 +1789,15 @@ Shows an action menu. This API uses a promise to return the result synchronously **Parameters** -| Name | Type | Mandatory | Description | -| ------- | --------------------------------------- | ---- | ------- | -| options | [ActionMenuOptions](js-apis-promptAction.md#actionmenuoptions) | Yes | Action menu options.| +| Name | Type | Mandatory| Description | +| ------- | ------------------------------------------------------------ | ---- | -------------- | +| options | [promptAction.ActionMenuOptions](js-apis-promptAction.md#actionmenuoptions) | Yes | Action menu options.| **Return value** -| Type | Description | -| ---------------------------------------- | ------- | -| Promise<[ActionMenuSuccessResponse](js-apis-promptAction.md#actionmenusuccessresponse)> | Promise used to return the action menu response result.| +| Type | Description | +| ------------------------------------------------------------ | -------------- | +| Promise<[promptAction.ActionMenuSuccessResponse](js-apis-promptAction.md#actionmenusuccessresponse)> | Promise used to return the action menu response result.| **Error codes** diff --git a/en/application-dev/reference/apis/js-apis-arkui-dragController.md b/en/application-dev/reference/apis/js-apis-arkui-dragController.md index 02d5d474c46a9d1e660bcb26efdd5de677123956..8c4292fc30bf74109f0d76728543b368f1e1ef4d 100644 --- a/en/application-dev/reference/apis/js-apis-arkui-dragController.md +++ b/en/application-dev/reference/apis/js-apis-arkui-dragController.md @@ -28,7 +28,7 @@ Initiates a drag action, with the object to be dragged and the drag information | Name | Type | Mandatory| Description | | -------- | ------------------------------------------------------------ | ---- | -------------------------------- | | custom | [CustomBuilder](../arkui-ts/ts-types.md#custombuilder8) \| [DragItemInfo](../arkui-ts/ts-universal-events-drag-drop.md#dragiteminfo) | Yes | Object to be dragged.| -| dragInfo | [DragInfo](#draginfo) | Yes | Drag information. | +| dragInfo | [DragInfo](#draginfo) | Yes | Drag information. | | callback | AsyncCallback<{event: [DragEvent](../arkui-ts/ts-universal-events-drag-drop.md#dragevent), extraParams: string}> | Yes | Callback used to return the result. | **Example** @@ -89,7 +89,7 @@ Initiates a drag action, with the object to be dragged and the drag information | Name | Type | Mandatory| Description | | -------- | ------------------------------------------------------------ | ---- | -------------------------------- | | custom | [CustomBuilder](../arkui-ts/ts-types.md#custombuilder8) \| [DragItemInfo](../arkui-ts/ts-universal-events-drag-drop.md#dragiteminfo) | Yes | Object to be dragged.| -| dragInfo | [DragInfo](#draginfo) | Yes | Drag information. | +| dragInfo | [DragInfo](#draginfo) | Yes | Drag information. | **Return value** @@ -171,6 +171,8 @@ struct DragControllerPage { ## DragInfo +**System capability**: SystemCapability.ArkUI.ArkUI.Full + Defines the attributes required for initiating a drag action and information carried in the dragging process. | Name | Type | Mandatory| Description | diff --git a/en/application-dev/reference/apis/js-apis-arkui-drawableDescriptor.md b/en/application-dev/reference/apis/js-apis-arkui-drawableDescriptor.md index 25a6deb575728408b625e3c4f32aadfa05ffe960..60a21b51554ccf04399842de7a6272e03fdbd2a5 100644 --- a/en/application-dev/reference/apis/js-apis-arkui-drawableDescriptor.md +++ b/en/application-dev/reference/apis/js-apis-arkui-drawableDescriptor.md @@ -57,7 +57,7 @@ struct Index { Row() { Column() { Image(( (this.resManager.getDrawableDescriptor($r('app.media.icon').id)))) - Image((( (this.resManager.getDrawableDescriptor($r('app.media.drawable') + Image((( (this.resManager.getDrawableDescriptor($r('app.media.icon') .id))).getForeground()).getPixelMap()) }.height('50%') }.width('50%') @@ -80,7 +80,8 @@ Obtains this **pixelMap** object. **Example** ```ts -pixmap: PixelMap = ( (this.resManager.getDrawableDescriptor($r('app.media.icon') +let resManager = getContext().resourceManager +let pixmap: PixelMap = ( (resManager.getDrawableDescriptor($r('app.media.icon') .id))).getPixelMap(); ``` @@ -99,7 +100,8 @@ Obtains the **pixelMap** object where the foreground, background, and mask are b **Example** ```ts -pixmap: PixelMap = ( (this.resManager.getDrawableDescriptor($r('app.media.drawable') +let resManager = getContext().resourceManager +let pixmap: PixelMap = ( (resManager.getDrawableDescriptor($r('app.media.icon') .id))).getPixelMap(); ``` @@ -118,7 +120,8 @@ Obtains the **DrawableDescriptor** object of the foreground. **Example** ```ts -drawable: DrawableDescriptor = ( (this.resManager.getDrawableDescriptor($r('app.media.drawable') +let resManager = getContext().resourceManager +let drawable: DrawableDescriptor = ( (resManager.getDrawableDescriptor($r('app.media.icon') .id))).getForeground(); ``` @@ -137,7 +140,8 @@ Obtains the **DrawableDescriptor** object of the background. **Example** ```ts -drawable: DrawableDescriptor = ( (this.resManager.getDrawableDescriptor($r('app.media.drawable') +let resManager = getContext().resourceManager +drawable: DrawableDescriptor = ( (resManager.getDrawableDescriptor($r('app.media.icon') .id))).getBackground(); ``` @@ -156,6 +160,26 @@ Obtains the **DrawableDescriptor** object of the mask. **Example** ```ts -drawable: DrawableDescriptor = ( (this.resManager.getDrawableDescriptor($r('app.media.drawable') +let resManager = getContext().resourceManager +let drawable: DrawableDescriptor = ( (resManager.getDrawableDescriptor($r('app.media.icon') .id))).getMask(); ``` +## LayeredDrawableDescriptor.getMaskClipPath +static getMaskClipPath(): string + +Obtains the built-in clipping path parameters of the system. It is a static method of **LayeredDrawableDescriptor**. + +**System capability**: SystemCapability.ArkUI.ArkUI.Full + +**Return value** + +| Type | Description | +| ---------------------------------------- | -------------------- | +| string | String of the clipping path.| + +**Example** + ```ts +Image($r('app.media.icon')) + .width('200px').height('200px') + .clip(new Path({commands:LayeredDrawableDescriptor.getMaskClipPath()})) + ``` diff --git a/en/application-dev/reference/apis/js-apis-arkui-inspector.md b/en/application-dev/reference/apis/js-apis-arkui-inspector.md index d3e423708846036003ffba310f715241a024cb22..95f38d3807061db0f420a352e895f1ba9759b3e1 100644 --- a/en/application-dev/reference/apis/js-apis-arkui-inspector.md +++ b/en/application-dev/reference/apis/js-apis-arkui-inspector.md @@ -48,7 +48,7 @@ Implements a component observer for completion of component layout and drawing, on(type: 'layout', callback: () => void): void -Registers a listener for completion of component layout or drawing. +Registers a listener for completion of component layout. **System capability**: SystemCapability.ArkUI.ArkUI.Full @@ -63,7 +63,7 @@ Registers a listener for completion of component layout or drawing. off(type: 'layout', callback?: () => void): void -Unregisters the listener for completion of component layout or drawing. +Unregisters the listener for completion of component layout. **System capability**: SystemCapability.ArkUI.ArkUI.Full @@ -74,6 +74,36 @@ Unregisters the listener for completion of component layout or drawing. | type | string | Yes | Type of the listener. The value must be **'layout'** or **'draw'**.
**'layout'**: completion of component layout.
**'draw'**: completion of component drawing.| | callback | void | No | Callback to unregister. If this parameter is not specified, all callbacks of the specified type are unregistered.| +### on + +on(type: 'draw', callback: () => void): void + +Registers a listener for completion of component drawing. + +**System capability**: SystemCapability.ArkUI.ArkUI.Full + +**Parameters** + +| Name | Type | Mandatory| Description | +| -------- | ------ | ---- | ------------------------------------------------------------ | +| type | string | Yes | Type of the listener. The value must be **'layout'** or **'draw'**.
**'layout'**: completion of component layout.
**'draw'**: completion of component drawing.| +| callback | void | Yes | Callback invoked upon completion of component layout or drawing. | + +### off + +off(type: 'draw', callback?: () => void): void + +Unregisters the listener for completion of component drawing. + +**System capability**: SystemCapability.ArkUI.ArkUI.Full + +**Parameters** + +| Name | Type | Mandatory| Description | +| -------- | ------ | ---- | ------------------------------------------------------------ | +| type | string | Yes | Type of the listener. The value must be **'layout'** or **'draw'**.
**'layout'**: completion of component layout.
**'draw'**: completion of component drawing.| +| callback | void | No | Callback to unregister. If this parameter is not specified, all callbacks of the specified type are unregistered.| + **Example** ```ts diff --git a/en/application-dev/reference/apis/js-apis-curve.md b/en/application-dev/reference/apis/js-apis-curve.md index c09e42bbe96a4dca2c0e5c336fa393ee71423894..235f7014246488fcc9a4b6d936a4e5bf16faf52e 100644 --- a/en/application-dev/reference/apis/js-apis-curve.md +++ b/en/application-dev/reference/apis/js-apis-curve.md @@ -41,7 +41,7 @@ Since API version 9, this API is supported in ArkTS widgets. **System capability**: SystemCapability.ArkUI.ArkUI.Full -| Name | Description: | +| Name | Description | | ------------------- | ------------------------------------------------------------ | | Linear | The animation speed keeps unchanged. | | Ease | The animation starts slowly, accelerates, and then slows down towards the end. The cubic-bezier curve (0.25, 0.1, 0.25, 1.0) is used.| @@ -279,10 +279,10 @@ Creates a custom curve. ```ts import Curves from '@ohos.curves' -interpolate(fraction) { - return Math.sqrt(fraction); +let interpolate = function(fraction) { + return Math.sqrt(fraction) } -private curve = Curves.customCurve(this.interpolate) // Create a custom curve. +let curve = Curves.customCurve(interpolate) // Create a custom interpolation curve. ``` diff --git a/en/application-dev/reference/apis/js-apis-matrix4.md b/en/application-dev/reference/apis/js-apis-matrix4.md index e2de4ddcedf439f08598e5aa6b7eaca294fb936c..67864b311bd4fbf30b87e17abb84db12e24889be 100644 --- a/en/application-dev/reference/apis/js-apis-matrix4.md +++ b/en/application-dev/reference/apis/js-apis-matrix4.md @@ -27,7 +27,7 @@ Matrix constructor, which is used to create a 4 x 4 matrix by using the input pa | Name| Type | Mandatory| Description | | ------ | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ | -| option | [number,number,number,number,number,number,number,number,number,number,number,number,number,number,number,number] | Yes | A number array whose length is 16 (4 x 4). For details, see **Description of a 4 x 4 matrix**.
Default value:
[1, 0, 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1] | +| option | [number,number,number,number,
number,number,number,number,
number,number,number,number,
number,number,number,number] | Yes | A number array whose length is 16 (4 x 4). For details, see **Description of a 4 x 4 matrix**.
Default value:
[1, 0, 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1] | **Return value** @@ -170,6 +170,132 @@ struct Test { ![en-us_image_0000001219744181](figures/en-us_image_0000001219744181.png) +## matrix4.invert(deprecated) + +invert(): Matrix4Transit + +Inverts this matrix object. + +This API is deprecated since API version 10. + +**System capability**: SystemCapability.ArkUI.ArkUI.Full + +**Return value** + +| Type | Description | +| --------------------------------- | ---------------------- | +| [Matrix4Transit](#matrix4transit) | Inverse matrix object of the current matrix.| + +## matrix4.combine(deprecated) + +combine(options: Matrix4Transit): Matrix4Transit + +Combines the effects of two matrices to generate a new matrix object. + +This API is deprecated since API version 10. + +**System capability**: SystemCapability.ArkUI.ArkUI.Full + +**Parameters** + +| Name| Type | Mandatory| Description | +| ------ | --------------------------------- | ---- | ------------------ | +| option | [Matrix4Transit](#matrix4transit) | Yes | Matrix object to be combined.| + +**Return value** + +| Type | Description | +| --------------------------------- | ---------------------- | +| [Matrix4Transit](#matrix4transit) | Inverse matrix object of the current matrix.| + +## matrix4.translate(deprecated) + +translate(options: TranslateOption): Matrix4Transit + +Translates this matrix object along the x, y, and z axes. + +This API is deprecated since API version 10. + +**System capability**: SystemCapability.ArkUI.ArkUI.Full + +**Parameters** + +| Name| Type | Mandatory| Description | +| ------ | ----------------------------------- | ---- | -------------- | +| option | [TranslateOption](#translateoption) | Yes | Translation configuration.| + +**Return value** + +| Type | Description | +| --------------------------------- | ---------------------- | +| [Matrix4Transit](#matrix4transit) | Inverse matrix object of the current matrix.| + +## matrix4.scale(deprecated) + +scale(options: ScaleOption): Matrix4Transit + +Scales this matrix object along the x, y, and z axes. + +This API is deprecated since API version 10. + +**System capability**: SystemCapability.ArkUI.ArkUI.Full + +**Parameters** + +| Name| Type | Mandatory| Description | +| ------ | --------------------------- | ---- | -------------- | +| option | [ScaleOption](#scaleoption) | Yes | Scaling configuration.| + +**Return value** + +| Type | Description | +| --------------------------------- | ---------------------- | +| [Matrix4Transit](#matrix4transit) | Inverse matrix object of the current matrix.| + +## matrix4.rotate(deprecated) + +rotate(options: RotateOption): Matrix4Transit + +Rotates this matrix object along the x, y, and z axes. + +This API is deprecated since API version 10. + +**System capability**: SystemCapability.ArkUI.ArkUI.Full + +**Parameters** + +| Name| Type | Mandatory| Description | +| ------ | ----------------------------- | ---- | -------------- | +| option | [RotateOption](#rotateoption) | Yes | Rotation configuration.| + +**Return value** + +| Type | Description | +| --------------------------------- | ---------------------- | +| [Matrix4Transit](#matrix4transit) | Inverse matrix object of the current matrix.| + +## matrix4.transformPoint(deprecated) + +transformPoint(options: [number, number]): [number, number] + +Applies the current transformation effect to a coordinate point. + +This API is deprecated since API version 10. + +**System capability**: SystemCapability.ArkUI.ArkUI.Full + +**Parameters** + +| Name| Type | Mandatory| Description | +| ------ | ---------------- | ---- | ------------------ | +| option | [number, number] | Yes | Point to be transformed.| + +**Return value** + +| Type | Description | +| ---------------- | --------------------------- | +| [number, number] | Point object after matrix transformation| + ## Matrix4Transit @@ -330,7 +456,6 @@ Scales this matrix object along the x, y, and z axes. | ------ | --------------------------- | ---- | -------------- | | option | [ScaleOption](#scaleoption) | Yes | Scaling configuration.| - **Return value** | Type | Description | @@ -375,7 +500,6 @@ Rotates this matrix object along the x, y, and z axes. | ------ | ----------------------------- | ---- | -------------- | | option | [RotateOption](#rotateoption) | Yes | Rotation configuration.| - **Return value** | Type | Description | diff --git a/en/application-dev/reference/arkui-ts/figures/tabContent3.gif b/en/application-dev/reference/arkui-ts/figures/tabContent3.gif new file mode 100644 index 0000000000000000000000000000000000000000..2cb1d18f9c8f726cc02a7709ad07d641016cae61 Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/tabContent3.gif differ diff --git a/en/device-dev/device-test/xdevice.md b/en/device-dev/device-test/xdevice.md index dd65022b37a1397978e714f0d90c425aafa50bc3..22f16b1de3ed9031d1285c21e225ddeb4545bb6f 100644 --- a/en/device-dev/device-test/xdevice.md +++ b/en/device-dev/device-test/xdevice.md @@ -46,7 +46,7 @@ The environment configuration is as follows: - + @@ -63,7 +63,7 @@ The environment configuration is as follows: - + @@ -75,7 +75,7 @@ The environment configuration is as follows: - + @@ -383,7 +383,7 @@ Check whether xDevice runs properly. If the AT command serial port is the same as the log output serial port, the serial ports can be set to the same port. That is, in the **user_config** file, the COM port whose **type** is **cmd** and the COM port whose **type** is **deploy** can be set to the same port, for example, **COM18**. - ![L0-1](figures/L0-1.PNG) + ![Mini-system-device-1](figures/L0-1.PNG) The following is an example of the modified **user_config.xml** file: @@ -476,7 +476,7 @@ Check whether xDevice runs properly. The COM port whose **type** is **cmd** corresponds to the AT command serial port on the board. The port is used to send commands to the device. In the example, the **ChA(COM20)** serial port is used. - ![L0-1](figures/L0-1.PNG) + ![small-system-device-1](figures/L0-1.PNG) IP camera devices have two connection modes. One is to connect through the local serial port, and the other is to connect through the IP address of the local area network. diff --git a/en/device-dev/driver/driver-peripherals-light-des.md b/en/device-dev/driver/driver-peripherals-light-des.md index 0127fc711c1518d26cd8e673ea09e2d210f1390d..06566c755efa5979991c43b504eff0c67625ebf4 100644 --- a/en/device-dev/driver/driver-peripherals-light-des.md +++ b/en/device-dev/driver/driver-peripherals-light-des.md @@ -34,7 +34,7 @@ The following describes how to start and run the light module driver on an RK356 ### When to Use -Light control is widely used in daily life. For example, a light is blinking when a mobile phone receives an SMS message or has low battery level, and a light changes its colors based on the device charging status. These actions are implemented by calling the APIs provided by the light driver model. +Light control is widely used in daily life. For example, a light is blinking when a mobile device receives an SMS message or has low battery level, and a light changes its colors based on the device charging status. These actions are implemented by calling the APIs provided by the light driver model. ### Available APIs diff --git a/en/device-dev/guide/device-camera-visual-prepare.md b/en/device-dev/guide/device-camera-visual-prepare.md index 8814d28e5f876916017579e2dcdcfc1e51ec747e..26d7fdac1f74b79cafae701a36bdf23f5c353887 100644 --- a/en/device-dev/guide/device-camera-visual-prepare.md +++ b/en/device-dev/guide/device-camera-visual-prepare.md @@ -1,24 +1,21 @@ -# Preparations +# Preparations -## Setting Up the Development Environment +## Setting Up the Development Environment -Download and install DevEco Studio. For details, see the [HUAWEI DevEco Studio User Guide](https://developer.harmonyos.com/en/docs/documentation/doc-guides/software_install-0000001053582415). +Download and configure DevEco Studio. For details, see [DevEco Studio User Guide](https://developer.harmonyos.com/en/docs/documentation/doc-guides/software_install-0000001053582415). -## Creating a Project +## Creating a Project -1. Open the project wizard using either of the following methods: - - If no project is open, select **Create HarmonyOS Project** on the welcome page. - - If a project is already open, go to **File** \> **New** \> **New Project** on the menu bar. +1. Open the DevEco Studio project wizard using either of the following methods: + - If no project is open, select **Create Project** on the welcome page. + - If a project is already open, choose **File** \> **New** \> **Create Project** on the menu bar. -2. Choose the **Smart Vision** for **Device** and **Empty Feature Ability** for **Template**. +2. Select the **Empty Ability** template under **Application** and click **Next**. ![](figures/empty-feature-ability.png) -3. Click **Next** and configure the project. - - **Project Name**: project name. - - **Package Name**: software package name. By default, this name will also be used as your application ID. Your application must have a unique ID to be released. - - **Save Location**: path for storing project files. The path cannot contain Chinese characters or spaces. - - **Compatible API Version**: compatible API version of the SDK. - -4. Click **Finish**. DevEco Studio will automatically generate the sample code and resources that match your project type. Wait until the project is created. - +3. Enter project information by retaining the default values, and click **Finish**. + + For details about the parameters, see [DevEco Studio User Guide](https://developer.harmonyos.com/en/docs/documentation/doc-guides-V3/create_new_project-0000001053342414-V3). + + After the project is created, DevEco Studio automatically starts project synchronization. diff --git a/en/device-dev/porting/porting-smallchip-driver-plat.md b/en/device-dev/porting/porting-smallchip-driver-plat.md index 9ef20588cf56693f750fe06155c891aa8809929d..2d444c8d3de7d6b9766d218e886f4b15e7a9c9c1 100644 --- a/en/device-dev/porting/porting-smallchip-driver-plat.md +++ b/en/device-dev/porting/porting-smallchip-driver-plat.md @@ -1,6 +1,8 @@ -# Platform Driver Porting +# Platform Driver Porting + + +Create a platform driver in the source code directory **//device/vendor_name/soc_name/drivers**. If there is no repository for the vendor of your SoC, contact the [device SIG](https://gitee.com/openharmony/community/blob/master/sig/sig_devboard/sig_devboard.md) to create one. -Create a platform driver in the source code directory **//device/vendor\_name/soc\_name/drivers**. If there is no repository for the vendor of your SoC, contact the [device SIG](https://gitee.com/openharmony/community/blob/master/sig/sig_devboard/sig_devboard.md) to create one. The recommended directory structure is as follows: @@ -29,137 +31,141 @@ device │ ├── board_name ``` -The HDF creates driver models for all platform drivers. The main task of porting platform drivers is to inject instances into the models. You can find the definitions of these models in the source code directory **//drivers/framework/support/platform/include**. +The HDF creates driver models for all platform drivers. The main task of porting platform drivers is to inject instances into the models. You can find the definitions of these models in the source code directory **//drivers/hdf_core/framework/support/platform/include**. -The following uses the GPIO as an example to describe how to port the platform driver: -1. Create a GPIO driver. - - Create the **soc\_name\_gpio.c** file in the source code directory **//device/vendor\_name/soc\_name/drivers/gpio**. The sample code is as follows: - - ``` - #include "gpio_core.h" - - // Define the GPIO structure if necessary. - struct SocNameGpioCntlr { - struct GpioCntlr cntlr; // Structure required by the HDF GPIO driver framework. - int myData; // The following information is required by the current driver. - }; - - // The Bind method is mainly used to release services in the HDF driver. As this method is not needed here, simply return a success message. - static int32_t GpioBind(struct HdfDeviceObject *device) - { - (void)device; - return HDF_SUCCESS; - } - - // Entry for initializing the driver when the Init method is used. You need to register the model instance in the Init method. - static int32_t GpioInit(struct HdfDeviceObject *device) - { - SocNameGpioCntlr *impl = CreateGpio(); // Implement the CreateGpio method. - ret = GpioCntlrAdd(&impl->cntlr); // Register a GPIO model instance. - if (ret != HDF_SUCCESS) { - HDF_LOGE("%s: err add controller:%d", __func__, ret); - return ret; - } - return HDF_SUCCESS; - } - - // The Release method is called when the driver is uninstalled to reclaim resources. - static void GpioRelease(struct HdfDeviceObject *device) - { - // The GpioCntlrFromDevice method obtains the model instance registered in the init method from the abstract device object. - struct GpioCntlr *cntlr = GpioCntlrFromDevice(device); - // Release resources. - } - - struct HdfDriverEntry g_gpioDriverEntry = { - .moduleVersion = 1, - .Bind = GpioBind, - .Init = GpioInit, - .Release = GpioRelease, - .moduleName = "SOC_NAME_gpio_driver", // Name to be used in the configuration file to load the driver. - }; - HDF_INIT(g_gpioDriverEntry); // Register a GPIO driver entry. - ``` - -2. Create a build entry for the vendor driver. - - As described above, **device/vendor\_name/drivers/lite.mk** is the entry for building vendor drivers. We need to start building from this entry. - - ``` - # File: device/vendor_name/drivers/lite.mk - - SOC_VENDOR_NAME := $(subst $/",,$(LOSCFG_DEVICE_COMPANY)) - SOC_NAME := $(subst $/",,$(LOSCFG_PLATFORM)) - BOARD_NAME := $(subst $/",,$(LOSCFG_PRODUCT_NAME)) - - # Specify the SoC for building. - LIB_SUBDIRS += $(LITEOSTOPDIR)/../../device/$(SOC_VENDOR_NAME)/$(SOC_NAME)/drivers/ - ``` - -3. Create a build entry for the SoC driver. - - ``` - # File: device/vendor_name/soc_name/drivers/lite.mk - - SOC_DRIVER_ROOT := $(LITEOSTOPDIR)/../../device/$(SOC_VENDOR_NAME)/$(SOC_NAME)/drivers/ - - # Check whether the kernel compilation switch of the GPIO is enabled. - ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_GPIO), y) - # After the construction is complete, an object named hdf_gpio needs to be linked. - LITEOS_BASELIB += -lhdf_gpio - # Add the build directory gpio. - LIB_SUBDIRS += $(SOC_DRIVER_ROOT)/gpio - endif - - # Add other drivers here. - ``` - -4. Create a build entry for the GPIO driver. - - ``` - include $(LITEOSTOPDIR)/config.mk - include $(LITEOSTOPDIR)/../../drivers/adapter/khdf/liteos/lite.mk - - # Specify the name of the output object. Ensure that the name is the same as LITEOS_BASELIB in the SoC driver build entry. - MODULE_NAME := hdf_gpio - - # Add the INCLUDE of the HDF framework. - LOCAL_CFLAGS += $(HDF_INCLUDE) - - # Specify the file to be compiled. - LOCAL_SRCS += soc_name_gpio.c - - # Build parameters - LOCAL_CFLAGS += -fstack-protector-strong -Wextra -Wall -Werror -fsigned-char -fno-strict-aliasing -fno-common - - include $(HDF_DRIVER) - ``` - -5. Configure the product loading driver. - - All device information of the product is defined in the source code file **//vendor/vendor\_name/product\_name/config/device\_info/device\_info.hcs**. - - Add the platform driver to the host of the platform. - - >![](../public_sys-resources/icon-note.gif) **NOTE:** - >The value of **moduleName** must be the same as that defined in the driver. - - ``` - root { - ... - platform :: host { - device_gpio :: device { - device0 :: deviceNode { - policy = 0; - priority = 10; - permission = 0644; - moduleName = "SOC_NAME_gpio_driver"; - } - } - } - } - ``` +The following uses the GPIO as an example to describe how to port the platform driver: +1. Create a GPIO driver. + + Create the **soc_name_gpio.c** file in the **//device/vendor_name/soc_name/drivers/gpio** directory. The sample code is as follows: + + ``` + #include "gpio_core.h" + + // Define the GPIO structure if necessary. + struct SocNameGpioCntlr { + struct GpioCntlr cntlr; // Structure required by the HDF GPIO driver framework. + int myData; // The following information is required by the current driver. + }; + + // The Bind method is mainly used to release services in the HDF driver. As this method is not needed here, simply return a success message. + static int32_t GpioBind(struct HdfDeviceObject *device) + { + (void)device; + return HDF_SUCCESS; + } + + // Entry for initializing the driver when the Init method is used. You need to register the model instance in the Init method. + static int32_t GpioInit(struct HdfDeviceObject *device) + { + SocNameGpioCntlr *impl = CreateGpio(); // Implement the CreateGpio method. + ret = GpioCntlrAdd(&impl->cntlr); // Register a GPIO model instance. + if (ret != HDF_SUCCESS) { + HDF_LOGE("%s: err add controller:%d", __func__, ret); + return ret; + } + return HDF_SUCCESS; + } + + // The Release method is called when the driver is uninstalled to reclaim resources. + static void GpioRelease(struct HdfDeviceObject *device) + { + // The GpioCntlrFromDevice method obtains the model instance registered in the init method from the abstract device object. + struct GpioCntlr *cntlr = GpioCntlrFromDevice(device); + // Release resources. + } + + struct HdfDriverEntry g_gpioDriverEntry = { + .moduleVersion = 1, + .Bind = GpioBind, + .Init = GpioInit, + .Release = GpioRelease, + .moduleName = "SOC_NAME_gpio_driver", // Name to be used in the configuration file to load the driver. + }; + HDF_INIT(g_gpioDriverEntry); // Register a GPIO driver entry. + ``` + +2. Create a build entry for the vendor driver. + + As described above, **device/vendor_name/drivers/lite.mk** is the entry for building vendor drivers. We need to start building from this entry. + + + ``` + #File: device/vendor_name/drivers/lite.mk + + SOC_VENDOR_NAME := $(subst $/",,$(LOSCFG_DEVICE_COMPANY)) + SOC_NAME := $(subst $/",,$(LOSCFG_PLATFORM)) + BOARD_NAME := $(subst $/",,$(LOSCFG_PRODUCT_NAME)) + + # Specify the SoC for building. + LIB_SUBDIRS += $(LITEOSTOPDIR)/../../device/$(SOC_VENDOR_NAME)/$(SOC_NAME)/drivers/ + ``` + +3. Create a build entry for the SoC driver. + + ``` + #File: device/vendor_name/soc_name/drivers/lite.mk + + SOC_DRIVER_ROOT := $(LITEOSTOPDIR)/../../device/$(SOC_VENDOR_NAME)/$(SOC_NAME)/drivers/ + + # Check whether the kernel compilation switch of the GPIO is enabled. + ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_GPIO), y) + # After the construction is complete, an object named hdf_gpio needs to be linked. + LITEOS_BASELIB += -lhdf_gpio + # Add the build directory gpio. + LIB_SUBDIRS += $(SOC_DRIVER_ROOT)/gpio + endif + + # Add other drivers here. + ``` + +4. Create a build entry for the GPIO driver. + + + ``` + include $(LITEOSTOPDIR)/config.mk + include $(LITEOSTOPDIR)/../../drivers/adapter/khdf/liteos/lite.mk + + # Specify the name of the output object. Ensure that the name is the same as LITEOS_BASELIB in the SoC driver build entry. + MODULE_NAME := hdf_gpio + + # Add the INCLUDE of the HDF framework. + LOCAL_CFLAGS += $(HDF_INCLUDE) + + # Specify the file to be compiled. + LOCAL_SRCS += soc_name_gpio.c + + # Compiling parameters + LOCAL_CFLAGS += -fstack-protector-strong -Wextra -Wall -Werror -fsigned-char -fno-strict-aliasing -fno-common + + include $(HDF_DRIVER) + ``` + +5. Configure the product loading driver. + + All device information of the product is defined in the source code file **//vendor/vendor_name/product_name/config/device_info/device_info.hcs**. + + Add the platform driver to the host of the platform. + + > ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** + > +> The value of **moduleName** must be the same as that defined in the driver. + + + ``` + root { + ... + platform :: host { + device_gpio :: device { + device0 :: deviceNode { + policy = 0; + priority = 10; + permission = 0644; + moduleName = "SOC_NAME_gpio_driver"; + } + } + } + } + ``` diff --git a/en/device-dev/porting/porting-stm32mp15xx-on-smallsystem.md b/en/device-dev/porting/porting-stm32mp15xx-on-smallsystem.md index 91684e5a06777efb344dfbce35d1bc88ff60c94f..52780fa5ee3589692278458f61ff64e720cdd0c9 100644 --- a/en/device-dev/porting/porting-stm32mp15xx-on-smallsystem.md +++ b/en/device-dev/porting/porting-stm32mp15xx-on-smallsystem.md @@ -351,7 +351,7 @@ Driver adaptation files are stored in `device/soc/st/common/platform` and are lo ``` 2. Describe the source code adaptation of the stm32mp1xx `gpio` driver in the `//device/soc/st/common/platform/gpio/stm32mp1_gpio.c` file. - First, load the basic driver adaptation framework based on the `HDF` driver framework of `OpenHarmony`, as shown below: + First, load the basic driver adaptation framework based on the `HDF` driver framework of `OpenHarmony`, as shown below: ``` struct HdfDriverEntry g_GpioDriverEntry = { @@ -546,13 +546,13 @@ To adapt the graphics subsystem, you need to add the `graphic_utils` component t For details about `graphic` configuration, see `//vendor/bearpi/bearpi_hm_micro/graphic_config/product_graphic_lite_config.h`. -#### ACE Subsystem Adaptation +#### ArkUI Subsystem Adaptation -To adapt the ACE subsystem, you need to add the `ace_engine_lite` component to the `config.json` file. +To adapt the ArkUI subsystem, you need to add the `ace_engine_lite` component to the `config.json` file. ``` { - "subsystem": "ace", + "subsystem": "arkui", "components": [ { "component": "ace_engine_lite", diff --git a/en/device-dev/quick-start/quickstart-pkg-3516-burn.md b/en/device-dev/quick-start/quickstart-pkg-3516-burn.md index f877b0f47e58c6873a720fdf78a60655a71a43b8..fe7c7443d5c263684228da514bba3a785989f873 100644 --- a/en/device-dev/quick-start/quickstart-pkg-3516-burn.md +++ b/en/device-dev/quick-start/quickstart-pkg-3516-burn.md @@ -22,7 +22,7 @@ The following exemplifies how to burn an image to Hi3516DV300 using HiTool. You 1. Prepare the files to be burnt. 1. On the client platform, create a folder for storing the files to be burnt, for example, **D:\liteos** or **D:\linux**. 2. Save the burning configuration file and boot file to the new folder. - - For L1_LiteOS, the burning configuration file is **L1_3516_liteos.xml**, and the boot file is **[u-boot-hi3516dv300.bin](https://gitee.com/openharmony/device_board_hisilicon/tree/master/hispark_taurus/uboot/out/boot)**. + - For the small system with the LiteOS kernel, the burning configuration file is **L1_3516_liteos.xml**, and the boot file is **[u-boot-hi3516dv300.bin](https://gitee.com/openharmony/device_board_hisilicon/tree/master/hispark_taurus/uboot/out/boot)**. You need to prepare the **L1_3516_liteos.xml** file on your own by applying the template below: @@ -35,7 +35,7 @@ The following exemplifies how to burn an image to Hi3516DV300 using HiTool. You ``` - - For L1_Linux, the burning configuration file is **L1_3516_linux.xml**, and the boot file is **[u-boot-hi3516dv300.bin](https://gitee.com/openharmony/device_board_hisilicon/tree/master/hispark_taurus/uboot/out/boot)**. + - For the small system with the Linux kernel, the burning configuration file is **L1_3516_linux.xml**, and the boot file is **[u-boot-hi3516dv300.bin](https://gitee.com/openharmony/device_board_hisilicon/tree/master/hispark_taurus/uboot/out/boot)**. You need to prepare the **L1_3516_linux.xml** file on your own by applying the template below: @@ -53,8 +53,8 @@ The following exemplifies how to burn an image to Hi3516DV300 using HiTool. You For the Hi3516 development board, the files required for burning of the mini system are as follows: - - L1_LiteOS: **OHOS_Image.bin**, **rootfs_vfat.img**, and **userfs_vfat.img** - - 1_Linux: **uImage_hi3516dv300_smp**, **rootfs_ext4.img**, **userfs_ext4.img**, and **userdata_ext4.img** + - Small system with the LiteOS kernel: **OHOS_Image.bin**, **rootfs_vfat.img**, and **userfs_vfat.img** + - Small system with the Linux kernel: **uImage_hi3516dv300_smp**, **rootfs_ext4.img**, **userfs_ext4.img**, and **userdata_ext4.img** 2. Burn the image files using HiTool. 1. Open HiTool. @@ -77,7 +77,7 @@ The following exemplifies how to burn an image to Hi3516DV300 using HiTool. You If **hisilicon \#** is displayed on the terminal tool page, the serial port of the development board is connected. 3. Copy the following startup parameters in the serial port terminal tool and press **Enter** to complete the setup. - - Startup parameters corresponding to L1_LiteOS: + - Startup parameters corresponding to the small system with the LiteOS kernel: ``` setenv bootcmd "mmc read 0x0 0x80000000 0x800 0x4800;go 0x80000000"; @@ -85,7 +85,7 @@ The following exemplifies how to burn an image to Hi3516DV300 using HiTool. You saveenv sa;reset ``` - - Startup parameters corresponding to L1_Linux: + - Startup parameters corresponding to small system with the Linux kernel: ``` setenv bootargs "mem=128M console=ttyAMA0,115200 root=/dev/mmcblk0p3 rw rootfstype=ext4 rootwait blkdevparts=mmcblk0:1M(boot),9M(kernel),50M(rootfs),50M(userfs),1024M(userdata)"