|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | - | - |
| automock/ | | 12-May-2024 | - | 6,105 | 4,325 |
| cli/ | | 12-May-2024 | - | 2,631 | 2,233 |
| cmake/ | | 12-May-2024 | - | 42 | 40 |
| figures/ | | 12-May-2024 | - | | |
| gn/ | | 12-May-2024 | - | 39 | 37 |
| jsapp/ | | 12-May-2024 | - | 2,881 | 2,367 |
| mock/ | | 12-May-2024 | - | 3,752 | 2,488 |
| util/ | | 12-May-2024 | - | 4,712 | 3,311 |
| .gitattributes | D | 12-May-2024 | 11 | 1 | 1 |
| .gitignore | D | 12-May-2024 | 198 | 17 | 16 |
| BUILD.gn | D | 12-May-2024 | 4.8 KiB | 172 | 157 |
| Jenkinsfile | D | 12-May-2024 | 1.4 KiB | 49 | 45 |
| LICENSE | D | 12-May-2024 | 10.1 KiB | 177 | 150 |
| OAT.xml | D | 12-May-2024 | 4 KiB | 66 | 13 |
| README.md | D | 12-May-2024 | 2.5 KiB | 44 | 26 |
| README_zh.md | D | 12-May-2024 | 1.9 KiB | 42 | 26 |
| RichPreviewer.cpp | D | 12-May-2024 | 7 KiB | 217 | 170 |
| ThinPreviewer.cpp | D | 12-May-2024 | 7.3 KiB | 201 | 145 |
| app.rc | D | 12-May-2024 | 38 | 2 | 1 |
| app_define.json | D | 12-May-2024 | 139 | 1 | 1 |
| build.sh | D | 12-May-2024 | 1.6 KiB | 59 | 39 |
| bundle.json | D | 12-May-2024 | 2.2 KiB | 82 | 81 |
| config.cfg | D | 12-May-2024 | 114 | 5 | 2 |
README.md
1# Previewer
2
3## Introduction
4
5The Previewer is a component that empowers the DevEco Studio Previewer to leverage the ArkUI rendering engine for real-time rendering and preview. To be specific, with the Previewer component, the DevEco Studio Previewer can send commands through the named pipe to instruct the ArkUI rendering engine to implement real-time rendering and receive the resultant images for preview presentation. The Previewer component supports ArkTS and JS applications on Windows or macOS.
6
7**Figure 1** Previewer component architecture<a name="fig2606133765017"></a>
8
9![](figures/Previewer-Component-Architecture.PNG "Previewer Component Architecture")
10
11To start with, the DevEco Studio Previewer launches the Previewer component through the command line and passes to it startup parameters such as the ArkTS build product path and preview specifications. When starting up, the Previewer component launches the ArkUI rendering engine, which then renders pages based on the startup parameters and delivers preview images for the DevEco Studio Previewer. When page information changes, the DevEco Studio Previewer sends page refresh commands through the named pipe to the Previewer component. Based on the received commands, the Previewer component calls the ArkUI processing APIs to refresh and render the pages and deliver the images.
12## Directory Structure
13
14The source code of the Previewer component is stored in **/ide_previewer**. The following shows the directory structure.
15
16```
17/ide_previewer
18├── cli # Command processing
19├── gn # Build dependencies and toolchain configuration
20├── jsapp # Rendering engine invoking
21├── mock # Code of the interaction layer
22├── util # Utility
23```
24
25## Application Scenarios
26
27The Previewer component is built and released with the OpenHarmony SDK. You can use it to enable the DevEco Studio Previewer to leverage the ArkUI rendering engine for page rendering.
28
29## Building and Compilation
30
31For details, see the README in the [build](https://gitee.com/openharmony/build) repository.
32
33## Repositories Involved
34
35**ide_previewer**
36
37[arkui\_ace\_engine\_lite](https://gitee.com/openharmony/arkui_ace_engine_lite)
38
39[arkui\_ace\_engine](https://gitee.com/openharmony/arkui_ace_engine)
40
41## How to Contribute
42
43For details about how to contribute, see [Contribution Guide](https://gitee.com/openharmony/docs/blob/master/en/contribute/Readme-EN.md).
44