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-2024 Cyril Hrubis <metan@ucw.cz>
6
7
*/
8
24
#ifndef GP_WIDGET_CHECKBOX_H
25
#define GP_WIDGET_CHECKBOX_H
26
27
#include <
widgets/gp_widget_class_bool.h
>
28
37
gp_widget
*
gp_widget_checkbox_new
(
const
char
*label,
int
val);
38
49
static
inline
gp_widget
*
gp_widget_checkbox_new2
(
const
char
*label,
int
val,
50
int
(*on_event)(
gp_widget_event
*ev),
51
void
*priv)
52
{
53
gp_widget
*ret =
gp_widget_checkbox_new
(label, val);
54
55
gp_widget_on_event_set
(ret, on_event, priv);
56
57
return
ret;
58
}
59
66
void
gp_widget_checkbox_set
(
gp_widget
*self,
int
val);
67
73
void
gp_widget_checkbox_toggle
(
gp_widget
*self);
74
83
int
gp_widget_checkbox_get
(
gp_widget
*self);
84
85
#endif
/* GP_WIDGET_CHECKBOX_H */
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:49
gp_widget_checkbox_new
gp_widget * gp_widget_checkbox_new(const char *label, int val)
Allocate and initialize new checkbox widget.
gp_widget_class_bool.h
A bollean widget class.
gp_widget_on_event_set
void gp_widget_on_event_set(gp_widget *self, int(*on_event)(gp_widget_event *), void *priv)
Sets a widget event handler.
gp_widget_event
Event structure passed to widget event handler.
Definition
gp_widget_event.h:137
gp_widget
A widget base.
Definition
gp_widget.h:28
Generated by
1.9.8