aboutsummaryrefslogtreecommitdiff
path: root/script.it/script.ml
diff options
context:
space:
mode:
Diffstat (limited to 'script.it/script.ml')
-rwxr-xr-xscript.it/script.ml23
1 files changed, 11 insertions, 12 deletions
diff --git a/script.it/script.ml b/script.it/script.ml
index 29bf2c9..6c2b5d3 100755
--- a/script.it/script.ml
+++ b/script.it/script.ml
@@ -87,7 +87,7 @@ type 'a param_events =
; angle : float S.t
; export : unit E.t
; delete : unit E.t
- ; rendering : State.events E.t
+ ; rendering : State.event E.t
}
type slider =
@@ -174,7 +174,7 @@ let set_sidebar
State.E
( render_type
- , (module M: State.Handler with type t = Layer.Paths.printer ))
+ , (module M: State.Event with type t = Layer.Paths.printer ))
) rendering' in
@@ -377,7 +377,7 @@ let page_main id =
let module Delete = Script_event.Delete in
State.E
( Delete.{ worker }
- , (module Delete: State.Handler with type t = Delete.t )))
+ , (module Delete: State.Event with type t = Delete.t )))
parameters.delete
and export_event =
@@ -385,21 +385,21 @@ let page_main id =
let module Export = Script_event.Export in
State.E
( ()
- , (module Export: State.Handler with type t = Export.t )))
+ , (module Export: State.Event with type t = Export.t )))
parameters.export
and angle_event = S.changes parameters.angle
|> E.map (fun value ->
let module Property = Script_event.Property in
State.E
( Property.{ value ; worker ; prop = `Angle }
- , (module Property: State.Handler with type t = Property.t )))
+ , (module Property: State.Event with type t = Property.t )))
and width_event = S.changes parameters.width
|> E.map (fun value ->
let module Property = Script_event.Property in
State.E
( Property.{ value ; worker ; prop = `Width }
- , (module Property: State.Handler with type t = Property.t )))
+ , (module Property: State.Event with type t = Property.t )))
and worker_event = Note.E.filter_map
(function
| `Other t ->
@@ -410,7 +410,7 @@ let page_main id =
Some (
State.E
( outline
- , (module Complete_path: State.Handler with type t = Complete_path.t ))))
+ , (module Complete_path: State.Event with type t = Complete_path.t ))))
worker_event
in
@@ -439,13 +439,13 @@ let page_main id =
let module MouseDown = Script_event.Mouse_down in
State.E
( MouseDown.{ position = c ; timer }
- , (module MouseDown: State.Handler with type t = MouseDown.t ))
+ , (module MouseDown: State.Event with type t = MouseDown.t ))
| `Out c ->
let module Click = Script_event.Click in
State.E
( Click.{ point = c ; worker; timer }
- , (module Click: State.Handler with type t = Click.t ))
+ , (module Click: State.Event with type t = Click.t ))
) canva_events in
let tick_event =
@@ -456,14 +456,13 @@ let page_main id =
Option.map (fun p ->
State.E
( (f, p)
- , (module Tick: State.Handler with type t = Tick.t )))
+ , (module Tick: State.Event with type t = Tick.t )))
pos ) in
(* The first evaluation is the state. Which is the result of all the
successives events to the initial state *)
let state =
- Application.run
- State.do_action
+ State.run
State.init
(E.select
[ worker_event