Mercurial > molko
comparison libmlk-ui/mlk/ui/checkbox.h @ 433:862b15c3a3ae
ui: cleanup hierarchy
author | David Demelier <markand@malikania.fr> |
---|---|
date | Sat, 15 Oct 2022 21:19:25 +0200 |
parents | src/libmlk-ui/ui/checkbox.h@8f59201dc76b |
children | 773a082f0b91 |
comparison
equal
deleted
inserted
replaced
432:38cf60f5a1c4 | 433:862b15c3a3ae |
---|---|
1 /* | |
2 * checkbox.h -- GUI checkbox | |
3 * | |
4 * Copyright (c) 2020-2022 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 MLK_UI_CHECKBOX_H | |
20 #define MLK_UI_CHECKBOX_H | |
21 | |
22 #include <mlk/core/core.h> | |
23 | |
24 union event; | |
25 | |
26 struct theme; | |
27 | |
28 struct checkbox { | |
29 int x; | |
30 int y; | |
31 unsigned int w; | |
32 unsigned int h; | |
33 int checked; | |
34 const struct theme *theme; | |
35 }; | |
36 | |
37 CORE_BEGIN_DECLS | |
38 | |
39 void | |
40 checkbox_draw_default(const struct theme *, const struct checkbox *); | |
41 | |
42 int | |
43 checkbox_handle(struct checkbox *, const union event *); | |
44 | |
45 void | |
46 checkbox_draw(const struct checkbox *); | |
47 | |
48 CORE_END_DECLS | |
49 | |
50 #endif /* !MLK_UI_CHECKBOX_H */ |