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