8 /* The general state of the application */
15 /* Having received some kind of input, change state accordingly */
16 static int state_transition(struct ui_event
*e
)
27 ret
= ui_confirm_deny("Quit?");
28 state
= ST_ASKING_QUIT
;
31 state
= ST_SHOULD_QUIT
;
45 state
= ST_SHOULD_QUIT
;
59 state
= ST_SHOULD_QUIT
;
66 int main(int argc
, char **argv
)
69 uint_fast8_t more_evs
= 0;
70 struct ui_event e
= { 0 };
74 setlocale(LC_ALL
, "");
76 if ((ret
= ui_init())) {
80 if ((ret
= ui_start_frame())) {
84 while (state
!= ST_SHOULD_QUIT
) {
85 /* includes framelimiting delay */
86 if ((ret
= ui_finish_frame())) {
93 if ((ret
= ui_get_event(&e
, &more_evs
))) {
102 if ((ret
= ui_start_frame())) {