GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
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
27#ifndef GP_WIDGET_CHECKBOX_H
28#define GP_WIDGET_CHECKBOX_H
29
31
40gp_widget *gp_widget_checkbox_new(const char *label, bool set);
41
52static inline gp_widget *gp_widget_checkbox_new2(const char *label, bool set,
53 int (*on_event)(gp_widget_event *ev),
54 void *priv)
55{
56 gp_widget *ret = gp_widget_checkbox_new(label, set);
57
58 gp_widget_on_event_set(ret, on_event, priv);
59
60 return ret;
61}
62
70
71#endif /* GP_WIDGET_CHECKBOX_H */
gp_widget * gp_widget_checkbox_new(const char *label, bool set)
Allocate and initialize new checkbox widget.
const char * gp_widget_checkbox_label_get(gp_widget *self)
Gets checkbox label.
static gp_widget * gp_widget_checkbox_new2(const char *label, bool set, int(*on_event)(gp_widget_event *ev), void *priv)
Allocate and initialize new checkbox widget.
A bollean widget class.
void gp_widget_on_event_set(gp_widget *self, int(*on_event)(gp_widget_event *), void *priv)
Sets a widget event handler.
Event structure passed to widget event handler.
A widget base.
Definition gp_widget.h:28