Mercurial > molko
annotate libmlk-ui/mlk/ui/checkbox.h @ 646:7e1eb7f6c049 default tip @
misc: remove .clang
author | David Demelier <markand@malikania.fr> |
---|---|
date | Sun, 04 Feb 2024 15:24:37 +0100 |
parents | b8fd5c112538 |
children |
rev | line source |
---|---|
115
3bd0d3a39e30
core: implement checkbox, closes #2486
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
1 /* |
3bd0d3a39e30
core: implement checkbox, closes #2486
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
2 * checkbox.h -- GUI checkbox |
3bd0d3a39e30
core: implement checkbox, closes #2486
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
3 * |
445
773a082f0b91
misc: update copyright years
David Demelier <markand@malikania.fr>
parents:
433
diff
changeset
|
4 * Copyright (c) 2020-2023 David Demelier <markand@malikania.fr> |
115
3bd0d3a39e30
core: implement checkbox, closes #2486
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
5 * |
3bd0d3a39e30
core: implement checkbox, closes #2486
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
6 * Permission to use, copy, modify, and/or distribute this software for any |
3bd0d3a39e30
core: implement checkbox, closes #2486
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
7 * purpose with or without fee is hereby granted, provided that the above |
3bd0d3a39e30
core: implement checkbox, closes #2486
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
8 * copyright notice and this permission notice appear in all copies. |
3bd0d3a39e30
core: implement checkbox, closes #2486
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
9 * |
3bd0d3a39e30
core: implement checkbox, closes #2486
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
3bd0d3a39e30
core: implement checkbox, closes #2486
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
3bd0d3a39e30
core: implement checkbox, closes #2486
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
3bd0d3a39e30
core: implement checkbox, closes #2486
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
3bd0d3a39e30
core: implement checkbox, closes #2486
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
3bd0d3a39e30
core: implement checkbox, closes #2486
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
3bd0d3a39e30
core: implement checkbox, closes #2486
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
3bd0d3a39e30
core: implement checkbox, closes #2486
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
17 */ |
3bd0d3a39e30
core: implement checkbox, closes #2486
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
18 |
366
19782ea1cf4a
misc: start rebranding
David Demelier <markand@malikania.fr>
parents:
320
diff
changeset
|
19 #ifndef MLK_UI_CHECKBOX_H |
19782ea1cf4a
misc: start rebranding
David Demelier <markand@malikania.fr>
parents:
320
diff
changeset
|
20 #define MLK_UI_CHECKBOX_H |
115
3bd0d3a39e30
core: implement checkbox, closes #2486
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
21 |
606
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
22 /** |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
23 * \file mlk/ui/checkbox.h |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
24 * \brief GUI checkbox. |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
25 */ |
115
3bd0d3a39e30
core: implement checkbox, closes #2486
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
26 |
503
a55d0a29f466
ui: rework checkbox style
David Demelier <markand@malikania.fr>
parents:
495
diff
changeset
|
27 struct mlk_checkbox; |
619
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
28 struct mlk_checkbox_style; |
503
a55d0a29f466
ui: rework checkbox style
David Demelier <markand@malikania.fr>
parents:
495
diff
changeset
|
29 |
606
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
30 union mlk_event; |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
31 |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
32 /** |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
33 * \struct mlk_checkbox |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
34 * \brief UI clickable checkbox. |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
35 */ |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
36 struct mlk_checkbox { |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
37 /** |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
38 * (read-write) |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
39 * |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
40 * Position in x. |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
41 */ |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
42 int x; |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
43 |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
44 /** |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
45 * (read-write) |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
46 * |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
47 * Position in y. |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
48 */ |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
49 int y; |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
50 |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
51 /** |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
52 * (read-write) |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
53 * |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
54 * Checkbox width. |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
55 */ |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
56 unsigned int w; |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
57 |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
58 /** |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
59 * (read-write) |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
60 * |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
61 * Checkbox height. |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
62 */ |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
63 unsigned int h; |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
64 |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
65 /** |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
66 * (read-write) |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
67 * |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
68 * Checkbox status, non-zero if activated. |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
69 */ |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
70 int checked; |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
71 |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
72 /** |
619
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
73 * (read-write, borrowed, optional) |
606
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
74 * |
619
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
75 * Style to use for drawing this checkbox. |
606
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
76 */ |
619
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
77 struct mlk_checkbox_style *style; |
507
d49a05e7a5b5
ui: separate delegate/style
David Demelier <markand@malikania.fr>
parents:
503
diff
changeset
|
78 }; |
d49a05e7a5b5
ui: separate delegate/style
David Demelier <markand@malikania.fr>
parents:
503
diff
changeset
|
79 |
606
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
80 /** |
619
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
81 * \struct mlk_checkbox_style |
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
82 * \brief Checkbox style. |
606
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
83 */ |
619
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
84 struct mlk_checkbox_style { |
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
85 /** |
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
86 * (read-write) |
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
87 * |
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
88 * Background color. |
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
89 */ |
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
90 unsigned long background; |
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
91 |
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
92 /** |
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
93 * (read-write) |
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
94 * |
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
95 * Border color. |
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
96 */ |
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
97 unsigned long border; |
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
98 |
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
99 /** |
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
100 * (read-write) |
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
101 * |
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
102 * Border size. |
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
103 */ |
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
104 unsigned int border_size; |
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
105 |
606
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
106 /* |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
107 * (read-write, borrowed, optional) |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
108 * |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
109 * Arbitrary user data. |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
110 */ |
507
d49a05e7a5b5
ui: separate delegate/style
David Demelier <markand@malikania.fr>
parents:
503
diff
changeset
|
111 void *data; |
606
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
112 |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
113 /** |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
114 * (read-write, optional) |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
115 * |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
116 * Update the checkbox. |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
117 * |
619
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
118 * \param self this style |
606
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
119 * \param cb the checkbox to update |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
120 * \param ticks number of ticks since last frame |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
121 */ |
619
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
122 void (*update)(struct mlk_checkbox_style *self, |
606
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
123 struct mlk_checkbox *cb, |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
124 unsigned int ticks); |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
125 |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
126 /** |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
127 * (read-write, optional) |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
128 * |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
129 * Draw this checkbox. |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
130 * |
619
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
131 * \param self this style |
606
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
132 * \param cb the checkbox to update |
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
133 */ |
619
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
134 void (*draw)(struct mlk_checkbox_style *self, |
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
135 struct mlk_checkbox *cb); |
503
a55d0a29f466
ui: rework checkbox style
David Demelier <markand@malikania.fr>
parents:
495
diff
changeset
|
136 }; |
152
1008a796a9e7
ui: make UI widgets usable as actions
David Demelier <markand@malikania.fr>
parents:
151
diff
changeset
|
137 |
606
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
138 /** |
619
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
139 * \brief Dark default style for check. |
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
140 */ |
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
141 extern struct mlk_checkbox_style mlk_checkbox_style_dark; |
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
142 |
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
143 /** |
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
144 * \brief Light default style for checkbox. |
606
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
145 */ |
619
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
146 extern struct mlk_checkbox_style mlk_checkbox_style_light; |
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
147 |
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
148 /** |
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
149 * \brief Default style for all checkboxes. |
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
150 */ |
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
151 extern struct mlk_checkbox_style *mlk_checkbox_style; |
503
a55d0a29f466
ui: rework checkbox style
David Demelier <markand@malikania.fr>
parents:
495
diff
changeset
|
152 |
517
6e8f6640e05b
misc: use extern C manually
David Demelier <markand@malikania.fr>
parents:
507
diff
changeset
|
153 #if defined(__cplusplus) |
6e8f6640e05b
misc: use extern C manually
David Demelier <markand@malikania.fr>
parents:
507
diff
changeset
|
154 extern "C" { |
6e8f6640e05b
misc: use extern C manually
David Demelier <markand@malikania.fr>
parents:
507
diff
changeset
|
155 #endif |
292
08ab73b32832
misc: add extern "C" {} blocks for C++ friends
David Demelier <markand@malikania.fr>
parents:
243
diff
changeset
|
156 |
606
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
157 /** |
619
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
158 * Invoke ::mlk_checkbox_style::update. |
606
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
159 */ |
405
0e39368e106c
ui: return int in checkbox_handle
David Demelier <markand@malikania.fr>
parents:
378
diff
changeset
|
160 int |
606
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
161 mlk_checkbox_handle(struct mlk_checkbox *cb, const union mlk_event *ev); |
115
3bd0d3a39e30
core: implement checkbox, closes #2486
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
162 |
606
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
163 /** |
619
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
164 * Invoke ::mlk_checkbox_style::update. |
606
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
165 */ |
115
3bd0d3a39e30
core: implement checkbox, closes #2486
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
166 void |
507
d49a05e7a5b5
ui: separate delegate/style
David Demelier <markand@malikania.fr>
parents:
503
diff
changeset
|
167 mlk_checkbox_update(struct mlk_checkbox *cb, unsigned int ticks); |
115
3bd0d3a39e30
core: implement checkbox, closes #2486
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
168 |
606
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
169 /** |
619
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
170 * Invoke ::mlk_checkbox_style::draw. |
606
35e58271d820
ui: do the same with checkbox
David Demelier <markand@malikania.fr>
parents:
517
diff
changeset
|
171 */ |
503
a55d0a29f466
ui: rework checkbox style
David Demelier <markand@malikania.fr>
parents:
495
diff
changeset
|
172 void |
619
b8fd5c112538
ui: simplify checkbox
David Demelier <markand@malikania.fr>
parents:
606
diff
changeset
|
173 mlk_checkbox_draw(struct mlk_checkbox *cb); |
503
a55d0a29f466
ui: rework checkbox style
David Demelier <markand@malikania.fr>
parents:
495
diff
changeset
|
174 |
517
6e8f6640e05b
misc: use extern C manually
David Demelier <markand@malikania.fr>
parents:
507
diff
changeset
|
175 #if defined(__cplusplus) |
6e8f6640e05b
misc: use extern C manually
David Demelier <markand@malikania.fr>
parents:
507
diff
changeset
|
176 } |
6e8f6640e05b
misc: use extern C manually
David Demelier <markand@malikania.fr>
parents:
507
diff
changeset
|
177 #endif |
292
08ab73b32832
misc: add extern "C" {} blocks for C++ friends
David Demelier <markand@malikania.fr>
parents:
243
diff
changeset
|
178 |
366
19782ea1cf4a
misc: start rebranding
David Demelier <markand@malikania.fr>
parents:
320
diff
changeset
|
179 #endif /* !MLK_UI_CHECKBOX_H */ |