• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021-2022 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 #include <map>
17 
18 #include "base/log/log.h"
19 #include "base/resource/internal_resource.h"
20 
21 // binary/play.svg
22 // Use objcopy transform to compiled object file.
23 // The following parameters represent the beginning and end of the file.
24 extern uint8_t _binary_play_svg_start[];
25 extern uint8_t* _binary_play_svg_end;
26 
27 // binary/pause.svg
28 // Use objcopy transform to compiled object file.
29 // The following parameters represent the beginning and end of the file.
30 extern uint8_t _binary_pause_svg_start[];
31 extern uint8_t* _binary_pause_svg_end;
32 
33 // binary/select_arrow_normal.png
34 // Use objcopy transform to compiled object file.
35 // The following parameters represent the beginning and end of the file.
36 extern uint8_t _binary_select_arrow_normal_png_start[];
37 extern uint8_t* _binary_select_arrow_normal_png_end;
38 
39 // binary/select_arrow_disabled.png
40 // Use objcopy transform to compiled object file.
41 // The following parameters represent the beginning and end of the file.
42 extern uint8_t _binary_select_arrow_disabled_png_start[];
43 extern uint8_t* _binary_select_arrow_disabled_png_end;
44 
45 // binary/full_screen.svg
46 // Use objcopy transform to compiled object file.
47 // The following parameters represent the beginning and end of the file.
48 extern uint8_t _binary_full_screen_svg_start[];
49 extern uint8_t* _binary_full_screen_svg_end;
50 
51 // binary/exit_full_screen.svg
52 // Use objcopy transform to compiled object file.
53 // The following parameters represent the beginning and end of the file.
54 extern uint8_t _binary_exit_full_screen_svg_start[];
55 extern uint8_t* _binary_exit_full_screen_svg_end;
56 
57 // binary/errorcode.json
58 // Use objcopy transform to compiled object file.
59 // The following parameters represent the beginning and end of the file.
60 extern uint8_t _binary_errorcode_json_start[];
61 extern uint8_t* _binary_errorcode_json_end;
62 
63 // binary/tv_rate_star_big_off.svg
64 // Use objcopy transform to compiled object file.
65 // The following parameters represent the beginning and end of the file.
66 extern uint8_t _binary_tv_rate_star_big_off_svg_start[];
67 extern uint8_t* _binary_tv_rate_star_big_off_svg_end;
68 
69 // binary/tv_rate_star_big_on.svg
70 // Use objcopy transform to compiled object file.
71 // The following parameters represent the beginning and end of the file.
72 extern uint8_t _binary_tv_rate_star_big_on_svg_start[];
73 extern uint8_t* _binary_tv_rate_star_big_on_svg_end;
74 
75 // binary/tv_rate_star_small_off.svg
76 // Use objcopy transform to compiled object file.
77 // The following parameters represent the beginning and end of the file.
78 extern uint8_t _binary_tv_rate_star_small_off_svg_start[];
79 extern uint8_t* _binary_tv_rate_star_small_off_svg_end;
80 
81 // binary/tv_rate_star_small_on.png
82 // Use objcopy transform to compiled object file.
83 // The following parameters represent the beginning and end of the file.
84 extern uint8_t _binary_tv_rate_star_small_on_svg_start[];
85 extern uint8_t* _binary_tv_rate_star_small_on_svg_end;
86 
87 // binary/rate_star_big_off.svg
88 // Use objcopy transform to compiled object file.
89 // The following parameters represent the beginning and end of the file.
90 extern uint8_t _binary_rate_star_big_off_svg_start[];
91 extern uint8_t* _binary_rate_star_big_off_svg_end;
92 
93 // binary/rate_star_big_on.svg
94 // Use objcopy transform to compiled object file.
95 // The following parameters represent the beginning and end of the file.
96 extern uint8_t _binary_rate_star_big_on_svg_start[];
97 extern uint8_t* _binary_rate_star_big_on_svg_end;
98 
99 // binary/rate_star_small_off.svg
100 // Use objcopy transform to compiled object file.
101 // The following parameters represent the beginning and end of the file.
102 extern uint8_t _binary_rate_star_small_off_svg_start[];
103 extern uint8_t* _binary_rate_star_small_off_svg_end;
104 
105 // binary/rate_star_small_on.svg
106 // Use objcopy transform to compiled object file.
107 // The following parameters represent the beginning and end of the file.
108 extern uint8_t _binary_rate_star_small_on_svg_start[];
109 extern uint8_t* _binary_rate_star_small_on_svg_end;
110 
111 // binary/rate_star_small_on.svg
112 // Use objcopy transform to compiled object file.
113 // The following parameters represent the beginning and end of the file.
114 extern uint8_t _binary_rate_star_small_on_svg_start[];
115 extern uint8_t* _binary_rate_star_small_on_svg_end;
116 
117 // binary/indexer_arrow.png
118 // Use objcopy transform to compiled object file.
119 // The following parameters represent the beginning and end of the file.
120 extern uint8_t _binary_indexer_arrow_png_start[];
121 extern uint8_t* _binary_indexer_arrow_png_end;
122 
123 // binary/correct.svg
124 // Use objcopy transform to compiled object file.
125 // The following parameters represent the beginning and end of the file.
126 extern uint8_t _binary_correct_svg_start[];
127 extern uint8_t* _binary_correct_svg_end;
128 
129 // binary/wrong.svg
130 // Use objcopy transform to compiled object file.
131 // The following parameters represent the beginning and end of the file.
132 extern uint8_t _binary_wrong_svg_start[];
133 extern uint8_t* _binary_wrong_svg_end;
134 
135 // binary/search.svg
136 // Use objcopy transform to compiled object file.
137 // The following parameters represent the beginning and end of the file.
138 extern uint8_t _binary_search_svg_start[];
139 extern uint8_t* _binary_search_svg_end;
140 
141 // binary/close.svg
142 // Use objcopy transform to compiled object file.
143 // The following parameters represent the beginning and end of the file.
144 extern uint8_t _binary_close_svg_start[];
145 extern uint8_t* _binary_close_svg_end;
146 
147 // binary/indexletter_bar.json
148 // Use objcopy transform to compiled object file.
149 // The following parameters represent the beginning and end of the file.
150 extern uint8_t _binary_indexletter_bar_json_start[];
151 extern uint8_t* _binary_indexletter_bar_json_end;
152 
153 // binary/entry.json
154 // Use objcopy transform to compiled object file.
155 // The following parameters represent the beginning and end of the file.
156 extern uint8_t _binary_entry_json_start[];
157 extern uint8_t* _binary_entry_json_end;
158 
159 // binary/up_arrow.svg
160 // Use objcopy transform to compiled object file.
161 // The following parameters represent the beginning and end of the file.
162 extern uint8_t _binary_up_arrow_svg_start[];
163 extern uint8_t* _binary_up_arrow_svg_end;
164 
165 // binary/watch_up_arrow.svg
166 // Use objcopy transform to compiled object file.
167 // The following parameters represent the beginning and end of the file.
168 extern uint8_t _binary_watch_up_arrow_svg_start[];
169 extern uint8_t* _binary_watch_up_arrow_svg_end;
170 
171 // binary/down_arrow.svg
172 // Use objcopy transform to compiled object file.
173 // The following parameters represent the beginning and end of the file.
174 extern uint8_t _binary_down_arrow_svg_start[];
175 extern uint8_t* _binary_down_arrow_svg_end;
176 
177 // binary/watch_down_arrow.svg
178 // Use objcopy transform to compiled object file.
179 // The following parameters represent the beginning and end of the file.
180 extern uint8_t _binary_watch_down_arrow_svg_start[];
181 extern uint8_t* _binary_watch_down_arrow_svg_end;
182 
183 // binary/show_password.svg
184 // Use objcopy transform to compiled object file.
185 // The following parameters represent the beginning and end of the file.
186 extern uint8_t _binary_show_password_svg_start[];
187 extern uint8_t* _binary_show_password_svg_end;
188 
189 // binary/hide_password.svg
190 // Use objcopy transform to compiled object file.
191 // The following parameters represent the beginning and end of the file.
192 extern uint8_t _binary_hide_password_svg_start[];
193 extern uint8_t* _binary_hide_password_svg_end;
194 
195 // binary/semi_modal_bar_down.svg
196 // Use objcopy transform to compiled object file.
197 // The following parameters represent the beginning and end of the file.
198 extern uint8_t _binary_semi_modal_bar_down_svg_start[];
199 extern uint8_t* _binary_semi_modal_bar_down_svg_end;
200 
201 // binary/semi_modal_bar_middle.svg
202 // Use objcopy transform to compiled object file.
203 // The following parameters represent the beginning and end of the file.
204 extern uint8_t _binary_semi_modal_bar_middle_svg_start[];
205 extern uint8_t* _binary_semi_modal_bar_middle_svg_end;
206 
207 // binary/left_arrow.svg
208 // Use objcopy transform to compiled object file.
209 // The following parameters represent the beginning and end of the file.
210 extern uint8_t _binary_left_arrow_svg_start[];
211 extern uint8_t* _binary_left_arrow_svg_end;
212 
213 // binary/right_arrow.svg
214 // Use objcopy transform to compiled object file.
215 // The following parameters represent the beginning and end of the file.
216 extern uint8_t _binary_right_arrow_svg_start[];
217 extern uint8_t* _binary_right_arrow_svg_end;
218 
219 // binary/stepper_back_arrow.svg
220 // Use objcopy transform to compiled object file.
221 // The following parameters represent the beginning and end of the file.
222 extern uint8_t _binary_stepper_back_arrow_svg_start[];
223 extern uint8_t* _binary_stepper_back_arrow_svg_end;
224 
225 // binary/stepper_next_arrow.svg
226 // Use objcopy transform to compiled object file.
227 // The following parameters represent the beginning and end of the file.
228 extern uint8_t _binary_stepper_next_arrow_svg_start[];
229 extern uint8_t* _binary_stepper_next_arrow_svg_end;
230 
231 // binary/piece_delete.svg
232 // Use objcopy transform to compiled object file.
233 // The following parameters represent the beginning and end of the file.
234 extern uint8_t _binary_piece_delete_svg_start[];
235 extern uint8_t* _binary_piece_delete_svg_end;
236 
237 // binary/ic_back.svg
238 // Use objcopy transform to compiled object file.
239 // The following parameters represent the beginning and end of the file.
240 extern uint8_t _binary_ic_back_svg_start[];
241 extern uint8_t* _binary_ic_back_svg_end;
242 
243 // binary/ic_more.svg
244 // Use objcopy transform to compiled object file.
245 // The following parameters represent the beginning and end of the file.
246 extern uint8_t _binary_ic_more_svg_start[];
247 extern uint8_t* _binary_ic_more_svg_end;
248 
249 // binary/ic_more_dark.svg
250 // Use objcopy transform to compiled object file.
251 // The following parameters represent the beginning and end of the file.
252 extern uint8_t _binary_ic_more_dark_svg_start[];
253 extern uint8_t* _binary_ic_more_dark_svg_end;
254 
255 // binary/ic_more_transparent.svg
256 // Use objcopy transform to compiled object file.
257 // The following parameters represent the beginning and end of the file.
258 extern uint8_t _binary_ic_more_transparent_svg_start[];
259 extern uint8_t* _binary_ic_more_transparent_svg_end;
260 
261 // binary/translate_c2e.svg
262 // Use objcopy transform to compiled object file.
263 // The following parameters represent the beginning and end of the file.
264 extern uint8_t _binary_translate_c2e_svg_start[];
265 extern uint8_t* _binary_translate_c2e_svg_end;
266 
267 // binary/share.svg
268 // Use objcopy transform to compiled object file.
269 // The following parameters represent the beginning and end of the file.
270 extern uint8_t _binary_share_svg_start[];
271 extern uint8_t* _binary_share_svg_end;
272 
273 // binary/fa_clock_widget_hour.png
274 extern uint8_t _binary_fa_clock_widget_hour_png_start[];
275 extern uint8_t* _binary_fa_clock_widget_hour_png_end;
276 
277 // binary/fa_clock_widget_minute.png
278 extern uint8_t _binary_fa_clock_widget_minute_png_start[];
279 extern uint8_t* _binary_fa_clock_widget_minute_png_end;
280 
281 // binary/fa_clock_widget_second.png
282 extern uint8_t _binary_fa_clock_widget_second_png_start[];
283 extern uint8_t* _binary_fa_clock_widget_second_png_end;
284 
285 // binary/fa_black_clock_widget_hour.png
286 extern uint8_t _binary_fa_black_clock_widget_hour_png_start[];
287 extern uint8_t* _binary_fa_black_clock_widget_hour_png_end;
288 
289 // binary/fa_black_clock_widget_minute.png
290 extern uint8_t _binary_fa_black_clock_widget_minute_png_start[];
291 extern uint8_t* _binary_fa_black_clock_widget_minute_png_end;
292 
293 // binary/fa_black_clock_widget_second.png
294 extern uint8_t _binary_fa_black_clock_widget_second_png_start[];
295 extern uint8_t* _binary_fa_black_clock_widget_second_png_end;
296 
297 // binary/ic_public_drawer.svg
298 // Use objcopy transform to compiled object file.
299 // The following parameters represent the beginning and end of the file.
300 extern uint8_t _binary_ic_public_drawer_svg_start[];
301 extern uint8_t* _binary_ic_public_drawer_svg_end;
302 
303 // binary/ic_public_spinner.svg
304 // Use objcopy transform to compiled object file.
305 // The following parameters represent the beginning and end of the file.
306 extern uint8_t _binary_ic_public_spinner_svg_start[];
307 extern uint8_t* _binary_ic_public_spinner_svg_end;
308 
309 // binary/ic_public_input_search.svg
310 // Use objcopy transform to compiled object file.
311 // The following parameters represent the beginning and end of the file.
312 extern uint8_t _binary_ic_public_input_search_svg_start[];
313 extern uint8_t* _binary_ic_public_input_search_svg_end;
314 
315 // binary/app_bar_back.svg
316 extern uint8_t _binary_app_bar_back_svg_start[];
317 extern uint8_t* _binary_app_bar_back_svg_end;
318 
319 // binary/app_bar_fa.svg
320 extern uint8_t _binary_app_bar_fa_svg_start[];
321 extern uint8_t* _binary_app_bar_fa_svg_end;
322 
323 // binary/container_modal_window_close.png
324 extern uint8_t _binary_container_modal_window_close_png_start[];
325 extern uint8_t* _binary_container_modal_window_close_png_end;
326 
327 // binary/container_modal_window_maximize.png
328 extern uint8_t _binary_container_modal_window_maximize_png_start[];
329 extern uint8_t* _binary_container_modal_window_maximize_png_end;
330 
331 // binary/container_modal_window_minimize.png
332 extern uint8_t _binary_container_modal_window_minimize_png_start[];
333 extern uint8_t* _binary_container_modal_window_minimize_png_end;
334 
335 // binary/container_modal_window_recover.png
336 extern uint8_t _binary_container_modal_window_recover_png_start[];
337 extern uint8_t* _binary_container_modal_window_recover_png_end;
338 
339 // binary/container_modal_window_split_left.png
340 extern uint8_t _binary_container_modal_window_split_left_png_start[];
341 extern uint8_t* _binary_container_modal_window_split_left_png_end;
342 
343 // binary/container_modal_window_defocus_close.png
344 extern uint8_t _binary_container_modal_window_defocus_close_png_start[];
345 extern uint8_t* _binary_container_modal_window_defocus_close_png_end;
346 
347 // binary/container_modal_window_defocus_maximize.png
348 extern uint8_t _binary_container_modal_window_defocus_maximize_png_start[];
349 extern uint8_t* _binary_container_modal_window_defocus_maximize_png_end;
350 
351 // binary/container_modal_window_defocus_minimize.png
352 extern uint8_t _binary_container_modal_window_defocus_minimize_png_start[];
353 extern uint8_t* _binary_container_modal_window_defocus_minimize_png_end;
354 
355 // binary/container_modal_window_defocus_recover.png
356 extern uint8_t _binary_container_modal_window_defocus_recover_png_start[];
357 extern uint8_t* _binary_container_modal_window_defocus_recover_png_end;
358 
359 // binary/container_modal_window_defocus_split_left.png
360 extern uint8_t _binary_container_modal_window_defocus_split_left_png_start[];
361 extern uint8_t* _binary_container_modal_window_defocus_split_left_png_end;
362 
363 // binary/ic_bottomsheet_close.svg
364 // Use objcopy transform to compiled object file.
365 // The following parameters represent the beginning and end of the file.
366 extern uint8_t _binary_ic_bottomsheet_close_svg_start[];
367 extern uint8_t* _binary_ic_bottomsheet_close_svg_end;
368 
369 namespace OHOS::Ace {
370 namespace {
371 
372 struct ResourceData final {
ResourceDataOHOS::Ace::__anonfb4aff640111::ResourceData373     ResourceData(const uint8_t* buf, size_t size) : buf(buf), size(size) {}
374     ~ResourceData() = default;
375 
376     const uint8_t* buf;
377     size_t size;
378 };
379 
380 } // namespace
381 
382 InternalResource::InternalResource() = default;
383 
384 InternalResource::~InternalResource() = default;
385 
GetResource(const ResourceId id,size_t & size) const386 const uint8_t* InternalResource::GetResource(const ResourceId id, size_t& size) const
387 {
388     static const std::map<InternalResource::ResourceId, ResourceData> RESOURCE_MAP = {
389         { InternalResource::ResourceId::TV_RATE_STAR_BIG_ON_SVG,
390             ResourceData(_binary_tv_rate_star_big_on_svg_start,
391                 static_cast<size_t>(_binary_tv_rate_star_big_on_svg_end - _binary_tv_rate_star_big_on_svg_start)) },
392         { InternalResource::ResourceId::TV_RATE_STAR_BIG_OFF_SVG,
393             ResourceData(_binary_tv_rate_star_big_off_svg_start,
394                 static_cast<size_t>(_binary_tv_rate_star_big_off_svg_end - _binary_tv_rate_star_big_off_svg_start)) },
395         { InternalResource::ResourceId::TV_RATE_STAR_SMALL_ON_SVG,
396             ResourceData(_binary_tv_rate_star_small_on_svg_start,
397                 static_cast<size_t>(_binary_tv_rate_star_small_on_svg_end - _binary_tv_rate_star_small_on_svg_start)) },
398         { InternalResource::ResourceId::TV_RATE_STAR_SMALL_OFF_SVG,
399             ResourceData(_binary_tv_rate_star_small_off_svg_start,
400                 static_cast<size_t>(
401                     _binary_tv_rate_star_small_off_svg_end - _binary_tv_rate_star_small_off_svg_start)) },
402         { InternalResource::ResourceId::RATE_STAR_BIG_ON_SVG,
403             ResourceData(_binary_rate_star_big_on_svg_start,
404                 static_cast<size_t>(_binary_rate_star_big_on_svg_end - _binary_rate_star_big_on_svg_start)) },
405         { InternalResource::ResourceId::RATE_STAR_BIG_OFF_SVG,
406             ResourceData(_binary_rate_star_big_off_svg_start,
407                 static_cast<size_t>(_binary_rate_star_big_off_svg_end - _binary_rate_star_big_off_svg_start)) },
408         { InternalResource::ResourceId::RATE_STAR_SMALL_ON_SVG,
409             ResourceData(_binary_rate_star_small_on_svg_start,
410                 static_cast<size_t>(_binary_rate_star_small_on_svg_end - _binary_rate_star_small_on_svg_start)) },
411         { InternalResource::ResourceId::RATE_STAR_SMALL_OFF_SVG,
412             ResourceData(_binary_rate_star_small_off_svg_start,
413                 static_cast<size_t>(_binary_rate_star_small_off_svg_end - _binary_rate_star_small_off_svg_start)) },
414         { InternalResource::ResourceId::RATE_STAR_SMALL_OFF_SVG,
415             ResourceData(_binary_rate_star_small_off_svg_start,
416                 static_cast<size_t>(_binary_rate_star_small_off_svg_end - _binary_rate_star_small_off_svg_start)) },
417         { InternalResource::ResourceId::INDEXER_ARROW_PNG,
418             ResourceData(_binary_indexer_arrow_png_start,
419                 static_cast<size_t>(_binary_indexer_arrow_png_end - _binary_indexer_arrow_png_start)) },
420         { InternalResource::ResourceId::CORRECT_SVG,
421             ResourceData(
422                 _binary_correct_svg_start, static_cast<size_t>(_binary_correct_svg_end - _binary_correct_svg_start)) },
423         { InternalResource::ResourceId::WRONG_SVG,
424             ResourceData(
425                 _binary_wrong_svg_start, static_cast<size_t>(_binary_wrong_svg_end - _binary_wrong_svg_start)) },
426         { InternalResource::ResourceId::SEARCH_SVG,
427             ResourceData(
428                 _binary_search_svg_start, static_cast<size_t>(_binary_search_svg_end - _binary_search_svg_start)) },
429         { InternalResource::ResourceId::CLOSE_SVG,
430             ResourceData(
431                 _binary_close_svg_start, static_cast<size_t>(_binary_close_svg_end - _binary_close_svg_start)) },
432         { InternalResource::ResourceId::PLAY_SVG,
433             ResourceData(_binary_play_svg_start, static_cast<size_t>(_binary_play_svg_end - _binary_play_svg_start)) },
434         { InternalResource::ResourceId::PAUSE_SVG,
435             ResourceData(
436                 _binary_pause_svg_start, static_cast<size_t>(_binary_pause_svg_end - _binary_pause_svg_start)) },
437         { InternalResource::ResourceId::FULLSCREEN_SVG,
438             ResourceData(_binary_full_screen_svg_start,
439                 static_cast<size_t>(_binary_full_screen_svg_end - _binary_full_screen_svg_start)) },
440         { InternalResource::ResourceId::QUIT_FULLSCREEN_SVG,
441             ResourceData(_binary_exit_full_screen_svg_start,
442                 static_cast<size_t>(_binary_exit_full_screen_svg_end - _binary_exit_full_screen_svg_start)) },
443         { InternalResource::ResourceId::ERRORINFO_JSON,
444             ResourceData(_binary_errorcode_json_start,
445                 static_cast<size_t>(_binary_errorcode_json_end - _binary_errorcode_json_start)) },
446         { InternalResource::ResourceId::SELECT_ARROW_NORMAL_PNG,
447             ResourceData(_binary_select_arrow_normal_png_start,
448                 static_cast<size_t>(_binary_select_arrow_normal_png_end - _binary_select_arrow_normal_png_start)) },
449         { InternalResource::ResourceId::SELECT_ARROW_DISABLED_PNG,
450             ResourceData(_binary_select_arrow_disabled_png_start,
451                 static_cast<size_t>(_binary_select_arrow_disabled_png_end - _binary_select_arrow_disabled_png_start)) },
452         { InternalResource::ResourceId::INDEXLETTER_BAR_JSON,
453             ResourceData(_binary_indexletter_bar_json_start,
454                 static_cast<size_t>(_binary_indexletter_bar_json_end - _binary_indexletter_bar_json_start)) },
455         { InternalResource::ResourceId::ENTRY_JSON,
456             ResourceData(
457                 _binary_entry_json_start, static_cast<size_t>(_binary_entry_json_end - _binary_entry_json_start)) },
458         { InternalResource::ResourceId::UP_ARROW_SVG,
459             ResourceData(_binary_up_arrow_svg_start,
460                 static_cast<size_t>(_binary_up_arrow_svg_end - _binary_up_arrow_svg_start)) },
461         { InternalResource::ResourceId::WATCH_UP_ARROW_SVG,
462             ResourceData(_binary_watch_up_arrow_svg_start,
463                 static_cast<size_t>(_binary_watch_up_arrow_svg_end - _binary_watch_up_arrow_svg_start)) },
464         { InternalResource::ResourceId::DOWN_ARROW_SVG,
465             ResourceData(_binary_down_arrow_svg_start,
466                 static_cast<size_t>(_binary_down_arrow_svg_end - _binary_down_arrow_svg_start)) },
467         { InternalResource::ResourceId::WATCH_DOWN_ARROW_SVG,
468             ResourceData(_binary_watch_down_arrow_svg_start,
469                 static_cast<size_t>(_binary_watch_down_arrow_svg_end - _binary_watch_down_arrow_svg_start)) },
470         { InternalResource::ResourceId::SHOW_PASSWORD_SVG,
471             ResourceData(_binary_show_password_svg_start,
472                 static_cast<size_t>(_binary_show_password_svg_end - _binary_show_password_svg_start)) },
473         { InternalResource::ResourceId::HIDE_PASSWORD_SVG,
474             ResourceData(_binary_hide_password_svg_start,
475                 static_cast<size_t>(_binary_hide_password_svg_end - _binary_hide_password_svg_start)) },
476         { InternalResource::ResourceId::SEMI_MODAL_BAR_DOWN_SVG,
477             ResourceData(_binary_semi_modal_bar_down_svg_start,
478                 static_cast<size_t>(_binary_semi_modal_bar_down_svg_end - _binary_semi_modal_bar_down_svg_start)) },
479         { InternalResource::ResourceId::SEMI_MODAL_BAR_MIDDLE_SVG,
480             ResourceData(_binary_semi_modal_bar_middle_svg_start,
481                 static_cast<size_t>(_binary_semi_modal_bar_middle_svg_end - _binary_semi_modal_bar_middle_svg_start)) },
482         { InternalResource::ResourceId::LEFT_ARROW_SVG,
483             ResourceData(_binary_left_arrow_svg_start,
484                 static_cast<size_t>(_binary_left_arrow_svg_end - _binary_left_arrow_svg_start)) },
485         { InternalResource::ResourceId::RIGHT_ARROW_SVG,
486             ResourceData(_binary_right_arrow_svg_start,
487                 static_cast<size_t>(_binary_right_arrow_svg_end - _binary_right_arrow_svg_start)) },
488         { InternalResource::ResourceId::STEPPER_BACK_ARROW,
489             ResourceData(_binary_stepper_back_arrow_svg_start,
490                 static_cast<size_t>(_binary_stepper_back_arrow_svg_end - _binary_stepper_back_arrow_svg_start)) },
491         { InternalResource::ResourceId::STEPPER_NEXT_ARROW,
492             ResourceData(_binary_stepper_next_arrow_svg_start,
493                 static_cast<size_t>(_binary_stepper_next_arrow_svg_end - _binary_stepper_next_arrow_svg_start)) },
494         { InternalResource::ResourceId::PIECE_DELETE_SVG,
495             ResourceData(_binary_piece_delete_svg_start,
496                 static_cast<size_t>(_binary_piece_delete_svg_end - _binary_piece_delete_svg_start)) },
497         { InternalResource::ResourceId::IC_BACK,
498             ResourceData(
499                 _binary_ic_back_svg_start, static_cast<size_t>(_binary_ic_back_svg_end - _binary_ic_back_svg_start)) },
500         { InternalResource::ResourceId::IC_MORE,
501             ResourceData(
502                 _binary_ic_more_svg_start, static_cast<size_t>(_binary_ic_more_svg_end - _binary_ic_more_svg_start)) },
503         { InternalResource::ResourceId::IC_MORE_DARK,
504             ResourceData(_binary_ic_more_dark_svg_start,
505                 static_cast<size_t>(_binary_ic_more_dark_svg_end - _binary_ic_more_dark_svg_start)) },
506         { InternalResource::ResourceId::IC_MORE_TRANSPARENT,
507             ResourceData(_binary_ic_more_transparent_svg_start,
508                 static_cast<size_t>(_binary_ic_more_transparent_svg_end - _binary_ic_more_transparent_svg_start)) },
509         { InternalResource::ResourceId::TRANSLATE_C2E_SVG,
510             ResourceData(_binary_translate_c2e_svg_start,
511                 static_cast<size_t>(_binary_translate_c2e_svg_end - _binary_translate_c2e_svg_start)) },
512         { InternalResource::ResourceId::SHARE_SVG,
513             ResourceData(
514                 _binary_share_svg_start, static_cast<size_t>(_binary_share_svg_end - _binary_share_svg_start)) },
515         { InternalResource::ResourceId::FA_CLOCK_WIDGET_HOUR,
516             ResourceData(_binary_fa_clock_widget_hour_png_start,
517                 static_cast<size_t>(_binary_fa_clock_widget_hour_png_end - _binary_fa_clock_widget_hour_png_start)) },
518         { InternalResource::ResourceId::FA_CLOCK_WIDGET_MINUTE,
519             ResourceData(_binary_fa_clock_widget_minute_png_start,
520                 static_cast<size_t>(
521                     _binary_fa_clock_widget_minute_png_end - _binary_fa_clock_widget_minute_png_start)) },
522         { InternalResource::ResourceId::FA_CLOCK_WIDGET_SECOND,
523             ResourceData(_binary_fa_clock_widget_second_png_start,
524                 static_cast<size_t>(
525                     _binary_fa_clock_widget_second_png_end - _binary_fa_clock_widget_second_png_start)) },
526         { InternalResource::ResourceId::FA_BLACK_CLOCK_WIDGET_HOUR,
527             ResourceData(_binary_fa_black_clock_widget_hour_png_start,
528                 static_cast<size_t>(
529                     _binary_fa_black_clock_widget_hour_png_end - _binary_fa_black_clock_widget_hour_png_start)) },
530         { InternalResource::ResourceId::FA_BLACK_CLOCK_WIDGET_MINUTE,
531             ResourceData(_binary_fa_black_clock_widget_minute_png_start,
532                 static_cast<size_t>(
533                     _binary_fa_black_clock_widget_minute_png_end - _binary_fa_black_clock_widget_minute_png_start)) },
534         { InternalResource::ResourceId::FA_BLACK_CLOCK_WIDGET_SECOND,
535             ResourceData(_binary_fa_black_clock_widget_second_png_start,
536                 static_cast<size_t>(
537                     _binary_fa_black_clock_widget_second_png_end - _binary_fa_black_clock_widget_second_png_start)) },
538         { InternalResource::ResourceId::SIDE_BAR,
539             ResourceData(_binary_ic_public_drawer_svg_start,
540                 static_cast<size_t>(_binary_ic_public_drawer_svg_end - _binary_ic_public_drawer_svg_start)) },
541         { InternalResource::ResourceId::SPINNER,
542             ResourceData(_binary_ic_public_spinner_svg_start,
543                 static_cast<size_t>(_binary_ic_public_spinner_svg_end - _binary_ic_public_spinner_svg_start)) },
544         { InternalResource::ResourceId::INPUT_SEARCH_SVG,
545             ResourceData(_binary_ic_public_input_search_svg_start,
546                 static_cast<size_t>(
547                     _binary_ic_public_input_search_svg_end - _binary_ic_public_input_search_svg_start)) },
548         { InternalResource::ResourceId::APP_BAR_BACK_SVG,
549             ResourceData(_binary_app_bar_back_svg_start,
550                 static_cast<size_t>(_binary_app_bar_back_svg_end - _binary_app_bar_back_svg_start)) },
551         { InternalResource::ResourceId::APP_BAR_FA_SVG,
552             ResourceData(_binary_app_bar_fa_svg_start,
553                 static_cast<size_t>(_binary_app_bar_fa_svg_end - _binary_app_bar_fa_svg_start)) },
554         { InternalResource::ResourceId::CONTAINER_MODAL_WINDOW_CLOSE,
555             ResourceData(_binary_container_modal_window_close_png_start,
556                 static_cast<size_t>(
557                     _binary_container_modal_window_close_png_end - _binary_container_modal_window_close_png_start)) },
558         { InternalResource::ResourceId::CONTAINER_MODAL_WINDOW_MAXIMIZE,
559             ResourceData(_binary_container_modal_window_maximize_png_start,
560                 static_cast<size_t>(_binary_container_modal_window_maximize_png_end -
561                                     _binary_container_modal_window_maximize_png_start)) },
562         { InternalResource::ResourceId::CONTAINER_MODAL_WINDOW_MINIMIZE,
563             ResourceData(_binary_container_modal_window_minimize_png_start,
564                 static_cast<size_t>(_binary_container_modal_window_minimize_png_end -
565                                     _binary_container_modal_window_minimize_png_start)) },
566         { InternalResource::ResourceId::CONTAINER_MODAL_WINDOW_RECOVER,
567             ResourceData(_binary_container_modal_window_recover_png_start,
568                 static_cast<size_t>(_binary_container_modal_window_recover_png_end -
569                                     _binary_container_modal_window_recover_png_start)) },
570         { InternalResource::ResourceId::CONTAINER_MODAL_WINDOW_SPLIT_LEFT,
571             ResourceData(_binary_container_modal_window_split_left_png_start,
572                 static_cast<size_t>(_binary_container_modal_window_split_left_png_end -
573                                     _binary_container_modal_window_split_left_png_start)) },
574         { InternalResource::ResourceId::CONTAINER_MODAL_WINDOW_DEFOCUS_CLOSE,
575             ResourceData(_binary_container_modal_window_defocus_close_png_start,
576                 static_cast<size_t>(_binary_container_modal_window_defocus_close_png_end -
577                                     _binary_container_modal_window_defocus_close_png_start)) },
578         { InternalResource::ResourceId::CONTAINER_MODAL_WINDOW_DEFOCUS_MAXIMIZE,
579             ResourceData(_binary_container_modal_window_defocus_maximize_png_start,
580                 static_cast<size_t>(_binary_container_modal_window_defocus_maximize_png_end -
581                                     _binary_container_modal_window_defocus_maximize_png_start)) },
582         { InternalResource::ResourceId::CONTAINER_MODAL_WINDOW_DEFOCUS_MINIMIZE,
583             ResourceData(_binary_container_modal_window_defocus_minimize_png_start,
584                 static_cast<size_t>(_binary_container_modal_window_defocus_minimize_png_end -
585                                     _binary_container_modal_window_defocus_minimize_png_start)) },
586         { InternalResource::ResourceId::CONTAINER_MODAL_WINDOW_DEFOCUS_RECOVER,
587             ResourceData(_binary_container_modal_window_defocus_recover_png_start,
588                 static_cast<size_t>(_binary_container_modal_window_defocus_recover_png_end -
589                                     _binary_container_modal_window_defocus_recover_png_start)) },
590         { InternalResource::ResourceId::CONTAINER_MODAL_WINDOW_DEFOCUS_SPLIT_LEFT,
591             ResourceData(_binary_container_modal_window_defocus_split_left_png_start,
592                 static_cast<size_t>(_binary_container_modal_window_defocus_split_left_png_end -
593                                     _binary_container_modal_window_defocus_split_left_png_start)) },
594         { InternalResource::ResourceId::IC_BOTTOMSHEET_CLOSE_SVG,
595             ResourceData(_binary_ic_bottomsheet_close_svg_start,
596                 static_cast<size_t>(_binary_ic_bottomsheet_close_svg_end - _binary_ic_bottomsheet_close_svg_start)) },
597     };
598     auto iter = RESOURCE_MAP.find(id);
599     if (iter != RESOURCE_MAP.end()) {
600         size = iter->second.size;
601         return iter->second.buf;
602     }
603     return nullptr;
604 }
605 
606 } // namespace OHOS::Ace
607