@geastack/engine 0.1.5 → 0.1.7

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 (45) hide show
  1. package/README.md +70 -0
  2. package/canvas.cpp +86 -30
  3. package/css/animation.h +64 -0
  4. package/css/declarative.h +6 -0
  5. package/css/engine.h +25 -1
  6. package/image_store.cpp +136 -33
  7. package/package.json +2 -2
  8. package/ui/CSS_FEATURES.md +261 -0
  9. package/ui/absolute_leaf_refresh.cpp +42 -39
  10. package/ui/core.cpp +32 -1
  11. package/ui/css_atom.cpp +6 -0
  12. package/ui/css_atom.h +2 -0
  13. package/ui/css_features.h +282 -0
  14. package/ui/display_invalidation.cpp +29 -0
  15. package/ui/flex_balance.h +73 -0
  16. package/ui/image_node.cpp +33 -28
  17. package/ui/input.cpp +88 -38
  18. package/ui/input_render.cpp +17 -13
  19. package/ui/internal.h +51 -5
  20. package/ui/layout.cpp +2601 -441
  21. package/ui/layout_snapshot.cpp +49 -6
  22. package/ui/node_features.h +18 -0
  23. package/ui/node_lifecycle.cpp +204 -71
  24. package/ui/node_lifecycle.h +1 -0
  25. package/ui/node_model.h +930 -70
  26. package/ui/node_text.h +82 -0
  27. package/ui/render.cpp +793 -352
  28. package/ui/renderer_features.h +19 -0
  29. package/ui/root_scroll_refresh.cpp +46 -24
  30. package/ui/style.cpp +4155 -1073
  31. package/ui/style.h +143 -6
  32. package/ui/style_values.h +16 -0
  33. package/ui/text.cpp +401 -106
  34. package/ui/tree_events.cpp +138 -95
  35. package/ui/tree_events.h +28 -19
  36. package/ui/tree_inspection.h +15 -0
  37. package/ui/tree_internal.h +19 -0
  38. package/ui/tree_nodes.cpp +38 -4
  39. package/ui/tree_render.cpp +119 -40
  40. package/ui/tree_scroll_mirror.cpp +26 -0
  41. package/ui/tree_state.cpp +261 -114
  42. package/ui/tree_state.h +121 -16
  43. package/ui/tree_style.cpp +609 -82
  44. package/ui/view.cpp +720 -299
  45. package/ui/virtual_keyboard.cpp +10 -3
@@ -36,12 +36,13 @@
36
36
  // handlers fire.
37
37
 
38
38
  #include "virtual_keyboard.h"
39
+ #include "node_features.h"
39
40
 
40
41
  #ifndef GEA_EMBEDDED_ENABLE_VIRTUAL_KEYBOARD
41
42
  #define GEA_EMBEDDED_ENABLE_VIRTUAL_KEYBOARD 1
42
43
  #endif
43
44
 
44
- #if GEA_EMBEDDED_ENABLE_VIRTUAL_KEYBOARD
45
+ #if GEA_EMBEDDED_ENABLE_VIRTUAL_KEYBOARD && GEA_UI_INPUT_NODES
45
46
 
46
47
  #include "display.h"
47
48
  #include "internal.h"
@@ -579,7 +580,9 @@ void applyKeyToActiveInput(int code)
579
580
  Node &nn = tree.node(nodeId);
580
581
  nn.render.dirty = 1;
581
582
  nn.render.layout_dirty = 1;
583
+ #if GEA_CSS_SCROLLING
582
584
  nn.render.non_scroll_dirty = 1;
585
+ #endif
583
586
  };
584
587
 
585
588
  if (code == kCodeBackspace) {
@@ -701,10 +704,14 @@ void applyAppResize()
701
704
  // first setStyle lands, so none of them is read back post-mutation.
702
705
  const int prevHeight = n.style.height;
703
706
  const int prevFlex = n.style.flex;
707
+ #if GEA_CSS_OVERFLOW_AXES
704
708
  const int prevOverflowY = n.style.overflow_y;
709
+ #else
710
+ const int prevOverflowY = n.style.overflow;
711
+ #endif
705
712
  const int prevPosition = n.style.position;
706
- const int prevTop = n.style.pos_offsets[0];
707
- const int prevLeft = n.style.pos_offsets[3];
713
+ const int prevTop = GEA_CSS_POSITION_PX_0(n.style);
714
+ const int prevLeft = GEA_CSS_POSITION_PX_3(n.style);
708
715
  const int viewportH = tree.mountedHeight();
709
716
  // Available vertical space between the top of this node (set by
710
717
  // previous siblings' heights during the most recent layout pass)