From: luozheng <1732036298@qq.com> Date: Mon, 28 Jul 2025 08:00:19 +0000 (+0800) Subject: nativelauncher文件夹合并 X-Git-Tag: leiniao_debug_1.0.0_20250922_020716~212 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=297d8161d71b9bbcdfb6fb05c30e43595b56664d;p=mirrors%2FFD230.git nativelauncher文件夹合并 --- diff --git a/code/sdk/application/wearable/fd230/nativeapp/CMakeLists.txt b/code/sdk/application/wearable/fd230/nativeapp/CMakeLists.txt index d6452adc6..371208b6c 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/CMakeLists.txt +++ b/code/sdk/application/wearable/fd230/nativeapp/CMakeLists.txt @@ -7,54 +7,12 @@ set(UI_SAMPLE_ROOT ${ROOT_DIR}/middleware/services/gui/uikit/sample/uitest) set(PUBLIC_HEADER ${NativeApp}/nativelauncher/include - ${NativeApp}/nativeui/screennotify/include - ${NativeApp}/nativeui/bluetooth/include + ${NativeApp}/nativeui/include ) set(PRIVATE_HEADER ${NativeApp}/nativeui/ - ${NativeApp}/nativeui/main/include - ${NativeApp}/nativeui/clock/include - ${NativeApp}/nativeui/bloodoxygen/include - ${NativeApp}/nativeui/bluetooth/include - ${NativeApp}/nativeui/indoorwalk/include - ${NativeApp}/nativeui/rebootdevice/include - ${NativeApp}/nativeui/activity/include - ${NativeApp}/nativeui/heartrate/include - ${NativeApp}/nativeui/callerlog/include - ${NativeApp}/nativeui/makephone/include - ${NativeApp}/nativeui/rtcservice/include - ${NativeApp}/nativeui/compass/include - ${NativeApp}/nativeui/connectnewphone/include - ${NativeApp}/nativeui/alarmclockmanage/include - ${NativeApp}/nativeui/alarmclocktimerconfig/include - ${NativeApp}/nativeui/alarm/include - ${NativeApp}/nativeui/temperature/include - ${NativeApp}/nativeui/offlinevoice/include - ${NativeApp}/nativeui/settings/include - ${NativeApp}/nativeui/set_desktop/include - ${NativeApp}/nativeui/set_card/include - ${NativeApp}/nativeui/add_card/include - ${NativeApp}/nativeui/set_dial/include - ${NativeApp}/nativeui/set_dial_style/include - ${NativeApp}/nativeui/set_aod/include - ${NativeApp}/nativeui/key/include - ${NativeApp}/nativeui/player/include - ${NativeApp}/nativeui/applist/include - ${NativeApp}/nativeui/phoneservice/include - ${NativeApp}/nativeui/screensetting/include - ${NativeApp}/nativeui/uiservice/include - ${NativeApp}/nativeui/uisample/include ${NativeApp}/nativeui/uisample/uitest/framework/include - ${NativeApp}/nativeui/aod_view/include - ${NativeApp}/nativeui/health/ - - ${NativeApp}/nativeui/alipay/include - ${NativeApp}/nativeui/alipay/include/AlipayList - - ${NativeApp}/nativeui/alipay/include/AlipayTrans - ${NativeApp}/nativeui/restoredefaults/include - ${UI_SAMPLE_ROOT}/components ${NativeApp}/../service/smart_voice/smart_voice_service/interfaces/innerkits/native_c/include ${NativeApp}/../service/smart_voice/voice_engine_hal/interfaces/innerkits/native_c/include @@ -79,15 +37,15 @@ set(PRIVATE_HEADER ${ROOT_DIR}/include/middleware/services/bts/common ${ROOT_DIR}/include/middleware/services/bts/ble ${ROOT_DIR}/include/middleware/services/bts/br + ${ROOT_DIR}/middleware/chips/brandy/nv/ ${ROOT_DIR}/open_source/openharmony/drivers/peripheral/display/interfaces/include ${ROOT_DIR}/open_source/openharmony/foundation/distributedschedule/samgr_lite/interfaces/kits/samgr - ${NativeApp}/nativeui/main/include/dial ${ROOT_DIR}/middleware/services/media/foundation/sample/wrapper ${ROOT_DIR}/application/wearable/service/msg_center/include - # ${ROOT_DIR}/application/wearable/nativeabilityfwk/include - + ${ROOT_DIR}/application/wearable/fd230/nativeabilityfwk/include + ${ROOT_DIR}/application/wearable/service/device_msg ${ROOT_DIR}/open_source/openharmony/foundation/multimedia/audio_player/interfaces/kits ${ROOT_DIR}/open_source/openharmony/foundation/multimedia/audiomanager/interfaces/kits/audiomanager ${ROOT_DIR}/open_source/openharmony/foundation/multimedia/audiomanager/interfaces/kits/audiocommon @@ -99,12 +57,16 @@ set(PRIVATE_HEADER ${UIKIT_ROOT_DIR}/proprietary/src/ui/innerkits ${ROOT_DIR}/application/wearable/service/dial_market ${ROOT_DIR}/open_source/openharmony/third_party/cJSON + ${ROOT_DIR}/middleware/utils/dfx/diag/ + ${ROOT_DIR}/middleware/utils/dfx/diag/diag_cmd_router/include + ${ROOT_DIR}/open_source/openharmony/hiviewdfx/hilog/lite/interfaces/native/kits/hilog_lite + ${ROOT_DIR}/middleware/services/gui/uikit/ui/interfaces/kits/animator + ${ROOTDIR}/open_source/flatbuffers/include + ${ROOT_DIR}/open_source/openharmony/third_party/lwip/lwip_adapter/lwip_driver_adapter ${ROOT_DIR}/zhihui/drivers/ ${ROOT_DIR}/zhihui/UI/CustomUIComponentTool/ ${ROOT_DIR}/zhihui/UI/producttest/include/ - ${ROOT_DIR}/application/wearable/fd230/nativeabilityfwk/include - ${NativeApp}/nativeui/ ) @@ -113,6 +75,8 @@ set(SOURCES ${SOURCES} ${NativeApp}/nativelauncher/src/NativeLauncher.cpp ${NativeApp}/nativelauncher/src/NativeRegisterManager.cpp + ${NativeApp}/nativelauncher/src/UICardPageFactory.cpp + ${UI_SAMPLE_ROOT}/components/ui_test_lottie/ui_test_lottie.cpp ${UI_SAMPLE_ROOT}/components/ui_test_tiger/tiger_view.cpp ${UI_SAMPLE_ROOT}/components/ui_test_tiger/ui_test_tiger.cpp ${UI_SAMPLE_ROOT}/components/ui_test_running_ball/ui_test_running_ball.cpp @@ -220,13 +184,17 @@ set(PRIVATE_DEFINES build_component() set(COMPONENT_NAME "uikit_fwk") -# set(UIKIT_NATIVE_FWK ${ROOT_DIR}/application/wearable/nativeabilityfwk) set(UIKIT_NATIVE_FWK ${ROOT_DIR}/application/wearable/fd230/nativeabilityfwk) set(UIKIT_NATIVE_DIAL ${NativeApp}/nativeui/main) set(COMPONENT_SRC + ${UIKIT_NATIVE_FWK}/src/View.cpp + ${UIKIT_NATIVE_FWK}/src/SlicePage.cpp ${UIKIT_NATIVE_FWK}/src/BackDragListener.cpp ${UIKIT_NATIVE_FWK}/src/PageTransitionMgr.cpp ${UIKIT_NATIVE_FWK}/src/TransitionManager.cpp + ${UIKIT_NATIVE_FWK}/src/RecentManager.cpp + ${UIKIT_NATIVE_FWK}/src/SlicePageManager.cpp + ${UIKIT_NATIVE_FWK}/src/SlicePageFactory.cpp ${UIKIT_NATIVE_FWK}/src/TransitionRecord.cpp ${UIKIT_NATIVE_DIAL}/src/dial/parser/DialBinParser.cpp ${UIKIT_NATIVE_DIAL}/src/dial/parser/DialBinParserManager.cpp @@ -253,13 +221,13 @@ set(PRIVATE_HEADER ${ROOT_DIR}/middleware/services/gui/uikit/surface/interfaces/kits ${ROOT_DIR}/middleware/services/gui/uikit/ui/interfaces/innerkits ${ROOT_DIR}/middleware/services/gui/uikit/ui/frameworks - ${ROOT_DIR}/application/wearable/nativeapp/nativeui/applist/include/ ${ROOT_DIR}/open_source/openharmony/drivers/peripheral/display/interfaces/include ${ROOT_DIR}/open_source/openharmony/drivers/peripheral/format/interfaces/include ${UIKIT_NATIVE_DIAL}/include/dial ${ROOT_DIR}/middleware/services/media/foundation/sample/wrapper ${ROOT_DIR}/middleware/services/media/foundation/player/interfaces/kits ${UIKIT_ROOT_DIR}/proprietary/src/ui/innerkits + ${ROOT_DIR}/open_source/openharmony/base/security/appverify/include ) set(PRIVATE_DEFINES diff --git a/code/sdk/application/wearable/fd230/nativeapp/brandy-auto-ota-cli/libuikit_fwk.a b/code/sdk/application/wearable/fd230/nativeapp/brandy-auto-ota-cli/libuikit_fwk.a index f8834ae85..eede3b370 100644 Binary files a/code/sdk/application/wearable/fd230/nativeapp/brandy-auto-ota-cli/libuikit_fwk.a and b/code/sdk/application/wearable/fd230/nativeapp/brandy-auto-ota-cli/libuikit_fwk.a differ diff --git a/code/sdk/application/wearable/fd230/nativeapp/brandy-auto-ota-ser/libuikit_fwk.a b/code/sdk/application/wearable/fd230/nativeapp/brandy-auto-ota-ser/libuikit_fwk.a index 9c513d8e2..40a9458c8 100644 Binary files a/code/sdk/application/wearable/fd230/nativeapp/brandy-auto-ota-ser/libuikit_fwk.a and b/code/sdk/application/wearable/fd230/nativeapp/brandy-auto-ota-ser/libuikit_fwk.a differ diff --git a/code/sdk/application/wearable/fd230/nativeapp/brandy-native-js/libuikit_fwk.a b/code/sdk/application/wearable/fd230/nativeapp/brandy-native-js/libuikit_fwk.a index b1ab9d2d0..e3ce469ad 100644 Binary files a/code/sdk/application/wearable/fd230/nativeapp/brandy-native-js/libuikit_fwk.a and b/code/sdk/application/wearable/fd230/nativeapp/brandy-native-js/libuikit_fwk.a differ diff --git a/code/sdk/application/wearable/fd230/nativeapp/brandy-xts/libuikit_fwk.a b/code/sdk/application/wearable/fd230/nativeapp/brandy-xts/libuikit_fwk.a index 7864f090a..337b034d5 100644 Binary files a/code/sdk/application/wearable/fd230/nativeapp/brandy-xts/libuikit_fwk.a and b/code/sdk/application/wearable/fd230/nativeapp/brandy-xts/libuikit_fwk.a differ diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/AppViewIDs.h b/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/AppViewIDs.h index 113ef87da..f533268f3 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/AppViewIDs.h +++ b/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/AppViewIDs.h @@ -64,7 +64,6 @@ typedef enum : uint16_t VIEW_RECORD, // 录音 VIEW_MUSIC_PLAYER, // 音乐播放器 /* --------------------------------------------------------------------------*/ - // 合并不清晰viewid VIEW_REBOOT, @@ -123,6 +122,24 @@ typedef enum : uint16_t VIEW_SCHEDULE, // 日程 VIEW_SLEEPMODE, // sleep mode VIEW_SET_DESKTOP, // 设置主题 + /* ---------------------------- 650-0723patch 合并 ---------------------------- */ + VIEW_MAIN_BREATHEASE, + VIEW_FLASHLIGHT_0723, // 手电筒; + VIEW_STOPWATCH, // 秒表; + VIEW_WEATHER_0723, // 天气 + VIEW_TIMER, // 计时器 + VIEW_BLOOD_0723, // 血氧 + VIEW_CAMERA, // 相机 + VIEW_FIND_PHONE_0723, // 寻找手机 + VIEW_DATE, // 日期 + VIEW_QRCODE_CONN, // 二维码连接; + VIEW_SPORTS, + VIEW_SLEEPING, + VIEW_TRAINING_0723, + VIEW_EMPTY, + VIEW_SET_OTA, + + /* -------------------------------------------------------------------------- */ /*屏蔽Slice*/ VIEW_PHONERING, // 拨号界面 VIEW_PHONECALLING, // 来电 @@ -150,8 +167,10 @@ typedef enum : uint16_t VIEW_HEART_CHART, // 心率曲线图检测 VIEW_ADD_NEW_ID = 250, /* -------------------------------------------------------------------------- */ - VIEW_MAX_INTER_APP, // 在此之前添加native应用ID. - VIEW_EXTERN_APP = 0xFFFE, // 三方应用 + VIEW_RECENT_APP, + VIEW_MAX_INTER_ARRY_APP = 0x7FFF, // 在此之前添加内部数组native应用ID. + VIEW_MAX_INTER_APP = 0xFFFD, // 在此之前添加内部静态注册native应用ID,æ­¤ID在NativeRegisterType.h里单独管理 + VIEW_EXTERN_APP = 0xFFFE, // 三方应用 VIEW_INVALIDE_APP = 0xFFFF, } AppViewId; diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/NativeLauncher.h b/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/NativeLauncher.h index 3f297f139..c1c64e603 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/NativeLauncher.h +++ b/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/NativeLauncher.h @@ -28,8 +28,6 @@ public: static NativeLauncher &GetInstance(void); void InitNativeLauncher(LaunchMode mode); private: - void InitAllNativeSlices(void); - NativeLauncher(); NativeLauncher(const NativeLauncher &); NativeLauncher &operator=(const NativeLauncher &); diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/NativeRegisterManager.h b/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/NativeRegisterManager.h index 9225b8321..67c840055 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/NativeRegisterManager.h +++ b/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/NativeRegisterManager.h @@ -13,7 +13,7 @@ #include "NativeRegisterType.h" #include "SliceProxy.h" #include "AbilitySliceProxy.h" -#include "ApplistModel.h" +#include "applist/ApplistModel.h" #include "NativeAbility.h" #include "wearable_log.h" #include "UiConfig.h" @@ -27,11 +27,6 @@ public: virtual void InitSlice() {}; }; -struct NativeMap { - NativeRegisterType type; - NativeRegisterCallback* native; -}; - struct SliceMap { uint16_t id; SliceProxy* slice; @@ -45,32 +40,24 @@ public: return instance; } void InitAllNativesSlices(); - Graphic::Vector& GetNatives(); List& GetNativeAppLists(); - void RegisterNative(const AppItem &nativeAppList, NativeRegisterCallback* native); void RegisterSlice(const uint16_t id, SliceProxy* slice); void RegisterMenu(const uint16_t id, const char *icon, const char *iconHexagon, const char *label); + void RegisterMenu(const AppItem &item); bool IsSliceIdExist(AppViewId id); + + //拓展新增的 void RegisterMenuPro(const uint16_t id, const char *iconLarge, const char *iconSmall,const char *iconHexagon, const char *label, uint16_t TextId); private: NativeRegisterManager() {}; - ~NativeRegisterManager(); + ~NativeRegisterManager() {}; NativeRegisterManager(const NativeRegisterManager&) = delete; NativeRegisterManager &operator=(const NativeRegisterManager&) = delete; - Graphic::Vector natives_; Graphic::Vector slices_; List nativeAppLists_; }; -class NativeRegister { -public: - NativeRegister(const AppItem &nativeAppList, NativeRegisterCallback* native) - { - NativeRegisterManager::GetInstance().RegisterNative(nativeAppList, native); - } -}; - class SliceRegister { public: SliceRegister(const uint16_t id, SliceProxy* sliceProxy) @@ -83,9 +70,14 @@ public: NativeRegisterManager::GetInstance().RegisterSlice(id, sliceProxy); NativeRegisterManager::GetInstance().RegisterMenu(id, icon, iconHexagon, label); } + SliceRegister(const AppItem &item, SliceProxy* sliceProxy) + { + NativeRegisterManager::GetInstance().RegisterSlice(item.id, sliceProxy); + NativeRegisterManager::GetInstance().RegisterMenu(item); + } }; -//新增的 +//拓展新增的 class SliceRegister_Pro { public: SliceRegister_Pro(const uint16_t id, SliceProxy* sliceProxy, @@ -101,14 +93,22 @@ public: } // namespace OHOS -#define REGIST_NATIVE(nativeAppList, func) \ - const static OHOS::NativeRegister (STATIC_VAR)(nativeAppList, new func()) #define REGIST_SLICE(id, V, P) \ const static OHOS::SliceRegister (STATIC_VAR)(static_cast(id), new AbilitySliceProxy()) #define REGIST_MENU(id, V, P, icon, iconHexagon, label) \ const static OHOS::SliceRegister (STATIC_VAR)(static_cast(id), new AbilitySliceProxy(), \ icon, iconHexagon, label) -//新增的 + /* + * 目前支持两种模式的注册,如果需要扩展,请自行扩展AppItem的构造方法 + * 支持多语言注册以及多图标打包功能的注册示例:REGIST_MENU_EXT((AppItem{VIEW_OFFLINEVOICE, VOICE_RES_ID, + * VOICE_HEXAGON_ID, RES_PATH, HEXAGON_PATH, VOICE_LANGUAGE_ID, nullptr}), MainVocassistView, VocassistPresenter); + * 不支持多语言,一个图标使用一个文件的注册示例:REGIST_MENU_EXT((AppItem{VIEW_OFFLINEVOICE, PNG_APPLIST_VOCASSIST_IMAGE, + * PNG_APPLIST_DEFAULT_IMG, "语音助手", nullptr}), MainVocassistView, VocassistPresenter); + */ +#define REGIST_MENU_EXT(item, V, P) \ + const static OHOS::SliceRegister (STATIC_VAR)(item, new AbilitySliceProxy()) + +//拓展新增的 #define REGIST_MENU_PRO(id, V, P, iconLarge,iconSmall, iconHexagon, text,textId) \ const static OHOS::SliceRegister_Pro (STATIC_VAR)(static_cast(id), new AbilitySliceProxy(), \ iconLarge,iconSmall, iconHexagon, text,textId) diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/UICardPageFactory.h b/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/UICardPageFactory.h new file mode 100644 index 000000000..761e137c7 --- /dev/null +++ b/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/UICardPageFactory.h @@ -0,0 +1,73 @@ +/* + * Copyright (c) CompanyNameMagicTag 2025. All rights reserved. + * Description: UICardPageFactory + * Author: + * Create: 2025-06 + */ + +#ifndef UI_CARD_PAGE_FACTORY_H +#define UI_CARD_PAGE_FACTORY_H + +#include +#include "components/ui_card_page.h" +#include "UiConfig.h" + +namespace OHOS { +class UICardPageProxyInterface; +class UICardPageFactory { +public: + static UICardPageFactory& GetInstance() + { + static UICardPageFactory instance; + return instance; + } + void RegisterWatchDial(const uint16_t mode, const uint16_t id, UICardPageProxyInterface* uiCardPage); + UICardPage* CreateWatchDial(uint16_t mode, uint16_t id); + +private: + UICardPageFactory() {}; + ~UICardPageFactory() {}; + UICardPageFactory(const UICardPageFactory&) = delete; + UICardPageFactory &operator=(const UICardPageFactory&) = delete; + std::unordered_map watchDials_[static_cast(DIAL_DISPLAY_MODE_MAX)]; +}; + +class WatchDialRegister { +public: + WatchDialRegister(const uint16_t mode, const uint16_t id, UICardPageProxyInterface* uiCardPage) + { + UICardPageFactory::GetInstance().RegisterWatchDial(mode, id, uiCardPage); + } +}; + +class UICardPageProxyInterface { +public: + virtual UICardPage* CreateUICardPage() = 0; + UICardPageProxyInterface() = default; + virtual ~UICardPageProxyInterface() = default; + UICardPageProxyInterface(const UICardPageProxyInterface&) = delete; + UICardPageProxyInterface& operator=(const UICardPageProxyInterface&) = delete; + UICardPageProxyInterface(UICardPageProxyInterface&&) = delete; + UICardPageProxyInterface& operator=(UICardPageProxyInterface&&) = delete; +}; + +template +class WatchDialProxy : public UICardPageProxyInterface { +public: + UICardPage* CreateUICardPage() override + { + U* u = new U(); + UICardPage* page = dynamic_cast(u); + if (page == nullptr) { + delete u; + } + return page; + } +}; +} // namespace OHOS + +#define REGIST_WATCH_DIAL(mode, id, U) \ + const static OHOS::WatchDialRegister (STATIC_VAR)(static_cast(mode), static_cast(id), \ + new WatchDialProxy()) + +#endif // UI_CARD_PAGE_FACTORY_H \ No newline at end of file diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/UiConfig.h b/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/UiConfig.h index 0f3677087..9f5e3a5b5 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/UiConfig.h +++ b/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/UiConfig.h @@ -41,6 +41,11 @@ DIAL_CLOCK_5 = 5, DIAL_MAX, } DialId; + typedef enum { + DIAL_DISPLAY_MODE_MAIN = 0, + DIAL_DISPLAY_MODE_AOD, + DIAL_DISPLAY_MODE_MAX, + } DialDispayMode; /*主界面上下拉界面*/ typedef enum @@ -735,6 +740,25 @@ static constexpr const char *B024_010_IMAGE_PATH = APP_RES_PATH "/SECONDHAND.bin"; static constexpr const char *B024_011_IMAGE_PATH = APP_RES_PATH "/MINUTEHAND.bin"; static constexpr const char *PNG_APPLIST_PHONE_IMAGE = APP_RES_PATH "/phone.bin"; // 电话 + + static constexpr const char *PNG_APPLIST_STOPWATCH_LOGO = APP_RES_PATH"/STOPWATCH_LOGO.bin"; + static constexpr const char *PNG_APPLIST_STOPWATCH_IMAGE = APP_RES_PATH"/STOPWATCH.bin"; + static constexpr const char *WEATHER_IMAGE = APP_RES_PATH"/WEATHER.bin"; + static constexpr const char *WEATHER_MAIN_ICON = APP_RES_PATH"/WEATHER_LOGO.bin"; + static constexpr const char *TIMER_IMAGE = APP_RES_PATH"/TIMER.bin"; + static constexpr const char *TIMER_MAIN_ICON = APP_RES_PATH"/TIMER_ICON.bin"; + static constexpr const char *DATE_IMAGE = APP_RES_PATH"/DATE.bin"; + static constexpr const char *DATE_MAIN_ICON = APP_RES_PATH"/DATE_LOGO.bin"; + static constexpr const char *FLASHLIGHT_IMAGE = APP_RES_PATH"/FLASHLIGHT.bin"; + static constexpr const char *FLASHLIGHT_MAIN_ICON = APP_RES_PATH"/FLASHLIGHT_LOGO.bin"; + static constexpr const char *SLEEP_IMAGE = APP_RES_PATH"/SLEEP.bin"; + static constexpr const char *SLEEP_ICON = APP_RES_PATH"/SLEEP_ICON.bin"; + static constexpr const char *BREATH_IMAGE = APP_RES_PATH"/BREATH.bin"; + static constexpr const char *BREATH_MAIN_ICON = APP_RES_PATH"/BREATH_ICON.bin"; + static constexpr const char *FINDPHONE_IMAGE = APP_RES_PATH"/FINDPHONE.bin"; + static constexpr const char *FINDPHONE_MAIN_ICON = APP_RES_PATH"/FINDPHONE_LOGO.bin"; + static constexpr const char *CAMERA_IMAGE = APP_RES_PATH"/CAMERA.bin"; + static constexpr const char *CAMERA_MAIN_ICON = APP_RES_PATH"/CAMERA_ICON.bin"; /* -------------------------------------------------------------------------- */ static constexpr const char *PNG_NEW_WLAN_WIFI = APP_RES_PATH "/FULL_SIGNAL_OPEN.bin"; static constexpr const char *FULL_SIGNAL_ENCRYPTION = APP_RES_PATH "/FULL_SIGNAL_ENCRYPTION.bin"; diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/ui_resource_breath.h b/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/ui_resource_breath.h new file mode 100644 index 000000000..ca668341c --- /dev/null +++ b/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/ui_resource_breath.h @@ -0,0 +1,102 @@ +/* + * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved. + * Description: UIBreathResource + * Create: 2025-06-05 + */ +#ifndef UI_RESOURCE_BREATH_IMAGE_H +#define UI_RESOURCE_BREATH_IMAGE_H +#include +namespace OHOS { + static const int IMAGE_CONVERTER_TOOL_BREATH001 = 0x100001; + static const int IMAGE_CONVERTER_TOOL_BREATH002 = 0x100002; + static const int IMAGE_CONVERTER_TOOL_BREATH003 = 0x100003; + static const int IMAGE_CONVERTER_TOOL_BREATH004 = 0x100004; + static const int IMAGE_CONVERTER_TOOL_BREATH005 = 0x100005; + static const int IMAGE_CONVERTER_TOOL_BREATH006 = 0x100006; + static const int IMAGE_CONVERTER_TOOL_BREATH007 = 0x100007; + static const int IMAGE_CONVERTER_TOOL_BREATH008 = 0x100008; + static const int IMAGE_CONVERTER_TOOL_BREATH009 = 0x100009; + static const int IMAGE_CONVERTER_TOOL_BREATH010 = 0x10000a; + static const int IMAGE_CONVERTER_TOOL_BREATH011 = 0x10000b; + static const int IMAGE_CONVERTER_TOOL_BREATH012 = 0x10000c; + static const int IMAGE_CONVERTER_TOOL_BREATH013 = 0x10000d; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE001 = 0x10000e; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE002 = 0x10000f; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE003 = 0x100010; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE004 = 0x100011; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE005 = 0x100012; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE006 = 0x100013; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE007 = 0x100014; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE008 = 0x100015; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE009 = 0x100016; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE010 = 0x100017; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE011 = 0x100018; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE012 = 0x100019; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE013 = 0x10001a; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE014 = 0x10001b; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE015 = 0x10001c; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE016 = 0x10001d; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE017 = 0x10001e; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE018 = 0x10001f; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE019 = 0x100020; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE020 = 0x100021; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE021 = 0x100022; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE022 = 0x100023; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE023 = 0x100024; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE024 = 0x100025; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE025 = 0x100026; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE026 = 0x100027; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE027 = 0x100028; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE028 = 0x100029; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE029 = 0x10002a; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE030 = 0x10002b; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE031 = 0x10002c; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE032 = 0x10002d; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE033 = 0x10002e; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE034 = 0x10002f; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE035 = 0x100030; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE036 = 0x100031; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE037 = 0x100032; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE038 = 0x100033; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE039 = 0x100034; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE040 = 0x100035; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE041 = 0x100036; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE042 = 0x100037; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE043 = 0x100038; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE044 = 0x100039; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE045 = 0x10003a; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE046 = 0x10003b; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE047 = 0x10003c; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE048 = 0x10003d; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE049 = 0x10003e; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE050 = 0x10003f; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE051 = 0x100040; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE052 = 0x100041; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE053 = 0x100042; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE054 = 0x100043; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE055 = 0x100044; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE056 = 0x100045; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE057 = 0x100046; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE058 = 0x100047; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE059 = 0x100048; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE060 = 0x100049; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE061 = 0x10004a; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE062 = 0x10004b; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE063 = 0x10004c; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE064 = 0x10004d; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE065 = 0x10004e; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE066 = 0x10004f; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE067 = 0x100050; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE068 = 0x100051; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE069 = 0x100052; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE070 = 0x100053; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE071 = 0x100054; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE072 = 0x100055; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE073 = 0x100056; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE074 = 0x100057; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE075 = 0x100058; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE076 = 0x100059; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE077 = 0x10005a; + static const int IMAGE_CONVERTER_TOOL_INOREX_HALE078 = 0x10005b; +} // OHOS +#endif // UI_RESOURCE_BREATH_IMAGE_H \ No newline at end of file diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/ui_resource_camera.h b/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/ui_resource_camera.h new file mode 100644 index 000000000..022ddfca0 --- /dev/null +++ b/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/ui_resource_camera.h @@ -0,0 +1,17 @@ +/* + * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved. + * Description: UICameraResource + * Create: 2025-06-05 + */ +#ifndef UI_RESOURCE_CAMERA_H +#define UI_RESOURCE_CAMERA_H +#include +namespace OHOS { + static const int IMAGE_CONVERTER_TOOL_CAMERA_1 = 0x100001; + static const int IMAGE_CONVERTER_TOOL_CAMERA_2 = 0x100002; + static const int IMAGE_CONVERTER_TOOL_CAMERA_3 = 0x100003; + static const int IMAGE_CONVERTER_TOOL_CAMERA_4 = 0x100004; + static const int IMAGE_CONVERTER_TOOL_CAMERA_5 = 0x100005; + +} // OHOS +#endif // UI_RESOURCE_CAMERA_H diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/ui_resource_date.h b/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/ui_resource_date.h new file mode 100644 index 000000000..0bccb8b0e --- /dev/null +++ b/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/ui_resource_date.h @@ -0,0 +1,21 @@ +/* + * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved. + * Description: UIWeatherResource + * Create: 2025-06-10 + */ +#ifndef UI_RESOURCE_DATE_H +#define UI_RESOURCE_DATE_H +#include +namespace OHOS { + static const int DIR_MASK = 0xfff00000; + static const int PNG_MASK = 0x000fffff; + static const int IMAGE_CONVERTER_TOOL_DATE1 = 0x100001; + static const int IMAGE_CONVERTER_TOOL_DATE2 = 0x100002; + static const int IMAGE_CONVERTER_TOOL_DATE3 = 0x100003; + static const int IMAGE_CONVERTER_TOOL_DATE4 = 0x100004; + static const int IMAGE_CONVERTER_TOOL_DATE5 = 0x100005; + static const int IMAGE_CONVERTER_TOOL_DATE6 = 0x100006; + static const int IMAGE_CONVERTER_TOOL_DATE7 = 0x100007; + static const int IMAGE_CONVERTER_TOOL_DATE8 = 0x100008; +} // OHOS +#endif // UI_RESOURCE_DATE_H diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/ui_resource_findPhone.h b/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/ui_resource_findPhone.h new file mode 100644 index 000000000..9a51cdf10 --- /dev/null +++ b/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/ui_resource_findPhone.h @@ -0,0 +1,46 @@ +/* + * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved. + * Description: UIFindPhoneResource + * Create: 2025-2-13 + */ +#ifndef UI_RESOURCE_FINDPHONE_H +#define UI_RESOURCE_FINDPHONE_H +#include +namespace OHOS { + static const int IMAGE_CONVERTER_TOOL_CONNECT_PHONE_1 = 0x100001; + static const int IMAGE_CONVERTER_TOOL_CONNECT_PHONE_2 = 0x100002; + static const int IMAGE_CONVERTER_TOOL_CONNECT_PHONE_3 = 0x100003; + static const int IMAGE_CONVERTER_TOOL_CONNECT_PHONE_4 = 0x100004; + static const int IMAGE_CONVERTER_TOOL_CONNECT_PHONE_5 = 0x100005; + static const int IMAGE_CONVERTER_TOOL_CONNECT_PHONE_6 = 0x100006; + static const int IMAGE_CONVERTER_TOOL_CONNECT_PHONE_7 = 0x100007; + static const int IMAGE_CONVERTER_TOOL_FINDPHONE001 = 0x100008; + static const int IMAGE_CONVERTER_TOOL_FINDPHONE002 = 0x100009; + static const int IMAGE_CONVERTER_TOOL_FINDPHONE003 = 0x10000a; + static const int IMAGE_CONVERTER_TOOL_FINDPHONE004 = 0x10000b; + static const int IMAGE_CONVERTER_TOOL_FINDPHONE005 = 0x10000c; + static const int IMAGE_CONVERTER_TOOL_FINDPHONE006 = 0x10000d; + static const int IMAGE_CONVERTER_TOOL_FINDPHONE007 = 0x10000e; + static const int IMAGE_CONVERTER_TOOL_FINDPHONE008 = 0x10000f; + static const int IMAGE_CONVERTER_TOOL_FINDPHONE009 = 0x100010; + static const int IMAGE_CONVERTER_TOOL_FINDPHONE010 = 0x100011; + static const int IMAGE_CONVERTER_TOOL_FINDPHONE011 = 0x100012; + static const int IMAGE_CONVERTER_TOOL_FINDPHONE012 = 0x100013; + static const int IMAGE_CONVERTER_TOOL_FINDPHONE013 = 0x100014; + static const int IMAGE_CONVERTER_TOOL_FINDPHONE014 = 0x100015; + static const int IMAGE_CONVERTER_TOOL_FINDPHONE015 = 0x100016; + static const int IMAGE_CONVERTER_TOOL_FINDPHONE016 = 0x100017; + static const int IMAGE_CONVERTER_TOOL_FINDPHONE017 = 0x100018; + static const int IMAGE_CONVERTER_TOOL_FINDPHONE018 = 0x100019; + static const int IMAGE_CONVERTER_TOOL_FINDPHONE019 = 0x10001a; + static const int IMAGE_CONVERTER_TOOL_FINDPHONE020 = 0x10001b; + static const int IMAGE_CONVERTER_TOOL_FINDPHONE021 = 0x10001c; + static const int IMAGE_CONVERTER_TOOL_FINDPHONE022 = 0x10001d; + static const int IMAGE_CONVERTER_TOOL_FINDPHONE023 = 0x10001e; + static const int IMAGE_CONVERTER_TOOL_FINDPHONE024 = 0x10001f; + static const int IMAGE_CONVERTER_TOOL_FINDPHONE025 = 0x100020; + static const int IMAGE_CONVERTER_TOOL_FINDPHONE026 = 0x100021; + static const int IMAGE_CONVERTER_TOOL_FINDPHONE027 = 0x100022; + static const int IMAGE_CONVERTER_TOOL_FINDPHONE028 = 0x100023; +} // OHOS +#endif // UI_RESOURCE_FINDPHONE_H diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/ui_resource_sleep.h b/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/ui_resource_sleep.h new file mode 100644 index 000000000..c5d369d71 --- /dev/null +++ b/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/ui_resource_sleep.h @@ -0,0 +1,28 @@ +/* + * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved. + * Description: UISleepResource + * Create: 2025-06-05 + */ +#ifndef UI_RESOURCE_SLEEP_H +#define UI_RESOURCE_SLEEP_H +#include +namespace OHOS { + static const int IMAGE_CONVERTER_TOOL_BACKGROUND = 0x100001; + static const int IMAGE_CONVERTER_TOOL_BLACK_BG = 0x100002; + static const int IMAGE_CONVERTER_TOOL_BLUE_CIR = 0x100003; + static const int IMAGE_CONVERTER_TOOL_GREEN_CIR = 0x100004; + static const int IMAGE_CONVERTER_TOOL_NORECORD_SLEEP = 0x100005; + static const int IMAGE_CONVERTER_TOOL_ORANGE_CIR = 0x100006; + static const int IMAGE_CONVERTER_TOOL_RECORD_BG = 0x100007; + static const int IMAGE_CONVERTER_TOOL_RECORD_SLEEP = 0x100008; + static const int IMAGE_CONVERTER_TOOL_RED_CIR = 0x100009; + static const int IMAGE_CONVERTER_TOOL_SELECTEDTIME = 0x10000a; + static const int IMAGE_CONVERTER_TOOL_SELECTTIME = 0x10000b; + static const int IMAGE_CONVERTER_TOOL_SETTIMEBTN = 0x10000c; + static const int IMAGE_CONVERTER_TOOL_SETTING = 0x10000d; + static const int IMAGE_CONVERTER_TOOL_START_GRAY = 0x10000e; + static const int IMAGE_CONVERTER_TOOL_STAR_GRAY = 0x10000f; + static const int IMAGE_CONVERTER_TOOL_STAR_YELLOW = 0x100010; + static const int IMAGE_CONVERTER_TOOL_TIPS = 0x100011; +} // OHOS +#endif // UI_RESOURCE_SLEEP_H diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/ui_resource_timer.h b/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/ui_resource_timer.h new file mode 100644 index 000000000..b9a462900 --- /dev/null +++ b/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/ui_resource_timer.h @@ -0,0 +1,27 @@ +/* + * Copyright (c) Huawei Technologies Co., Ltd. 2025-2025. All rights reserved. + * Description: UITimerResource + * Create: 2025-06-05 + */ +#ifndef UI_RESOURCE_TIMER_H +#define UI_RESOURCE_TIMER_H +#include +namespace OHOS { + static const int IMAGE_CONVERTER_TOOL_BG_CIR = 0x100001; + static const int IMAGE_CONVERTER_TOOL_TIMER_1 = 0x100002; + static const int IMAGE_CONVERTER_TOOL_TIMER_15 = 0x100003; + static const int IMAGE_CONVERTER_TOOL_TIMER_3 = 0x100004; + static const int IMAGE_CONVERTER_TOOL_TIMER_30 = 0x100005; + static const int IMAGE_CONVERTER_TOOL_TIMER_BEGIN_GRAY = 0x100006; + static const int IMAGE_CONVERTER_TOOL_TIMER_BEGIN_ORANGE = 0x100007; + static const int IMAGE_CONVERTER_TOOL_TIMER_BG = 0x100008; + static const int IMAGE_CONVERTER_TOOL_TIMER_EXIT = 0x100009; + static const int IMAGE_CONVERTER_TOOL_TIMER_PAUSE = 0x10000a; + static const int IMAGE_CONVERTER_TOOL_TIMER_PAUSE_ORANGE = 0x10000b; + static const int IMAGE_CONVERTER_TOOL_TIMER_PBG = 0x10000c; + static const int IMAGE_CONVERTER_TOOL_TIMER_PLAY = 0x10000d; + static const int IMAGE_CONVERTER_TOOL_TIMER_POINTER = 0x10000e; + static const int IMAGE_CONVERTER_TOOL_TIMER_RESTART = 0x10000f; + static const int IMAGE_CONVERTER_TOOL_TIMER_USER = 0x100010; +} // OHOS +#endif // UI_RESOURCE_TIMER_H diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/ui_resource_weather.h b/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/ui_resource_weather.h new file mode 100644 index 000000000..874ba3f93 --- /dev/null +++ b/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/ui_resource_weather.h @@ -0,0 +1,89 @@ +/* + * Copyright (c) Huawei Technologies Co., Ltd. 2025-2025. All rights reserved. + * Description: UIWeatherResource + * Create: 2025-06-05 + */ +#ifndef UI_RESOURCE_WEATHER_IMAGE_H +#define UI_RESOURCE_WEATHER_IMAGE_H +#include +namespace OHOS { +static const int IMAGE_CONVERTER_TOOL_WEATHER00 = 0x100001; +static const int IMAGE_CONVERTER_TOOL_WEATHER01 = 0x100002; +static const int IMAGE_CONVERTER_TOOL_WEATHER02 = 0x100003; +static const int IMAGE_CONVERTER_TOOL_WEATHER03 = 0x100004; +static const int IMAGE_CONVERTER_TOOL_WEATHER04 = 0x100005; +static const int IMAGE_CONVERTER_TOOL_WEATHER05 = 0x100006; +static const int IMAGE_CONVERTER_TOOL_WEATHER06 = 0x100007; +static const int IMAGE_CONVERTER_TOOL_WEATHER07 = 0x100008; +static const int IMAGE_CONVERTER_TOOL_WEATHER08 = 0x100009; +static const int IMAGE_CONVERTER_TOOL_WEATHER09 = 0x10000a; +static const int IMAGE_CONVERTER_TOOL_WEATHER10 = 0x10000b; +static const int IMAGE_CONVERTER_TOOL_WEATHER11 = 0x10000c; +static const int IMAGE_CONVERTER_TOOL_WEATHER12 = 0x10000d; +static const int IMAGE_CONVERTER_TOOL_WEATHER13 = 0x10000e; +static const int IMAGE_CONVERTER_TOOL_WEATHER14 = 0x10000f; +static const int IMAGE_CONVERTER_TOOL_WEATHER15 = 0x100010; +static const int IMAGE_CONVERTER_TOOL_WEATHER16 = 0x100011; +static const int IMAGE_CONVERTER_TOOL_WEATHER17 = 0x100012; +static const int IMAGE_CONVERTER_TOOL_WEATHER18 = 0x100013; +static const int IMAGE_CONVERTER_TOOL_WEATHER19 = 0x100014; +static const int IMAGE_CONVERTER_TOOL_WEATHER20 = 0x100015; +static const int IMAGE_CONVERTER_TOOL_WEATHER21 = 0x100016; +static const int IMAGE_CONVERTER_TOOL_WEATHER22 = 0x100017; +static const int IMAGE_CONVERTER_TOOL_WEATHER23 = 0x100018; +static const int IMAGE_CONVERTER_TOOL_WEATHER24 = 0x100019; +static const int IMAGE_CONVERTER_TOOL_WEATHER25 = 0x10001a; +static const int IMAGE_CONVERTER_TOOL_WEATHER26 = 0x10001b; +static const int IMAGE_CONVERTER_TOOL_WEATHER27 = 0x10001c; +static const int IMAGE_CONVERTER_TOOL_WEATHER28 = 0x10001d; +static const int IMAGE_CONVERTER_TOOL_WEATHER29 = 0x10001e; +static const int IMAGE_CONVERTER_TOOL_WEATHER30 = 0x10001f; +static const int IMAGE_CONVERTER_TOOL_WEATHER31 = 0x100020; +static const int IMAGE_CONVERTER_TOOL_WEATHER32 = 0x100021; +static const int IMAGE_CONVERTER_TOOL_WEATHER33 = 0x100022; +static const int IMAGE_CONVERTER_TOOL_WEATHER34 = 0x100023; +static const int IMAGE_CONVERTER_TOOL_WEATHER35 = 0x100024; +static const int IMAGE_CONVERTER_TOOL_WEATHER36 = 0x100025; +static const int IMAGE_CONVERTER_TOOL_WEATHER37 = 0x100026; +static const int IMAGE_CONVERTER_TOOL_WEATHER38 = 0x100027; +static const int IMAGE_CONVERTER_TOOL_WEATHER39 = 0x100028; +static const int IMAGE_CONVERTER_TOOL_WEATHER40 = 0x100029; +static const int IMAGE_CONVERTER_TOOL_WEATHER41 = 0x10002a; +static const int IMAGE_CONVERTER_TOOL_WEATHER42 = 0x10002b; +static const int IMAGE_CONVERTER_TOOL_WEATHER43 = 0x10002c; +static const int IMAGE_CONVERTER_TOOL_WEATHER44 = 0x10002d; +static const int IMAGE_CONVERTER_TOOL_WEATHER45 = 0x10002e; +static const int IMAGE_CONVERTER_TOOL_WEATHER46 = 0x10002f; +static const int IMAGE_CONVERTER_TOOL_WEATHER47 = 0x100030; +static const int IMAGE_CONVERTER_TOOL_WEATHER48 = 0x100031; +static const int IMAGE_CONVERTER_TOOL_WEATHER49 = 0x100032; +static const int IMAGE_CONVERTER_TOOL_WEATHER50 = 0x100033; +static const int IMAGE_CONVERTER_TOOL_WEATHER51 = 0x100034; +static const int IMAGE_CONVERTER_TOOL_WEATHER52 = 0x100035; +static const int IMAGE_CONVERTER_TOOL_WEATHER53 = 0x100036; +static const int IMAGE_CONVERTER_TOOL_WEATHER54 = 0x100037; +static const int IMAGE_CONVERTER_TOOL_WEATHER55 = 0x100038; +static const int IMAGE_CONVERTER_TOOL_WEATHER56 = 0x100039; +static const int IMAGE_CONVERTER_TOOL_WEATHER57 = 0x10003a; +static const int IMAGE_CONVERTER_TOOL_WEATHER58 = 0x10003b; +static const int IMAGE_CONVERTER_TOOL_WEATHER59 = 0x10003c; +static const int IMAGE_CONVERTER_TOOL_WEATHER60 = 0x10003d; +static const int IMAGE_CONVERTER_TOOL_WEATHER61 = 0x10003e; +static const int IMAGE_CONVERTER_TOOL_WEATHER62 = 0x10003f; +static const int IMAGE_CONVERTER_TOOL_WEATHER63 = 0x100040; +static const int IMAGE_CONVERTER_TOOL_WEATHER64 = 0x100041; +static const int IMAGE_CONVERTER_TOOL_WEATHER65 = 0x100042; +static const int IMAGE_CONVERTER_TOOL_WEATHER66 = 0x100043; +static const int IMAGE_CONVERTER_TOOL_WEATHER67 = 0x100044; +static const int IMAGE_CONVERTER_TOOL_WEATHER68 = 0x100045; +static const int IMAGE_CONVERTER_TOOL_WEATHER69 = 0x100046; +static const int IMAGE_CONVERTER_TOOL_WEATHER70 = 0x100047; +static const int IMAGE_CONVERTER_TOOL_WEATHER71 = 0x100048; +static const int IMAGE_CONVERTER_TOOL_WEATHER72 = 0x100049; +static const int IMAGE_CONVERTER_TOOL_WEATHER73 = 0x10004a; +static const int IMAGE_CONVERTER_TOOL_WEATHER74 = 0x10004b; +static const int IMAGE_CONVERTER_TOOL_WEATHER75 = 0x10004c; +static const int IMAGE_CONVERTER_TOOL_WEATHER76 = 0x10004d; +static const int IMAGE_CONVERTER_TOOL_WEATHER77 = 0x10004e; +} // OHOS +#endif // UI_RESOURCE_IMAGE_H diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/ui_stopwatch_resource.h b/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/ui_stopwatch_resource.h new file mode 100644 index 000000000..56019f1cd --- /dev/null +++ b/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/include/ui_stopwatch_resource.h @@ -0,0 +1,25 @@ +/* + * Copyright (c) CompanyNameMagicTag 2025-2025. All rights reserved. + * Description: UIStopWatchResource + * Create: 2025-06-05 + */ + +#ifndef UI_STOPWATCH_RESOURCE_H +#define UI_STOPWATCH_RESOURCE_H + +#include + +namespace OHOS { +static const int IMAGE_STOPWATCH_STOPWATCH01 = 0x100001; +static const int IMAGE_STOPWATCH_STOPWATCH02 = 0x100002; +static const int IMAGE_STOPWATCH_STOPWATCH04 = 0x100003; +static const int IMAGE_STOPWATCH_STOPWATCH06 = 0x100004; +static const int IMAGE_STOPWATCH_STOPWATCH08 = 0x100005; +static const int IMAGE_STOPWATCH_STOPWATCH10 = 0x100006; +static const int IMAGE_STOPWATCH_STOPWATCH12 = 0x100007; +static const int IMAGE_STOPWATCH_STOPWATCH14 = 0x100008; +static const int IMAGE_STOPWATCH_STOPWATCH16 = 0x100009; +static const int IMAGE_STOPWATCH_STOPWATCH19 = 0x10000a; +static const int IMAGE_STOPWATCH_STOPWATCH20 = 0x10000b; +} // OHOS +#endif // UI_STOPWATCH_RESOURCE_H diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/src/NativeLauncher.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/src/NativeLauncher.cpp index 7166adcec..7542e8227 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/src/NativeLauncher.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/src/NativeLauncher.cpp @@ -18,20 +18,23 @@ #include "SliceProxy.h" #include "AbilitySliceProxy.h" #include "wearable_log.h" -#include "CallerLogModel.h" -#include "ActivityModel.h" -#include "HeartModel.h" -#include "PlayersModel.h" -#include "HealthModel.h" -#include "VocassistModel.h" -#include "ScreenModels.h" -#include "BluetoothHeadsetEvent.h" +#include "callerlog/CallerLogModel.h" +#include "activity/ActivityModel.h" +#include "heartrate/HeartModel.h" +#include "player/PlayersModel.h" +#include "main/HealthModel.h" +#include "sports/SportsModel.h" +#include "offlinevoice/VocassistModel.h" +#include "screensetting/ScreenModels.h" +#include "bluetooth/BluetoothHeadsetEvent.h" #include "graphic_hardware_config.h" #include "graphic_service.h" #include "common/graphic_startup.h" #ifdef JS_ENABLE #include "product_adapter.h" #endif +#include "RecentManager.h" +#include "PageTransitionMgr.h" //头文件加下面 #include "languagecode/include/LanguageSwitchModel.h" @@ -67,6 +70,8 @@ void NativeLauncher::InitNativeLauncher(LaunchMode mode) { #ifdef JS_ENABLE ACELite::ProductAdapter::SetScreenSize(HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION); + ACELite::ProductAdapter::SetDefaultFontStyle( + DEFAULT_VECTOR_FONT_FILENAME, ACELite::ProductAdapter::GetDefaultFontSize()); #endif WEARABLE_LOGI(WEARABLE_LOG_MODULE_LAUNCHER_FWK, "c %d", mode); if (mode == LaunchMode::SAFE_MODE) @@ -103,7 +108,7 @@ void NativeLauncher::InitNativeLauncher(LaunchMode mode) WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "InitLangues error"); } // 初始化所有预加载slice - InitAllNativeSlices(); + NativeRegisterManager::GetInstance().InitAllNativesSlices(); CallerLogModel::GetInstance()->InitPhoneService(); @@ -174,19 +179,18 @@ void NativeLauncher::InitNativeLauncher(LaunchMode mode) SystemLogModel::GetInstance()->load_nextday_log(); // 读取popup_windows日志 SystemLogModel::GetInstance()->load_popup_windows_log(); -} -void NativeLauncher::InitAllNativeSlices(void) -{ - Graphic::Vector& natives = NativeRegisterManager::GetInstance().GetNatives(); - for(uint16_t index =0; index < natives.Size(); index++) { - if (static_cast(natives[index].type) >= VIEW_MAX_INTER_APP) { - continue; - } - natives[index].native->InitSlice(); - } - NativeRegisterManager::GetInstance().InitAllNativesSlices(); - return; + /* ----------------------------- 650-0723patch合并 ---------------------------- */ + // SportsModel::GetInstance()->Init(); + RecentManager::GetInstance()->SetDirPath("system/recent/"); + RecentManager::GetInstance()->AddToBlackList(VIEW_AOD); + RecentManager::GetInstance()->AddToBlackList(VIEW_RECENT_APP); + RecentManager::GetInstance()->AddToBlackList(VIEW_APPLIST); + RecentManager::GetInstance()->AddToBlackList(VIEW_MAIN); + RecentManager::GetInstance()->SetMaxSize(5); // 5: max number of recent apps. + PageTransitionMgr::GetInstance().SetRecentMinPeriod(1000); // 1000: min period + /* -------------------------------------------------------------------------- */ + } } diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/src/NativeRegisterManager.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/src/NativeRegisterManager.cpp index cf1d7b98b..3495dbaa4 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/src/NativeRegisterManager.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/src/NativeRegisterManager.cpp @@ -8,15 +8,6 @@ #include "NativeRegisterManager.h" namespace OHOS { -NativeRegisterManager::~NativeRegisterManager() -{ - for(uint16_t i =0; i < natives_.Size(); i++) { - if (natives_[i].native != nullptr) { - delete natives_[i].native; - natives_[i].native = nullptr; - } - } -} void NativeRegisterManager::InitAllNativesSlices() { @@ -26,34 +17,11 @@ void NativeRegisterManager::InitAllNativesSlices() } } -Graphic::Vector& NativeRegisterManager::GetNatives() -{ - return natives_; -} - List& NativeRegisterManager::GetNativeAppLists() { return nativeAppLists_; } -void NativeRegisterManager::RegisterNative(const AppItem &nativeAppList, NativeRegisterCallback* native) -{ - if (native == nullptr) { - GRAPHIC_LOGE("native can't be nullptr"); - return; - } - for(uint16_t i = 0; i < natives_.Size(); i++) { - if (natives_[i].type == (NativeRegisterType)nativeAppList.id) { - GRAPHIC_LOGE("RegisterNative failed because type %d already registered", nativeAppList.id); - return; - } - } - GRAPHIC_LOGI("register native %d", nativeAppList.id); - NativeMap map = {(NativeRegisterType)nativeAppList.id, native}; - natives_.PushBack(map); - nativeAppLists_.PushBack(nativeAppList); -} - void NativeRegisterManager::RegisterSlice(const uint16_t id, SliceProxy* sliceProxy) { if (sliceProxy == nullptr) { @@ -72,7 +40,7 @@ void NativeRegisterManager::RegisterSlice(const uint16_t id, SliceProxy* slicePr void NativeRegisterManager::RegisterMenu(const uint16_t id, const char *icon, const char *iconHexagon, const char *label) { - AppItem item = {id, icon, icon, iconHexagon, label, nullptr}; + AppItem item = {id, icon, iconHexagon, label, nullptr}; ListNode* appNode = nativeAppLists_.Head(); while (appNode != nativeAppLists_.End()) { if (id == appNode->data_.id) { @@ -88,6 +56,23 @@ void NativeRegisterManager::RegisterMenu(const uint16_t id, const char *icon, co nativeAppLists_.PushBack(item); } +void NativeRegisterManager::RegisterMenu(const AppItem &item) +{ + ListNode* appNode = nativeAppLists_.Head(); + while (appNode != nativeAppLists_.End()) { + if (item.id == appNode->data_.id) { + GRAPHIC_LOGE("Register menu failed because id %d already registered.", item.id); + return; + } + if (item.id < appNode->data_.id) { + nativeAppLists_.Insert(appNode, item); + return; + } + appNode = appNode->next_; + } + nativeAppLists_.PushBack(item); +} + bool NativeRegisterManager::IsSliceIdExist(AppViewId id) { for (uint16_t index = 0; index < slices_.Size(); index++) { diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/src/UICardPageFactory.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/src/UICardPageFactory.cpp new file mode 100644 index 000000000..649aa2f3c --- /dev/null +++ b/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/src/UICardPageFactory.cpp @@ -0,0 +1,43 @@ +/* + * Copyright (c) CompanyNameMagicTag 2025. All rights reserved. + * Description: UICardPageFactory + * Author: + * Create: 2025-06 + */ + +#include "UICardPageFactory.h" +#include "wearable_log.h" + +namespace OHOS { + +void UICardPageFactory::RegisterWatchDial(const uint16_t mode, const uint16_t id, UICardPageProxyInterface* uiCardPage) +{ + if (mode >= DIAL_DISPLAY_MODE_MAX || uiCardPage == nullptr) { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Can't register watch dial using invalid mode or proxy %d-%p", + mode, uiCardPage); + return; + } + if (watchDials_[mode].find(id) != watchDials_[mode].end()) { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Watch dial mode %d id:%d has already been registered", mode, id); + return; + } else { + watchDials_[mode].insert({id, uiCardPage}); + } +} + +UICardPage* UICardPageFactory::CreateWatchDial(uint16_t mode, uint16_t id) +{ + if (mode >= DIAL_DISPLAY_MODE_MAX ) { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Can't create watch dial using invalid mode %d", mode); + return nullptr; + } + + auto it = watchDials_[mode].find(id); + if (it != watchDials_[mode].end()) { + return it->second->CreateUICardPage(); + } else { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Watch dial mode %d id:%d was not registered", mode, id); + return nullptr; + } +} +} // namespace OHOS