forked from pjde-ultibo/littlevgl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathulvgl.pas
3684 lines (3362 loc) · 204 KB
/
ulvgl.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
unit ulvgl;
{$mode objfpc}{$H+}
{$hints off}
interface
uses
Classes, SysUtils, SysCalls;
{$linklib lvgl}
{ Pascal headers for lvGL.
Website : lvlgl.io
From the above website
MIT licence
Copyright (c) 2016 Gábor Kiss-Vámosi
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the “Software”),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.
The same goes for this header file (c) 2020 pjde.
}
{$PACKRECORDS C}
const
// ---------- lv_version.h ----------
LVGL_VERSION_MAJOR = 7;
LVGL_VERSION_MINOR = 6;
LVGL_VERSION_PATCH = 0;
LVGL_VERSION_INFO = '';
// ------------ lv_hal_disp.h --------------
LV_DISP_SIZE_SMALL = 0;
LV_DISP_SIZE_MEDIUM = 1;
LV_DISP_SIZE_LARGE = 2;
LV_DISP_SIZE_EXTRA_LARGE = 3;
// ---------- lv_types.h ----------
LV_RES_INV = 0; // Typically indicates that the object is deleted (become invalid) in the action
// function or an operation was failed
LV_RES_OK = 1; // The object is valid (no deleted) after the action
// ---------- lv_obj.h ----------
LV_MAX_ANCESTOR_NUM = 8;
LV_EXT_CLICK_AREA_OFF = 0;
LV_EXT_CLICK_AREA_TINY = 1;
LV_EXT_CLICK_AREA_FULL = 2;
// design mode enumerations
LV_DESIGN_DRAW_MAIN = 0; // Draw the main portion of the object
LV_DESIGN_DRAW_POST = 1; // Draw extras on the object
LV_DESIGN_COVER_CHK = 2; // Check if the object fully covers the 'mask_p' area
// event type enumerations
LV_EVENT_PRESSED = 0; // The object has been pressed
LV_EVENT_PRESSING = 1; // The object is being pressed (called continuously while pressing)
LV_EVENT_PRESS_LOST = 2; // User is still pressing but slid cursor/finger off of the object
LV_EVENT_SHORT_CLICKED = 3; // User pressed object for a short period of time, then released it. Not called if dragged.
LV_EVENT_LONG_PRESSED = 4; // Object has been pressed for at least `LV_INDEV_LONG_PRESS_TIME`. Not called if dragged.
LV_EVENT_LONG_PRESSED_REPEAT = 5; // Called after `LV_INDEV_LONG_PRESS_TIME` in every
// `LV_INDEV_LONG_PRESS_REP_TIME` ms. Not called if dragged.
LV_EVENT_CLICKED = 6; // Called on release if not dragged (regardless to long press)
LV_EVENT_RELEASED = 7; // Called in every cases when the object has been released
LV_EVENT_DRAG_BEGIN = 8;
LV_EVENT_DRAG_END = 9;
LV_EVENT_DRAG_THROW_BEGIN = 10;
LV_EVENT_GESTURE = 11; // The object has been gesture
LV_EVENT_KEY = 12;
LV_EVENT_FOCUSED = 13;
LV_EVENT_DEFOCUSED = 14;
LV_EVENT_LEAVE = 15;
LV_EVENT_VALUE_CHANGED = 16; // The object's value has changed (i.e. slider moved)
LV_EVENT_INSERT = 17;
LV_EVENT_REFRESH = 18;
LV_EVENT_APPLY = 19; // "Ok", "Apply" or similar specific button has clicked
LV_EVENT_CANCEL = 20; // "Close", "Cancel" or similar specific button has clicked
LV_EVENT_DELETE = 21; // Object is being deleted
_LV_EVENT_LAST = 22; // Number of events
// LABEL Long mode behaviors enumeration
LV_LABEL_LONG_EXPAND = 0; // Expand the object size to the text size
LV_LABEL_LONG_BREAK = 1; // Keep the object width, break the too long lines and expand the object height
LV_LABEL_LONG_DOT = 2; // Keep the size and write dots at the end if the text is too long
LV_LABEL_LONG_SROLL = 3; // Keep the size and roll the text back and forth
LV_LABEL_LONG_SROLL_CIRC = 4; // Keep the size and roll the text circularly
LV_LABEL_LONG_CROP = 5; // Keep the size and crop the text out of it
// General signals enumeration
LV_SIGNAL_CLEANUP = 0; // Object is being deleted
LV_SIGNAL_CHILD_CHG = 1; // Child was removed/added
LV_SIGNAL_CORD_CHG = 2; // Object coordinates/size have changed
LV_SIGNAL_PARENT_SIZE_CHG = 3; // Parent's size has changed
LV_SIGNAL_STYLE_CHG = 4; // Object's style has changed
LV_SIGNAL_BASE_DIR_CHG = 5; // The base dir has changed
LV_SIGNAL_REFR_EXT_DRAW_PAD = 6; // Object's extra padding has changed
LV_SIGNAL_GET_TYPE = 7; // LittlevGL needs to retrieve the object's type
// Input device related
LV_SIGNAL_PRESSED = 8; // The object has been pressed
LV_SIGNAL_PRESSING = 9; // The object is being pressed (called continuously while pressing)
LV_SIGNAL_PRESS_LOST = 10; // User is still pressing but slid cursor/finger off of the object
LV_SIGNAL_RELEASED = 11; // User pressed object for a short period of time, then released it. Not called if dragged.
LV_SIGNAL_LONG_PRESS = 12; // Object has been pressed for at least `LV_INDEV_LONG_PRESS_TIME`. Not called if dragged.
LV_SIGNAL_LONG_PRESS_REP = 13; // Called after `LV_INDEV_LONG_PRESS_TIME` in every `LV_INDEV_LONG_PRESS_REP_TIME` ms. Not called if dragged.
LV_SIGNAL_DRAG_BEGIN = 14;
LV_SIGNAL_DRAG_END = 15;
// Group related
LV_SIGNAL_FOCUS = 16;
LV_SIGNAL_DEFOCUS = 17;
LV_SIGNAL_CONTROL = 18;
LV_SIGNAL_GET_EDITABLE = 19;
// Object alignment enumerations
LV_ALIGN_CENTER = 0;
LV_ALIGN_IN_TOP_LEFT = 1;
LV_ALIGN_IN_TOP_MID = 2;
LV_ALIGN_IN_TOP_RIGHT = 3;
LV_ALIGN_IN_BOTTOM_LEFT = 4;
LV_ALIGN_IN_BOTTOM_MID = 5;
LV_ALIGN_IN_BOTTOM_RIGHT = 6;
LV_ALIGN_IN_LEFT_MID = 7;
LV_ALIGN_IN_RIGHT_MID = 8;
LV_ALIGN_OUT_TOP_LEFT = 9;
LV_ALIGN_OUT_TOP_MID = 10;
LV_ALIGN_OUT_TOP_RIGHT = 11;
LV_ALIGN_OUT_BOTTOM_LEFT = 12;
LV_ALIGN_OUT_BOTTOM_MID = 13;
LV_ALIGN_OUT_BOTTOM_RIGHT = 14;
LV_ALIGN_OUT_LEFT_TOP = 15;
LV_ALIGN_OUT_LEFT_MID = 16;
LV_ALIGN_OUT_LEFT_BOTTOM = 17;
LV_ALIGN_OUT_RIGHT_TOP = 18;
LV_ALIGN_OUT_RIGHT_MID = 19;
LV_ALIGN_OUT_RIGHT_BOTTOM = 20;
LV_GESTURE_DIR_TOP = 0; // Gesture dir up.
LV_GESTURE_DIR_BOTTOM = 1; // Gesture dir down.
LV_GESTURE_DIR_LEFT = 2; // Gesture dir left.
LV_GESTURE_DIR_RIGHT = 3; // Gesture dir right.
LV_INDEV_TYPE_NONE = 0; // Uninitialized state
LV_INDEV_TYPE_POINTER = 1; // Touch pad, mouse, external button
LV_INDEV_TYPE_KEYPAD = 2; // Keypad or keyboard
LV_INDEV_TYPE_BUTTON = 3; // External (hardware button) which is assigned to a specific point of the
// screen
LV_INDEV_TYPE_ENCODER = 4; // Encoder with only Left, Right turn and a Button
LV_INDEV_STATE_REL = 0;
LV_INDEV_STATE_PR = 1;
// dragging enumerations
LV_DRAG_DIR_HOR = $1; // Object can be dragged horizontally.
LV_DRAG_DIR_VER = $2; // Object can be dragged vertically.
LV_DRAG_DIR_ALL = $3; // Object can be dragged in all directions.
// protection enumerations
LV_PROTECT_NONE = $00;
LV_PROTECT_CHILD_CHG = $01; // Disable the child change signal. Used by the library
LV_PROTECT_PARENT = $02; // Prevent automatic parent change (e.g. in lv_page)
LV_PROTECT_POS = $04; // Prevent automatic positioning (e.g. in lv_cont layout)
LV_PROTECT_FOLLOW = $08; // Prevent the object be followed in automatic ordering (e.g. in
// lv_cont PRETTY layout)
LV_PROTECT_PRESS_LOST = $10; // If the `indev` was pressing this object but swiped out while
// pressing do not search other object.
LV_PROTECT_CLICK_FOCUS = $20; // Prevent focusing the object by clicking on it
LV_THEME_MATERIAL_FLAG_DARK = $01;
LV_THEME_MATERIAL_FLAG_LIGHT = $02;
LV_THEME_MATERIAL_FLAG_NO_TRANSITION = $10;
LV_THEME_MATERIAL_FLAG_NO_FOCUS = $20;
LV_DPI = 130;
// arcs
LV_ARC_PART_BG = 0;
LV_OBJ_PART_MAIN = 0;
LV_ARC_PART_INDIC = 1;
LV_ARC_PART_KNOB = 2;
_LV_ARC_PART_VIRTUAL_LAST = 3;
// _LV_ARC_PART_REAL_LAST = _LV_OBJ_PART_REAL_LAST;
LV_ARC_TYPE_NORMAL = 0;
LV_ARC_TYPE_SYMMETRIC = 1;
LV_ARC_TYPE_REVERSE = 2;
LV_BAR_ANIM_STATE_START = 0; // Bar animation start value. (Not the real value of the Bar just indicates process animation)
LV_BAR_ANIM_STATE_END = 256; // Bar animation end value. (Not the real value of the Bar just indicates process animation)
LV_BAR_ANIM_STATE_INV = -1; // Mark no animation is in progress
LV_BAR_ANIM_STATE_NORM = 8;
LV_BAR_TYPE_NORMAL = 0;
LV_BAR_TYPE_SYMMETRICAL = 1;
LV_BAR_TYPE_CUSTOM = 2;
LV_BAR_PART_BG = 0; // Bar background style.
LV_BAR_PART_INDIC = 1; // Bar fill area style.
_LV_BAR_PART_VIRTUAL_LAST = 2;
LV_FONT_WIDTH_FRACT_DIGIT = 4;
LV_FONT_KERN_POSITIVE = 0;
LV_FONT_KERN_NEGATIVE = 1;
LV_CALENDAR_PART_BG = 0; // Background and "normal" date numbers style
LV_CALENDAR_PART_HEADER = 1; // Calendar header style
LV_CALENDAR_PART_DAY_NAMES = 2; // Day name style
LV_CALENDAR_PART_DATE = 3; // Day name style
(*
LV_OBJ_PART_MAIN = 0;
_LV_OBJ_PART_VIRTUAL_LAST = _LV_OBJ_PART_VIRTUAL_FIRST;
_LV_OBJ_PART_REAL_LAST = _LV_OBJ_PART_REAL_FIRST;
LV_OBJ_PART_ALL = $FF;
*)
_LV_OBJ_PART_REAL_LAST = 2; // find actual value and delete <--------------
LV_LINEMETER_PART_MAIN = 0;
_LV_LINEMETER_PART_VIRTUAL_LAST = 1;
_LV_LINEMETER_PART_REAL_LAST = _LV_OBJ_PART_REAL_LAST;
LV_GAUGE_PART_MAIN = LV_LINEMETER_PART_MAIN;
LV_GAUGE_PART_MAJOR = _LV_LINEMETER_PART_VIRTUAL_LAST;
LV_GAUGE_PART_NEEDLE = LV_GAUGE_PART_MAJOR + 1;
_LV_GAUGE_PART_VIRTUAL_LAST = _LV_LINEMETER_PART_VIRTUAL_LAST;
_LV_GAUGE_PART_REAL_LAST = _LV_LINEMETER_PART_REAL_LAST;
LV_TABVIEW_TAB_POS_NONE = 0;
LV_TABVIEW_TAB_POS_TOP = 1;
LV_TABVIEW_TAB_POS_BOTTOM = 2;
LV_TABVIEW_TAB_POS_LEFT = 3;
LV_TABVIEW_TAB_POS_RIGHT = 4;
LV_BORDER_SIDE_NONE = $00;
LV_BORDER_SIDE_BOTTOM = $01;
LV_BORDER_SIDE_TOP = $02;
LV_BORDER_SIDE_LEFT = $04;
LV_BORDER_SIDE_RIGHT = $08;
LV_BORDER_SIDE_FULL = $0F;
LV_BORDER_SIDE_INTERNAL = $10;
_LV_BORDER_SIDE_LAST = $11;
LV_LABEL_PART_MAIN = 0;
LV_LABEL_ALIGN_LEFT = 0; // Align text to left
LV_LABEL_ALIGN_CENTER = 1; // Align text to center
LV_LABEL_ALIGN_RIGHT = 2; // Align text to right
LV_LABEL_ALIGN_AUTO = 3; // Use LEFT or RIGHT depending on the direction of the text (LTR/RTL)
LV_GRAD_DIR_NONE = 0;
LV_GRAD_DIR_VER = 1;
LV_GRAD_DIR_HOR = 2;
_LV_GRAD_DIR_LAST = 3;
LV_CONT_PART_MAIN = LV_OBJ_PART_MAIN;
// _LV_CONT_PART_VIRTUAL_LAST = _LV_OBJ_PART_VIRTUAL_LAST;
_LV_CONT_PART_REAL_LAST = _LV_OBJ_PART_REAL_LAST;
LV_PAGE_PART_BG = LV_CONT_PART_MAIN;
// LV_PAGE_PART_SCROLLBAR = _LV_OBJ_PART_VIRTUAL_LAST;
// LV_PAGE_PART_EDGE_FLASH = LV_PAGE_PART_SCROLLBAR + 1;
// _LV_PAGE_PART_VIRTUAL_LAST = LV_PAGE_PART_EDGE_FLASH + 1;
LV_PAGE_PART_SCROLLABLE = _LV_OBJ_PART_REAL_LAST;
_LV_PAGE_PART_REAL_LAST = LV_PAGE_PART_SCROLLABLE + 1;
LV_LIST_PART_BG = LV_PAGE_PART_BG; // List background style
// LV_LIST_PART_SCROLLBAR = LV_PAGE_PART_SCROLLBAR; // List scrollbar style.
// LV_LIST_PART_EDGE_FLASH = LV_PAGE_PART_EDGE_FLASH; // List edge flash style.
// _LV_LIST_PART_VIRTUAL_LAST = _LV_PAGE_PART_VIRTUAL_LAST,
LV_LIST_PART_SCROLLABLE = LV_PAGE_PART_SCROLLABLE; // List scrollable area style.
_LV_LIST_PART_REAL_LAST = _LV_PAGE_PART_REAL_LAST;
// Text decorations (Use 'OR'ed values)
LV_TEXT_DECOR_NONE = $00;
LV_TEXT_DECOR_UNDERLINE = $01;
LV_TEXT_DECOR_STRIKETHROUGH = $02;
_LV_TEXT_DECOR_LAST = $03;
LV_LED_BRIGHT_MIN = 120;
LV_LED_BRIGHT_MAX = 255;
LV_STYLE_STATE_POS = 8;
LV_STYLE_STATE_MASK = $7F00;
LV_STYLE_INHERIT_MASK = $8000;
LV_STYLE_ID_VALUE = $00; // max 9 pcs
LV_STYLE_ID_COLOR = $09; // max 3 pcs
LV_STYLE_ID_OPA = $0C; // max 2 pcs
LV_STYLE_ID_PTR = $0E; // max 2 pcs
LV_STYLE_RADIUS = $01;
LV_STYLE_CLIP_CORNER = $02;
LV_STYLE_SIZE = $03;
LV_STYLE_TRANSFORM_WIDTH = $04;
LV_STYLE_TRANSFORM_HEIGHT = $05;
LV_STYLE_TRANSFORM_ANGLE = $07;
LV_STYLE_TRANSFORM_ZOOM = $08;
LV_STYLE_OPA_SCALE = $800C;
LV_STYLE_PAD_TOP = $10;
LV_STYLE_PAD_BOTTOM = $11;
LV_STYLE_PAD_LEFT = $12;
LV_STYLE_PAD_RIGHT = $13;
LV_STYLE_PAD_INNER = $14;
LV_STYLE_MARGIN_TOP = $15;
LV_STYLE_MARGIN_BOTTOM = $16;
LV_STYLE_MARGIN_LEFT = $17;
LV_STYLE_MARGIN_RIGHT = $18;
LV_STYLE_BG_BLEND_MODE = $20;
LV_STYLE_BG_MAIN_STOP = $21;
LV_STYLE_BG_GRAD_STOP = $22;
LV_STYLE_BG_GRAD_DIR = $23;
LV_STYLE_BG_COLOR = $29;
LV_STYLE_BG_GRAD_COLOR = $2A;
LV_STYLE_BG_OPA = $2C;
LV_STYLE_BORDER_WIDTH = $30;
LV_STYLE_BORDER_SIDE = $31;
LV_STYLE_BORDER_BLEND_MODE = $32;
LV_STYLE_BORDER_POST = $33;
LV_STYLE_BORDER_COLOR = $39;
LV_STYLE_BORDER_OPA = $3C;
LV_STYLE_OUTLINE_WIDTH = $40;
LV_STYLE_OUTLINE_PAD = $41;
LV_STYLE_OUTLINE_BLEND_MODE = $42;
LV_STYLE_OUTLINE_COLOR = $49;
LV_STYLE_OUTLINE_OPA = $4C;
LV_STYLE_SHADOW_WIDTH = $50;
LV_STYLE_SHADOW_OFS_X = $51;
LV_STYLE_SHADOW_OFS_Y = $52;
LV_STYLE_SHADOW_SPREAD = $53;
LV_STYLE_SHADOW_BLEND_MODE = $54;
LV_STYLE_SHADOW_COLOR = $59;
LV_STYLE_SHADOW_OPA = $5C;
LV_STYLE_PATTERN_BLEND_MODE = $60;
LV_STYLE_PATTERN_REPEAT = $61;
LV_STYLE_PATTERN_RECOLOR = $69;
LV_STYLE_PATTERN_OPA = $6C;
LV_STYLE_PATTERN_RECOLOR_OPA = $6D;
LV_STYLE_PATTERN_IMAGE = $6E;
LV_STYLE_VALUE_LETTER_SPACE = $70;
LV_STYLE_VALUE_LINE_SPACE = $71;
LV_STYLE_VALUE_BLEND_MODE = $72;
LV_STYLE_VALUE_OFS_X = $73;
LV_STYLE_VALUE_OFS_Y = $74;
LV_STYLE_VALUE_ALIGN = $75;
LV_STYLE_VALUE_COLOR = $79;
LV_STYLE_VALUE_OPA = $7C;
LV_STYLE_VALUE_FONT = $7E;
LV_STYLE_VALUE_STR = $7F;
LV_STYLE_TEXT_LETTER_SPACE = $8080;
LV_STYLE_TEXT_LINE_SPACE = $8081;
LV_STYLE_TEXT_DECOR = $8082;
LV_STYLE_TEXT_BLEND_MODE = $8083;
LV_STYLE_TEXT_COLOR = $8089;
LV_STYLE_TEXT_SEL_COLOR = $808A;
LV_STYLE_TEXT_OPA = $808C;
LV_STYLE_TEXT_FONT = $808E;
LV_STYLE_LINE_WIDTH = $90;
LV_STYLE_LINE_BLEND_MODE = $91;
LV_STYLE_LINE_DASH_WIDTH = $92;
LV_STYLE_LINE_DASH_GAP = $93;
LV_STYLE_LINE_ROUNDED = $94;
LV_STYLE_LINE_COLOR = $99;
LV_STYLE_LINE_OPA = $9C;
LV_STYLE_IMAGE_BLEND_MODE = $80A0;
LV_STYLE_IMAGE_RECOLOR = $80A9;
LV_STYLE_IMAGE_OPA = $80AC;
LV_STYLE_IMAGE_RECOLOR_OPA = $80AD;
LV_STYLE_TRANSITION_TIME = $B0;
LV_STYLE_TRANSITION_DELAY = $B1;
LV_STYLE_TRANSITION_PROP_1 = $B2;
LV_STYLE_TRANSITION_PROP_2 = $B3;
LV_STYLE_TRANSITION_PROP_3 = $B4;
LV_STYLE_TRANSITION_PROP_4 = $B5;
LV_STYLE_TRANSITION_PROP_5 = $B6;
LV_STYLE_TRANSITION_PROP_6 = $B7;
LV_STYLE_TRANSITION_PATH = $BE;
LV_STYLE_SCALE_WIDTH = $C0;
LV_STYLE_SCALE_BORDER_WIDTH = $C1;
LV_STYLE_SCALE_END_BORDER_WIDTH = $C2;
LV_STYLE_SCALE_END_LINE_WIDTH = $C3;
LV_STYLE_SCALE_GRAD_COLOR = $C9;
LV_STYLE_SCALE_END_COLOR = $CA;
LV_SLIDER_TYPE_NORMAL = 0;
LV_SLIDER_TYPE_SYMMETRICAL = 1;
LV_SLIDER_TYPE_RANGE = 2;
LV_SLIDER_PART_BG = 0; // Slider background style.
LV_SLIDER_PART_INDIC = 1; // Slider indicator (filled area) style.
LV_SLIDER_PART_KNOB = 2; // Slider knob style.
LV_ANIM_OFF = 0;
LV_ANIM_ON = 1;
LV_SWITCH_PART_BG = LV_BAR_PART_BG; // Switch background.
LV_SWITCH_PART_INDIC = LV_BAR_PART_INDIC; // Switch fill area.
LV_SWITCH_PART_KNOB = _LV_BAR_PART_VIRTUAL_LAST; // Switch knob.
_LV_SWITCH_PART_VIRTUAL_LAST = LV_SWITCH_PART_KNOB + 1;
LV_CHART_TYPE_NONE = $00; // Don't draw the series
LV_CHART_TYPE_LINE = $01; // Connect the points with lines
LV_CHART_TYPE_COLUMN = $02; // Draw columns
LV_CHART_TYPE_SCATTER = $03; // X/Y chart, points and/or lines
LV_BTN_STATE_RELEASED = 0;
LV_BTN_STATE_PRESSED = 1;
LV_BTN_STATE_DISABLED = 2;
LV_BTN_STATE_CHECKED_RELEASED = 3;
LV_BTN_STATE_CHECKED_PRESSED = 4;
LV_BTN_STATE_CHECKED_DISABLED = 5;
_LV_BTN_STATE_LAST = 6; // Number of states
LV_BTNMATRIX_CTRL_HIDDEN = $0008; // Button hidden
LV_BTNMATRIX_CTRL_NO_REPEAT = $0010; // Do not repeat press this button.
LV_BTNMATRIX_CTRL_DISABLED = $0020; // Disable this button.
LV_BTNMATRIX_CTRL_CHECKABLE = $0040; // Button *can* be toggled.
LV_BTNMATRIX_CTRL_CHECK_STATE = $0080; // Button is currently toggled (e.g. checked).
LV_BTNMATRIX_CTRL_CLICK_TRIG = $0100; // 1: Send LV_EVENT_SELECTED on CLICK, 0: Send LV_EVENT_SELECTED on PRESS
LV_BTNMATRIX_PART_BG = 0;
LV_BTNMATRIX_PART_BTN = 1;
LV_DROPDOWN_DIR_DOWN = 0;
LV_DROPDOWN_DIR_UP = 1;
LV_DROPDOWN_DIR_LEFT = 2;
LV_DROPDOWN_DIR_RIGHT = 3;
LV_DROPDOWN_PART_MAIN = LV_OBJ_PART_MAIN;
LV_DROPDOWN_PART_LIST = _LV_OBJ_PART_REAL_LAST;
LV_DROPDOWN_PART_SCROLLBAR = LV_DROPDOWN_PART_LIST + 1;
LV_DROPDOWN_PART_SELECTED = LV_DROPDOWN_PART_LIST + 2;
LV_SCROLLBAR_MODE_OFF = $00; // Never show scroll bars
LV_SCROLLBAR_MODE_ON = $01; // Always show scroll bars
LV_SCROLLBAR_MODE_DRAG = $02; // Show scroll bars when page is being dragged
LV_SCROLLBAR_MODE_AUTO = $03; // Show scroll bars when the scrollable container is large enough to be scrolled
LV_SCROLLBAR_MODE_HIDE = $04; // Hide the scroll bar temporally
LV_SCROLLBAR_MODE_UNHIDE = $08; // Unhide the previously hidden scroll bar. Recover original mode too
LV_PAGE_EDGE_LEFT = $01;
LV_PAGE_EDGE_TOP = $02;
LV_PAGE_EDGE_RIGHT = $04;
LV_PAGE_EDGE_BOTTOM = $08;
LV_LAYOUT_OFF = 0; // No layout
LV_LAYOUT_CENTER = 1; // Center objects
LV_LAYOUT_COLUMN_LEFT = 2; // Column left align
LV_LAYOUT_COLUMN_MID = 3; // Column middle align
LV_LAYOUT_COLUMN_RIGHT = 4; // Column right align
LV_LAYOUT_ROW_TOP = 5; // Row top align
LV_LAYOUT_ROW_MID = 6; // Row middle align
LV_LAYOUT_ROW_BOTTOM = 7; // Row bottom align
LV_LAYOUT_PRETTY_TOP = 8; // Row top align
LV_LAYOUT_PRETTY_MID = 9; // Row middle align
LV_LAYOUT_PRETTY_BOTTOM = 10; // Row bottom align
LV_LAYOUT_GRID = 11; // Align same-sized object into a grid
_LV_LAYOUT_LAST = 12;
LV_FIT_NONE = 0; // Do not change the size automatically
LV_FIT_TIGHT = 1; // Shrink wrap around the children
LV_FIT_PARENT = 2; // Align the size to the parent's edge
LV_FIT_MAX = 3; // Align the size to the parent's edge first but if there is an object out of it
// then get larger
_LV_FIT_LAST = 4;
LV_STATE_DEFAULT = $00;
LV_STATE_CHECKED = $01;
LV_STATE_FOCUSED = $02;
LV_STATE_EDITED = $04;
LV_STATE_HOVERED = $08;
LV_STATE_PRESSED = $00;
LV_STATE_DISABLED = $20;
LV_OPA_TRANSP = 0;
LV_OPA_0 = 0;
LV_OPA_10 = 25;
LV_OPA_20 = 51;
LV_OPA_30 = 76;
LV_OPA_40 = 102;
LV_OPA_50 = 127;
LV_OPA_60 = 153;
LV_OPA_70 = 178;
LV_OPA_80 = 204;
LV_OPA_90 = 229;
LV_OPA_100 = 255;
LV_OPA_COVER = 255;
LV_TABLE_PART_BG = 0;
LV_TABLE_PART_CELL1 = 1;
LV_TABLE_PART_CELL2 = 2;
LV_TABLE_PART_CELL3 = 3;
LV_TABLE_PART_CELL4 = 4;
LV_CHART_PART_BG = LV_OBJ_PART_MAIN;
// LV_CHART_PART_SERIES_BG = _LV_OBJ_PART_VIRTUAL_LAST;
// LV_CHART_PART_SERIES = LV_CHART_PART_SERIES_BG + 1;
LV_ROLLER_MODE_NORMAL = 0; // Normal mode (roller ends at the end of the options).
LV_ROLLER_MODE_INIFINITE = 1; // Infinite mode (roller can be scrolled forever).
LV_IMG_CF_UNKNOWN = 0;
LV_IMG_CF_RAW = 1;
LV_IMG_CF_RAW_ALPHA = 2;
LV_IMG_CF_RAW_CHROMA_KEYED = 3;
LV_IMG_CF_TRUE_COLOR = 4;
LV_IMG_CF_TRUE_COLOR_ALPHA = 5;
LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED = 6;
type
Tlv_obj = record // may not need to elaborate as may not need to access directly should be 68 bytes in size
end;
Tuint8 = byte;
Tint8 = byte;
Tuint16 = word;
Tint16 = SmallInt;
Tuint32 = LongWord;
Tint32 = integer;
Plv_obj = ^Tlv_obj;
Tlv_res = Tuint8;
Tlv_coord = Tint16; // to match conf settings
Plv_coord = ^Tlv_coord;
Tlv_align = Tuint8;
Tlv_state = Tuint8;
Tlv_style = record
end;
Plv_style = ^Tlv_style;
Tlv_drag_dir = Tuint8;
Tlv_bidi_dir = Tuint8;
Tlv_event = Tuint8;
Tlv_opa = Tuint8;
Plv_opa = ^Tlv_opa;
Tlv_event_cb = procedure (obj : Plv_obj; event : Tlv_event); //cdecl;
Plv_event_cb = ^Tlv_event_cb;
Tlv_signal = Tuint8;
Tlv_design_mode = Tuint8;
Tlv_point = record
x : Tlv_coord;
y : Tlv_coord;
end;
Plv_point = ^Tlv_point;
Tlv_area = record
x1 : Tlv_coord;
y1 : Tlv_coord;
x2 : Tlv_coord;
y2 : Tlv_coord;
end;
Plv_area = ^Tlv_area;
Tlv_disp_size = Tuint32; // enum
Tlv_gesture_dir = Tuint8;
Tlv_indev = record
(* driver : Tlv_indev_drv;
proc : Tlv_indev_proc;
cursor : Plv_obj; // Cursor for LV_INPUT_TYPE_POINTER
group : Plv_group; // Keypad destination group
btn_points : Plv_point; // Array points assigned to the button ()screen will be pressed
*) // here by the buttons
end;
Plv_indev = ^Tlv_indev;
Tlv_indev_type = Tuint8;
Tlv_design_cb = function (obj : Plv_obj; const mask_p : Plv_area; mode : Tlv_design_mode) : LongBool; cdecl;
Plv_design_cb = ^Tlv_design_cb;
Tlv_signal_cb = function (obj : Plv_obj; sign : Tlv_signal; param : pointer) : Tlv_res; cdecl;
Plv_signal_cb = ^Tlv_signal_cb;
Tlv_obj_type = record
_type : array [0..LV_MAX_ANCESTOR_NUM - 1] of byte; // [0]: the actual type, [1]: ancestor, [2] #1's ancestor
// ... [x]: "lv_obj"
end;
Plv_obj_type = ^Tlv_obj_type;
Tlv_obj_user_data = pointer; // to match conf settings
Plv_obj_user_data = ^Tlv_obj_user_data;
Tlv_font_user_data = pointer;
Tlv_color = packed record // assume 32 bit
case integer of
0 :
(
blue : Tuint8;
green : Tuint8;
red : Tuint8;
alpha : Tuint8;
);
1 :
(
full : Tuint32;
);
end;
Plv_color = ^Tlv_color;
Tlv_log_level = Tint8;
Tlv_log_print_g_cb = procedure (level : Tlv_log_level; fb : PChar; ln : Tuint32; desc : PChar); cdecl;
Tlv_task = record
end;
Plv_task = ^Tlv_task;
Tlv_disp_buf = record // 28 bytes
buf1 : pointer; // First display buffer. (4 -> 4)
buf2 : pointer; // Second display buffer. (4 -> 8)
// Internal, used by the library
buf_act : pointer; // (4 -> 12)
size : Tuint32; // In pixel count (4 -> 16)
area : Tlv_area; // (4 * 2 -> 24)
flushing : Tuint32; // bit 1 (4 -> 28)
flushing_last : Tuint32;
last_area : Tuint32;
lasp_part : Tuint32;
end;
Plv_disp_buf = ^Tlv_disp_buf;
Tlv_disp = record // 364 bytes
fill : array [0 .. 363] of byte;
end;
Plv_disp = ^Tlv_disp;
Tlv_disp_drv = record // 44 bytes
hor_res : Tlv_coord; // Horizontal resolution. (2 -> 2)
ver_res : Tlv_coord; // Vertical resolution. (2 -> 4)
buffer : Plv_disp_buf; // pointer to buffer (4 -> 8)
dpi : Tuint32; // dpi. (4 -> 12)
flush_cb : pointer; // pointer to procedure (4 -> 16)
rounder_cb : pointer; // pointer to procedure (4 -> 20)
set_px_cb : pointer; // pointer to procedure (4 -> 24)
monitor_cb : pointer; // pointer to procedure (4 -> 28)
wait_cb : pointer; // pointer to procedure (4 -> 32)
gpu_blend_cb : pointer; // pointer to procedure (4 -> 36)
gpu_fill_cb : pointer; // pointer to procedure (4 -> 40)
color_chroma_key : Tlv_color; // (4 -> 44)
end;
Plv_disp_drv = ^Tlv_disp_drv;
// bool ( *read_cb)(struct _lv_indev_drv_t * indev_drv, lv_indev_data_t * data); /**< Function pointer to read input device data.
// void ( *feedback_cb)(struct _lv_indev_drv_t *, uint8_t); /** Called when an action happened on the input device.
Tlv_indev_state = Tuint8;
Tlv_indev_data = record
point : Tlv_point; // For LV_INDEV_TYPE_POINTER the currently pressed point
key : Tuint32; // For LV_INDEV_TYPE_KEYPAD the currently pressed key
btn_id : Tuint32; // For LV_INDEV_TYPE_BUTTON the currently pressed button
enc_diff : Tint16; // For LV_INDEV_TYPE_ENCODER number of steps since the previous read
state : Tlv_indev_state; // LV_INDEV_STATE_REL or LV_INDEV_STATE_PR
end;
Plv_indev_data = ^Tlv_indev_data;
Tlv_indev_drv = record // 28 bytes
_type : Tlv_indev_type; // Input device type
read_cb : pointer; // 4 to function
feedback_cb : pointer; // 4 to procedure
(*
#if LV_USE_USER_DATA
lv_indev_drv_user_data_t user_data;
#endif
*)
disp : Plv_disp; // 4 Pointer to the assigned display
read_task : pointer; // Plv_task; // 4
drag_limit : Tuint8; // 1 Number of pixels to slide before actually drag the object
drag_throw : Tuint8; // 1 Drag throw slow-down in [%]. Greater value means faster slow-down */
gesture_min_velocity : Tuint8; // 1 At least this difference should between two points to evaluate as gesture */
gesture_limit : Tuint8; // 1 At least this difference should be to send a gesture
long_press_time : Tuint16; // 2 Long press time in milliseconds
long_press_rep_time : Tuint16; // 2 Repeated trigger period in long press [ms]
end;
Plv_indev_drv = ^Tlv_indev_drv;
// ----------- lv_blend.h ------------
Tlv_blend_mode = Tuint8;
// ----------- lv_canvas.h ------------
Tlv_canvas_style = Tuint8;
Tlv_img_cf = Tuint8; // colour format
// ------- lv_img_header --------------
{ The first 8 bit is very important to distinguish the different source types.
For more info see `lv_img_get_src_type()` in lv_img.c
cf : 5 Color format: See lv_img_color_format
always_zero : 3 It the upper bits of the first byte. Always zero to look like a
non-printable character
Reserved : 2; Reserved to be used later
w : 11 Width of the image map
h : 11 Height of the image map }
Tlv_img_header = bitpacked record
cf: 0..(1 shl 5) -1;
always_zero: 0..(1 shl 3) -1;
reserved: 0..(1 shl 2) -1;
w: 0..(1 shl 11) -1;
h: 0..(1 shl 11) -1;
end;
Plv_img_header = ^Tlv_img_header;
Tlv_img_dsc = record
header : Tlv_img_header;
data_size : Tuint32;
data : Puint8;
end;
Plv_img_dsc = ^Tlv_img_dsc;
Tlv_img_style = Tuint8;
// ------------ lv_anim.h --------------
Tlv_anim_enable = Tuint8;
Tlv_anim_value = Tlv_coord;
// ------------ lv_style.h --------------
Tlv_style_list = record // no need to actually define this in detail 8 bytes
end;
Plv_style_list = ^Tlv_style_list;
Tlv_border_side = Tuint8;
Tlv_grad_dir = Tuint8;
Tlv_text_decor = Tuint8;
Tlv_style_attr = Tuint8;
Tlv_style_property = Tuint16;
Tlv_style_int = Tint16;
Plv_style_int = ^Tlv_style_int;
// #define LV_STYLE_ATTR_GET_INHERIT(f) ((f)&0x80)
// #define LV_STYLE_ATTR_GET_STATE(f) ((f)&0x7F)
// ------------ lv_btn.h ---------------
Tlv_btn_state = Tuint8;
Tlv_btn_style = Tuint8;
// ------------ lv_label.h -------------
Tlv_label_style = Tuint8;
Tlv_label_long_mode = Tuint8;
Tlv_label_align = Tuint8;
// ------------ lv_cont.h ---------------
Tlv_layout = Tuint8;
Tlv_fit = Tuint8;
Tlv_cont_style = Tuint8;
// ------------ lv_arc.h ---------------
Tlv_arc_part = Tuint8;
Tlv_arc_type = Tuint8;
// ------------ lv_arc.h ---------------
Tlv_roller_mode = Tuint8;
// ------------ lv_bar.h ---------------
Tlv_bar_type = Tuint8;
Tlv_bar_part = Tuint8;
// ------------ lv_btnmatrix.h ---------------
Tlv_btnmatrix_ctrl = Tuint16;
Tlv_btnmatrix_part = Tuint8;
// ------------ lv_list.h ---------------
Tlv_list_style_t = Tuint8;
// ------------ lv_font.h ---------------
Tlv_font = record
get_glyph_desc : pointer; // 4 to function
get_glyph_bitmap : pointer; // 4 to function
line_height : Tlv_coord; // 2 The real line height where any text fits
baseline : Tlv_coord; // 2 Base line measured from the top of the line_height
subpx : Tuint8; // 1 bit 2 - An element of `lv_font_subpx_t
underline_position : Tint8; // 1 Distance between the top of the underline and base line (< 0 means below the base line)
underline_thickness : Tint8; // 1 Thickness of the underline
dsc : pointer; // 4 Store implementation specific or run_time data or caching here
// user_data : Tlv_font_user_data; // 4 Custom user data for font. - Not using LV_USE_DATA
end;
Plv_font = ^Tlv_font;
// ------------ lv_bar.h ---------------
// ------------ lv_chart.h ---------------
Tlv_chart_axis = Tuint8;
Tlv_chart_series = record
points : Plv_coord;
color : Tlv_color;
start_point : Tuint16;
ext_buf_assigned : Tuint8;
y_axis : Tlv_chart_axis;
end;
Plv_chart_series = ^Tlv_chart_series;
Tlv_chart_axis_options = Tuint8;
Tlv_chart_update_mode = Tuint8;
Tlv_chart_type = Tuint8;
// ------------ lv_calendar.h ---------------
Tlv_calendar_date = record
year : Tuint16;
month : Tuint8;
day : Tuint8;
end;
Plv_calendar_date = ^Tlv_calendar_date;
Tlv_calendar_ext = record
today : Tlv_calendar_date; // Date of today
showed_date : Tlv_calendar_date; // Currently visible month (day is ignored)
highlighted_dates : Plv_calendar_date; // Apply different style on these days (pointer to an
// array defined by the user)
btn_pressing : Tint8; // -1: prev month pressing, +1 next month pressing on the header
highlighted_dates_num : Tuint16; // Number of elements in `highlighted_days`
pressed_date : Tlv_calendar_date;
day_names : PPChar; // Pointer to an array with the name of the days (NULL: use default names)
month_names : PPChar; // Pointer to an array with the name of the month (NULL. use default names)
style_header : Tlv_style_list;
style_day_names : Tlv_style_list;
style_date_nums : Tlv_style_list;
end;
// Calendar parts
Tlv_calendar_part = Tuint8;
// ------------ lv_linemeter.h ---------------
Tlv_linemeter_ext = record
scale_angle : Tuint16; // Angle of the scale in deg. (0..360)
angle_ofs : Tuint16;
line_cnt : Tuint16; // Count of lines
cur_value : Tint32;
min_value : Tint32;
max_value : Tint32;
mirrored : Tuint8;
end;
Tlv_linemeter_part = Tuint8;
// ------------ lv_gauge.h ----------------
Tlv_gauge_ext = record
lmeter : Tlv_linemeter_ext; // Ext. of ancestor
// New data for this type
values : Pint32; // Array of the set values (for needles)
needle_colors : Plv_color; // Color of the needles (lv_color_t my_colors[needle_num])
needle_img : pointer;
needle_img_pivot : Tlv_point;
style_needle : Tlv_style_list;
style_strong : Tlv_style_list;
needle_count : Tuint8; // Number of needles
label_count : Tuint8; // Number of labels on the scale
format_cb : pointer; // to callback function
end;
Tlv_gauge_style = Tuint8;
// ------------ lv_page.h ----------------
Tlv_scrollbar_mode = Tuint8;
Tlv_page_edge = Tuint8;
// ------------ lv_switch.h ----------------
Tlv_switch_ext = record
style_knob : Tlv_style_list; // Style of the knob
state : Tuint8; // The current state
end;
Plv_switch_ext = ^Tlv_switch_ext;
Tlv_switch_part = Tuint8;
// ------------ lv_slider.h ----------------
Tlv_slider_type = Tuint8;
// ------------ lv_dropdown.h ----------------
Tlv_dropdown_dir = Tuint8;
Tlv_dropdown_part = Tuint8;
// ------------ lv_tabview.h ----------------
Tlv_tabview_btns_pos = Tuint8;
Tlv_tabview_ext = record
btns : Plv_obj;
indic : Plv_obj;
content : Plv_obj; // A background page which holds tab's pages
tab_name_ptr : PPChar;
point_last : Tlv_point;
tab_cur : Tuint16;
tab_cnt : Tuint16;
//#if LV_USE_ANIMATION
// uint16_t anim_time;
//#endif
btn_pos : Tlv_tabview_btns_pos;
end;
{
LV_TABVIEW_PART_BG = LV_OBJ_PART_MAIN,
_LV_TABVIEW_PART_VIRTUAL_LAST = _LV_OBJ_PART_VIRTUAL_LAST,
LV_TABVIEW_PART_BG_SCRLLABLE = _LV_OBJ_PART_REAL_LAST,
LV_TABVIEW_PART_TAB_BG,
LV_TABVIEW_PART_TAB_BTN,
LV_TABVIEW_PART_INDIC,
_LV_TABVIEW_PART_REAL_LAST,
}
Tlv_tabview_part = Tuint8;
// ------------ lv_themes.h ----------------
(*
typedef void ( *lv_theme_apply_cb_t)(struct _lv_theme_t *, lv_obj_t *, lv_theme_style_t);
typedef void ( *lv_theme_apply_xcb_t)(lv_obj_t *, lv_theme_style_t); /*Deprecated: use `apply_cb` instead*/
*)
Tlv_theme_style = Tint32; // enum
Plv_theme = ^Tlv_theme;
Tlv_theme = record
apply_cb : pointer; // pointer to apply function
apply_xcp : pointer; // Deprecated: use `apply_cb` instead*/
base : Plv_theme; // Apply the current theme's style on top of this theme.
color_primary : Tlv_color;
color_secondary : Tlv_color;
font_small : Plv_font;
font_normal : Plv_font;
font_subtitle : Plv_font;
font_title : Plv_font;
flags : Tuint32;
user_data : pointer;
end;
const
LV_COLOR_WHITE : Tlv_color = (blue : $FF; green : $FF; red : $FF; alpha : $FF);
LV_COLOR_SILVER : Tlv_color = (blue : $C0; green : $C0; red : $C0; alpha : $FF);
LV_COLOR_GRAY : Tlv_color = (blue : $80; green : $80; red : $80; alpha : $FF);
LV_COLOR_BLACK : Tlv_color = (blue : $00; green : $00; red : $00; alpha : $FF);
LV_COLOR_RED : Tlv_color = (blue : $00; green : $00; red : $FF; alpha : $FF);
LV_COLOR_MAROON : Tlv_color = (blue : $00; green : $00; red : $80; alpha : $FF);
LV_COLOR_YELLOW : Tlv_color = (blue : $00; green : $FF; red : $FF; alpha : $FF);
LV_COLOR_OLIVE : Tlv_color = (blue : $00; green : $80; red : $80; alpha : $FF);
LV_COLOR_LIME : Tlv_color = (blue : $00; green : $FF; red : $00; alpha : $FF);
LV_COLOR_GREEN : Tlv_color = (blue : $00; green : $80; red : $00; alpha : $FF);
LV_COLOR_CYAN : Tlv_color = (blue : $FF; green : $FF; red : $00; alpha : $FF);
LV_COLOR_TEAL : Tlv_color = (blue : $80; green : $80; red : $00; alpha : $FF);
LV_COLOR_BLUE : Tlv_color = (blue : $FF; green : $00; red : $00; alpha : $FF);
LV_COLOR_NAVY : Tlv_color = (blue : $80; green : $00; red : $00; alpha : $FF);
LV_COLOR_MAGENTA : Tlv_color = (blue : $FF; green : $00; red : $FF; alpha : $FF);
LV_COLOR_PURPLE : Tlv_color = (blue : $80; green : $00; red : $80; alpha : $FF);
LV_COLOR_ORANGE : Tlv_color = (blue : $00; green : $A5; red : $FF; alpha : $FF);
LV_COLOR_AQUA : Tlv_color = (blue : $FF; green : $FF; red : $00; alpha : $FF);
LV_THEME_DEFAULT_COLOR_PRIMARY : Tlv_color = (blue : $01; green : $A2; red : $B1; alpha : $FF); // lv_color_hex(0x01a2b1)
LV_THEME_DEFAULT_COLOR_SECONDARY : Tlv_color = (blue : $44; green : $D1; red : $B6; alpha : $FF); // lv_color_hex(0x44d1b6)
//lv_img
function lv_img_create (parent : Plv_obj; copy : Plv_obj) : Plv_obj; cdecl; external;
procedure lv_img_set_src (img : Plv_obj; src_img : Pointer); cdecl; external;
//lv_btn
procedure lv_btn_set_checkable (btn : Plv_obj; tgl : Boolean); cdecl; external;
//lv_imgbtn
function lv_imgbtn_create (parent : Plv_obj; copy : Plv_obj) : Plv_obj; cdecl; external;
procedure lv_imgbtn_set_src (imgbtn : Plv_obj; state : Tlv_btn_state; src_img : Pointer); cdecl; external;
//lv_keyboard
function lv_keyboard_create (parent : Plv_obj; copy : Plv_obj) : Plv_obj; cdecl; external;
procedure lv_keyboard_set_textarea (kb : Plv_obj; ta : Plv_obj); cdecl; external;
procedure lv_keyboard_set_cursor_manage (kb : Plv_obj; en : Boolean); cdecl; external;
procedure lv_keyboard_def_event_cb (kb : Plv_obj; event : Tlv_event); cdecl; external;
procedure lv_log_register_print_cb (print_cb : Tlv_log_print_g_cb); cdecl; external;