true whenever an alt key is down.
any_down occurs whenever a key goes down.
true whenever any key is down.
any_up occurs whenever a key goes up.
11.mm, the average adult finger width.
Useri's current backend.
backend_scheme is the
Useri's current backend's scheme.
clipboard is the clipboard's textual content (if any).
count ~until is a signal that counts time starting from
until the next occurence of
counter () is a counter counting time from call time on.
counter_value c is the current counter value in seconds.
cpu_count is the number of CPU available.
create hidpi pos size kind anchor mode () is a surface specification
true (default) tries to get a high-dpi surface.,
pos, a hint to position the surface by using
the position of the top-left corner of the surface in its
backend dependent display container. The coordinates of the
top-left corner of the display container is
coordinate increase in from top to bottom and left to
size, the size of the surface in logical pixels. Consult
the individual backend documentation for the default value.,
kind is the kind of surface.,
handle is a backend dependent surface handle. In certain
backends allows to interface
Useri with pre-existing surfaces.,
mode is the the surface mode.
true whenever a ctrl key is down.
default is the default OpenGL surface specification.
did t is a device identifier for the touch.
down id occurs whenever the key
id goes down.
dpos t occurs when the touch moves with the current touch position
minus the previous one.
dpos occurs on mouse moves with current mouse position minus
the previous position.
may occur with
(text, cpos, sel_len)
whenever text is being composited for example if multiple key
strokes are needed in order to input a character.
elapsed () is the number of seconds elapsed since the
beginning of the program.
env var ~default parse lookups
var in the environment, parses
parse and returns the result.
source () is the event target used for keyboard events.
feel () is a signal that varies according to user latency
= `Interacting if
t < User.interrupted., [
= `Interrupted if
t < User.left., [
= `Left if
t >= User.left.
file occurs whenever a file is dropped on the application.
handle () is the application's surface backend dependent handle.
holds id is
true whenever the key
id is down.
id t is a unique identifier for the touch
(FIXME across device identifiers ?)
init name surface
initialises an application named
derived from the executable name) with surface
to a default
1.s, the time span after which the user will
feel interrupted and feedback from the system is needed.
key_capture () is the function that determines whether key
events related to a key are captured by Useri (i.e prevent
default action and stop propagation).
launch_context is the mechanism that started the program.
10.s, the time span after which the user will
switch to another task and feedback indicating when the system
expects to respond is needed.
true whenever the left mouse button is down.
left_down has an occurence whenever the left mouse button goes down.
left_up has an occurence whenever the left mouse button goes up.
true whenever a meta key is down.
true whenever the middle mouse button is down.
middle_down has an occurence whenever the middle mouse button goes
middle_up has an occurence whenever the middle mouse button goes
mode is the application's surface mode.
is an event which occur whenever
with the opposite mode of
0.1s, the time span after which the user will
notice a delay and feel that the system is not reacting
over t occurs once whenever the touch ends either because
the pressure stops (
`Up) or because the touch is canceled (
for example if the touch is captured by something else).
path f is
f's file system path.
platform is the name of the platform you are running on.
pos t is the current touch position of
pos is the current mouse position.
pos is the position of the top-left corner of the surface
in the surface's backend dependent display container.
pp_backend ppf b prints an unspecified representation of
pp_backend_scheme ppf bs prints and unspecified representation of
pp_cpu_count ppf c prints an unspecified representation of
pp_id ppf id prints an unspecified representation of
pp_launch_context ppf c prints an unspecified representation of
pp_mode ppf m prints an unspecified representation of
pp_ms ppf s prints
s seconds in milliseconds.
pp_mus ppf s prints
s seconds in microseconds.
pp_s ppf s prints
s seconds in seconds.
TODO this should used the app name automatically.
prepare f k prepares files
f for reading, calling
k f r whenever
f is ready to be read from (e.g.
pressure t is the pressure normalized from
quit occurs whenever the user requested to quit.
raster_size is the application's surface underlying raster
refresh occurs whenever the surface needs to be redrawn with
the number of seconds since its last occurence or, for the
first occurence, the number of seconds since the application
Stops and release sink references.
true whenever the right mouse button is down.
right_down has an occurence whenever the right mouse button goes
right_up has an occurence whenever the right mouse button goes up.
gather as much user input as possible and returns
the maximal timespan after which
should be called again.
set_backend_logger log sets
log to be called by backends
whenever non-fatal internal warnings and errors are generated.
set_clipboard_setter setter on occurences of
setter sets the
clipboard's textual content.
set_event_target target sets the event target to target.
uses occurences of
to set, if possible,
the current surface's application mode and the value of
to be used to generate
an occurence of
some time after each occurence of
true whenever a shift key is down.
sink_event e keeps a reference on
e until the app
sink_signal s keeps a reference on
s until the app
size is the application's surface logical size.
size_mm is the application's surface size in millimeters.
start occurs whenever touches do.
tick span is an event that occurs once in
span seconds with
span - span' where
span' is the actual delay
performed by the system.
2.mm, the minimum padding size in
millimeters between two touch targets.
9.mm, the recommended touch target size in
7.mm, the minimal touch target size in
uchar c is a key identifier from
unit ~span is a signal that linearly increases from
up id occurs whenever the key
id goes up.
update () updates the rendering surface.