comparison libmlk-example/mlk/example/trace-hud.h @ 459:541cb950997b

examples: add libmlk-example library
author David Demelier <markand@malikania.fr>
date Sun, 26 Feb 2023 19:44:47 +0100
parents examples/example/trace_hud.h@773a082f0b91
children 2af25db99273
comparison
equal deleted inserted replaced
458:02c1481b7dbb 459:541cb950997b
1 /*
2 * trace_hud.h -- on screen hud
3 *
4 * Copyright (c) 2020-2023 David Demelier <markand@malikania.fr>
5 *
6 * Permission to use, copy, modify, and/or distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
9 *
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 */
18
19 #ifndef EXAMPLES_TRACE_TRACE_HUD_H
20 #define EXAMPLES_TRACE_TRACE_HUD_H
21
22 #define TRACE_HUD_TIMEOUT_DEFAULT (3000)
23
24 struct action;
25 struct theme;
26
27 struct trace_hud {
28 struct theme *theme;
29 unsigned int timeout;
30 };
31
32 extern struct trace_hud trace_hud;
33
34 void
35 trace_hud_handler(const char *);
36
37 void
38 trace_hud_update(unsigned int);
39
40 void
41 trace_hud_draw(void);
42
43 void
44 trace_hud_clear(void);
45
46 struct mlk_action *
47 trace_hud_action(void);
48
49 #endif /* !EXAMPLES_TRACE_TRACE_HUD_H */