1 /* 2 * Copyright (c) 2020-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 /** 17 * @addtogroup Graphic 18 * @{ 19 * 20 * @brief Defines a lightweight graphics system that provides basic UI and container views, 21 * including buttons, images, labels, lists, animators, scroll views, swipe views, and layouts. 22 * This system also provides the Design for X (DFX) capability to implement features such as 23 * view rendering, animation, and input event distribution. 24 * 25 * @since 1.0 26 * @version 1.0 27 */ 28 29 /** 30 * @file graphic_config.h 31 * 32 * @brief Provides configuration items required for graphics. 33 * 34 * @since 1.0 35 * @version 1.0 36 */ 37 38 #ifndef GRAPHIC_LITE_GRAPHIC_CONFIG_H 39 #define GRAPHIC_LITE_GRAPHIC_CONFIG_H 40 41 #if defined(ENABLE_OHOS_GRAPHIC_UTILS_PRODUCT_CONFIG) && (ENABLE_OHOS_GRAPHIC_UTILS_PRODUCT_CONFIG == 1) 42 #include "product_graphic_lite_config.h" 43 #endif 44 45 #include "gfx_utils/graphic_types.h" 46 47 namespace OHOS { 48 /** 49 * Defines three graphics library versions: lightweight, standard, and extended versions. 50 * The three versions have different requirements on the memory and hardware. 51 * The standard version is enabled by default. 52 * 53 * The macros of the versions are defined as follows: 54 * Name | Version Description 55 * ------------------- | ---------- 56 * VERSION_LITE | Lightweight version 57 * VERSION_STANDARD | Standard version 58 * VERSION_EXTENDED | Extended version 59 */ 60 #ifdef __LITEOS_M__ 61 #define VERSION_LITE 62 #elif defined _WIN32 || defined __APPLE__ 63 #define VERSION_LITE 64 #else 65 #define VERSION_STANDARD 66 #endif 67 68 /* Defines some configurations and their default values on LiteOS and other system platforms. */ 69 #ifndef ENABLE_FIXED_POINT 70 #define ENABLE_FIXED_POINT 1 71 #endif 72 73 /** 74 * @brief Multi-Font type, which is disabled by default on LiteOS. 75 */ 76 #ifndef ENABLE_MULTI_FONT 77 #define ENABLE_MULTI_FONT 1 78 #endif 79 80 /** 81 * @brief checkBox iamge, which default value = 1 means use the default image, 82 * if haven't use checkBox image could set value = 0 to reduce the build resources. 83 */ 84 #ifndef ENABLE_DEFAULT_CHECKBOX_IMAGE 85 #define ENABLE_DEFAULT_CHECKBOX_IMAGE 1 86 #endif 87 88 /** 89 * @brief For vector type font, enable different font size or font family for label. 90 */ 91 #ifndef ENABLE_SPANNABLE_STRING 92 #define ENABLE_SPANNABLE_STRING 0 93 #endif 94 95 #ifdef __LITEOS_M__ 96 /** 97 * @brief Font shaping, which is disabled by default on LiteOS. 98 * Cannot take effect without ENABLE_ICU. 99 */ 100 #ifndef ENABLE_SHAPING 101 #define ENABLE_SHAPING 0 102 #endif 103 /** 104 * @brief Advanced algorithm for line breaks, which is disabled by default on LiteOS. 105 */ 106 #ifndef ENABLE_ICU 107 #define ENABLE_ICU 0 108 #endif 109 /** 110 * @brief Multi-window, which does not take effect on LiteOS. 111 */ 112 #ifndef ENABLE_WINDOW 113 #define ENABLE_WINDOW 0 114 #endif 115 /** 116 * @brief Display buffer for rendering data refresh, which is disabled by default on LiteOS. 117 */ 118 #ifndef ENABLE_FRAME_BUFFER 119 #define ENABLE_FRAME_BUFFER 1 120 #endif 121 /** 122 * @brief Vector type font, which is enabled by default on LiteOS. 123 */ 124 #ifndef ENABLE_VECTOR_FONT 125 #define ENABLE_VECTOR_FONT 1 126 #endif 127 /** 128 * @brief Bitmap type font, which is disabled by default on LiteOS. 129 */ 130 #ifndef ENABLE_BITMAP_FONT 131 #define ENABLE_BITMAP_FONT 0 132 #endif 133 /** 134 * @brief Static Bitmap type font, which is disabled by default on LiteOS. 135 */ 136 #ifndef ENABLE_STATIC_FONT 137 #define ENABLE_STATIC_FONT 0 138 #endif 139 140 /** 141 * @brief Use bitmap font for TextId multi language convert, use vector font for glyphs. 142 * Normally you do not need to enable this macro 143 */ 144 #ifndef ENABLE_MIX_FONT 145 #define ENABLE_MIX_FONT 0 146 #endif 147 148 /** 149 * @brief JPEG and PNG, which is disabled by default on LiteOS. 150 */ 151 #ifndef ENABLE_JPEG 152 #define ENABLE_JPEG 0 153 #endif 154 #ifndef ENABLE_PNG 155 #define ENABLE_PNG 0 156 #endif 157 158 /** 159 * @brief GIF, which is disabled by default on LiteOS. 160 */ 161 #ifndef ENABLE_GIF 162 #define ENABLE_GIF 0 163 #endif 164 165 /** 166 * @brief Fully rectangle render everytime, which is disabled by default on LiteOS. 167 */ 168 #ifndef FULLY_RENDER 169 #define FULLY_RENDER 0 170 #endif 171 /** 172 * @brief Graphics rendering hardware acceleration, which is enabled by default on LiteOS. 173 */ 174 #ifndef ENABLE_HARDWARE_ACCELERATION 175 #define ENABLE_HARDWARE_ACCELERATION 1 176 #endif 177 /** 178 * @brief Graphics rendering hardware acceleration for text, which is disabled by default on LiteOS. 179 */ 180 #ifndef ENABLE_HARDWARE_ACCELERATION_FOR_TEXT 181 #define ENABLE_HARDWARE_ACCELERATION_FOR_TEXT 0 182 #endif 183 /** 184 * @brief Graphics rendering accelerated by gfx_engines, which is disabled by default on LiteOS. 185 */ 186 #ifndef ENABLE_GFX_ENGINES 187 #define ENABLE_GFX_ENGINES 0 188 #endif 189 /** 190 * @brief ARM NEON ability, which is disabled by default on LiteOS. 191 */ 192 #ifndef ENABLE_ARM_NEON 193 #define ENABLE_ARM_NEON 0 194 #endif 195 #elif defined _WIN32 || defined __APPLE__ 196 /** 197 * @brief Multi-window, which is disabled by default on WIN32. 198 */ 199 #ifndef ENABLE_WINDOW 200 #define ENABLE_WINDOW 0 201 #endif 202 /** 203 * @brief Display buffer for rendering data refresh, which is disabled by default on WIN32. 204 */ 205 #ifndef ENABLE_FRAME_BUFFER 206 #define ENABLE_FRAME_BUFFER 0 207 #endif 208 209 #ifndef ENABLE_JPEG 210 #define ENABLE_JPEG 1 211 #endif 212 #ifndef ENABLE_PNG 213 #define ENABLE_PNG 1 214 #endif 215 /** 216 * @brief ARM NEON ability, which is disabled by default on WIN32. 217 */ 218 #ifndef ENABLE_ARM_NEON 219 #define ENABLE_ARM_NEON 0 220 #endif 221 /** 222 * @brief Graphics rendering hardware acceleration, which is disabled by default on WIN32. 223 */ 224 #ifndef ENABLE_HARDWARE_ACCELERATION 225 #define ENABLE_HARDWARE_ACCELERATION 0 226 #endif 227 /** 228 * @brief Graphics rendering hardware acceleration for text, which is disabled by default on WIN32. 229 */ 230 #ifndef ENABLE_HARDWARE_ACCELERATION_FOR_TEXT 231 #define ENABLE_HARDWARE_ACCELERATION_FOR_TEXT 0 232 #endif 233 /** 234 * @brief Graphics rendering accelerated by gfx_engines, which is disabled by default on WIN32. 235 */ 236 #ifndef ENABLE_GFX_ENGINES 237 #define ENABLE_GFX_ENGINES 0 238 #endif 239 240 #else 241 /** 242 * @brief Multi-window, which is enabled by default on other platforms. 243 */ 244 #ifndef ENABLE_WINDOW 245 #define ENABLE_WINDOW 1 246 #endif 247 /** 248 * @brief Display buffer for rendering data refresh, which is disabled by default on other platforms. 249 */ 250 #ifndef ENABLE_FRAME_BUFFER 251 #define ENABLE_FRAME_BUFFER 0 252 #endif 253 254 #ifndef ENABLE_JPEG 255 #define ENABLE_JPEG 1 256 #endif 257 #ifndef ENABLE_PNG 258 #define ENABLE_PNG 1 259 #endif 260 /** 261 * @brief ARM NEON ability, which is enabled by default on other platforms. 262 */ 263 #ifndef ENABLE_ARM_NEON 264 #define ENABLE_ARM_NEON 1 265 #endif 266 /** 267 * @brief Graphics rendering hardware acceleration, which is disabled by default on other platforms. 268 */ 269 #ifndef ENABLE_HARDWARE_ACCELERATION 270 #define ENABLE_HARDWARE_ACCELERATION 0 271 #endif 272 /** 273 * @brief Graphics rendering hardware acceleration for text, which is disabled by default on other platforms. 274 */ 275 #ifndef ENABLE_HARDWARE_ACCELERATION_FOR_TEXT 276 #define ENABLE_HARDWARE_ACCELERATION_FOR_TEXT 0 277 #endif 278 /** 279 * @brief Graphics rendering accelerated by gfx_engines, which is enabled by default on other platforms. 280 */ 281 #ifndef ENABLE_GFX_ENGINES 282 #define ENABLE_GFX_ENGINES 1 283 #endif // ENABLE_GFX_ENGINES 284 #endif 285 286 #ifndef ENABLE_ROTATE_INPUT 287 #define ENABLE_ROTATE_INPUT 1 288 #endif 289 290 #ifndef ENABLE_VIBRATOR 291 #define ENABLE_VIBRATOR 1 292 #endif 293 294 #ifndef ENABLE_FOCUS_MANAGER 295 #define ENABLE_FOCUS_MANAGER 1 296 #endif 297 298 /** 299 * @brief Graphics local rendering, which is disabled by default. 300 */ 301 #ifndef LOCAL_RENDER 302 #define LOCAL_RENDER 0 303 #endif 304 305 /** 306 * @brief Actually use ARM NEON optimization. 307 * __ARM_NEON__ and __ARM_NEON are set by the compiler according to the compilation option -mfpu=neon 308 */ 309 #if (defined(__ARM_NEON__) || defined(__ARM_NEON)) && ENABLE_ARM_NEON == 1 310 #define ARM_NEON_OPT 311 #endif 312 313 /** 314 * @brief Graphics bottom-layer RGBA, which is enabled by default. 315 */ 316 #ifndef ENABLE_BUFFER_RGBA 317 #define ENABLE_BUFFER_RGBA 1 318 #endif 319 /** 320 * @brief Debug mode, which is disabled by default. 321 */ 322 #ifndef ENABLE_DEBUG 323 #define ENABLE_DEBUG 1 324 #endif 325 /** 326 * @brief Memory hook, which is enabled by default. The system memory allocation is taken over after it is enabled. 327 */ 328 #ifndef ENABLE_MEMORY_HOOKS 329 #define ENABLE_MEMORY_HOOKS 0 330 #endif 331 /** 332 * @brief Function for monitoring the image refresh frame rate, which is disabled by default. 333 */ 334 #ifndef ENABLE_FPS_SUPPORT 335 #define ENABLE_FPS_SUPPORT 0 336 #endif 337 /** 338 * @brief Anti-aliasing, which is enabled by default. 339 */ 340 #ifndef ENABLE_ANTIALIAS 341 #define ENABLE_ANTIALIAS 1 342 #endif 343 /** 344 * @brief Rectangle anti-aliasing, which is disabled by default. 345 */ 346 #ifndef ENABLE_RECT_ANTIALIAS 347 #define ENABLE_RECT_ANTIALIAS 0 348 #endif 349 /** 350 * @brief Font color mode, which is disabled by default. 351 * After it is enabled, the font color mode is set to <b>4</b> to accelerate font rendering. 352 */ 353 #ifndef ENABLE_SPEC_FONT 354 #define ENABLE_SPEC_FONT 0 355 #endif 356 /** 357 * @brief Log function of a graphics subsystem, which is disabled by default 358 */ 359 #ifndef ENABLE_GRAPHIC_LOG 360 #define ENABLE_GRAPHIC_LOG 0 361 #endif 362 /** 363 * @brief Performance tracking for debugging, which is disabled by default. 364 */ 365 #ifndef ENABLE_DEBUG_PERFORMANCE_TRACE 366 #define ENABLE_DEBUG_PERFORMANCE_TRACE 0 367 #endif 368 /** 369 * @brief Function for receiving input events in screen-off mode, which is disabled by default. 370 */ 371 #ifndef ENABLE_AOD 372 #define ENABLE_AOD 0 373 #endif 374 375 /** 376 * @brief Defines the log level. A smaller value indicates a higher priority. 377 * Logs whose priorities are higher than a specified level can be recorded. 378 * Log levels: 379 * NONE: disabling logs 380 * FATAL: fatal level 381 * ERROR: error level 382 * WARN: warning level 383 * INFO: info level 384 * DEBUG: debugging level 385 */ 386 #ifndef GRAPHIC_LOG_LEVEL 387 #define GRAPHIC_LOG_LEVEL 5 388 #endif 389 /** 390 * @brief Defines the color depth of graphics rendering. The default value is <b>32</b> bits. 391 * The value can be <b>16</b> or <b>32</b>. 392 */ 393 #ifndef COLOR_DEPTH 394 #define COLOR_DEPTH 32 395 #endif 396 397 /** 398 * @brief Represents the code number of the layer pixel format. 399 * 0: LAYER_PF_ARGB1555 400 * 1: LAYER_PF_ARGB8888 401 * Other: LAYER_PF_ARGB8888 402 */ 403 #ifndef LAYER_PF_CODE 404 #define LAYER_PF_CODE 1 405 #endif 406 407 #if LAYER_PF_CODE == 0 408 #define LAYER_PF_ARGB1555 409 #elif LAYER_PF_CODE == 1 410 #define LAYER_PF_ARGB8888 411 #else 412 #define LAYER_PF_ARGB8888 413 #endif 414 415 /** 416 * @brief Defines whether the C library math function is supported. 417 * 0: Unsupport 418 * 1: Support 419 */ 420 #ifndef ENABLE_CMATH 421 #define ENABLE_CMATH 1 422 #endif 423 424 /** 425 * @brief Defines the file name of default vector font. 426 */ 427 #if ENABLE_VECTOR_FONT 428 429 #ifndef DEFAULT_VECTOR_FONT_FILENAME 430 #define DEFAULT_VECTOR_FONT_FILENAME "SourceHanSansSC-Regular.otf" 431 #endif // DEFAULT_VECTOR_FONT_FILENAME 432 433 #else // ENABLE_VECTOR_FONT 434 435 #ifndef DEFAULT_VECTOR_FONT_FILENAME 436 #define DEFAULT_VECTOR_FONT_FILENAME "SourceHanSansSC-Regular" 437 #endif // DEFAULT_VECTOR_FONT_FILENAME 438 439 #endif // ENABLE_VECTOR_FONT 440 441 /* Default font size. The default value is <b>18</b>. */ 442 static constexpr uint8_t DEFAULT_VECTOR_FONT_SIZE = 18; 443 /* Max font search number for UiMultiFontManager. */ 444 static constexpr uint8_t MAX_FONT_SEARCH_NUM = 26; 445 /* Defines the file name of default line break rule. */ 446 #ifndef DEFAULT_LINE_BREAK_RULE_FILENAME 447 #define DEFAULT_LINE_BREAK_RULE_FILENAME "line_cj.brk" 448 #endif 449 450 #ifndef DEFAULT_MAX_CACHE_ENTRY_NUM 451 #define DEFAULT_MAX_CACHE_ENTRY_NUM 64 452 #endif // DEFAULT_MAX_CACHE_ENTRY_NUM 453 454 /* Defines some configurations and their default values on LiteOS and other system platforms. */ 455 #ifdef __LITEOS_M__ 456 457 /* Resolution width of a graphics display screen. The default value is <b>454</b>. */ 458 #ifndef HORIZONTAL_RESOLUTION 459 #define HORIZONTAL_RESOLUTION 454 460 #endif 461 462 /* Resolution height of a graphics display screen. The default value is <b>454</b>. */ 463 #ifndef VERTICAL_RESOLUTION 464 #define VERTICAL_RESOLUTION 454 465 #endif // VERTICAL_RESOLUTION 466 467 #elif defined _WIN32 || defined __APPLE__ // __LITEOS_M__ 468 469 /* Resolution width of a graphics display screen. The default value is <b>454</b>. */ 470 #ifndef HORIZONTAL_RESOLUTION 471 #define HORIZONTAL_RESOLUTION 960 472 #endif 473 474 /* Resolution height of a graphics display screen. The default value is <b>454</b>. */ 475 #ifndef VERTICAL_RESOLUTION 476 #define VERTICAL_RESOLUTION 480 477 #endif 478 479 #else 480 481 /* Resolution width of a graphics display screen. The default value is <b>960</b>. */ 482 #ifndef HORIZONTAL_RESOLUTION 483 #define HORIZONTAL_RESOLUTION 960 484 #endif 485 486 /* Resolution height of a graphics display screen. The default value is <b>480</b>. */ 487 #ifndef VERTICAL_RESOLUTION 488 #define VERTICAL_RESOLUTION 480 489 #endif 490 491 #endif 492 493 #ifndef VERSION_LITE 494 static constexpr const char* MEDIA_IMAGE_PLAY_CENTER = "/user/data/videoplayer_play_center.png"; 495 static constexpr const char* MEDIA_IMAGE_PLAY = "/user/data/videoplayer_play.png"; 496 static constexpr const char* MEDIA_IMAGE_PAUSE = "/user/data/videoplayer_pause.png"; 497 static constexpr const char* MEDIA_IMAGE_VOLUME = "/user/data/videoplayer_volume.png"; 498 static constexpr const char* MEDIA_IMAGE_MUTE = "/user/data/videoplayer_mute.png"; 499 #endif 500 501 /* Defines some configurations and their default values on LiteOS and other system platforms. */ 502 #if defined QT_COMPILER 503 /* Default file path for DOM tree logs */ 504 static constexpr const char* DEFAULT_DUMP_DOM_TREE_PATH = ".\\dump_dom_tree.json"; 505 506 /* Default file path for font */ 507 #ifndef VECTOR_FONT_DIR 508 #define VECTOR_FONT_DIR "..\\..\\simulator\\font\\" 509 #endif 510 511 #elif defined _WIN32 // QT_COMPILER 512 513 /* Default file path for DOM tree logs */ 514 static constexpr const char* DEFAULT_DUMP_DOM_TREE_PATH = ".\\dump_dom_tree.json"; 515 /* Default file path for font */ 516 #ifndef VECTOR_FONT_DIR 517 #define VECTOR_FONT_DIR "..\\..\\tools\\font\\font_tool\\font_tool\\font\\" 518 #endif 519 520 #elif defined __LITEOS_M__ // QT_COMPILER 521 522 /* Default file path for screenshots */ 523 static constexpr const char* DEFAULT_SCREENSHOT_PATH = "user/log/screenshot.bin"; 524 /* Default file path for DOM tree logs */ 525 static constexpr const char* DEFAULT_DUMP_DOM_TREE_PATH = "user/log/dump_dom_tree.json"; 526 /* Default file path for font */ 527 #ifndef VECTOR_FONT_DIR 528 #define VECTOR_FONT_DIR "/user/data/" 529 #endif 530 531 #else // QT_COMPILER 532 533 /* Default file path for screenshots */ 534 static constexpr const char* DEFAULT_SCREENSHOT_PATH = "/storage/screenshot.bin"; 535 /* Default file path for DOM tree logs */ 536 static constexpr const char* DEFAULT_DUMP_DOM_TREE_PATH = "/storage/dump_dom_tree.json"; 537 /* Default file path for font */ 538 #ifndef VECTOR_FONT_DIR 539 #define VECTOR_FONT_DIR "/user/data/" 540 #endif 541 542 #endif // QT_COMPILER 543 /* Default task execution period. The default value is <b>16</b> ms. */ 544 static constexpr uint8_t DEFAULT_TASK_PERIOD = 16; 545 /* Window manager execution period. The default value is <b>16</b> ms. */ 546 static constexpr uint8_t WMS_MAIN_TASK_PERIOD = 16; 547 /* Maximum number of cached images. The default value is <b>5</b>. */ 548 #ifndef IMG_CACHE_SIZE 549 #define IMG_CACHE_SIZE 5 550 #endif 551 static constexpr uint8_t INDEV_READ_PERIOD = 10; /* Input event read cycle. The default value is <b>10</b> ms. */ 552 /* Drag distance threshold of a drag event. The default value is <b>10px</b>. */ 553 static constexpr uint8_t INDEV_DRAG_LIMIT = 10; 554 /* Maximum depth of view nesting. The default value is <b>64</b>. */ 555 static constexpr uint8_t COMPONENT_NESTING_DEPTH = 64; 556 /* Long-press event threshold. The default value is <b>1000</b> ms. */ 557 static constexpr uint16_t INDEV_LONG_PRESS_TIME = 1000; 558 /* Delay for reporting a press event on a draggable object. The default value is <b>100</b> ms. */ 559 static constexpr uint16_t INDEV_PRESS_TIME_IN_DRAG = 100; 560 /* Maximum number of bytes in a text that can be continuously displayed. The default value is <b>4096</b> bytes. */ 561 static constexpr uint16_t MAX_TEXT_LENGTH = 4096; 562 /* Maximum value of the graphic display range. The default value is <b>16383px</b>. */ 563 static constexpr int32_t COORD_MAX = 16383; 564 /* Minimum value of the graphic display range. The default value is <b>-16384px</b>. */ 565 static constexpr int32_t COORD_MIN = -16384; 566 static constexpr uint32_t HARFBUZ_CACHE_LENGTH = 0x19000; // 100K 567 static constexpr uint16_t MAX_LINE_WIDTH = 128; 568 /* Maximum length of a QR code string. The default value is <b>2048</b>. */ 569 static constexpr uint32_t QRCODE_VAL_MAX = 2048; 570 571 /* Rotate sensitivity factor. The default value is <b>1.0<b> time. */ 572 static constexpr float ROTATE_SENSITIVITY = 1.0; 573 /* Rotate sensitivity factor of UISwipeView. The default value is <b>2.8<b> time. */ 574 static constexpr float DEFAULT_SWIPE_VIEW_ROTATE_FACTOR = 2.8; 575 /* Rotate sensitivity factor of UIList. The default value is <b>1.2<b> time. */ 576 static constexpr float DEFAULT_LIST_ROTATE_FACTOR = 1.2; 577 /* Rotate sensitivity factor of UIPicker. The default value is <b>1.2<b> time. */ 578 static constexpr float DEFAULT_PICKER_ROTATE_FACTOR = 1.2; 579 /* Rotate sensitivity factor of UIScrollView. The default value is <b>2.0<b> time. */ 580 static constexpr float DEFAULT_SCROLL_VIEW_ROTATE_FACTOR = 2.0; 581 #ifdef _WIN32 582 /* Rotate sensitivity factor of UISlider. The default value is <b>-1<b> time. */ 583 static constexpr float DEFAULT_SLIDER_ROTATE_FACTOR = -1; 584 #else 585 /* Rotate sensitivity factor of UISlider. The default value is <b>-0.05<b> time. */ 586 static constexpr float DEFAULT_SLIDER_ROTATE_FACTOR = -0.05; 587 #endif 588 /* When rotating the crown, a vibration is triggered every 30 pixels. */ 589 static constexpr uint8_t DEFAULT_SCROLL_VIEW_VIBRATION_LEN = 30; 590 /* calculate drag throw distance when rotating, last rotate distance * ROTATE_DISTANCE_COEFFICIENT */ 591 static constexpr uint8_t ABSTRACT_ROTATE_DISTANCE_COEFF = 20; 592 static constexpr uint8_t SCROLLVIEW_ROTATE_DISTANCE_COEFF = 20; 593 static constexpr uint8_t PICKERVIEW_ROTATE_DISTANCE_COEFF = 20; 594 static constexpr uint8_t LIST_ROTATE_DISTANCE_COEFF = 20; 595 /* calculate rotate throw threshold when rotating the crown, width or height / DEFAULT_ROTATE_THROW_THRESHOLD */ 596 static constexpr uint8_t ABSTRACT_ROTATE_THROW_THRESHOLD = 4; 597 static constexpr uint8_t SCROLLVIEW_ROTATE_THROW_THRESHOLD = 4; 598 static constexpr uint8_t PICKERVIEW_ROTATE_THROW_THRESHOLD = 4; 599 static constexpr uint8_t LIST_ROTATE_THROW_THRESHOLD = 4; 600 } // namespace OHOS 601 #endif // GRAPHIC_LITE_GRAPHIC_CONFIG_H 602