123b3eb3cSopenharmony_ci/* 223b3eb3cSopenharmony_ci * Copyright (c) 2021-2023 Huawei Device Co., Ltd. 323b3eb3cSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 423b3eb3cSopenharmony_ci * you may not use this file except in compliance with the License. 523b3eb3cSopenharmony_ci * You may obtain a copy of the License at 623b3eb3cSopenharmony_ci * 723b3eb3cSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 823b3eb3cSopenharmony_ci * 923b3eb3cSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 1023b3eb3cSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 1123b3eb3cSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1223b3eb3cSopenharmony_ci * See the License for the specific language governing permissions and 1323b3eb3cSopenharmony_ci * limitations under the License. 1423b3eb3cSopenharmony_ci */ 1523b3eb3cSopenharmony_ci 1623b3eb3cSopenharmony_ci#ifndef FOUNDATION_ACE_FRAMEWORKS_BASE_RESOURCE_INTERNAL_RESOURCE_H 1723b3eb3cSopenharmony_ci#define FOUNDATION_ACE_FRAMEWORKS_BASE_RESOURCE_INTERNAL_RESOURCE_H 1823b3eb3cSopenharmony_ci 1923b3eb3cSopenharmony_ci#include <cstddef> 2023b3eb3cSopenharmony_ci#include <cstdint> 2123b3eb3cSopenharmony_ci 2223b3eb3cSopenharmony_ci#include "base/utils/singleton.h" 2323b3eb3cSopenharmony_ci 2423b3eb3cSopenharmony_cinamespace OHOS::Ace { 2523b3eb3cSopenharmony_ci 2623b3eb3cSopenharmony_ciclass InternalResource final : public Singleton<InternalResource> { 2723b3eb3cSopenharmony_ci DECLARE_SINGLETON(InternalResource); 2823b3eb3cSopenharmony_ci 2923b3eb3cSopenharmony_cipublic: 3023b3eb3cSopenharmony_ci enum class ResourceId : uint32_t { 3123b3eb3cSopenharmony_ci NO_ID = 0, 3223b3eb3cSopenharmony_ci SELECT_ARROW_NORMAL_PNG, 3323b3eb3cSopenharmony_ci SELECT_ARROW_DISABLED_PNG, 3423b3eb3cSopenharmony_ci INDEXER_ARROW_PNG, 3523b3eb3cSopenharmony_ci FA_CLOCK_WIDGET_HOUR, 3623b3eb3cSopenharmony_ci FA_CLOCK_WIDGET_MINUTE, 3723b3eb3cSopenharmony_ci FA_CLOCK_WIDGET_SECOND, 3823b3eb3cSopenharmony_ci FA_BLACK_CLOCK_WIDGET_HOUR, 3923b3eb3cSopenharmony_ci FA_BLACK_CLOCK_WIDGET_MINUTE, 4023b3eb3cSopenharmony_ci FA_BLACK_CLOCK_WIDGET_SECOND, 4123b3eb3cSopenharmony_ci CONTAINER_MODAL_WINDOW_SPLIT_LEFT, 4223b3eb3cSopenharmony_ci CONTAINER_MODAL_WINDOW_DEFOCUS_CLOSE, 4323b3eb3cSopenharmony_ci CONTAINER_MODAL_WINDOW_DEFOCUS_MAXIMIZE, 4423b3eb3cSopenharmony_ci CONTAINER_MODAL_WINDOW_DEFOCUS_MINIMIZE, 4523b3eb3cSopenharmony_ci CONTAINER_MODAL_WINDOW_DEFOCUS_RECOVER, 4623b3eb3cSopenharmony_ci CONTAINER_MODAL_WINDOW_DEFOCUS_SPLIT_LEFT, 4723b3eb3cSopenharmony_ci 4823b3eb3cSopenharmony_ci // 10000 - 20000 is reserved for SVG resource. 4923b3eb3cSopenharmony_ci SVG_START = 10000, 5023b3eb3cSopenharmony_ci CORRECT_SVG, 5123b3eb3cSopenharmony_ci WRONG_SVG, 5223b3eb3cSopenharmony_ci SEARCH_SVG, 5323b3eb3cSopenharmony_ci CLOSE_SVG, 5423b3eb3cSopenharmony_ci PLAY_SVG, 5523b3eb3cSopenharmony_ci PAUSE_SVG, 5623b3eb3cSopenharmony_ci FULLSCREEN_SVG, 5723b3eb3cSopenharmony_ci QUIT_FULLSCREEN_SVG, 5823b3eb3cSopenharmony_ci UP_ARROW_SVG, 5923b3eb3cSopenharmony_ci WATCH_UP_ARROW_SVG, 6023b3eb3cSopenharmony_ci DOWN_ARROW_SVG, 6123b3eb3cSopenharmony_ci WATCH_DOWN_ARROW_SVG, 6223b3eb3cSopenharmony_ci SHOW_PASSWORD_SVG, 6323b3eb3cSopenharmony_ci HIDE_PASSWORD_SVG, 6423b3eb3cSopenharmony_ci SEMI_MODAL_BAR_MIDDLE_SVG, 6523b3eb3cSopenharmony_ci SEMI_MODAL_BAR_DOWN_SVG, 6623b3eb3cSopenharmony_ci LEFT_ARROW_SVG, 6723b3eb3cSopenharmony_ci RIGHT_ARROW_SVG, 6823b3eb3cSopenharmony_ci STEPPER_BACK_ARROW, 6923b3eb3cSopenharmony_ci STEPPER_NEXT_ARROW, 7023b3eb3cSopenharmony_ci PIECE_DELETE_SVG, 7123b3eb3cSopenharmony_ci RATE_STAR_BIG_OFF_SVG, 7223b3eb3cSopenharmony_ci RATE_STAR_BIG_ON_SVG, 7323b3eb3cSopenharmony_ci RATE_STAR_SMALL_OFF_SVG, 7423b3eb3cSopenharmony_ci RATE_STAR_SMALL_ON_SVG, 7523b3eb3cSopenharmony_ci TV_RATE_STAR_BIG_OFF_SVG, 7623b3eb3cSopenharmony_ci TV_RATE_STAR_BIG_ON_SVG, 7723b3eb3cSopenharmony_ci TV_RATE_STAR_SMALL_OFF_SVG, 7823b3eb3cSopenharmony_ci TV_RATE_STAR_SMALL_ON_SVG, 7923b3eb3cSopenharmony_ci TITLEBAR_BACK, 8023b3eb3cSopenharmony_ci IC_BACK, 8123b3eb3cSopenharmony_ci IC_MORE, 8223b3eb3cSopenharmony_ci IC_MORE_DARK, 8323b3eb3cSopenharmony_ci IC_MORE_TRANSPARENT, 8423b3eb3cSopenharmony_ci IC_WINDOW_MENU_FULLSCREEN, 8523b3eb3cSopenharmony_ci IC_WINDOW_MENU_MAXIMIZE, 8623b3eb3cSopenharmony_ci IC_WINDOW_MENU_OK, 8723b3eb3cSopenharmony_ci IC_WINDOW_MENU_SCREEN_L, 8823b3eb3cSopenharmony_ci IC_WINDOW_MENU_SCREEN_N, 8923b3eb3cSopenharmony_ci TRANSLATE_C2E_SVG, 9023b3eb3cSopenharmony_ci SHARE_SVG, 9123b3eb3cSopenharmony_ci SIDE_BAR, 9223b3eb3cSopenharmony_ci SPINNER, 9323b3eb3cSopenharmony_ci INPUT_SEARCH_SVG, 9423b3eb3cSopenharmony_ci APP_BAR_BACK_SVG, 9523b3eb3cSopenharmony_ci APP_BAR_FA_SVG, 9623b3eb3cSopenharmony_ci APP_BAR_MENU_SVG, 9723b3eb3cSopenharmony_ci APP_BAR_CLOSE_SVG, 9823b3eb3cSopenharmony_ci MENU_OK_SVG, 9923b3eb3cSopenharmony_ci SPINNER_DISABLE, 10023b3eb3cSopenharmony_ci LOCATION_BUTTON_FILLED_SVG, 10123b3eb3cSopenharmony_ci LOCATION_BUTTON_LINE_SVG, 10223b3eb3cSopenharmony_ci PASTE_BUTTON_LINE_SVG, 10323b3eb3cSopenharmony_ci SAVE_BUTTON_FILLED_SVG, 10423b3eb3cSopenharmony_ci SAVE_BUTTON_LINE_SVG, 10523b3eb3cSopenharmony_ci SAVE_BUTTON_PICTURE_SVG, 10623b3eb3cSopenharmony_ci IC_PUBLIC_ARROW_LEFT_SVG, 10723b3eb3cSopenharmony_ci IC_PUBLIC_ARROW_RIGHT_SVG, 10823b3eb3cSopenharmony_ci IC_PUBLIC_ARROW_UP_SVG, 10923b3eb3cSopenharmony_ci IC_PUBLIC_ARROW_DOWN_SVG, 11023b3eb3cSopenharmony_ci IC_PUBLIC_DOUBLE_ARROW_LEFT_SVG, 11123b3eb3cSopenharmony_ci IC_PUBLIC_DOUBLE_ARROW_RIGHT_SVG, 11223b3eb3cSopenharmony_ci IC_CUT_SVG, 11323b3eb3cSopenharmony_ci IC_COPY_SVG, 11423b3eb3cSopenharmony_ci IC_PASTE_SVG, 11523b3eb3cSopenharmony_ci IC_SELECT_ALL_SVG, 11623b3eb3cSopenharmony_ci IC_SHARE_SVG, 11723b3eb3cSopenharmony_ci IC_TRANSLATE_SVG, 11823b3eb3cSopenharmony_ci IC_SEARCH_SVG, 11923b3eb3cSopenharmony_ci IC_AI_WRITE_SVG, 12023b3eb3cSopenharmony_ci IC_BOTTOMSHEET_CLOSE_SVG, 12123b3eb3cSopenharmony_ci IC_CANCEL_SVG, 12223b3eb3cSopenharmony_ci RADIO_TICK_SVG, 12323b3eb3cSopenharmony_ci RADIO_DOT_SVG, 12423b3eb3cSopenharmony_ci IC_TAKEPHOTO_SVG, 12523b3eb3cSopenharmony_ci CONTAINER_MODAL_WINDOW_CLOSE, 12623b3eb3cSopenharmony_ci CONTAINER_MODAL_WINDOW_MAXIMIZE, 12723b3eb3cSopenharmony_ci CONTAINER_MODAL_WINDOW_MINIMIZE, 12823b3eb3cSopenharmony_ci CONTAINER_MODAL_WINDOW_RECOVER, 12923b3eb3cSopenharmony_ci SVG_END = 20000, 13023b3eb3cSopenharmony_ci 13123b3eb3cSopenharmony_ci // 20001 - 30000 is reserved for i18n resource. 13223b3eb3cSopenharmony_ci I18N_START = 20001, 13323b3eb3cSopenharmony_ci INDEXLETTER_BAR_JSON, 13423b3eb3cSopenharmony_ci ERRORINFO_JSON, 13523b3eb3cSopenharmony_ci ENTRY_JSON, 13623b3eb3cSopenharmony_ci I18N_END = 30000, 13723b3eb3cSopenharmony_ci }; 13823b3eb3cSopenharmony_ci 13923b3eb3cSopenharmony_ci const uint8_t* GetResource(const ResourceId id, size_t& size) const; 14023b3eb3cSopenharmony_ci}; 14123b3eb3cSopenharmony_ci 14223b3eb3cSopenharmony_ci} // namespace OHOS::Ace 14323b3eb3cSopenharmony_ci 14423b3eb3cSopenharmony_ci#endif // FOUNDATION_ACE_FRAMEWORKS_BASE_RESOURCE_INTERNAL_RESOURCE_H 145