source: mainline/uspace/lib/ui/private/rbutton.h@ d7f7a4a

Last change on this file since d7f7a4a was d7f7a4a, checked in by Jiří Zárevúcky <zarevucky.jiri@…>, 4 years ago

Replace some license headers with SPDX identifier

Headers are replaced using tools/transorm-copyright.sh only
when it can be matched verbatim with the license header used
throughout most of the codebase.

  • Property mode set to 100644
File size: 1.1 KB
Line 
1/*
2 * SPDX-FileCopyrightText: 2021 Jiri Svoboda
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7/** @addtogroup libui
8 * @{
9 */
10/**
11 * @file Radio button structure
12 *
13 */
14
15#ifndef _UI_PRIVATE_RBUTTON_H
16#define _UI_PRIVATE_RBUTTON_H
17
18#include <gfx/coord.h>
19#include <stdbool.h>
20
21/** Actual structure of radio button group.
22 *
23 * This is private to libui.
24 */
25struct ui_rbutton_group {
26 /** UI resource */
27 struct ui_resource *res;
28 /** Callbacks */
29 struct ui_rbutton_group_cb *cb;
30 /** Callback argument */
31 void *arg;
32 /** Selected button */
33 struct ui_rbutton *selected;
34};
35
36/** Actual structure of radio button.
37 *
38 * This is private to libui.
39 */
40struct ui_rbutton {
41 /** Base control object */
42 struct ui_control *control;
43 /** Containing radio button group */
44 struct ui_rbutton_group *group;
45 /** Callback argument */
46 void *arg;
47 /** Radio button rectangle */
48 gfx_rect_t rect;
49 /** Caption */
50 const char *caption;
51 /** Radio button is currently held down */
52 bool held;
53 /** Pointer is currently inside */
54 bool inside;
55};
56
57extern errno_t ui_rbutton_paint_gfx(ui_rbutton_t *);
58extern errno_t ui_rbutton_paint_text(ui_rbutton_t *);
59
60#endif
61
62/** @}
63 */
Note: See TracBrowser for help on using the repository browser.