2 * Copyright (c) 2016-2019, S. Gilles <sgilles@math.umd.edu>
4 * Permission to use, copy, modify, and/or distribute this software
5 * for any purpose with or without fee is hereby granted, provided
6 * that the above copyright notice and this permission notice appear
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
13 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
14 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
15 * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
16 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
34 /* What event this is */
37 /* Event-specific data */
48 /* Initialize whatever UI is present */
49 int ui_init(struct quiver
*q
);
51 /* Tear down whatever UI was made */
52 int ui_teardown(void);
54 /* Deal with the fact that the quiver was changed */
55 int ui_respond_quiver_change(void);
57 /* Acknowledge a successful load */
58 int ui_respond_successful_load(const char *filename
);
60 /* Acknowledge a successful save */
61 int ui_respond_successful_save(const char *filename
);
63 /* Record that a frame has been started */
64 int ui_start_frame(void);
66 /* Draw a frame, sleep to framelimit */
67 int ui_finish_frame(void);
69 /* Get some kind of ui-agnostic event (like `quit' or `mutate' */
70 int ui_get_event(struct ui_event
*e
, uint_fast8_t *more
);