1 /*
2 * Copyright (c) 2021-2023 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_CORE_COMPONENTS_BASE_LAYOUT_CONSTANTS_H
17 #define FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_BASE_LAYOUT_CONSTANTS_H
18
19 #include <cstdint>
20 #include "base/utils/linear_map.h"
21 #include "base/utils/utils.h"
22
23 namespace OHOS::Ace {
24
25 enum class LineCap {
26 BUTT,
27 ROUND,
28 SQUARE,
29 };
30
31 enum class ButtonType {
32 NORMAL,
33 CAPSULE,
34 CIRCLE,
35 TEXT,
36 ARC,
37 DOWNLOAD,
38 ICON,
39 CUSTOM,
40 };
41
42 enum class RectWidthStyle {
43 TIGHT,
44 MAX,
45 };
46
47 enum class RectHeightStyle {
48 TIGHT,
49 MAX,
50 INCLUDE_LINE_SPACE_MIDDLE,
51 INCLUDE_LINE_SPACE_TOP,
52 INCLUDE_LINE_SPACE_BOTTOM,
53 STRUT,
54 };
55
56 // Type of hover mode area.
57 enum class HoverModeAreaType {
58 TOP_SCREEN = 0,
59 BOTTOM_SCREEN = 1,
60 };
61
62 enum class ButtonStyleMode { NORMAL, EMPHASIZE, TEXT };
63
64 enum class ControlSize { SMALL, NORMAL };
65
66 enum class ButtonRole { NORMAL, ERROR };
67
68 // Flex Styles
69 enum class FlexDirection {
70 ROW = 0,
71 COLUMN,
72 ROW_REVERSE,
73 COLUMN_REVERSE,
74 };
75
76 enum class FlexAlign {
77 AUTO,
78
79 // align to the start of the axis, can be both used in MainAxisAlign and CrossAxisAlign.
80 FLEX_START,
81
82 // align to the center of the axis, can be both used in MainAxisAlign and CrossAxisAlign.
83 CENTER,
84
85 // align to the end of the axis, can be both used in MainAxisAlign and CrossAxisAlign.
86 FLEX_END,
87
88 // stretch the cross size, only used in CrossAxisAlign.
89 STRETCH,
90
91 // adjust the cross position according to the textBaseline, only used in CrossAxisAlign.
92 BASELINE,
93
94 // align the children on both ends, only used in MainAxisAlign.
95 SPACE_BETWEEN,
96
97 // align the child with equivalent space, only used in MainAxisAlign.
98 SPACE_AROUND,
99
100 // align the child with space evenly, only used in MainAxisAlign.
101 SPACE_EVENLY,
102
103 // User-defined space, only used in MainAxisAlign.
104 SPACE_CUSTOMIZATION,
105 };
106
107 enum class MainAxisSize {
108 // default setting, fill the max size of the layout param. Only under MAX, mainAxisAlign and FlexItem are valid
109 MAX,
110
111 // make the size of row/column as large as its children's size.
112 MIN,
113 };
114
115 enum class CrossAxisSize {
116 // fill the max size of the layout param in cross size of row/column.
117 MAX,
118
119 // make the cross size of row/column as large as its children's size.
120 MIN,
121 };
122
123 enum class FlexLayoutMode {
124 // If children do not contains flex weight, use this mode. It is the default mode.
125 FLEX_ITEM_MODE,
126
127 // If all the children contains flex weight, use this mode.
128 FLEX_WEIGHT_MODE,
129 };
130
131 // Box Style
132 enum class BoxFlex {
133 // width and height do not extend to box's parent
134 FLEX_NO,
135
136 // width extends to box's parent, height does not extend to box's parent
137 FLEX_X,
138
139 // height extends to box's parent, width does not extend to box's parent
140 FLEX_Y,
141
142 // width and height extend to box's parent
143 FLEX_XY,
144 };
145
146 enum class BoxSizing {
147 // The width and height properties includes only the content. Border and padding are not included.
148 CONTENT_BOX,
149
150 // The width and height properties includes content, padding and border.
151 BORDER_BOX,
152 };
153
154 // Stack Styles
155 enum class StackFit {
156 // keep the child component's size as it is.
157 KEEP,
158
159 // keep the child component's size as the parent's.
160 STRETCH,
161
162 // use parent's layoutParam to layout the child
163 INHERIT,
164
165 // use first child's size as layoutPram max size.
166 FIRST_CHILD,
167 };
168
169 enum class Overflow {
170 // when the size overflows, clip the exceeding.
171 CLIP,
172
173 // when the size overflows, observe the exceeding.
174 OBSERVABLE,
175
176 // when the size overflows, scroll the exceeding.
177 SCROLL,
178
179 // force clip the exceeding.
180 FORCE_CLIP,
181 };
182
183 enum class MainStackSize { MAX, MIN, NORMAL, LAST_CHILD_HEIGHT, MATCH_CHILDREN, MAX_X, MAX_Y };
184
185 enum class MainSwiperSize { MAX, MAX_X, MAX_Y, MIN, AUTO };
186
187 enum class PositionType {
188 PTRELATIVE = 0,
189 PTFIXED,
190 PTABSOLUTE,
191 PTOFFSET, // percentage layout based on RELATIVE
192 PTSEMI_RELATIVE, // absolute offset based on RELATIVE
193 };
194
195 enum class TextAlign {
196 LEFT = 4,
197 RIGHT = 5,
198 CENTER = 1,
199 /*
200 render the text to fit the size of the text container by adding space
201 */
202 JUSTIFY = 3,
203 /*
204 align the text from the start of the text container
205
206 For Direction.ltr, from left side
207 For Direction.rtl, from right side
208 */
209 START = 0,
210 /*
211 align the text from the end of the text container
212
213 For Direction.ltr, from right side
214 For Direction.rtl, from left side
215 */
216 END = 2,
217 };
218
219 namespace StringUtils {
ToString(const TextAlign & textAlign)220 inline std::string ToString(const TextAlign& textAlign)
221 {
222 static const LinearEnumMapNode<TextAlign, std::string> table[] = {
223 { TextAlign::LEFT, "LEFT" },
224 { TextAlign::RIGHT, "RIGHT" },
225 { TextAlign::CENTER, "CENTER" },
226 { TextAlign::JUSTIFY, "JUSTIFY" },
227 { TextAlign::START, "START" },
228 { TextAlign::END, "END" },
229 };
230 auto iter = BinarySearchFindIndex(table, ArraySize(table), textAlign);
231 return iter != -1 ? table[iter].value : "";
232 }
233 } // namespace StringUtils
234
235 enum class TextDataDetectType {
236 PHONE_NUMBER = 0,
237 URL,
238 EMAIL,
239 ADDRESS,
240 DATE_TIME,
241 };
242
243 enum class LineBreakStrategy {
244 GREEDY = 0,
245 HIGH_QUALITY,
246 BALANCED,
247 };
248
249 enum class WhiteSpace {
250 NORMAL,
251 PRE,
252 PRE_WRAP,
253 NOWRAP,
254 PRE_LINE,
255 INHERIT,
256 };
257
258 enum class TextOverflow {
259 NONE,
260 CLIP,
261 ELLIPSIS,
262 MARQUEE,
263 DEFAULT,
264 };
265
266 enum class TextSelectableMode {
267 SELECTABLE_UNFOCUSABLE = 0,
268 SELECTABLE_FOCUSABLE,
269 UNSELECTABLE,
270 };
271
272 namespace StringUtils {
ToString(const TextOverflow & textOverflow)273 inline std::string ToString(const TextOverflow& textOverflow)
274 {
275 static const LinearEnumMapNode<TextOverflow, std::string> table[] = {
276 { TextOverflow::NONE, "NONE" },
277 { TextOverflow::CLIP, "CLIP" },
278 { TextOverflow::ELLIPSIS, "ELLIPSIS" },
279 { TextOverflow::MARQUEE, "MARQUEE" },
280 };
281 auto iter = BinarySearchFindIndex(table, ArraySize(table), textOverflow);
282 return iter != -1 ? table[iter].value : "";
283 }
284 } // namespace StringUtils
285
286 enum class TextDirection {
287 LTR,
288 RTL,
289 INHERIT,
290 AUTO,
291 };
292
293 enum class TextDecoration {
294 NONE,
295 UNDERLINE,
296 OVERLINE,
297 LINE_THROUGH,
298 INHERIT,
299 };
300
301 enum class TextDecorationStyle {
302 SOLID,
303 DOUBLE,
304 DOTTED,
305 DASHED,
306 WAVY,
307 INITIAL,
308 INHERIT,
309 };
310
311 enum class TextHeightAdaptivePolicy {
312 MAX_LINES_FIRST,
313 MIN_FONT_SIZE_FIRST,
314 LAYOUT_CONSTRAINT_FIRST,
315 };
316
317 enum class MarqueeDirection {
318 LEFT,
319 RIGHT,
320 };
321
322 enum class ImageRepeat {
323 NO_REPEAT = 0,
324 REPEAT_X,
325 REPEAT_Y,
326 REPEAT,
327 };
328
329 enum class ImageFit {
330 FILL,
331 CONTAIN,
332 COVER,
333 FITWIDTH,
334 FITHEIGHT,
335 NONE,
336 SCALE_DOWN,
337 TOP_LEFT,
338 TOP,
339 TOP_END,
340 START,
341 CENTER,
342 END,
343 BOTTOM_START,
344 BOTTOM,
345 BOTTOM_END,
346 COVER_TOP_LEFT,
347 };
348
349 enum class DynamicRangeMode {
350 HIGH = 0,
351 CONSTRAINT,
352 STANDARD,
353 };
354
355 enum class AIImageQuality {
356 NONE = 0,
357 LOW,
358 NORMAL,
359 HIGH,
360 };
361
362 enum class ImageRotateOrientation {
363 AUTO = 0,
364 UP = 1,
365 RIGHT = 2,
366 DOWN = 3,
367 LEFT = 4,
368 };
369
370 enum class ImageRenderMode {
371 ORIGINAL = 0,
372 TEMPLATE,
373 };
374
375 enum class ImageInterpolation {
376 NONE = 0,
377 LOW,
378 MEDIUM,
379 HIGH,
380 };
381
382 enum class EdgeEffect {
383 SPRING = 0,
384 FADE,
385 NONE,
386 };
387
388 enum class BorderStyle {
389 SOLID,
390 DASHED,
391 DOTTED,
392 NONE,
393 };
394
395 enum class BorderImageRepeat {
396 SPACE,
397 STRETCH,
398 REPEAT,
399 ROUND,
400 };
401
402 enum class BorderImageDirection {
403 LEFT,
404 RIGHT,
405 TOP,
406 BOTTOM,
407 START,
408 END,
409 };
410
411 enum class TimePickerFormat {
412 HOUR_MINUTE,
413 HOUR_MINUTE_SECOND
414 };
415
416 enum class SrcType {
417 UNSUPPORTED = -1,
418 FILE = 0,
419 ASSET,
420 NETWORK,
421 MEMORY,
422 BASE64,
423 INTERNAL, // internal cached file resource
424 RESOURCE,
425 DATA_ABILITY,
426 DATA_ABILITY_DECODED,
427 RESOURCE_ID, // default resource which src is internal resource id
428 PIXMAP,
429 ASTC,
430 };
431
432 enum class WrapAlignment {
433 START,
434 CENTER,
435 END,
436 SPACE_AROUND,
437 SPACE_BETWEEN,
438 STRETCH,
439 SPACE_EVENLY,
440 BASELINE,
441 };
442
443 enum class WrapDirection {
444 HORIZONTAL,
445 VERTICAL,
446 HORIZONTAL_REVERSE,
447 VERTICAL_REVERSE,
448 };
449
450 enum class FlexWrap {
451 NO_WRAP,
452 WRAP,
453 WRAP_REVERSE,
454 };
455
456 enum class KeyDirection {
457 UP = 0,
458 DOWN,
459 LEFT,
460 RIGHT,
461 };
462
463 enum class PixelRoundPolicy {
464 ALL_FORCE_ROUND = 0,
465 FORCE_CEIL_START = 1,
466 FORCE_FLOOR_START = 1 << 1,
467 NO_FORCE_ROUND_START = 1 << 2,
468 FORCE_CEIL_TOP = 1 << 3,
469 FORCE_FLOOR_TOP = 1 << 4,
470 NO_FORCE_ROUND_TOP = 1 << 5,
471 FORCE_CEIL_END = 1 << 6,
472 FORCE_FLOOR_END = 1 << 7,
473 NO_FORCE_ROUND_END = 1 << 8,
474 FORCE_CEIL_BOTTOM = 1 << 9,
475 FORCE_FLOOR_BOTTOM = 1 << 10,
476 NO_FORCE_ROUND_BOTTOM = 1 << 11,
477 };
478
479 enum class PixelRoundCalcPolicy {
480 NO_FORCE_ROUND = 0,
481 FORCE_CEIL = 1,
482 FORCE_FLOOR = 2,
483 };
484
485 const ImageRepeat IMAGE_REPEATS[] = {
486 ImageRepeat::REPEAT,
487 ImageRepeat::REPEAT_X,
488 ImageRepeat::REPEAT_Y,
489 ImageRepeat::NO_REPEAT,
490 };
491
492 enum class WindowModal : int32_t {
493 NORMAL = 0,
494 SEMI_MODAL = 1,
495 SEMI_MODAL_FULL_SCREEN = 2,
496 DIALOG_MODAL = 3,
497 CONTAINER_MODAL = 4,
498 FIRST_VALUE = NORMAL,
499 LAST_VALUE = CONTAINER_MODAL,
500 };
501
502 enum class WindowMode : uint32_t {
503 WINDOW_MODE_UNDEFINED = 0,
504 WINDOW_MODE_FULLSCREEN = 1,
505 WINDOW_MODE_SPLIT_PRIMARY = 100,
506 WINDOW_MODE_SPLIT_SECONDARY,
507 WINDOW_MODE_FLOATING,
508 WINDOW_MODE_PIP
509 };
510
511 enum class WindowType : uint32_t {
512 WINDOW_TYPE_UNDEFINED = 0,
513 WINDOW_TYPE_APP_BASE = 1,
514 WINDOW_TYPE_APP_END = 1003,
515 WINDOW_TYPE_FLOAT = 2106,
516 };
517
518 enum class PanelType {
519 MINI_BAR,
520 FOLDABLE_BAR,
521 TEMP_DISPLAY,
522 CUSTOM,
523 };
524
525 enum class PanelMode {
526 MINI,
527 HALF,
528 FULL,
529 AUTO,
530 CUSTOM,
531 };
532
533 enum class ColorScheme : int32_t {
534 SCHEME_LIGHT = 0,
535 SCHEME_TRANSPARENT = 1,
536 SCHEME_DARK = 2,
537 FIRST_VALUE = SCHEME_LIGHT,
538 LAST_VALUE = SCHEME_DARK,
539 };
540
541 enum class RenderStatus : int32_t {
542 UNKNOWN = -1,
543 DEFAULT = 0,
544 ACTIVITY = 1,
545 FOCUS = 2,
546 BLUR = 3,
547 DISABLE = 4,
548 WAITING = 5,
549 };
550
551 enum class BadgePosition {
552 RIGHT_TOP,
553 RIGHT,
554 LEFT,
555 };
556
557 enum class QrcodeType {
558 RECT,
559 CIRCLE,
560 };
561
562 enum class AnimationCurve {
563 FRICTION,
564 STANDARD,
565 };
566
567 enum class WindowBlurStyle {
568 STYLE_BACKGROUND_SMALL_LIGHT = 100,
569 STYLE_BACKGROUND_MEDIUM_LIGHT = 101,
570 STYLE_BACKGROUND_LARGE_LIGHT = 102,
571 STYLE_BACKGROUND_XLARGE_LIGHT = 103,
572 STYLE_BACKGROUND_SMALL_DARK = 104,
573 STYLE_BACKGROUND_MEDIUM_DARK = 105,
574 STYLE_BACKGROUND_LARGE_DARK = 106,
575 STYLE_BACKGROUND_XLARGE_DARK = 107,
576 };
577
578 enum class DisplayType { NO_SETTING = 0, FLEX, GRID, NONE, BLOCK, INLINE, INLINE_BLOCK, INLINE_FLEX };
579
580 enum class VisibilityType {
581 NO_SETTING = 0,
582 VISIBLE,
583 HIDDEN,
584 };
585
586 enum class RefreshType {
587 AUTO,
588 PULL_DOWN,
589 };
590
591 enum class TabBarMode {
592 FIXED,
593 SCROLLABLE,
594 FIXED_START,
595 };
596
597 enum class TabAnimateMode {
598 CONTENT_FIRST = 0,
599 ACTION_FIRST,
600 NO_ANIMATION,
601 MAX_VALUE,
602 };
603
604 enum class ShowInNavigationBar {
605 SHOW = 0,
606 POPUP,
607 };
608
609 enum class HorizontalAlign {
610 START = 1,
611 CENTER,
612 END,
613 };
614
615 enum class VerticalAlign {
616 TOP = 1,
617 CENTER,
618 BOTTOM,
619 BASELINE,
620 NONE,
621 };
622
623 enum class SwiperDynamicSyncSceneType {
624 GESTURE = 0,
625 ANIMATE,
626 };
627
628 enum class MarqueeDynamicSyncSceneType {
629 ANIMATE = 1,
630 };
631
632 namespace StringUtils {
ToString(const VerticalAlign & verticalAlign)633 inline std::string ToString(const VerticalAlign& verticalAlign)
634 {
635 static const LinearEnumMapNode<VerticalAlign, std::string> table[] = {
636 { VerticalAlign::TOP, "TOP" },
637 { VerticalAlign::CENTER, "CENTER" },
638 { VerticalAlign::BOTTOM, "BOTTOM" },
639 { VerticalAlign::BASELINE, "BASELINE" },
640 { VerticalAlign::NONE, "NONE" },
641 };
642 auto iter = BinarySearchFindIndex(table, ArraySize(table), verticalAlign);
643 return iter != -1 ? table[iter].value : "";
644 }
645 } // namespace StringUtils
646
647 enum class BarPosition {
648 START,
649 END,
650 };
651
652 enum class CalendarType {
653 NORMAL = 0,
654 SIMPLE,
655 };
656
657 enum class SideBarContainerType { EMBED, OVERLAY, AUTO };
658
659 enum class SideBarPosition { START, END };
660
661 enum class SideBarStatus {
662 SHOW,
663 HIDDEN,
664 CHANGING,
665 AUTO,
666 };
667
668 enum class HitTestMode {
669 /**
670 * Both self and children respond to the hit test for touch events,
671 * but block hit test of the other nodes which is masked by this node.
672 */
673 HTMDEFAULT = 0,
674
675 /**
676 * Self respond to the hit test for touch events,
677 * but block hit test of children and other nodes which is masked by this node.
678 */
679 HTMBLOCK,
680
681 /**
682 * Self and child respond to the hit test for touch events,
683 * and allow hit test of other nodes which is masked by this node.
684 */
685 HTMTRANSPARENT,
686
687 /**
688 * Self not respond to the hit test for touch events,
689 * but children respond to the hit test for touch events.
690 */
691 HTMNONE
692 };
693
694 enum class CopyOptions {
695 None = 0,
696 InApp,
697 Local,
698 Distributed,
699 };
700
701 enum class VisibleType {
702 VISIBLE,
703 INVISIBLE,
704 GONE,
705 };
706
707 enum class ShapeMode {
708 /*
709 * unspecified, follow theme.
710 */
711 DEFAULT = 0,
712 /*
713 * rect scrollbar.
714 */
715 RECT,
716 /*
717 * round scrollbar.
718 */
719 ROUND,
720 };
721
722 enum class DisplayMode {
723 /*
724 * do not display scrollbar.
725 */
726 OFF = 0,
727 /*
728 * display scrollbar on demand.
729 */
730 AUTO,
731 /*
732 * always display scrollbar.
733 */
734 ON,
735 };
736
737 enum class PositionMode {
738 /*
739 * display scrollbar on right.
740 */
741 RIGHT = 0,
742 /*
743 * display scrollbar on left.
744 */
745 LEFT,
746 /*
747 * display scrollbar on bottom.
748 */
749 BOTTOM,
750 };
751
752 enum class XComponentType { UNKNOWN = -1, SURFACE = 0, COMPONENT, TEXTURE, NODE };
753
754 enum class RenderMode { ASYNC_RENDER = 0, SYNC_RENDER };
755
756 inline constexpr uint32_t STATE_NORMAL = 0;
757 inline constexpr uint32_t STATE_PRESSED = 1;
758 inline constexpr uint32_t STATE_FOCUS = 1 << 1;
759 inline constexpr uint32_t STATE_CHECKED = 1 << 2;
760 inline constexpr uint32_t STATE_DISABLED = 1 << 3;
761 inline constexpr uint32_t STATE_WAITING = 1 << 4;
762 inline constexpr uint32_t STATE_HOVERED = 1 << 5;
763 inline constexpr uint32_t STATE_ACTIVE = 1 << 6;
764
765 enum class TabBarStyle {
766 NOSTYLE = 0,
767 SUBTABBATSTYLE,
768 BOTTOMTABBATSTYLE,
769 };
770
771 enum class GestureJudgeResult {
772 CONTINUE = 0,
773 REJECT = 1,
774 };
775
776 enum class GestureTypeName {
777 UNKNOWN = -1,
778 TAP_GESTURE = 0,
779 LONG_PRESS_GESTURE = 1,
780 PAN_GESTURE = 2,
781 PINCH_GESTURE = 3,
782 SWIPE_GESTURE = 4,
783 ROTATION_GESTURE = 5,
784 DRAG = 6,
785 CLICK = 7,
786 BOXSELECT = 8,
787 WEBSCROLL = 9,
788 TEXTFIELD_BOXSELECT = 10,
789 };
790
791 enum class ModifierKey {
792 CTRL = 0,
793 SHIFT = 1,
794 ALT = 2,
795 };
796
797 enum class FunctionKey {
798 ESC = 0,
799 F1 = 1,
800 F2 = 2,
801 F3 = 3,
802 F4 = 4,
803 F5 = 5,
804 F6 = 6,
805 F7 = 7,
806 F8 = 8,
807 F9 = 9,
808 F10 = 10,
809 F11 = 11,
810 F12 = 12,
811 TAB = 13,
812 DPAD_UP = 14,
813 DPAD_DOWN = 15,
814 DPAD_LEFT = 16,
815 DPAD_RIGHT = 17,
816 };
817
818 enum class ObscuredReasons {
819 PLACEHOLDER = 0,
820 };
821
822 enum class MaximizeMode : uint32_t {
823 MODE_AVOID_SYSTEM_BAR,
824 MODE_FULL_FILL,
825 MODE_RECOVER,
826 };
827
828 enum class RenderFit : int32_t {
829 CENTER = 0,
830 TOP,
831 BOTTOM,
832 LEFT,
833 RIGHT,
834 TOP_LEFT,
835 TOP_RIGHT,
836 BOTTOM_LEFT,
837 BOTTOM_RIGHT,
838 RESIZE_FILL,
839 RESIZE_CONTAIN,
840 RESIZE_CONTAIN_TOP_LEFT,
841 RESIZE_CONTAIN_BOTTOM_RIGHT,
842 RESIZE_COVER,
843 RESIZE_COVER_TOP_LEFT,
844 RESIZE_COVER_BOTTOM_RIGHT,
845 };
846
847 enum class KeyBoardAvoidMode : int32_t {
848 OFFSET = 0,
849 RESIZE = 1,
850 OFFSET_WITH_CARET = 2,
851 RESIZE_WITH_CARET = 3,
852 NONE = 4,
853 };
854
855 enum class SwipeActionState : uint32_t {
856 COLLAPSED = 0,
857 EXPANDED,
858 ACTIONING,
859 };
860 /**
861 * souce is Rosen::Orientation
862 */
863 enum class Orientation : uint32_t {
864 BEGIN = 0,
865 UNSPECIFIED = BEGIN,
866 VERTICAL = 1,
867 HORIZONTAL = 2,
868 REVERSE_VERTICAL = 3,
869 REVERSE_HORIZONTAL = 4,
870 SENSOR = 5,
871 SENSOR_VERTICAL = 6,
872 SENSOR_HORIZONTAL = 7,
873 AUTO_ROTATION_RESTRICTED = 8,
874 AUTO_ROTATION_PORTRAIT_RESTRICTED = 9,
875 AUTO_ROTATION_LANDSCAPE_RESTRICTED = 10,
876 LOCKED = 11,
877 END = LOCKED,
878 };
879
880 enum class NodeRenderType : uint32_t {
881 RENDER_TYPE_DISPLAY = 0,
882 RENDER_TYPE_TEXTURE,
883 };
884
885 enum class MarqueeUpdateStrategy : uint32_t {
886 DEFAULT = 0,
887 PRESERVE_POSITION,
888 };
889
890 enum class EdgeType {
891 MARGIN,
892 PADDING,
893 SAFE_AREA_PADDING,
894 };
895
896 enum class SafeAreaSyncType : uint32_t {
897 SYNC_TYPE_NONE = 0,
898 SYNC_TYPE_KEYBOARD,
899 SYNC_TYPE_AVOID_AREA,
900 SYNC_TYPE_WINDOW_IGNORE
901 };
902 } // namespace OHOS::Ace
903
904 #endif // FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_BASE_LAYOUT_CONSTANTS_H
905