GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
include
widgets
gp_widget_stock_switch.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
31
#ifndef GP_WIDGET_STOCK_SWITCH_H
32
#define GP_WIDGET_STOCK_SWITCH_H
33
34
#include <
widgets/gp_widget_class_bool.h
>
35
#include <
widgets/gp_widget_stock.h
>
36
51
gp_widget
*
gp_widget_stock_switch_new
(
gp_widget_stock_type
on_stock,
52
gp_widget_stock_type
off_stock,
53
gp_widget_size
min_size,
bool
set);
54
68
static
inline
gp_widget
*
gp_widget_stock_switch_new_ev
(
gp_widget_stock_type
on_stock,
69
gp_widget_stock_type
off_stock,
70
gp_widget_size
min_size,
71
bool
set,
72
int
(*on_event)(
gp_widget_event
*ev),
73
void
*priv)
74
{
75
gp_widget
*ret =
gp_widget_stock_switch_new
(on_stock, off_stock, min_size, set);
76
77
gp_widget_on_event_set
(ret, on_event, priv);
78
79
return
ret;
80
}
81
82
#endif
/* GP_WIDGET_STOCK_SWITCH_H */
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_stock.h
A stock image widget.
gp_widget_stock_type
gp_widget_stock_type
Stock image type.
Definition
gp_widget_stock.h:34
gp_widget_stock_switch_new
gp_widget * gp_widget_stock_switch_new(gp_widget_stock_type on_stock, gp_widget_stock_type off_stock, gp_widget_size min_size, bool set)
Allocate and initialize new stock switch widget.
gp_widget_stock_switch_new_ev
static gp_widget * gp_widget_stock_switch_new_ev(gp_widget_stock_type on_stock, gp_widget_stock_type off_stock, gp_widget_size min_size, bool set, int(*on_event)(gp_widget_event *ev), void *priv)
Allocate and initialize new stock switch widget.
Definition
gp_widget_stock_switch.h:68
gp_widget_event
Event structure passed to widget event handler.
Definition
gp_widget_event.h:137
gp_widget_size
A compound size.
Definition
gp_widget_size_units.h:31
gp_widget
A widget base.
Definition
gp_widget.h:28
Generated by
1.9.8