1 /* 2 * Copyright (c) 2021 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef FOUNDATION_ACE_FRAMEWORKS_BASE_RESOURCE_INTERNAL_RESOURCE_H 17 #define FOUNDATION_ACE_FRAMEWORKS_BASE_RESOURCE_INTERNAL_RESOURCE_H 18 19 #include <functional> 20 21 #include "base/utils/singleton.h" 22 23 namespace OHOS::Ace { 24 25 class InternalResource final : public Singleton<InternalResource> { 26 DECLARE_SINGLETON(InternalResource); 27 28 public: 29 enum class ResourceId : uint32_t { 30 NO_ID = 0, 31 SELECT_ARROW_NORMAL_PNG, 32 SELECT_ARROW_DISABLED_PNG, 33 INDEXER_ARROW_PNG, 34 FA_CLOCK_WIDGET_HOUR, 35 FA_CLOCK_WIDGET_MINUTE, 36 FA_CLOCK_WIDGET_SECOND, 37 FA_BLACK_CLOCK_WIDGET_HOUR, 38 FA_BLACK_CLOCK_WIDGET_MINUTE, 39 FA_BLACK_CLOCK_WIDGET_SECOND, 40 41 // 10000 - 20000 is reserved for SVG resource. 42 SVG_START = 10000, 43 CORRECT_SVG, 44 WRONG_SVG, 45 SEARCH_SVG, 46 CLOSE_SVG, 47 PLAY_SVG, 48 PAUSE_SVG, 49 FULLSCREEN_SVG, 50 QUIT_FULLSCREEN_SVG, 51 UP_ARROW_SVG, 52 WATCH_UP_ARROW_SVG, 53 DOWN_ARROW_SVG, 54 WATCH_DOWN_ARROW_SVG, 55 SHOW_PASSWORD_SVG, 56 HIDE_PASSWORD_SVG, 57 SEMI_MODAL_BAR_MIDDLE_SVG, 58 SEMI_MODAL_BAR_DOWN_SVG, 59 LEFT_ARROW_SVG, 60 RIGHT_ARROW_SVG, 61 STEPPER_BACK_ARROW, 62 STEPPER_NEXT_ARROW, 63 PIECE_DELETE_SVG, 64 RATE_STAR_BIG_OFF_SVG, 65 RATE_STAR_BIG_ON_SVG, 66 RATE_STAR_SMALL_OFF_SVG, 67 RATE_STAR_SMALL_ON_SVG, 68 TV_RATE_STAR_BIG_OFF_SVG, 69 TV_RATE_STAR_BIG_ON_SVG, 70 TV_RATE_STAR_SMALL_OFF_SVG, 71 TV_RATE_STAR_SMALL_ON_SVG, 72 IC_BACK, 73 IC_MORE, 74 IC_MORE_DARK, 75 IC_MORE_TRANSPARENT, 76 TRANSLATE_C2E_SVG, 77 SHARE_SVG, 78 SIDE_BAR, 79 CONTAINER_MODAL_WINDOW_CLOSE, 80 CONTAINER_MODAL_WINDOW_MAXIMIZE, 81 CONTAINER_MODAL_WINDOW_MINIMIZE, 82 CONTAINER_MODAL_WINDOW_RECOVER, 83 CONTAINER_MODAL_WINDOW_SPLIT_LEFT, 84 SVG_END = 20000, 85 86 // 20001 - 30000 is reserved for i18n resource. 87 I18N_START = 20001, 88 INDEXLETTER_BAR_JSON, 89 ERRORINFO_JSON, 90 ENTRY_JSON, 91 I18N_END = 30000, 92 }; 93 94 const uint8_t* GetResource(const ResourceId id, size_t& size) const; 95 }; 96 97 } // namespace OHOS::Ace 98 99 #endif // FOUNDATION_ACE_FRAMEWORKS_BASE_RESOURCE_INTERNAL_RESOURCE_H 100