Skip to content

Commit

Permalink
Initial add libscroll
Browse files Browse the repository at this point in the history
  • Loading branch information
szbergeron committed Feb 22, 2020
1 parent 2f6f985 commit 32d3a8c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,16 @@
"reason-sdl2": "^2.10.3016",
"reason-skia": "github:revery-ui/reason-skia#69743dc",
"revery-text-wrap": "github:revery-ui/revery-text-wrap#005385c",
"timber": "*"
"timber": "*",
"libscroll": "*"
},
"resolutions": {
"@esy-ocaml/libffi": "esy-ocaml/libffi#c61127d",
"@opam/cmdliner": "1.0.2",
"esy-cmake": "prometheansacrifice/esy-cmake#2a47392def755",
"timber": "glennsl/timber#ae065bb",
"reason-harfbuzz": "revery-ui/reason-harfbuzz#0848520"
"reason-harfbuzz": "revery-ui/reason-harfbuzz#0848520",
"libscroll": "link:../libscroll-re"
},
"devDependencies": {
"ocaml": "~4.8",
Expand Down
2 changes: 1 addition & 1 deletion src/UI/dune
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
(name Revery_UI)
(public_name Revery.UI)
(preprocess (pps lwt_ppx ppx_deriving.show))
(libraries brisk-reconciler lwt lwt.unix sdl2 skia flex rebez.lib Revery_Core Revery_Draw Revery_Math))
(libraries brisk-reconciler lwt lwt.unix sdl2 skia flex rebez.lib Revery_Core Revery_Draw Revery_Math Libscroll))
3 changes: 3 additions & 0 deletions src/UI_Components/ScrollView.re
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ let%component make =
let%hook (actualScrollLeft, setScrollLeft) = Hooks.state(scrollLeft);
let%hook (bouncingState, setBouncingState) = Hooks.state(Idle);

let%hook (scrollview, setScrollview) = Hooks.state(() => Libscroll.scrollview_new());
//setScrollview(_ => scrollview);

let%hook (actualScrollTop, _bounceAnimationState, resetBouncingAnimation) =
switch (bouncingState) {
| Idle =>
Expand Down

0 comments on commit 32d3a8c

Please sign in to comment.