event processing still doesn't work right

This commit is contained in:
cqc
2024-06-29 20:06:36 -05:00
parent 8243029cee
commit 1e3b9da1ed
2 changed files with 217 additions and 187 deletions

View File

@ -166,16 +166,17 @@ let main =
]
[
Custom
(fun () ->
F.epr "Ctrl-X Ctrl-E@.";
TextBuffer.peek tb_init >>= fun str ->
Toploop.use_input out_ppf (String str)
|> F.epr "Toploop.use_input=%b@.";
Lwt.return_unit);
( "toplevel_execute",
fun () ->
F.epr "Ctrl-X Ctrl-E@.";
TextBuffer.peek tb_init >>= fun str ->
Toploop.use_input out_ppf (String str)
|> F.epr "Toploop.use_input=%b@.";
Lwt.return_unit );
]));
Layout.(
tiling ui `Y
system ui `Y
~style:
Style.{ default with margin = Margin.symmetric 10.0 10.0 }
[ TextEdit.multiline ui tb_init; TextEdit.multiline ui to_init ])
@ -190,7 +191,13 @@ let main =
[
[ Key (Press, X, [ Control ]); Key (Press, E, [ Control ]) ];
]
[ Custom (fun () -> Lwt.return ()) ]);
[ Custom ("toplevel_execute", fun () -> Lwt.return ()) ]);
let bindings =
ui.bindings |> Lwd.get |> Lwd.observe |> Lwd.quick_sample
in
F.epr "Bindings:@.%a" Ui.pp_bindings bindings;
F.pr "oplevel.ml: entering drawing loop@.";
let period_min = 1.0 /. 30. in
let t = GLFW.getTime () |> ref in