Mosaic_mlx.SubSourceOngoing event interests declared by the application.
The app.subscriptions function is called after every update and returns a subscription value describing which events the application wants to receive. Subscriptions are re-evaluated on each cycle, so they may depend on the current model. Compose multiple subscriptions with Sub.batch.
type 'msg t = | NoneNo subscription. Equivalent to batch [].
| Batch of 'msg t listActivate all subscriptions in the list.
*)| Every of float * unit -> 'msgEvery (interval, f) fires f () repeatedly at approximately interval-second intervals.
| On_tick of dt:float -> 'msgOn_tick f fires f ~dt on every render frame, where dt is the elapsed time in seconds since the previous frame.
| On_key of Event.key -> 'msg optionOn_key f delivers key events only to the currently focused element. f returns None to ignore an event.
| On_key_all of Event.key -> 'msg optionOn_key_all f delivers all key events regardless of focus. f returns None to ignore an event.
| On_mouse of Event.mouse -> 'msg optionOn_mouse f delivers mouse events only to the currently focused element.
| On_mouse_all of Event.mouse -> 'msg optionOn_mouse_all f delivers all mouse events regardless of focus.
| On_paste of Event.paste -> 'msg optionOn_paste f delivers paste events only to the currently focused element.
| On_paste_all of Event.paste -> 'msg optionOn_paste_all f delivers all paste events regardless of focus.
| On_resize of width:int -> height:int -> 'msgOn_resize f fires f ~width ~height whenever the terminal is resized.
| On_focus of 'msgOn_focus msg dispatches msg when the terminal window gains focus.
| On_blur of 'msgOn_blur msg dispatches msg when the terminal window loses focus.
The type for subscriptions.
batch subs is a subscription that activates every subscription in subs.
every interval f fires f () at approximately interval-second intervals for as long as the subscription is active.
on_tick f fires f ~dt on every rendered frame. dt is the elapsed time in seconds since the previous frame. Use this for animations that must advance at the display frame rate.
on_key f delivers key events to f for the currently focused element. f returns None to ignore an event without dispatching. See also on_key_all.
on_key_all f is like on_key but delivers all key events regardless of which element has focus.
on_mouse f delivers mouse events to f for the currently focused element. See also on_mouse_all.
on_mouse_all f is like on_mouse but delivers all mouse events regardless of focus.
on_paste f delivers paste events to f for the currently focused element. See also on_paste_all.
on_paste_all f is like on_paste but delivers all paste events regardless of focus.
on_resize f fires f ~width ~height whenever the terminal is resized, reporting the new dimensions in columns and rows.
on_focus msg dispatches msg when the terminal window gains focus.