-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtaffy_cpp_c.h
1426 lines (979 loc) · 64 KB
/
taffy_cpp_c.h
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
#ifndef TAFFY_CPP_C_H
#define TAFFY_CPP_C_H
/*
taffy_cpp C bindings
Currently, in that header file, declared only minimal public
taffy/taffy_cpp API. It describes the next main parts:
Taffy <-- Nodes tree structure
+-- Style <-- Node style description
+-- Layout <-- Node computed location & size
and the set of types they depend on.
*/
#include <stdint.h> /* for: {u}int{16,32,64}_t */
#include <stddef.h> /* for: size_t */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* common types --------------------------------------------------------------*/
/* Option<T> ------------------------------------------------------------ */
/* Option<float> ---------------------------------------------------- */
typedef struct taffy_Option_float taffy_Option_float;
/* constructors */
taffy_Option_float* taffy_Option_float_new_default(void);
taffy_Option_float* taffy_Option_float_new(float* value);
taffy_Option_float* taffy_Option_float_new_some(float value);
/* copy constuctor */
taffy_Option_float* taffy_Option_float_new_copy(const taffy_Option_float* other);
/* destructor */
void taffy_Option_float_delete(taffy_Option_float* self);
/* comparison operator (is equal) */
/* bool */ int taffy_Option_float_eq(const taffy_Option_float* lhs, const taffy_Option_float* rhs);
/* getters */
/* bool */ int taffy_Option_float_is_some(const taffy_Option_float* self);
/* call only if 'is_some()' is 'true' */
float taffy_Option_float_get_value(const taffy_Option_float* self);
/* setters */
void taffy_Option_float_set_value(taffy_Option_float* self, const float* value);
/* geometry types ------------------------------------------------------------*/
/* Point<T> ------------------------------------------------------------- */
/* Point<float> ----------------------------------------------------- */
typedef struct taffy_Point_of_float taffy_Point_of_float;
/* constructors */
taffy_Point_of_float* taffy_Point_of_float_new_default(void);
taffy_Point_of_float* taffy_Point_of_float_new(float x, float y);
/* copy constructor */
taffy_Point_of_float* taffy_Point_of_float_new_copy(const taffy_Point_of_float* other);
/* destructor */
void taffy_Point_of_float_delete(taffy_Point_of_float* self);
/* comparison operator (is equal) */
/* bool */ int taffy_Point_of_float_eq(const taffy_Point_of_float* lhs, const taffy_Point_of_float* rhs);
/* arithmetic operators */
taffy_Point_of_float* taffy_Point_of_float_new_add(const taffy_Point_of_float* lhs, const taffy_Point_of_float* rhs);
/* getters */
float taffy_Point_of_float_get_x(const taffy_Point_of_float* self);
float taffy_Point_of_float_get_y(const taffy_Point_of_float* self);
/* setters */
void taffy_Point_of_float_set_x(taffy_Point_of_float* self, float x);
void taffy_Point_of_float_set_y(taffy_Point_of_float* self, float y);
/* mutators */
float* taffy_Point_of_float_get_mut_x(taffy_Point_of_float* self);
float* taffy_Point_of_float_get_mut_y(taffy_Point_of_float* self);
/* specialization extras */
taffy_Point_of_float* taffy_Point_of_float_new_ZERO(void);
/* Size<T> -------------------------------------------------------------- */
/* Size<float> ------------------------------------------------------ */
typedef struct taffy_Size_of_float taffy_Size_of_float;
/* constructors */
taffy_Size_of_float* taffy_Size_of_float_new_default(void);
taffy_Size_of_float* taffy_Size_of_float_new(float width, float height);
/* copy constrcutor */
taffy_Size_of_float* taffy_Size_of_float_new_copy(const taffy_Size_of_float* other);
/* destructor */
void taffy_Size_of_float_delete(taffy_Size_of_float* self);
/* comparison operator (is equal) */
/* bool */ int taffy_Size_of_float_eq(const taffy_Size_of_float* lhs, const taffy_Size_of_float* rhs);
/* arithmetic operators */
taffy_Size_of_float* taffy_Size_of_float_new_add(const taffy_Size_of_float* lhs, const taffy_Size_of_float* rhs);
taffy_Size_of_float* taffy_Size_of_float_new_sub(const taffy_Size_of_float* lhs, const taffy_Size_of_float* rhs);
/* getters */
float taffy_Size_of_float_get_width (const taffy_Size_of_float* self);
float taffy_Size_of_float_get_height(const taffy_Size_of_float* self);
/* setters */
void taffy_Size_of_float_set_width (taffy_Size_of_float* self, float width );
void taffy_Size_of_float_set_height(taffy_Size_of_float* self, float height);
/* mutators */
float* taffy_Size_of_float_get_mut_width (taffy_Size_of_float* self);
float* taffy_Size_of_float_get_mut_height(taffy_Size_of_float* self);
/* specialization extras */
taffy_Size_of_float* taffy_Size_of_float_new_ZERO(void);
/* style types -------------------------------------------------------------- */
/* alignment types ------------------------------------------------------ */
/* AlignContent */
typedef enum {
taffy_AlignContent_Start = 0,
taffy_AlignContent_End,
taffy_AlignContent_FlexStart,
taffy_AlignContent_FlexEnd,
taffy_AlignContent_Center,
taffy_AlignContent_Stretch,
taffy_AlignContent_SpaceBetween,
taffy_AlignContent_SpaceEvenly,
taffy_AlignContent_SpaceAround
} taffy_AlignContent;
/* JustifyContent (same as AlignContent) */
typedef enum {
taffy_JustifyContent_Start = 0,
taffy_JustifyContent_End,
taffy_JustifyContent_FlexStart,
taffy_JustifyContent_FlexEnd,
taffy_JustifyContent_Center,
taffy_JustifyContent_Stretch,
taffy_JustifyContent_SpaceBetween,
taffy_JustifyContent_SpaceEvenly,
taffy_JustifyContent_SpaceAround
} taffy_JustifyContent;
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* AlignItems */
typedef enum {
taffy_AlignItems_Start = 0,
taffy_AlignItems_End,
taffy_AlignItems_FlexStart,
taffy_AlignItems_FlexEnd,
taffy_AlignItems_Center,
taffy_AlignItems_Baseline,
taffy_AlignItems_Stretch
} taffy_AlignItems;
/* AlignSelf (same as AlignItems) */
typedef enum {
taffy_AlignSelf_Start = 0,
taffy_AlignSelf_End,
taffy_AlignSelf_FlexStart,
taffy_AlignSelf_FlexEnd,
taffy_AlignSelf_Center,
taffy_AlignSelf_Baseline,
taffy_AlignSelf_Stretch
} taffy_AlignSelf;
/* dimension types ------------------------------------------------------ */
/* AvailableSpace --------------------------------------------------- */
typedef struct taffy_AvailableSpace taffy_AvailableSpace;
/* constructors */
taffy_AvailableSpace* taffy_AvailableSpace_new_Definite(float value);
taffy_AvailableSpace* taffy_AvailableSpace_new_MinContent(void);
taffy_AvailableSpace* taffy_AvailableSpace_new_MaxContent(void);
/* copy constructor */
taffy_AvailableSpace* taffy_AvailableSpace_new_copy(const taffy_AvailableSpace* other);
/* destructor */
void taffy_AvailableSpace_delete(taffy_AvailableSpace* self);
/* comparison operator (is equal) */
/* bool */ int taffy_AvailableSpace_eq(const taffy_AvailableSpace* lhs, const taffy_AvailableSpace* rhs);
/* type checking */
/* bool */ int taffy_AvailableSpace_is_Definite (const taffy_AvailableSpace* self);
/* bool */ int taffy_AvailableSpace_is_MinContent(const taffy_AvailableSpace* self);
/* bool */ int taffy_AvailableSpace_is_MaxContent(const taffy_AvailableSpace* self);
/* getters */
/* call only if 'is_Definite()' is 'true' */
float taffy_AvailableSpace_get_value(const taffy_AvailableSpace* self);
/* extras */
taffy_AvailableSpace* taffy_AvailableSpace_new_ZERO(void);
taffy_AvailableSpace* taffy_AvailableSpace_new_MIN_CONTENT(void);
taffy_AvailableSpace* taffy_AvailableSpace_new_MAX_CONTENT(void);
taffy_AvailableSpace* taffy_AvailableSpace_new_from_length(float value);
taffy_AvailableSpace* taffy_AvailableSpace_new_from_float(float value);
taffy_AvailableSpace* taffy_AvailableSpace_new_from_option(const taffy_Option_float* opt);
/* LengthPercentage ------------------------------------------------- */
typedef struct taffy_LengthPercentage taffy_LengthPercentage;
/* constructors */
taffy_LengthPercentage* taffy_LengthPercentage_new_Length(float value);
taffy_LengthPercentage* taffy_LengthPercentage_new_Percent(float value);
/* copy constructor */
taffy_LengthPercentage* taffy_LengthPercentage_new_copy(const taffy_LengthPercentage* other);
/* destructor */
void taffy_LengthPercentage_delete(taffy_LengthPercentage* self);
/* comparison operator (is equal) */
/* bool */ int taffy_LengthPercentage_eq(const taffy_LengthPercentage* lhs, const taffy_LengthPercentage* rhs);
/* type checking */
/* bool */ int taffy_LengthPercentage_is_Length (const taffy_LengthPercentage* self);
/* bool */ int taffy_LengthPercentage_is_Percent(const taffy_LengthPercentage* self);
/* getters */
float taffy_LengthPercentage_get_value(const taffy_LengthPercentage* self);
/* extras */
taffy_LengthPercentage* taffy_LengthPercentage_new_ZERO(void);
taffy_LengthPercentage* taffy_LengthPercentage_new_from_length(float value);
taffy_LengthPercentage* taffy_LengthPercentage_new_from_percent(float value);
/* LengthPercentageAuto --------------------------------------------- */
typedef struct taffy_LengthPercentageAuto taffy_LengthPercentageAuto;
/* constructors */
taffy_LengthPercentageAuto* taffy_LengthPercentageAuto_new_Length(float value);
taffy_LengthPercentageAuto* taffy_LengthPercentageAuto_new_Percent(float value);
taffy_LengthPercentageAuto* taffy_LengthPercentageAuto_new_Auto(void);
/* copy constructor */
taffy_LengthPercentageAuto* taffy_LengthPercentageAuto_new_copy(const taffy_LengthPercentageAuto* other);
/* destructor */
void taffy_LengthPercentageAuto_delete(taffy_LengthPercentageAuto* self);
/* comparison operator (is equal) */
/* bool */ int taffy_LengthPercentageAuto_eq(const taffy_LengthPercentageAuto* lhs, const taffy_LengthPercentageAuto* rhs);
/* type checking */
/* bool */ int taffy_LengthPercentageAuto_is_Length (const taffy_LengthPercentageAuto* self);
/* bool */ int taffy_LengthPercentageAuto_is_Percent(const taffy_LengthPercentageAuto* self);
/* bool */ int taffy_LengthPercentageAuto_is_Auto (const taffy_LengthPercentageAuto* self);
/* getters */
/* call only if 'is_Length()' or 'is_Percent()' is 'true' */
float taffy_LengthPercentageAuto_get_value(const taffy_LengthPercentageAuto* self);
/* extras */
taffy_LengthPercentageAuto* taffy_LengthPercentageAuto_new_ZERO(void);
taffy_LengthPercentageAuto* taffy_LengthPercentageAuto_new_AUTO(void);
taffy_LengthPercentageAuto* taffy_LengthPercentageAuto_new_from_length(float value);
taffy_LengthPercentageAuto* taffy_LengthPercentageAuto_new_from_percent(float value);
taffy_LengthPercentageAuto* taffy_LengthPercentageAuto_new_from_LengthPercentage(const taffy_LengthPercentage* input);
/* Dimension -------------------------------------------------------- */
typedef struct taffy_Dimension taffy_Dimension;
/* constructors */
taffy_Dimension* taffy_Dimension_new_Length(float value);
taffy_Dimension* taffy_Dimension_new_Percent(float value);
taffy_Dimension* taffy_Dimension_new_Auto(void);
/* copy constructor */
taffy_Dimension* taffy_Dimension_new_copy(const taffy_Dimension* other);
/* destructor */
void taffy_Dimension_delete(taffy_Dimension* self);
/* comparison operator (is equal) */
/* bool */ int taffy_Dimension_eq(const taffy_Dimension* lhs, const taffy_Dimension* rhs);
/* type checking */
/* bool */ int taffy_Dimension_is_Length (const taffy_Dimension* self);
/* bool */ int taffy_Dimension_is_Percent(const taffy_Dimension* self);
/* bool */ int taffy_Dimension_is_Auto (const taffy_Dimension* self);
/* getters */
/* call only if 'is_Length()' or 'is_Percent()' is 'true' */
float taffy_Dimension_get_value(const taffy_Dimension* self);
/* extras */
taffy_Dimension* taffy_Dimension_new_ZERO(void);
taffy_Dimension* taffy_Dimension_new_from_length(float value);
taffy_Dimension* taffy_Dimension_new_from_percent(float value);
taffy_Dimension* taffy_Dimension_new_from_LengthPercentage(const taffy_LengthPercentage* input);
taffy_Dimension* taffy_Dimension_new_from_LengthPercentageAuto(const taffy_LengthPercentageAuto* input);
/* flex types ----------------------------------------------------------- */
/* FlexDirection ---------------------------------------------------- */
typedef enum {
taffy_FlexDirection_Row = 0,
taffy_FlexDirection_Column,
taffy_FlexDirection_RowReverse,
taffy_FlexDirection_ColumnReverse
} taffy_FlexDirection;
taffy_FlexDirection taffy_FlexDirection_default(void);
/* FlexWrap --------------------------------------------------------- */
typedef enum {
taffy_FlexWrap_NoWrap = 0,
taffy_FlexWrap_Wrap,
taffy_FlexWrap_WrapReverse
} taffy_FlexWrap;
taffy_FlexWrap taffy_FlexWrap_default(void);
/* grid types ----------------------------------------------------------- */
/* GridAutoFlow ----------------------------------------------------- */
typedef enum {
taffy_GridAutoFlow_Row = 0,
taffy_GridAutoFlow_Column,
taffy_GridAutoFlow_RowDense,
taffy_GridAutoFlow_ColumnDense
} taffy_GridAutoFlow;
taffy_GridAutoFlow taffy_GridAutoFlow_default(void);
/* GridPlacement ---------------------------------------------------- */
typedef struct taffy_GridPlacement taffy_GridPlacement;
/* constructors */
taffy_GridPlacement* taffy_GridPlacement_new_default(void);
taffy_GridPlacement* taffy_GridPlacement_new_Auto(void);
taffy_GridPlacement* taffy_GridPlacement_new_Line(int16_t value);
taffy_GridPlacement* taffy_GridPlacement_new_Span(uint16_t value);
/* copy constructor */
taffy_GridPlacement* taffy_GridPlacement_new_copy(const taffy_GridPlacement* other);
/* destructor */
void taffy_GridPlacement_delete(taffy_GridPlacement* self);
/* comparison operator (is equal) */
/* bool */ int taffy_GridPlacement_eq(const taffy_GridPlacement* lhs, const taffy_GridPlacement* rhs);
/* type checking */
/* bool */ int taffy_GridPlacement_is_Auto(const taffy_GridPlacement* self);
/* bool */ int taffy_GridPlacement_is_Line(const taffy_GridPlacement* self);
/* bool */ int taffy_GridPlacement_is_Span(const taffy_GridPlacement* self);
/* getters */
/* call only if 'is_Line()' is 'true' */
int16_t taffy_GridPlacement_get_line(const taffy_GridPlacement* self);
/* call only if 'is_Span()' is 'true' */
uint16_t taffy_GridPlacement_get_span(const taffy_GridPlacement* self);
/* specialization extras */
taffy_GridPlacement* taffy_GridPlacement_new_AUTO(void);
taffy_GridPlacement* taffy_GridPlacement_new_from_line_index(int16_t index);
taffy_GridPlacement* taffy_GridPlacement_new_from_span(uint16_t span);
/* GridTrackRepetition ---------------------------------------------- */
typedef struct taffy_GridTrackRepetition taffy_GridTrackRepetition;
/* constructors */
taffy_GridTrackRepetition* taffy_GridTrackRepetition_new_AutoFill(void);
taffy_GridTrackRepetition* taffy_GridTrackRepetition_new_AutoFit(void);
taffy_GridTrackRepetition* taffy_GridTrackRepetition_new_Count(uint16_t value);
/* copy constructor */
taffy_GridTrackRepetition* taffy_GridTrackRepetition_new_copy(const taffy_GridTrackRepetition* other);
/* destructor */
void taffy_GridTrackRepetition_delete(taffy_GridTrackRepetition* self);
/* comparison operator (is equal) */
/* bool */ int taffy_GridTrackRepetition_eq(const taffy_GridTrackRepetition* lhs, const taffy_GridTrackRepetition* rhs);
/* type checking */
/* bool */ int taffy_GridTrackRepetition_is_AutoFill(const taffy_GridTrackRepetition* self);
/* bool */ int taffy_GridTrackRepetition_is_AutoFit (const taffy_GridTrackRepetition* self);
/* bool */ int taffy_GridTrackRepetition_is_Count (const taffy_GridTrackRepetition* self);
/* getters */
/* call only if 'is_Count()' is 'true' */
uint16_t taffy_GridTrackRepetition_get_value(const taffy_GridTrackRepetition* self);
/* extras */
/* null on failure */ taffy_GridTrackRepetition* taffy_GridTrackRepetition_try_from_u16(uint16_t value);
/* null on failure */ taffy_GridTrackRepetition* taffy_GridTrackRepetition_try_from_str(const char* str);
/* MaxTrackSizingFunction ------------------------------------------- */
typedef struct taffy_MaxTrackSizingFunction taffy_MaxTrackSizingFunction;
/* constructors */
taffy_MaxTrackSizingFunction* taffy_MaxTrackSizingFunction_new_Fixed(const taffy_LengthPercentage* value);
taffy_MaxTrackSizingFunction* taffy_MaxTrackSizingFunction_new_MinContent(void);
taffy_MaxTrackSizingFunction* taffy_MaxTrackSizingFunction_new_MaxContent(void);
taffy_MaxTrackSizingFunction* taffy_MaxTrackSizingFunction_new_FitContent(const taffy_LengthPercentage* value);
taffy_MaxTrackSizingFunction* taffy_MaxTrackSizingFunction_new_Auto(void);
taffy_MaxTrackSizingFunction* taffy_MaxTrackSizingFunction_new_Fraction(float value);
/* copy constructor */
taffy_MaxTrackSizingFunction* taffy_MaxTrackSizingFunction_new_copy(const taffy_MaxTrackSizingFunction* other);
/* destructor */
void taffy_MaxTrackSizingFunction_delete(taffy_MaxTrackSizingFunction* self);
/* comparison operator (is equal) */
/* bool */ int taffy_MaxTrackSizingFunction_eq(const taffy_MaxTrackSizingFunction* lhs, const taffy_MaxTrackSizingFunction* rhs);
/* type checking */
/* bool */ int taffy_MaxTrackSizingFunction_is_Fixed (const taffy_MaxTrackSizingFunction* self);
/* bool */ int taffy_MaxTrackSizingFunction_is_MinContent(const taffy_MaxTrackSizingFunction* self);
/* bool */ int taffy_MaxTrackSizingFunction_is_MaxContent(const taffy_MaxTrackSizingFunction* self);
/* bool */ int taffy_MaxTrackSizingFunction_is_FitContent(const taffy_MaxTrackSizingFunction* self);
/* bool */ int taffy_MaxTrackSizingFunction_is_Auto (const taffy_MaxTrackSizingFunction* self);
/* bool */ int taffy_MaxTrackSizingFunction_is_Fraction (const taffy_MaxTrackSizingFunction* self);
/* getters */
/* call only if 'is_Fixed()' or 'is_FitContent()' is 'true' */
taffy_LengthPercentage* taffy_MaxTrackSizingFunction_get_new_length_percentage(const taffy_MaxTrackSizingFunction* self);
/* call only if 'is_Fraction()' is 'true' */
float taffy_MaxTrackSizingFunction_get_fraction(const taffy_MaxTrackSizingFunction* self);
/* extras */
taffy_MaxTrackSizingFunction* taffy_MaxTrackSizingFunction_new_AUTO(void);
taffy_MaxTrackSizingFunction* taffy_MaxTrackSizingFunction_new_MIN_CONTENT(void);
taffy_MaxTrackSizingFunction* taffy_MaxTrackSizingFunction_new_MAX_CONTENT(void);
taffy_MaxTrackSizingFunction* taffy_MaxTrackSizingFunction_new_ZERO(void);
taffy_MaxTrackSizingFunction* taffy_MaxTrackSizingFunction_new_fit_content(const taffy_LengthPercentage* argument);
taffy_MaxTrackSizingFunction* taffy_MaxTrackSizingFunction_new_from_length(float value);
taffy_MaxTrackSizingFunction* taffy_MaxTrackSizingFunction_new_from_percent(float percent);
taffy_MaxTrackSizingFunction* taffy_MaxTrackSizingFunction_new_from_flex(float flex);
/* MinTrackSizingFunction ------------------------------------------- */
typedef struct taffy_MinTrackSizingFunction taffy_MinTrackSizingFunction;
/* constructors */
taffy_MinTrackSizingFunction* taffy_MinTrackSizingFunction_new_Fixed(const taffy_LengthPercentage* value);
taffy_MinTrackSizingFunction* taffy_MinTrackSizingFunction_new_MinContent(void);
taffy_MinTrackSizingFunction* taffy_MinTrackSizingFunction_new_MaxContent(void);
taffy_MinTrackSizingFunction* taffy_MinTrackSizingFunction_new_Auto(void);
/* copy constructor */
taffy_MinTrackSizingFunction* taffy_MinTrackSizingFunction_new_copy(const taffy_MinTrackSizingFunction* other);
/* destructors */
void taffy_MinTrackSizingFunction_delete(taffy_MinTrackSizingFunction* self);
/* comparison operator (is equal) */
/* bool */ int taffy_MinTrackSizingFunction_eq(const taffy_MinTrackSizingFunction* lhs, const taffy_MinTrackSizingFunction* rhs);
/* type checking */
/* bool */ int taffy_MinTrackSizingFunction_is_Fixed (const taffy_MinTrackSizingFunction* self);
/* bool */ int taffy_MinTrackSizingFunction_is_MinContent(const taffy_MinTrackSizingFunction* self);
/* bool */ int taffy_MinTrackSizingFunction_is_MaxContent(const taffy_MinTrackSizingFunction* self);
/* bool */ int taffy_MinTrackSizingFunction_is_Auto (const taffy_MinTrackSizingFunction* self);
/* getters */
/* call only if 'is_Fixed()' is 'true' */
taffy_LengthPercentage* taffy_MinTrackSizingFunction_get_new_value(const taffy_MinTrackSizingFunction* self);
/* extras */
taffy_MinTrackSizingFunction* taffy_MinTrackSizingFunction_new_AUTO(void);
taffy_MinTrackSizingFunction* taffy_MinTrackSizingFunction_new_MIN_CONTENT(void);
taffy_MinTrackSizingFunction* taffy_MinTrackSizingFunction_new_MAX_CONTENT(void);
taffy_MinTrackSizingFunction* taffy_MinTrackSizingFunction_new_ZERO(void);
taffy_MinTrackSizingFunction* taffy_MinTrackSizingFunction_new_from_length(float value);
taffy_MinTrackSizingFunction* taffy_MinTrackSizingFunction_new_from_percent(float percent);
/* NonRepeatedTrackSizingFunction ----------------------------------- */
typedef struct taffy_NonRepeatedTrackSizingFunction taffy_NonRepeatedTrackSizingFunction;
/* constructors */
taffy_NonRepeatedTrackSizingFunction* taffy_NonRepeatedTrackSizingFunction_new(const taffy_MinTrackSizingFunction* min, const taffy_MaxTrackSizingFunction* max);
/* copy constructor */
taffy_NonRepeatedTrackSizingFunction* taffy_NonRepeatedTrackSizingFunction_new_copy(const taffy_NonRepeatedTrackSizingFunction* other);
/* destructor */
void taffy_NonRepeatedTrackSizingFunction_delete(taffy_NonRepeatedTrackSizingFunction* self);
/* comparison operator (is equal) */
/* bool */ int taffy_NonRepeatedTrackSizingFunction_eq(const taffy_NonRepeatedTrackSizingFunction* lhs, const taffy_NonRepeatedTrackSizingFunction* rhs);
/* getters */
const taffy_MinTrackSizingFunction* taffy_NonRepeatedTrackSizingFunction_get_min(const taffy_NonRepeatedTrackSizingFunction* self);
const taffy_MaxTrackSizingFunction* taffy_NonRepeatedTrackSizingFunction_get_max(const taffy_NonRepeatedTrackSizingFunction* self);
/* setters */
void taffy_NonRepeatedTrackSizingFunction_set_min(taffy_NonRepeatedTrackSizingFunction* self, const taffy_MinTrackSizingFunction* min);
void taffy_NonRepeatedTrackSizingFunction_set_max(taffy_NonRepeatedTrackSizingFunction* self, const taffy_MaxTrackSizingFunction* max);
/* mutators */
taffy_MinTrackSizingFunction* taffy_NonRepeatedTrackSizingFunction_get_mut_min(taffy_NonRepeatedTrackSizingFunction* self);
taffy_MaxTrackSizingFunction* taffy_NonRepeatedTrackSizingFunction_get_mut_max(taffy_NonRepeatedTrackSizingFunction* self);
/* extras */
taffy_NonRepeatedTrackSizingFunction* taffy_NonRepeatedTrackSizingFunction_new_AUTO(void);
taffy_NonRepeatedTrackSizingFunction* taffy_NonRepeatedTrackSizingFunction_new_MIN_CONTENT(void);
taffy_NonRepeatedTrackSizingFunction* taffy_NonRepeatedTrackSizingFunction_new_MAX_CONTENT(void);
taffy_NonRepeatedTrackSizingFunction* taffy_NonRepeatedTrackSizingFunction_new_fit_content(const taffy_LengthPercentage* argument);
taffy_NonRepeatedTrackSizingFunction* taffy_NonRepeatedTrackSizingFunction_new_ZERO(void);
taffy_NonRepeatedTrackSizingFunction* taffy_NonRepeatedTrackSizingFunction_new_from_length(float value);
taffy_NonRepeatedTrackSizingFunction* taffy_NonRepeatedTrackSizingFunction_new_from_percent(float percent);
taffy_NonRepeatedTrackSizingFunction* taffy_NonRepeatedTrackSizingFunction_new_from_flex(float flex);
/* TrackSizingFunction ---------------------------------------------- */
/* GridTrackVec<NonRepeatedTrackSizingFunction> ----------------- */
typedef struct {
const taffy_NonRepeatedTrackSizingFunction** items;
size_t items_count;
} taffy_GridTrackVec_of_NonRepeatedTrackSizingFunction;
void taffy_GridTrackVec_of_NonRepeatedTrackSizingFunction_delete(taffy_GridTrackVec_of_NonRepeatedTrackSizingFunction* self);
typedef struct taffy_TrackSizingFunction taffy_TrackSizingFunction;
/* constructors */
taffy_TrackSizingFunction* taffy_TrackSizingFunction_new_Single(const taffy_NonRepeatedTrackSizingFunction* value);
taffy_TrackSizingFunction* taffy_TrackSizingFunction_new_Repeat(
const taffy_GridTrackRepetition* repetition,
const taffy_NonRepeatedTrackSizingFunction** funcs, size_t funcs_count
);
/* copy constructor */
taffy_TrackSizingFunction* taffy_TrackSizingFunction_new_copy(const taffy_TrackSizingFunction* other);
/* destructor */
void taffy_TrackSizingFunction_delete(taffy_TrackSizingFunction* self);
/* comparison operator (is equal) */
/* bool */ int taffy_TrackSizingFunction_eq(const taffy_TrackSizingFunction* lhs, const taffy_TrackSizingFunction* rhs);
/* ---------------------------------------------- */
/* type checking */
/* bool */ int taffy_TrackSizingFunction_is_Single(const taffy_TrackSizingFunction* self);
/* bool */ int taffy_TrackSizingFunction_is_Repeat(const taffy_TrackSizingFunction* self);
/* getters */
/* call only if 'is_Single()' is 'true' */
const taffy_NonRepeatedTrackSizingFunction* taffy_TrackSizingFunction_get_single_func(const taffy_TrackSizingFunction* self);
/* call only if 'is_Repeat()' is 'true' */
const taffy_GridTrackRepetition* taffy_TrackSizingFunction_get_repetition(const taffy_TrackSizingFunction* self);
/* call only if 'is_Repeat()' is 'true' */
/* Dont forget to call 'taffy_GridTrackVec_of_NonRepeatedTrackSizingFunction_delete()' after use */
taffy_GridTrackVec_of_NonRepeatedTrackSizingFunction taffy_TrackSizingFunction_get_repeat_funcs(const taffy_TrackSizingFunction* self);
/* ---------------------------------------------- */
/* extras */
taffy_TrackSizingFunction* taffy_TrackSizingFunction_new_AUTO(void);
taffy_TrackSizingFunction* taffy_TrackSizingFunction_new_MIN_CONTENT(void);
taffy_TrackSizingFunction* taffy_TrackSizingFunction_new_MAX_CONTENT(void);
taffy_TrackSizingFunction* taffy_TrackSizingFunction_new_ZERO(void);
taffy_TrackSizingFunction* taffy_TrackSizingFunction_new_fit_content(const taffy_LengthPercentage* argument);
taffy_TrackSizingFunction* taffy_TrackSizingFunction_new_from_length(float value);
taffy_TrackSizingFunction* taffy_TrackSizingFunction_new_from_percent(float percent);
taffy_TrackSizingFunction* taffy_TrackSizingFunction_new_from_flex(float flex);
/* Display -------------------------------------------------------------- */
typedef enum {
taffy_Display_Flex = 0,
taffy_Display_Grid,
taffy_Display_Block,
taffy_Display_None
} taffy_Display;
taffy_Display taffy_Display_default(void);
/* Overflow ------------------------------------------------------------- */
typedef enum {
taffy_Overflow_Visible = 0,
taffy_Overflow_Hidden,
taffy_Overflow_Scroll
} taffy_Overflow;
taffy_Overflow taffy_Overflow_default(void);
/* Position ------------------------------------------------------------- */
typedef enum {
taffy_Position_Relative = 0,
taffy_Position_Absolute
} taffy_Position;
taffy_Position taffy_Position_default(void);
/* Style ---------------------------------------------------------------- */
/* specialized types ------------------------------------------------ */
/* Point<Overflow> ---------------------------------------------- */
typedef struct taffy_Point_of_Overflow taffy_Point_of_Overflow;
/* constructors */
taffy_Point_of_Overflow* taffy_Point_of_Overflow_new_default(void);
taffy_Point_of_Overflow* taffy_Point_of_Overflow_new(taffy_Overflow x, taffy_Overflow y);
/* copy constructor */
taffy_Point_of_Overflow* taffy_Point_of_Overflow_new_copy(const taffy_Point_of_Overflow* other);
/* destructor */
void taffy_Point_of_Overflow_delete(taffy_Point_of_Overflow* self);
/* comparison operator (is equal) */
/* bool */ int taffy_Point_of_Overflow_eq(const taffy_Point_of_Overflow* lhs, const taffy_Point_of_Overflow* rhs);
/* getters */
taffy_Overflow taffy_Point_of_Overflow_get_x(const taffy_Point_of_Overflow* self);
taffy_Overflow taffy_Point_of_Overflow_get_y(const taffy_Point_of_Overflow* self);
/* setters */
void taffy_Point_of_Overflow_set_x(taffy_Point_of_Overflow* self, taffy_Overflow x);
void taffy_Point_of_Overflow_set_y(taffy_Point_of_Overflow* self, taffy_Overflow y);
/* NOTE:
Unfortunately mutators not supported here due to enum C <--> C++
conversion.
*/
/* Rect<LengthPercentage> --------------------------------------- */
typedef struct taffy_Rect_of_LengthPercentage taffy_Rect_of_LengthPercentage;
/* constructors */
taffy_Rect_of_LengthPercentage* taffy_Rect_of_LengthPercentage_new(
const taffy_LengthPercentage* left,
const taffy_LengthPercentage* right,
const taffy_LengthPercentage* top,
const taffy_LengthPercentage* bottom
);
/* copy constructor */
taffy_Rect_of_LengthPercentage* taffy_Rect_of_LengthPercentage_new_copy(const taffy_Rect_of_LengthPercentage* other);
/* destructor */
void taffy_Rect_of_LengthPercentage_delete(taffy_Rect_of_LengthPercentage* self);
/* comparison operator (is equal) */
/* bool */ int taffy_Rect_of_LengthPercentage_eq(const taffy_Rect_of_LengthPercentage* lhs, const taffy_Rect_of_LengthPercentage* rhs);
/* getters */
const taffy_LengthPercentage* taffy_Rect_of_LengthPercentage_get_left (const taffy_Rect_of_LengthPercentage* self);
const taffy_LengthPercentage* taffy_Rect_of_LengthPercentage_get_right (const taffy_Rect_of_LengthPercentage* self);
const taffy_LengthPercentage* taffy_Rect_of_LengthPercentage_get_top (const taffy_Rect_of_LengthPercentage* self);
const taffy_LengthPercentage* taffy_Rect_of_LengthPercentage_get_bottom(const taffy_Rect_of_LengthPercentage* self);
/* setters */
void taffy_Rect_of_LengthPercentage_set_left (taffy_Rect_of_LengthPercentage* self, const taffy_LengthPercentage* left);
void taffy_Rect_of_LengthPercentage_set_right (taffy_Rect_of_LengthPercentage* self, const taffy_LengthPercentage* right);
void taffy_Rect_of_LengthPercentage_set_top (taffy_Rect_of_LengthPercentage* self, const taffy_LengthPercentage* top);
void taffy_Rect_of_LengthPercentage_set_bottom(taffy_Rect_of_LengthPercentage* self, const taffy_LengthPercentage* bottom);
/* mutators */
taffy_LengthPercentage* taffy_Rect_of_LengthPercentage_get_mut_left (taffy_Rect_of_LengthPercentage* self);
taffy_LengthPercentage* taffy_Rect_of_LengthPercentage_get_mut_right (taffy_Rect_of_LengthPercentage* self);
taffy_LengthPercentage* taffy_Rect_of_LengthPercentage_get_mut_top (taffy_Rect_of_LengthPercentage* self);
taffy_LengthPercentage* taffy_Rect_of_LengthPercentage_get_mut_bottom(taffy_Rect_of_LengthPercentage* self);
/* extras*/
taffy_Rect_of_LengthPercentage* taffy_Rect_of_LengthPercentage_new_zero(void);
/* Rect<LengthPercentageAuto> ----------------------------------- */
typedef struct taffy_Rect_of_LengthPercentageAuto taffy_Rect_of_LengthPercentageAuto;
/* constructors */
taffy_Rect_of_LengthPercentageAuto* taffy_Rect_of_LengthPercentageAuto_new(
const taffy_LengthPercentageAuto* left,
const taffy_LengthPercentageAuto* right,
const taffy_LengthPercentageAuto* top,
const taffy_LengthPercentageAuto* bottom
);
/* copy constructor */
taffy_Rect_of_LengthPercentageAuto* taffy_Rect_of_LengthPercentageAuto_new_copy(const taffy_Rect_of_LengthPercentageAuto* other);
/* destructor */
void taffy_Rect_of_LengthPercentageAuto_delete(taffy_Rect_of_LengthPercentageAuto* self);
/* comparison operator (is equal) */
/* bool */ int taffy_Rect_of_LengthPercentageAuto_eq(const taffy_Rect_of_LengthPercentageAuto* lhs, const taffy_Rect_of_LengthPercentageAuto* rhs);
/* getters */
const taffy_LengthPercentageAuto* taffy_Rect_of_LengthPercentageAuto_get_left (const taffy_Rect_of_LengthPercentageAuto* self);
const taffy_LengthPercentageAuto* taffy_Rect_of_LengthPercentageAuto_get_right (const taffy_Rect_of_LengthPercentageAuto* self);
const taffy_LengthPercentageAuto* taffy_Rect_of_LengthPercentageAuto_get_top (const taffy_Rect_of_LengthPercentageAuto* self);
const taffy_LengthPercentageAuto* taffy_Rect_of_LengthPercentageAuto_get_bottom(const taffy_Rect_of_LengthPercentageAuto* self);
/* setters */
void taffy_Rect_of_LengthPercentageAuto_set_left (taffy_Rect_of_LengthPercentageAuto* self, const taffy_LengthPercentageAuto* left);
void taffy_Rect_of_LengthPercentageAuto_set_right (taffy_Rect_of_LengthPercentageAuto* self, const taffy_LengthPercentageAuto* right);
void taffy_Rect_of_LengthPercentageAuto_set_top (taffy_Rect_of_LengthPercentageAuto* self, const taffy_LengthPercentageAuto* top);
void taffy_Rect_of_LengthPercentageAuto_set_bottom(taffy_Rect_of_LengthPercentageAuto* self, const taffy_LengthPercentageAuto* bottom);
/* mutators */
taffy_LengthPercentageAuto* taffy_Rect_of_LengthPercentageAuto_get_mut_left (taffy_Rect_of_LengthPercentageAuto* self);
taffy_LengthPercentageAuto* taffy_Rect_of_LengthPercentageAuto_get_mut_right (taffy_Rect_of_LengthPercentageAuto* self);
taffy_LengthPercentageAuto* taffy_Rect_of_LengthPercentageAuto_get_mut_top (taffy_Rect_of_LengthPercentageAuto* self);
taffy_LengthPercentageAuto* taffy_Rect_of_LengthPercentageAuto_get_mut_bottom(taffy_Rect_of_LengthPercentageAuto* self);
/* extras */
taffy_Rect_of_LengthPercentageAuto* taffy_Rect_of_LengthPercentageAuto_new_AUTO(void);
taffy_Rect_of_LengthPercentageAuto* taffy_Rect_of_LengthPercentageAuto_new_zero(void);
/* Size<LengthPercentage> ---------------------------------------------- */
typedef struct taffy_Size_of_LengthPercentage taffy_Size_of_LengthPercentage;
/* constructors */
taffy_Size_of_LengthPercentage* taffy_Size_of_LengthPercentage_new(const taffy_LengthPercentage* width, const taffy_LengthPercentage* height);
/* copy constructor */
taffy_Size_of_LengthPercentage* taffy_Size_of_LengthPercentage_new_copy(const taffy_Size_of_LengthPercentage* other);
/* destructor */
void taffy_Size_of_LengthPercentage_delete(taffy_Size_of_LengthPercentage* self);
/* comparison operator (is equal) */
/* bool */ int taffy_Size_of_LengthPercentage_eq(const taffy_Size_of_LengthPercentage* lhs, const taffy_Size_of_LengthPercentage* rhs);
/* getters */
const taffy_LengthPercentage* taffy_Size_of_LengthPercentage_get_width (const taffy_Size_of_LengthPercentage* self);
const taffy_LengthPercentage* taffy_Size_of_LengthPercentage_get_height(const taffy_Size_of_LengthPercentage* self);
/* setters */
void taffy_Size_of_LengthPercentage_set_width (taffy_Size_of_LengthPercentage* self, const taffy_LengthPercentage* width );
void taffy_Size_of_LengthPercentage_set_height(taffy_Size_of_LengthPercentage* self, const taffy_LengthPercentage* height);
/* mutators */
taffy_LengthPercentage* taffy_Size_of_LengthPercentage_get_mut_width (taffy_Size_of_LengthPercentage* self);
taffy_LengthPercentage* taffy_Size_of_LengthPercentage_get_mut_height(taffy_Size_of_LengthPercentage* self);
/* extras */
taffy_Size_of_LengthPercentage* taffy_Size_of_LengthPercentage_new_zero(void);
/* Size<Dimension> ---------------------------------------------- */
typedef struct taffy_Size_of_Dimension taffy_Size_of_Dimension;
/* constructors */
taffy_Size_of_Dimension* taffy_Size_of_Dimension_new(const taffy_Dimension* width, const taffy_Dimension* height);
/* copy constructor */
taffy_Size_of_Dimension* taffy_Size_of_Dimension_new_copy(const taffy_Size_of_Dimension* other);
/* destructor */
void taffy_Size_of_Dimension_delete(taffy_Size_of_Dimension* self);
/* comparison operator (is equal) */
/* bool */ int taffy_Size_of_Dimension_eq(const taffy_Size_of_Dimension* lhs, const taffy_Size_of_Dimension* rhs);
/* getters */
const taffy_Dimension* taffy_Size_of_Dimension_get_width (const taffy_Size_of_Dimension* self);
const taffy_Dimension* taffy_Size_of_Dimension_get_height(const taffy_Size_of_Dimension* self);
/* setters */
void taffy_Size_of_Dimension_set_width (taffy_Size_of_Dimension* self, const taffy_Dimension* width );
void taffy_Size_of_Dimension_set_height(taffy_Size_of_Dimension* self, const taffy_Dimension* height);
/* mutators */
taffy_Dimension* taffy_Size_of_Dimension_get_mut_width (taffy_Size_of_Dimension* self);
taffy_Dimension* taffy_Size_of_Dimension_get_mut_height(taffy_Size_of_Dimension* self);
/* extras */
taffy_Size_of_Dimension* taffy_Size_of_Dimension_new_AUTO(void);
taffy_Size_of_Dimension* taffy_Size_of_Dimension_new_zero(void);
/* Line<GridPlacement> ------------------------------------------ */
typedef struct taffy_Line_of_GridPlacement taffy_Line_of_GridPlacement;
/* constructors */
taffy_Line_of_GridPlacement* taffy_Line_of_GridPlacement_new_default(void);
taffy_Line_of_GridPlacement* taffy_Line_of_GridPlacement_new(const taffy_GridPlacement* start, const taffy_GridPlacement* end);
/* copy constructor */
taffy_Line_of_GridPlacement* taffy_Line_of_GridPlacement_new_copy(const taffy_Line_of_GridPlacement* other);
/* destructor */
void taffy_Line_of_GridPlacement_delete(taffy_Line_of_GridPlacement* self);
/* comparison operator (is equal) */
/* bool */ int taffy_Line_of_GridPlacement_eq(const taffy_Line_of_GridPlacement* lhs, const taffy_Line_of_GridPlacement* rhs);
/* getters */
const taffy_GridPlacement* taffy_Line_of_GridPlacement_get_start(const taffy_Line_of_GridPlacement* self);
const taffy_GridPlacement* taffy_Line_of_GridPlacement_get_end (const taffy_Line_of_GridPlacement* self);
/* setters */
void taffy_Line_of_GridPlacement_set_start(taffy_Line_of_GridPlacement* self, const taffy_GridPlacement* start);
void taffy_Line_of_GridPlacement_set_end (taffy_Line_of_GridPlacement* self, const taffy_GridPlacement* end );
/* mutators */
taffy_GridPlacement* taffy_Line_of_GridPlacement_get_mut_start(taffy_Line_of_GridPlacement* self);
taffy_GridPlacement* taffy_Line_of_GridPlacement_get_mut_end (taffy_Line_of_GridPlacement* self);
/* extras */
taffy_Line_of_GridPlacement* taffy_Line_of_GridPlacement_new_AUTO(void);
/* Option<AlignContent> ----------------------------------------- */
typedef struct taffy_Option_AlignContent taffy_Option_AlignContent;
/* constructors */
taffy_Option_AlignContent* taffy_Option_AlignContent_new_default(void);
taffy_Option_AlignContent* taffy_Option_AlignContent_new(const taffy_AlignContent* value);
taffy_Option_AlignContent* taffy_Option_AlignContent_new_some(taffy_AlignContent value);
/* copy constuctor */
taffy_Option_AlignContent* taffy_Option_AlignContent_new_copy(const taffy_Option_AlignContent* other);
/* destructor */
void taffy_Option_AlignContent_delete(taffy_Option_AlignContent* self);
/* comparison operator (is equal) */
/* bool */ int taffy_Option_AlignContent_eq(const taffy_Option_AlignContent* lhs, const taffy_Option_AlignContent* rhs);
/* getters */
/* bool */ int taffy_Option_AlignContent_is_some(const taffy_Option_AlignContent* self);
/* call only if 'is_some()' is 'true' */
taffy_AlignContent taffy_Option_AlignContent_get_value(const taffy_Option_AlignContent* self);
/* setters */
void taffy_Option_AlignContent_set_value(taffy_Option_AlignContent* self, const taffy_AlignContent* value);
/* Option<JustifyContent> --------------------------------------- */
typedef struct taffy_Option_JustifyContent taffy_Option_JustifyContent;
/* constructors */
taffy_Option_JustifyContent* taffy_Option_JustifyContent_new_default(void);
taffy_Option_JustifyContent* taffy_Option_JustifyContent_new(const taffy_JustifyContent* value);
taffy_Option_JustifyContent* taffy_Option_JustifyContent_new_some(taffy_JustifyContent value);
/* copy constuctor */
taffy_Option_JustifyContent* taffy_Option_JustifyContent_new_copy(const taffy_Option_JustifyContent* other);
/* destructor */
void taffy_Option_JustifyContent_delete(taffy_Option_JustifyContent* self);
/* comparison operator (is equal) */
/* bool */ int taffy_Option_JustifyContent_eq(const taffy_Option_JustifyContent* lhs, const taffy_Option_JustifyContent* rhs);
/* getters */
/* bool */ int taffy_Option_JustifyContent_is_some(const taffy_Option_JustifyContent* self);
/* call only if 'is_some()' is 'true' */
taffy_JustifyContent taffy_Option_JustifyContent_get_value(const taffy_Option_JustifyContent* self);
/* setters */
void taffy_Option_JustifyContent_set_value(taffy_Option_JustifyContent* self, const taffy_JustifyContent* value);
/* Option<AlignItems> ------------------------------------------- */
typedef struct taffy_Option_AlignItems taffy_Option_AlignItems;
/* constructors */
taffy_Option_AlignItems* taffy_Option_AlignItems_new_default(void);
taffy_Option_AlignItems* taffy_Option_AlignItems_new(const taffy_AlignItems* value);
taffy_Option_AlignItems* taffy_Option_AlignItems_new_some(taffy_AlignItems value);
/* copy constuctor */
taffy_Option_AlignItems* taffy_Option_AlignItems_new_copy(const taffy_Option_AlignItems* other);
/* destructor */
void taffy_Option_AlignItems_delete(taffy_Option_AlignItems* self);
/* comparison operator (is equal) */
/* bool */ int taffy_Option_AlignItems_eq(const taffy_Option_AlignItems* lhs, const taffy_Option_AlignItems* rhs);
/* getters */
/* bool */ int taffy_Option_AlignItems_is_some(const taffy_Option_AlignItems* self);
/* call only if 'is_some()' is 'true' */
taffy_AlignItems taffy_Option_AlignItems_get_value(const taffy_Option_AlignItems* self);
/* setters */
void taffy_Option_AlignItems_set_value(taffy_Option_AlignItems* self, const taffy_AlignItems* value);
/* Option<AlignSelf> -------------------------------------------- */
typedef struct taffy_Option_AlignSelf taffy_Option_AlignSelf;
/* constructors */
taffy_Option_AlignSelf* taffy_Option_AlignSelf_new_default(void);
taffy_Option_AlignSelf* taffy_Option_AlignSelf_new(const taffy_AlignSelf* value);
taffy_Option_AlignSelf* taffy_Option_AlignSelf_new_some(taffy_AlignSelf value);
/* copy constuctor */
taffy_Option_AlignSelf* taffy_Option_AlignSelf_new_copy(const taffy_Option_AlignSelf* other);
/* destructor */
void taffy_Option_AlignSelf_delete(taffy_Option_AlignSelf* self);
/* comparison operator (is equal) */
/* bool */ int taffy_Option_AlignSelf_eq(const taffy_Option_AlignSelf* lhs, const taffy_Option_AlignSelf* rhs);
/* getters */
/* bool */ int taffy_Option_AlignSelf_is_some(const taffy_Option_AlignSelf* self);
/* call only if 'is_some()' is 'true' */
taffy_AlignSelf taffy_Option_AlignSelf_get_value(const taffy_Option_AlignSelf* self);
/* setters */
void taffy_Option_AlignSelf_set_value(taffy_Option_AlignSelf* self, const taffy_AlignSelf* value);
/* GridTrackVec<TrackSizingFunction> ---------------------------- */
typedef struct {
const taffy_TrackSizingFunction** items;
size_t items_count;
} taffy_GridTrackVec_of_TrackSizingFunction;
void taffy_GridTrackVec_of_TrackSizingFunction_delete(taffy_GridTrackVec_of_TrackSizingFunction* self);
typedef struct taffy_Style taffy_Style;
/* constructors */
taffy_Style* taffy_Style_new_default(void);
/* copy construcotr */
taffy_Style* taffy_Style_new_copy(const taffy_Style* other);
/* destructor */
void taffy_Style_delete(taffy_Style* self);
/* comparison operator (is equal) */
/* bool */ int taffy_Style_eq(const taffy_Style* lhs, const taffy_Style* rhs);
/* extra */
taffy_Style* taffy_Style_new_DEFAULT(void);
/* getters */
taffy_Display taffy_Style_get_display(const taffy_Style* self);
/* Overflow properties ---------------------------------------------- */
const taffy_Point_of_Overflow* taffy_Style_get_overflow(const taffy_Style* self);
float taffy_Style_get_scrollbar_width(const taffy_Style* self);
/* Position properties ---------------------------------------------- */
taffy_Position taffy_Style_get_position(const taffy_Style* self);
const taffy_Rect_of_LengthPercentageAuto* taffy_Style_get_inset(const taffy_Style* self);
/* Size properties -------------------------------------------------- */
const taffy_Size_of_Dimension* taffy_Style_get_size(const taffy_Style* self);
const taffy_Size_of_Dimension* taffy_Style_get_min_size(const taffy_Style* self);
const taffy_Size_of_Dimension* taffy_Style_get_max_size(const taffy_Style* self);