1TICKIT_RUN(3)              Library Functions Manual              TICKIT_RUN(3)
2
3
4

NAME

6       tickit_run,  tickit_stop  -  control  the  event  loop  of the toplevel
7       instance
8

SYNOPSIS

10       #include <tickit.h>
11
12       void tickit_run(Tickit *t);
13       void tickit_stop(Tickit *t);
14
15       void tickit_tick(Tickit *t, TickitRunFlags flags);
16
17       Link with -ltickit.
18

DESCRIPTION

20       tickit_run() starts the IO event loop of the  main  toplevel  instance,
21       allowing  it to receive and react to terminal input, and to send output
22       content back to it. Once invoked, this function will  block  processing
23       IO  and not return until the tickit_stop() function is called, or until
24       a SIGINT is received (usually by the user pressing Ctrl-C).
25
26       tickit_stop()  causes  a  currently-running  call  to  tickit_run()  to
27       return.
28
29       tickit_tick() runs one iteration of the IO loop and returns. Its behav‐
30       iour is controlled by the flags argument, which should be a bitmask  of
31       the following flags:
32
33       TICKIT_RUN_NOHANG
34              Perform   only   a   single   round   of  IO  without  blocking.
35              tickit_tick() will check for IO, or timers that are ready,  han‐
36              dle  those,  and  return.  but will not block further waiting if
37              nothing is yet ready.
38
39       TICKIT_RUN_NOSETUP
40              Do not perform any terminal setup before waiting on  IO  events.
41              Usually  this is only necessary early in startup, if the program
42              is using the Tickit event  loop  for  its  own  purposes  before
43              starting a terminal interface.
44
45              Without  this  flag,  terminal  setup will be run once the first
46              time tickit_run or tickit_tick is called, and will remain  valid
47              until the toplevel instance is destroyed.
48

RETURN VALUE

50       Neither tickit_run(), tickit_stop() nor tickit_tick() return a value.
51

SEE ALSO

53       tickit_new_stdio(3), tickit(7)
54
55
56
57                                                                 TICKIT_RUN(3)
Impressum