GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
include
widgets
gp_widget_checkbox.h
Go to the documentation of this file.
1
//SPDX-License-Identifier: LGPL-2.0-or-later
2
3
/*
4
5
Copyright (c) 2014-2023 Cyril Hrubis <metan@ucw.cz>
6
7
*/
8
16
#ifndef GP_WIDGET_CHECKBOX_H
17
#define GP_WIDGET_CHECKBOX_H
18
19
#include <
widgets/gp_widget_bool.h
>
20
29
gp_widget *
gp_widget_checkbox_new
(
const
char
*label,
int
val);
30
41
static
inline
gp_widget *
gp_widget_checkbox_new2
(
const
char
*label,
int
val,
42
int
(*on_event)(
gp_widget_event
*ev),
43
void
*priv)
44
{
45
gp_widget *ret =
gp_widget_checkbox_new
(label, val);
46
47
gp_widget_on_event_set(ret, on_event, priv);
48
49
return
ret;
50
}
51
58
void
gp_widget_checkbox_set
(gp_widget *self,
int
val);
59
65
void
gp_widget_checkbox_toggle
(gp_widget *self);
66
67
76
int
gp_widget_checkbox_get
(gp_widget *self);
77
78
#endif
/* GP_WIDGET_CHECKBOX_H */
gp_widget_bool.h
A bollean widget class.
gp_widget_checkbox_set
void gp_widget_checkbox_set(gp_widget *self, int val)
Sets a checkbox value.
gp_widget_checkbox_get
int gp_widget_checkbox_get(gp_widget *self)
Returns a checkbox value.
gp_widget_checkbox_toggle
void gp_widget_checkbox_toggle(gp_widget *self)
Toggles a checkbox value.
gp_widget_checkbox_new2
static gp_widget * gp_widget_checkbox_new2(const char *label, int val, int(*on_event)(gp_widget_event *ev), void *priv)
Allocate and initialize new checkbox widget.
Definition
gp_widget_checkbox.h:41
gp_widget_checkbox_new
gp_widget * gp_widget_checkbox_new(const char *label, int val)
Allocate and initialize new checkbox widget.
gp_widget_event
Event structure passed to widget event handler.
Definition
gp_widget_event.h:86
Generated by
1.9.8