GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
include
widgets
gp_widget_class_bool.h
Go to the documentation of this file.
1
//SPDX-License-Identifier: LGPL-2.0-or-later
2
3
/*
4
5
Copyright (c) 2014-2024 Cyril Hrubis <metan@ucw.cz>
6
7
*/
8
16
#ifndef GP_WIDGET_CLASS_BOOL_H
17
#define GP_WIDGET_CLASS_BOOL_H
18
19
struct
gp_widget_bool {
20
const
char
*label;
21
int
val;
22
int
type;
23
char
payload[];
24
};
25
32
int
gp_widget_bool_get
(
gp_widget
*self);
33
40
void
gp_widget_bool_set
(
gp_widget
*self,
int
val);
41
47
static
inline
void
gp_widget_bool_toggle
(
gp_widget
*self)
48
{
49
gp_widget_bool_set
(self, !
gp_widget_bool_get
(self));
50
}
51
52
#endif
/* GP_WIDGET_CLASS_BOOL_H */
gp_widget_bool_get
int gp_widget_bool_get(gp_widget *self)
Returns a class bool widget value.
gp_widget_bool_set
void gp_widget_bool_set(gp_widget *self, int val)
Sets a class bool widget value.
gp_widget_bool_toggle
static void gp_widget_bool_toggle(gp_widget *self)
Toggles a class bool widget value.
Definition
gp_widget_class_bool.h:47
gp_widget
A widget base.
Definition
gp_widget.h:28
Generated by
1.9.8