@triniwiz/nativescript-masonkit 1.0.0-alpha.2 → 1.0.0-alpha.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/index.d.ts +167 -17
  2. package/package.json +4 -4
  3. package/platforms/android/include.gradle +22 -1
  4. package/platforms/android/masonkit-release.aar +0 -0
  5. package/platforms/ios/Mason.xcframework/Info.plist +9 -5
  6. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/Mason-Swift.h +495 -313
  7. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/Mason.h +11 -0
  8. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/mason_native.h +215 -818
  9. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Info.plist +0 -0
  10. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Mason +0 -0
  11. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
  12. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.abi.json +30167 -19469
  13. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.private.swiftinterface +660 -310
  14. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  15. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.swiftinterface +660 -310
  16. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/module.modulemap +1 -1
  17. package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
  18. package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +2421 -0
  19. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/Mason-Swift.h +1053 -689
  20. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/Mason.h +11 -0
  21. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/mason_native.h +215 -818
  22. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Info.plist +0 -0
  23. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Mason +0 -0
  24. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
  25. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
  26. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.abi.json +30167 -19469
  27. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +660 -310
  28. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  29. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.swiftinterface +660 -310
  30. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.abi.json +30167 -19469
  31. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +660 -310
  32. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  33. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +660 -310
  34. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/module.modulemap +1 -1
  35. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/_CodeSignature/CodeResources +33 -97
  36. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
  37. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +2421 -0
  38. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/x86_64/Mason.yml +2357 -0
  39. package/common.d.ts +0 -75
  40. package/common.js +0 -1556
  41. package/common.js.map +0 -1
  42. package/helpers.d.ts +0 -233
  43. package/helpers.js +0 -3382
  44. package/helpers.js.map +0 -1
  45. package/index.android.d.ts +0 -26
  46. package/index.android.js +0 -95
  47. package/index.android.js.map +0 -1
  48. package/index.ios.d.ts +0 -27
  49. package/index.ios.js +0 -136
  50. package/index.ios.js.map +0 -1
  51. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/PrivateHeaders/mason_native.h +0 -676
  52. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/PrivateHeaders/mason_native.h +0 -676
  53. package/platforms/ios/Podfile +0 -1
  54. package/platforms/ios/build.xcconfig +0 -2
  55. package/platforms/ios/src/JSIModule.h +0 -217
  56. package/platforms/ios/src/JSIModule.mm +0 -2788
  57. package/platforms/ios/src/include/mason_native.h +0 -945
  58. package/platforms/ios/src/module.modulemap +0 -4
@@ -1,5 +1,5 @@
1
- #ifndef CBINDGEN_BINDINGS_H
2
- #define CBINDGEN_BINDINGS_H
1
+ #ifndef MASON_C_H
2
+ #define MASON_C_H
3
3
 
4
4
  /* Warning, this file is autogenerated by cbindgen. Don't modify this manually. */
5
5
 
@@ -8,28 +8,9 @@
8
8
  #include <stdint.h>
9
9
  #include <stdlib.h>
10
10
 
11
- typedef enum CMasonDimensionType {
12
- MasonDimensionPoints,
13
- MasonDimensionPercent,
14
- MasonDimensionAuto,
15
- } CMasonDimensionType;
16
-
17
- typedef enum CMasonGridPlacementType {
18
- MasonGridPlacementTypeAuto,
19
- MasonGridPlacementTypeLine,
20
- MasonGridPlacementTypeSpan,
21
- } CMasonGridPlacementType;
22
-
23
- typedef enum CMasonLengthPercentageAutoType {
24
- MasonLengthPercentageAutoPoints,
25
- MasonLengthPercentageAutoPercent,
26
- MasonLengthPercentageAutoAuto,
27
- } CMasonLengthPercentageAutoType;
28
-
29
- typedef enum CMasonLengthPercentageType {
30
- MasonLengthPercentagePoints,
31
- MasonLengthPercentagePercent,
32
- } CMasonLengthPercentageType;
11
+ typedef struct CMason CMason;
12
+
13
+ typedef struct CMasonNode CMasonNode;
33
14
 
34
15
  typedef struct NodeArray {
35
16
  void **array;
@@ -89,850 +70,266 @@ typedef struct CMasonTrackSizingFunctionArray {
89
70
  uintptr_t length;
90
71
  } CMasonTrackSizingFunctionArray;
91
72
 
92
- typedef struct CMasonLengthPercentageAuto {
93
- float value;
94
- enum CMasonLengthPercentageAutoType value_type;
95
- } CMasonLengthPercentageAuto;
73
+ typedef struct CMasonBuffer {
74
+ uint8_t *data;
75
+ uintptr_t size;
76
+ } CMasonBuffer;
96
77
 
97
- typedef struct CMasonLengthPercentage {
98
- float value;
99
- enum CMasonLengthPercentageType value_type;
100
- } CMasonLengthPercentage;
78
+ struct CMason *mason_init(void);
101
79
 
102
- typedef struct CMasonDimension {
103
- float value;
104
- enum CMasonDimensionType value_type;
105
- } CMasonDimension;
80
+ void mason_clear(struct CMason *mason);
106
81
 
107
- typedef struct CMasonLengthPercentageSize {
108
- struct CMasonLengthPercentage width;
109
- struct CMasonLengthPercentage height;
110
- } CMasonLengthPercentageSize;
82
+ void mason_release(struct CMason *mason);
111
83
 
112
- typedef struct CMasonGridPlacement {
113
- int16_t value;
114
- enum CMasonGridPlacementType value_type;
115
- } CMasonGridPlacement;
84
+ void mason_print_tree(struct CMason *mason, struct CMasonNode *node);
116
85
 
117
- void *mason_init(void);
86
+ bool mason_node_is_equal(struct CMasonNode *node_a, struct CMasonNode *node_b);
118
87
 
119
- void *mason_init_with_capacity(uintptr_t capacity);
88
+ void mason_node_array_destroy(struct NodeArray *array);
120
89
 
121
- void mason_destroy(void *mason);
90
+ void mason_node_destroy(struct CMasonNode *node);
122
91
 
123
- void mason_clear(void *mason);
92
+ struct CMasonNode *mason_node_new_node(struct CMason *mason);
124
93
 
125
- void mason_node_array_destroy(struct NodeArray array);
94
+ #if !defined(TARGET_OS_ANDROID)
95
+ struct CMasonNode *mason_node_new_node_with_context(struct CMason *mason,
96
+ void *measure_data,
97
+ long long (*measure)(const void*,
98
+ float,
99
+ float,
100
+ float,
101
+ float));
102
+ #endif
126
103
 
127
- void mason_node_destroy(void *node);
104
+ struct CMasonNode *mason_node_new_node_with_children(struct CMason *mason,
105
+ struct CMasonNode *const *children,
106
+ uintptr_t children_size);
128
107
 
129
- void *mason_node_new_node(void *mason, void *style);
108
+ void *mason_node_layout(struct CMason *mason,
109
+ struct CMasonNode *node,
110
+ void *(*layout)(const float*));
130
111
 
131
- void *mason_node_new_node_with_measure_func(void *mason,
132
- void *style,
133
- void *measure_data,
134
- long long (*measure)(const void*, float, float, float, float));
112
+ void mason_node_compute_wh(struct CMason *mason,
113
+ struct CMasonNode *node,
114
+ float width,
115
+ float height);
135
116
 
136
- void *mason_node_new_node_with_children(void *mason,
137
- void *style,
138
- const void *children,
139
- uintptr_t children_size);
117
+ void mason_node_compute_size(struct CMason *mason,
118
+ struct CMasonNode *node,
119
+ struct AvailableSpace width,
120
+ struct AvailableSpace height);
140
121
 
141
- uintptr_t mason_node_get_child_count(void *mason, void *node);
122
+ void mason_node_compute_max_content(struct CMason *mason, struct CMasonNode *node);
142
123
 
143
- void *mason_node_layout(void *mason, void *node, void *(*layout)(const float*));
124
+ void mason_node_compute_min_content(struct CMason *mason, struct CMasonNode *node);
144
125
 
145
- void mason_node_compute_wh(void *mason, void *node, float width, float height);
126
+ void mason_node_compute(struct CMason *mason, struct CMasonNode *node);
146
127
 
147
- void mason_node_compute_size(void *mason,
148
- void *node,
149
- struct AvailableSpace width,
150
- struct AvailableSpace height);
128
+ struct CMasonNode *mason_node_get_child_at(struct CMason *mason,
129
+ struct CMasonNode *node,
130
+ uintptr_t index);
151
131
 
152
- void mason_node_compute_max_content(void *mason, void *node);
153
-
154
- void mason_node_compute_min_content(void *mason, void *node);
155
-
156
- void mason_node_compute(void *mason, void *node);
157
-
158
- void mason_node_set_style(void *mason, void *node, void *style);
159
-
160
- void mason_node_update_and_set_style(void *mason, void *node, void *style);
161
-
162
- void mason_node_update_and_set_style_with_values(void *mason,
163
- void *node,
164
- void *style,
165
- int display,
166
- int position,
167
- int direction,
168
- int flex_direction,
169
- int flex_wrap,
170
- int overflow,
171
- int align_items,
172
- int align_self,
173
- int align_content,
174
- int justify_items,
175
- int justify_self,
176
- int justify_content,
177
- int inset_left_type,
178
- float inset_left_value,
179
- int inset_right_type,
180
- float inset_right_value,
181
- int inset_top_type,
182
- float inset_top_value,
183
- int inset_bottom_type,
184
- float inset_bottom_value,
185
- int margin_left_type,
186
- float margin_left_value,
187
- int margin_right_type,
188
- float margin_right_value,
189
- int margin_top_type,
190
- float margin_top_value,
191
- int margin_bottom_type,
192
- float margin_bottom_value,
193
- int padding_left_type,
194
- float padding_left_value,
195
- int padding_right_type,
196
- float padding_right_value,
197
- int padding_top_type,
198
- float padding_top_value,
199
- int padding_bottom_type,
200
- float padding_bottom_value,
201
- int border_left_type,
202
- float border_left_value,
203
- int border_right_type,
204
- float border_right_value,
205
- int border_top_type,
206
- float border_top_value,
207
- int border_bottom_type,
208
- float border_bottom_value,
209
- float flex_grow,
210
- float flex_shrink,
211
- int flex_basis_type,
212
- float flex_basis_value,
213
- int width_type,
214
- float width_value,
215
- int height_type,
216
- float height_value,
217
- int min_width_type,
218
- float min_width_value,
219
- int min_height_type,
220
- float min_height_value,
221
- int max_width_type,
222
- float max_width_value,
223
- int max_height_type,
224
- float max_height_value,
225
- int gap_row_type,
226
- float gap_row_value,
227
- int gap_column_type,
228
- float gap_column_value,
229
- float aspect_ratio,
230
- struct CMasonNonRepeatedTrackSizingFunctionArray *grid_auto_rows,
231
- struct CMasonNonRepeatedTrackSizingFunctionArray *grid_auto_columns,
232
- int grid_auto_flow,
233
- int grid_column_start_type,
234
- short grid_column_start_value,
235
- int grid_column_end_type,
236
- short grid_column_end_value,
237
- int grid_row_start_type,
238
- short grid_row_start_value,
239
- int grid_row_end_type,
240
- short grid_row_end_value,
241
- struct CMasonTrackSizingFunctionArray *grid_template_rows,
242
- struct CMasonTrackSizingFunctionArray *grid_template_columns);
243
-
244
- void *mason_node_update_style_with_values_compute_and_layout(void *mason,
245
- void *node,
246
- void *style,
247
- int display,
248
- int position_type,
249
- int direction,
250
- int flex_direction,
251
- int flex_wrap,
252
- int overflow,
253
- int align_items,
254
- int align_self,
255
- int align_content,
256
- int justify_items,
257
- int justify_self,
258
- int justify_content,
259
- int inset_left_type,
260
- float inset_left_value,
261
- int inset_right_type,
262
- float inset_right_value,
263
- int inset_top_type,
264
- float inset_top_value,
265
- int inset_bottom_type,
266
- float inset_bottom_value,
267
- int margin_left_type,
268
- float margin_left_value,
269
- int margin_right_type,
270
- float margin_right_value,
271
- int margin_top_type,
272
- float margin_top_value,
273
- int margin_bottom_type,
274
- float margin_bottom_value,
275
- int padding_left_type,
276
- float padding_left_value,
277
- int padding_right_type,
278
- float padding_right_value,
279
- int padding_top_type,
280
- float padding_top_value,
281
- int padding_bottom_type,
282
- float padding_bottom_value,
283
- int border_left_type,
284
- float border_left_value,
285
- int border_right_type,
286
- float border_right_value,
287
- int border_top_type,
288
- float border_top_value,
289
- int border_bottom_type,
290
- float border_bottom_value,
291
- float flex_grow,
292
- float flex_shrink,
293
- int flex_basis_type,
294
- float flex_basis_value,
295
- int width_type,
296
- float width_value,
297
- int height_type,
298
- float height_value,
299
- int min_width_type,
300
- float min_width_value,
301
- int min_height_type,
302
- float min_height_value,
303
- int max_width_type,
304
- float max_width_value,
305
- int max_height_type,
306
- float max_height_value,
307
- int32_t gap_row_type,
308
- float gap_row_value,
309
- int32_t gap_column_type,
310
- float gap_column_value,
311
- float aspect_ratio,
312
- struct CMasonNonRepeatedTrackSizingFunctionArray *grid_auto_rows,
313
- struct CMasonNonRepeatedTrackSizingFunctionArray *grid_auto_columns,
314
- int32_t grid_auto_flow,
315
- int32_t grid_column_start_type,
316
- int16_t grid_column_start_value,
317
- int32_t grid_column_end_type,
318
- int16_t grid_column_end_value,
319
- int32_t grid_row_start_type,
320
- int16_t grid_row_start_value,
321
- int32_t grid_row_end_type,
322
- int16_t grid_row_end_value,
323
- struct CMasonTrackSizingFunctionArray *grid_template_rows,
324
- struct CMasonTrackSizingFunctionArray *grid_template_columns,
325
- void *(*layout)(const float*));
326
-
327
- void *mason_node_update_style_with_values_size_compute_and_layout(void *mason,
328
- void *node,
329
- void *style,
330
- float width,
331
- float height,
332
- int display,
333
- int position,
334
- int direction,
335
- int flex_direction,
336
- int flex_wrap,
337
- int overflow,
338
- int align_items,
339
- int align_self,
340
- int align_content,
341
- int justify_items,
342
- int justify_self,
343
- int justify_content,
344
- int inset_left_type,
345
- float inset_left_value,
346
- int inset_right_type,
347
- float inset_right_value,
348
- int inset_top_type,
349
- float inset_top_value,
350
- int inset_bottom_type,
351
- float inset_bottom_value,
352
- int margin_left_type,
353
- float margin_left_value,
354
- int margin_right_type,
355
- float margin_right_value,
356
- int margin_top_type,
357
- float margin_top_value,
358
- int margin_bottom_type,
359
- float margin_bottom_value,
360
- int padding_left_type,
361
- float padding_left_value,
362
- int padding_right_type,
363
- float padding_right_value,
364
- int padding_top_type,
365
- float padding_top_value,
366
- int padding_bottom_type,
367
- float padding_bottom_value,
368
- int border_left_type,
369
- float border_left_value,
370
- int border_right_type,
371
- float border_right_value,
372
- int border_top_type,
373
- float border_top_value,
374
- int border_bottom_type,
375
- float border_bottom_value,
376
- float flex_grow,
377
- float flex_shrink,
378
- int flex_basis_type,
379
- float flex_basis_value,
380
- int width_type,
381
- float width_value,
382
- int height_type,
383
- float height_value,
384
- int min_width_type,
385
- float min_width_value,
386
- int min_height_type,
387
- float min_height_value,
388
- int max_width_type,
389
- float max_width_value,
390
- int max_height_type,
391
- float max_height_value,
392
- int32_t gap_row_type,
393
- float gap_row_value,
394
- int32_t gap_column_type,
395
- float gap_column_value,
396
- float aspect_ratio,
397
- struct CMasonNonRepeatedTrackSizingFunctionArray *grid_auto_rows,
398
- struct CMasonNonRepeatedTrackSizingFunctionArray *grid_auto_columns,
399
- int32_t grid_auto_flow,
400
- int32_t grid_column_start_type,
401
- int16_t grid_column_start_value,
402
- int32_t grid_column_end_type,
403
- int16_t grid_column_end_value,
404
- int32_t grid_row_start_type,
405
- int16_t grid_row_start_value,
406
- int32_t grid_row_end_type,
407
- int16_t grid_row_end_value,
408
- struct CMasonTrackSizingFunctionArray *grid_template_rows,
409
- struct CMasonTrackSizingFunctionArray *grid_template_columns,
410
- void *(*layout)(const float*));
411
-
412
- void *mason_node_update_set_style_compute_and_layout(void *mason,
413
- void *node,
414
- void *style,
415
- void *(*layout)(const float*));
416
-
417
- void *mason_node_update_set_style_compute_with_size_and_layout(void *mason,
418
- void *node,
419
- void *style,
420
- float width,
421
- float height,
422
- void *(*layout)(const float*));
423
-
424
- void *mason_node_get_child_at(void *mason, void *node, uintptr_t index);
425
-
426
- void mason_node_set_children(void *mason,
427
- void *node,
428
- const void *children,
132
+ void mason_node_set_children(struct CMason *mason,
133
+ struct CMasonNode *node,
134
+ struct CMasonNode *const *children,
429
135
  uintptr_t children_size);
430
136
 
431
- void mason_node_add_children(void *mason,
432
- void *node,
433
- const void *children,
137
+ void mason_node_add_children(struct CMason *mason,
138
+ struct CMasonNode *node,
139
+ struct CMasonNode *const *children,
434
140
  uintptr_t children_size);
435
141
 
436
- void mason_node_add_child(void *mason, void *node, void *child);
142
+ void mason_node_add_child(struct CMason *mason, struct CMasonNode *node, struct CMasonNode *child);
437
143
 
438
- void *mason_node_replace_child_at(void *mason, void *node, void *child, uintptr_t index);
144
+ struct CMasonNode *mason_node_replace_child_at(struct CMason *mason,
145
+ struct CMasonNode *node,
146
+ struct CMasonNode *child,
147
+ uintptr_t index);
439
148
 
440
- void mason_node_add_child_at(void *mason, void *node, void *child, uintptr_t index);
149
+ void mason_node_add_child_at(struct CMason *mason,
150
+ struct CMasonNode *node,
151
+ struct CMasonNode *child,
152
+ uintptr_t index);
441
153
 
442
- void mason_node_insert_child_before(void *mason, void *node, void *child, void *reference);
154
+ void mason_node_insert_child_before(struct CMason *mason,
155
+ struct CMasonNode *node,
156
+ struct CMasonNode *child,
157
+ struct CMasonNode *reference);
443
158
 
444
- void mason_node_insert_child_after(void *mason, void *node, void *child, void *reference);
159
+ void mason_node_insert_child_after(struct CMason *mason,
160
+ struct CMasonNode *node,
161
+ struct CMasonNode *child,
162
+ struct CMasonNode *reference);
445
163
 
446
- bool mason_node_dirty(void *mason, void *node);
164
+ bool mason_node_dirty(struct CMason *mason, struct CMasonNode *node);
447
165
 
448
- void mason_node_mark_dirty(void *mason, void *node);
166
+ void mason_node_mark_dirty(struct CMason *mason, struct CMasonNode *node);
449
167
 
450
- bool mason_node_is_children_same(void *mason,
451
- void *node,
452
- const void *children,
168
+ bool mason_node_is_children_same(struct CMason *mason,
169
+ struct CMasonNode *node,
170
+ struct CMasonNode *const *children,
453
171
  uintptr_t children_size);
454
172
 
455
- void mason_node_remove_children(void *mason, void *node);
173
+ void mason_node_remove_children(struct CMason *mason, struct CMasonNode *node);
456
174
 
457
- void *mason_node_remove_child_at(void *mason, void *node, uintptr_t index);
175
+ struct CMasonNode *mason_node_remove_child_at(struct CMason *mason,
176
+ struct CMasonNode *node,
177
+ uintptr_t index);
458
178
 
459
- void *mason_node_remove_child(void *mason, void *node, void *child);
179
+ struct CMasonNode *mason_node_remove_child(struct CMason *mason,
180
+ struct CMasonNode *node,
181
+ struct CMasonNode *child);
460
182
 
461
- struct NodeArray mason_node_get_children(void *mason, void *node);
183
+ struct NodeArray *mason_node_get_children(struct CMason *mason, struct CMasonNode *node);
462
184
 
463
- void mason_node_set_measure_func(void *mason,
464
- void *node,
465
- void *measure_data,
466
- long long (*measure)(const void*, float, float, float, float));
185
+ #if !defined(TARGET_OS_ANDROID)
186
+ void mason_node_set_context(struct CMason *mason,
187
+ struct CMasonNode *node,
188
+ void *measure_data,
189
+ long long (*measure)(const void*, float, float, float, float));
190
+ #endif
467
191
 
468
- void mason_node_remove_measure_func(void *mason, void *node);
192
+ void mason_node_remove_context(struct CMason *mason, struct CMasonNode *node);
469
193
 
470
194
  void mason_destroy_non_repeated_track_sizing_function_array(struct CMasonNonRepeatedTrackSizingFunctionArray *array);
471
195
 
472
196
  void mason_destroy_track_sizing_function_array(struct CMasonTrackSizingFunctionArray *array);
473
197
 
474
- void *mason_style_init(void);
475
-
476
- void mason_style_destroy(void *style);
477
-
478
- int mason_style_get_display(void *style);
479
-
480
- void mason_style_set_display(void *style, int display);
481
-
482
- void mason_style_set_position(void *style, int position);
483
-
484
- int mason_style_get_position(void *style);
485
-
486
- void mason_style_set_direction(void *_style, int _direction);
487
-
488
- int mason_style_get_direction(void *_style);
489
-
490
- void mason_style_set_flex_direction(void *style, int direction);
491
-
492
- int mason_style_get_flex_direction(void *style);
493
-
494
- void mason_style_set_flex_wrap(void *style, int wrap);
495
-
496
- int mason_style_get_flex_wrap(void *style);
497
-
498
- void mason_style_set_overflow(void *_style, int _overflow);
499
-
500
- int mason_style_get_overflow(void *_style);
501
-
502
- void mason_style_set_align_items(void *style, int align);
503
-
504
- int mason_style_get_align_items(void *style);
505
-
506
- void mason_style_set_align_self(void *style, int align);
507
-
508
- int mason_style_get_align_self(void *style);
509
-
510
- void mason_style_set_align_content(void *style, int align);
511
-
512
- int mason_style_get_align_content(void *style);
513
-
514
- void mason_style_set_justify_items(void *style, int align);
515
-
516
- int mason_style_get_justify_items(void *style);
517
-
518
- void mason_style_set_justify_self(void *style, int align);
519
-
520
- int mason_style_get_justify_self(void *style);
521
-
522
- void mason_style_set_justify_content(void *style, int justify);
523
-
524
- int mason_style_get_justify_content(void *style);
525
-
526
- void mason_style_set_inset(void *style,
527
- float value,
528
- enum CMasonLengthPercentageAutoType value_type);
529
-
530
- void mason_style_set_inset_lrtb(void *style,
531
- float left_value,
532
- enum CMasonLengthPercentageAutoType left_value_type,
533
- float right_value,
534
- enum CMasonLengthPercentageAutoType right_value_type,
535
- float top_value,
536
- enum CMasonLengthPercentageAutoType top_value_type,
537
- float bottom_value,
538
- enum CMasonLengthPercentageAutoType bottom_value_type);
539
-
540
- void mason_style_set_inset_left(void *style,
541
- float value,
542
- enum CMasonLengthPercentageAutoType value_type);
543
-
544
- struct CMasonLengthPercentageAuto mason_style_get_inset_left(void *style);
545
-
546
- void mason_style_set_inset_right(void *style,
547
- float value,
548
- enum CMasonLengthPercentageAutoType value_type);
549
-
550
- struct CMasonLengthPercentageAuto mason_style_get_inset_right(void *style);
551
-
552
- void mason_style_set_inset_top(void *style,
553
- float value,
554
- enum CMasonLengthPercentageAutoType value_type);
555
-
556
- struct CMasonLengthPercentageAuto mason_style_get_inset_top(void *style);
557
-
558
- void mason_style_set_inset_bottom(void *style,
559
- float value,
560
- enum CMasonLengthPercentageAutoType value_type);
561
-
562
- struct CMasonLengthPercentageAuto mason_style_get_inset_bottom(void *style);
563
-
564
- void mason_style_set_margin(void *style,
565
- float left_value,
566
- enum CMasonLengthPercentageAutoType left_value_type,
567
- float right_value,
568
- enum CMasonLengthPercentageAutoType right_value_type,
569
- float top_value,
570
- enum CMasonLengthPercentageAutoType top_value_type,
571
- float bottom_value,
572
- enum CMasonLengthPercentageAutoType bottom_value_type);
573
-
574
- void mason_style_set_margin_left(void *style,
575
- float value,
576
- enum CMasonLengthPercentageAutoType value_type);
577
-
578
- struct CMasonLengthPercentageAuto mason_style_get_margin_left(void *style);
579
-
580
- void mason_style_set_margin_right(void *style,
581
- float value,
582
- enum CMasonLengthPercentageAutoType value_type);
583
-
584
- struct CMasonLengthPercentageAuto mason_style_get_margin_right(void *style);
585
-
586
- void mason_style_set_margin_top(void *style,
587
- float value,
588
- enum CMasonLengthPercentageAutoType value_type);
589
-
590
- struct CMasonLengthPercentageAuto mason_style_get_margin_top(void *style);
591
-
592
- void mason_style_set_margin_bottom(void *style,
593
- float value,
594
- enum CMasonLengthPercentageAutoType value_type);
595
-
596
- struct CMasonLengthPercentageAuto mason_style_get_margin_bottom(void *style);
597
-
598
- void mason_style_set_padding(void *style,
599
- float left_value,
600
- enum CMasonLengthPercentageType left_value_type,
601
- float right_value,
602
- enum CMasonLengthPercentageType right_value_type,
603
- float top_value,
604
- enum CMasonLengthPercentageType top_value_type,
605
- float bottom_value,
606
- enum CMasonLengthPercentageType bottom_value_type);
607
-
608
- void mason_style_set_padding_left(void *style,
609
- float value,
610
- enum CMasonLengthPercentageType value_type);
611
-
612
- struct CMasonLengthPercentage mason_style_get_padding_left(void *style);
613
-
614
- void mason_style_set_padding_right(void *style,
615
- float value,
616
- enum CMasonLengthPercentageType value_type);
617
-
618
- struct CMasonLengthPercentage mason_style_get_padding_right(void *style);
619
-
620
- void mason_style_set_padding_top(void *style,
621
- float value,
622
- enum CMasonLengthPercentageType value_type);
623
-
624
- struct CMasonLengthPercentage mason_style_get_padding_top(void *style);
625
-
626
- void mason_style_set_padding_bottom(void *style,
627
- float value,
628
- enum CMasonLengthPercentageType value_type);
629
-
630
- struct CMasonLengthPercentage mason_style_get_padding_bottom(void *style);
631
-
632
- void mason_style_set_border(void *style,
633
- float left_value,
634
- enum CMasonLengthPercentageType left_value_type,
635
- float right_value,
636
- enum CMasonLengthPercentageType right_value_type,
637
- float top_value,
638
- enum CMasonLengthPercentageType top_value_type,
639
- float bottom_value,
640
- enum CMasonLengthPercentageType bottom_value_type);
641
-
642
- void mason_style_set_border_left(void *style,
643
- float value,
644
- enum CMasonLengthPercentageType value_type);
645
-
646
- struct CMasonLengthPercentage mason_style_get_border_left(void *style);
647
-
648
- void mason_style_set_border_right(void *style,
649
- float value,
650
- enum CMasonLengthPercentageType value_type);
651
-
652
- struct CMasonLengthPercentage mason_style_get_border_right(void *style);
653
-
654
- void mason_style_set_border_top(void *style,
655
- float value,
656
- enum CMasonLengthPercentageType value_type);
657
-
658
- struct CMasonLengthPercentage mason_style_get_border_top(void *style);
659
-
660
- void mason_style_set_border_bottom(void *style,
661
- float value,
662
- enum CMasonLengthPercentageType value_type);
663
-
664
- struct CMasonLengthPercentage mason_style_get_border_bottom(void *style);
665
-
666
- void mason_style_set_flex_grow(void *style, float grow);
667
-
668
- float mason_style_get_flex_grow(void *style);
669
-
670
- void mason_style_set_flex_shrink(void *style, float shrink);
671
-
672
- float mason_style_get_flex_shrink(void *style);
673
-
674
- void mason_style_set_flex_basis(void *style, float value, enum CMasonDimensionType value_type);
675
-
676
- struct CMasonDimension mason_style_get_flex_basis(void *style);
677
-
678
- void mason_style_set_width(void *style, float value, enum CMasonDimensionType value_type);
679
-
680
- struct CMasonDimension mason_style_get_width(void *style);
681
-
682
- void mason_style_set_height(void *style, float value, enum CMasonDimensionType value_type);
683
-
684
- struct CMasonDimension mason_style_get_height(void *style);
685
-
686
- void mason_style_set_min_width(void *style, float value, enum CMasonDimensionType value_type);
687
-
688
- struct CMasonDimension mason_style_get_min_width(void *style);
689
-
690
- void mason_style_set_min_height(void *style, float value, enum CMasonDimensionType value_type);
691
-
692
- struct CMasonDimension mason_style_get_min_height(void *style);
693
-
694
- void mason_style_set_max_width(void *style, float value, enum CMasonDimensionType value_type);
695
-
696
- struct CMasonDimension mason_style_get_max_width(void *style);
697
-
698
- void mason_style_set_max_height(void *style, float value, enum CMasonDimensionType value_type);
699
-
700
- struct CMasonDimension mason_style_get_max_height(void *style);
701
-
702
- struct CMasonLengthPercentageSize mason_style_get_gap(void *style);
703
-
704
- void mason_style_set_gap(void *style,
705
- float width_value,
706
- enum CMasonLengthPercentageType width_type,
707
- float height_value,
708
- enum CMasonLengthPercentageType height_type);
709
-
710
- void mason_style_set_row_gap(void *style, float value, enum CMasonLengthPercentageType value_type);
711
-
712
- struct CMasonLengthPercentage mason_style_get_row_gap(void *style);
713
-
714
- void mason_style_set_column_gap(void *style,
715
- float value,
716
- enum CMasonLengthPercentageType value_type);
717
-
718
- struct CMasonLengthPercentage mason_style_get_column_gap(void *style);
719
-
720
- void mason_style_set_aspect_ratio(void *style, float ratio);
721
-
722
- float mason_style_get_aspect_ratio(void *style);
723
-
724
- struct CMasonNonRepeatedTrackSizingFunctionArray *mason_style_get_grid_auto_rows(void *style);
725
-
726
- void mason_style_set_grid_auto_rows(void *style,
198
+ void mason_style_set_with_values(struct CMason *mason,
199
+ struct CMasonNode *node,
200
+ int display,
201
+ int position,
202
+ int direction,
203
+ int flex_direction,
204
+ int flex_wrap,
205
+ int overflow,
206
+ int align_items,
207
+ int align_self,
208
+ int align_content,
209
+ int justify_items,
210
+ int justify_self,
211
+ int justify_content,
212
+ int inset_left_type,
213
+ float inset_left_value,
214
+ int inset_right_type,
215
+ float inset_right_value,
216
+ int inset_top_type,
217
+ float inset_top_value,
218
+ int inset_bottom_type,
219
+ float inset_bottom_value,
220
+ int margin_left_type,
221
+ float margin_left_value,
222
+ int margin_right_type,
223
+ float margin_right_value,
224
+ int margin_top_type,
225
+ float margin_top_value,
226
+ int margin_bottom_type,
227
+ float margin_bottom_value,
228
+ int padding_left_type,
229
+ float padding_left_value,
230
+ int padding_right_type,
231
+ float padding_right_value,
232
+ int padding_top_type,
233
+ float padding_top_value,
234
+ int padding_bottom_type,
235
+ float padding_bottom_value,
236
+ int border_left_type,
237
+ float border_left_value,
238
+ int border_right_type,
239
+ float border_right_value,
240
+ int border_top_type,
241
+ float border_top_value,
242
+ int border_bottom_type,
243
+ float border_bottom_value,
244
+ float flex_grow,
245
+ float flex_shrink,
246
+ int flex_basis_type,
247
+ float flex_basis_value,
248
+ int width_type,
249
+ float width_value,
250
+ int height_type,
251
+ float height_value,
252
+ int min_width_type,
253
+ float min_width_value,
254
+ int min_height_type,
255
+ float min_height_value,
256
+ int max_width_type,
257
+ float max_width_value,
258
+ int max_height_type,
259
+ float max_height_value,
260
+ int gap_row_type,
261
+ float gap_row_value,
262
+ int gap_column_type,
263
+ float gap_column_value,
264
+ float aspect_ratio,
265
+ struct CMasonNonRepeatedTrackSizingFunctionArray *grid_auto_rows,
266
+ struct CMasonNonRepeatedTrackSizingFunctionArray *grid_auto_columns,
267
+ int grid_auto_flow,
268
+ int grid_column_start_type,
269
+ short grid_column_start_value,
270
+ int grid_column_end_type,
271
+ short grid_column_end_value,
272
+ int grid_row_start_type,
273
+ short grid_row_start_value,
274
+ int grid_row_end_type,
275
+ short grid_row_end_value,
276
+ struct CMasonTrackSizingFunctionArray *grid_template_rows,
277
+ struct CMasonTrackSizingFunctionArray *grid_template_columns,
278
+ int32_t overflow_x,
279
+ int32_t overflow_y,
280
+ float scrollbar_width,
281
+ int32_t text_align,
282
+ int32_t box_sizing);
283
+
284
+ void mason_style_sync_style(struct CMason *mason, struct CMasonNode *node, int64_t state);
285
+
286
+ void mason_style_sync_style_with_buffer(struct CMason *mason,
287
+ struct CMasonNode *node,
288
+ int64_t state,
289
+ uint8_t *buffer,
290
+ uintptr_t buffer_size);
291
+
292
+ void *mason_style_sync_compute_and_layout(struct CMason *mason,
293
+ struct CMasonNode *node,
294
+ uint8_t *data,
295
+ uintptr_t size,
296
+ int64_t state,
297
+ void *(*layout)(const float*));
298
+
299
+ void mason_style_release_style_buffer(struct CMasonBuffer *buffer);
300
+
301
+ struct CMasonBuffer *mason_style_get_style_buffer(struct CMason *mason, struct CMasonNode *node);
302
+
303
+ void *mason_style_get_style_buffer_apple(struct CMason *mason, struct CMasonNode *node);
304
+
305
+ struct CMasonNonRepeatedTrackSizingFunctionArray *mason_style_get_grid_auto_rows(struct CMason *mason,
306
+ struct CMasonNode *node);
307
+
308
+ void mason_style_set_grid_auto_rows(struct CMason *mason,
309
+ struct CMasonNode *node,
727
310
  struct CMasonNonRepeatedTrackSizingFunctionArray *value);
728
311
 
729
- struct CMasonNonRepeatedTrackSizingFunctionArray *mason_style_get_grid_auto_columns(void *style);
312
+ struct CMasonNonRepeatedTrackSizingFunctionArray *mason_style_get_grid_auto_columns(struct CMason *mason,
313
+ struct CMasonNode *node);
730
314
 
731
- void mason_style_set_grid_auto_columns(void *style,
315
+ void mason_style_set_grid_auto_columns(struct CMason *mason,
316
+ struct CMasonNode *node,
732
317
  struct CMasonNonRepeatedTrackSizingFunctionArray *value);
733
318
 
734
- int32_t mason_style_get_grid_auto_flow(void *style);
735
-
736
- void mason_style_set_grid_auto_flow(void *style, int32_t value);
319
+ struct CMasonTrackSizingFunctionArray *mason_style_get_grid_template_rows(struct CMason *mason,
320
+ struct CMasonNode *node);
737
321
 
738
- void mason_style_set_grid_area(void *style,
739
- struct CMasonGridPlacement row_start,
740
- struct CMasonGridPlacement row_end,
741
- struct CMasonGridPlacement column_start,
742
- struct CMasonGridPlacement column_end);
322
+ void mason_style_set_grid_template_rows(struct CMason *mason,
323
+ struct CMasonNode *node,
324
+ struct CMasonTrackSizingFunctionArray *value);
743
325
 
744
- struct CMasonGridPlacement mason_style_get_grid_column_start(void *style);
326
+ struct CMasonTrackSizingFunctionArray *mason_style_get_grid_template_columns(struct CMason *mason,
327
+ struct CMasonNode *node);
745
328
 
746
- void mason_style_set_grid_column(void *style,
747
- struct CMasonGridPlacement start,
748
- struct CMasonGridPlacement end);
749
-
750
- void mason_style_set_grid_column_start(void *style, struct CMasonGridPlacement value);
751
-
752
- struct CMasonGridPlacement mason_style_get_grid_column_end(void *style);
753
-
754
- void mason_style_set_grid_column_end(void *style, struct CMasonGridPlacement value);
755
-
756
- struct CMasonGridPlacement mason_style_get_grid_row_start(void *style);
757
-
758
- void mason_style_set_grid_row(void *style,
759
- struct CMasonGridPlacement start,
760
- struct CMasonGridPlacement end);
761
-
762
- void mason_style_set_grid_row_start(void *style, struct CMasonGridPlacement value);
763
-
764
- struct CMasonGridPlacement mason_style_get_grid_row_end(void *style);
765
-
766
- void mason_style_set_grid_row_end(void *style, struct CMasonGridPlacement value);
767
-
768
- struct CMasonTrackSizingFunctionArray *mason_style_get_grid_template_rows(void *style);
769
-
770
- void mason_style_set_grid_template_rows(void *style, struct CMasonTrackSizingFunctionArray *value);
771
-
772
- struct CMasonTrackSizingFunctionArray *mason_style_get_grid_template_columns(void *style);
773
-
774
- void mason_style_set_grid_template_columns(void *style,
329
+ void mason_style_set_grid_template_columns(struct CMason *mason,
330
+ struct CMasonNode *node,
775
331
  struct CMasonTrackSizingFunctionArray *value);
776
332
 
777
- void *mason_style_init_with_values(int display,
778
- int position_type,
779
- int direction,
780
- int flex_direction,
781
- int flex_wrap,
782
- int overflow,
783
- int align_items,
784
- int align_self,
785
- int align_content,
786
- int justify_items,
787
- int justify_self,
788
- int justify_content,
789
- int inset_left_type,
790
- float inset_left_value,
791
- int inset_right_type,
792
- float inset_right_value,
793
- int inset_top_type,
794
- float inset_top_value,
795
- int inset_bottom_type,
796
- float inset_bottom_value,
797
- int margin_left_type,
798
- float margin_left_value,
799
- int margin_right_type,
800
- float margin_right_value,
801
- int margin_top_type,
802
- float margin_top_value,
803
- int margin_bottom_type,
804
- float margin_bottom_value,
805
- int padding_left_type,
806
- float padding_left_value,
807
- int padding_right_type,
808
- float padding_right_value,
809
- int padding_top_type,
810
- float padding_top_value,
811
- int padding_bottom_type,
812
- float padding_bottom_value,
813
- int border_left_type,
814
- float border_left_value,
815
- int border_right_type,
816
- float border_right_value,
817
- int border_top_type,
818
- float border_top_value,
819
- int border_bottom_type,
820
- float border_bottom_value,
821
- float flex_grow,
822
- float flex_shrink,
823
- int flex_basis_type,
824
- float flex_basis_value,
825
- int width_type,
826
- float width_value,
827
- int height_type,
828
- float height_value,
829
- int min_width_type,
830
- float min_width_value,
831
- int min_height_type,
832
- float min_height_value,
833
- int max_width_type,
834
- float max_width_value,
835
- int max_height_type,
836
- float max_height_value,
837
- int32_t gap_row_type,
838
- float gap_row_value,
839
- int32_t gap_column_type,
840
- float gap_column_value,
841
- float aspect_ratio,
842
- struct CMasonNonRepeatedTrackSizingFunctionArray *grid_auto_rows,
843
- struct CMasonNonRepeatedTrackSizingFunctionArray *grid_auto_columns,
844
- int32_t grid_auto_flow,
845
- int32_t grid_column_start_type,
846
- int16_t grid_column_start_value,
847
- int32_t grid_column_end_type,
848
- int16_t grid_column_end_value,
849
- int32_t grid_row_start_type,
850
- int16_t grid_row_start_value,
851
- int32_t grid_row_end_type,
852
- int16_t grid_row_end_value,
853
- const struct CMasonTrackSizingFunctionArray *grid_template_rows,
854
- const struct CMasonTrackSizingFunctionArray *grid_template_columns);
855
-
856
- void mason_style_update_with_values(void *style,
857
- int display,
858
- int position_type,
859
- int direction,
860
- int flex_direction,
861
- int flex_wrap,
862
- int overflow,
863
- int align_items,
864
- int align_self,
865
- int align_content,
866
- int justify_items,
867
- int justify_self,
868
- int justify_content,
869
- int inset_left_type,
870
- float inset_left_value,
871
- int inset_right_type,
872
- float inset_right_value,
873
- int inset_top_type,
874
- float inset_top_value,
875
- int inset_bottom_type,
876
- float inset_bottom_value,
877
- int margin_left_type,
878
- float margin_left_value,
879
- int margin_right_type,
880
- float margin_right_value,
881
- int margin_top_type,
882
- float margin_top_value,
883
- int margin_bottom_type,
884
- float margin_bottom_value,
885
- int padding_left_type,
886
- float padding_left_value,
887
- int padding_right_type,
888
- float padding_right_value,
889
- int padding_top_type,
890
- float padding_top_value,
891
- int padding_bottom_type,
892
- float padding_bottom_value,
893
- int border_left_type,
894
- float border_left_value,
895
- int border_right_type,
896
- float border_right_value,
897
- int border_top_type,
898
- float border_top_value,
899
- int border_bottom_type,
900
- float border_bottom_value,
901
- float flex_grow,
902
- float flex_shrink,
903
- int flex_basis_type,
904
- float flex_basis_value,
905
- int width_type,
906
- float width_value,
907
- int height_type,
908
- float height_value,
909
- int min_width_type,
910
- float min_width_value,
911
- int min_height_type,
912
- float min_height_value,
913
- int max_width_type,
914
- float max_width_value,
915
- int max_height_type,
916
- float max_height_value,
917
- int32_t gap_row_type,
918
- float gap_row_value,
919
- int32_t gap_column_type,
920
- float gap_column_value,
921
- float aspect_ratio,
922
- struct CMasonNonRepeatedTrackSizingFunctionArray *grid_auto_rows,
923
- struct CMasonNonRepeatedTrackSizingFunctionArray *grid_auto_columns,
924
- int32_t grid_auto_flow,
925
- int32_t grid_column_start_type,
926
- int16_t grid_column_start_value,
927
- int32_t grid_column_end_type,
928
- int16_t grid_column_end_value,
929
- int32_t grid_row_start_type,
930
- int16_t grid_row_start_value,
931
- int32_t grid_row_end_type,
932
- int16_t grid_row_end_value,
933
- struct CMasonTrackSizingFunctionArray *grid_template_rows,
934
- struct CMasonTrackSizingFunctionArray *grid_template_columns);
935
-
936
333
  struct CMasonMinMax mason_util_create_non_repeated_track_sizing_function_with_type_value(int32_t track_type,
937
334
  float track_value);
938
335
 
@@ -942,4 +339,4 @@ char *mason_util_parse_auto_repeating_track_sizing_function(struct CMasonTrackSi
942
339
 
943
340
  void mason_util_destroy_string(char *string);
944
341
 
945
- #endif /* CBINDGEN_BINDINGS_H */
342
+ #endif /* MASON_C_H */