GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
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
36
52 gp_widget_stock_type off_stock,
53 gp_widget_size min_size, bool set);
54
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 */
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.
A stock image widget.
gp_widget_stock_type
Stock image type.
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.
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.
Event structure passed to widget event handler.
A compound size.
A widget base.
Definition gp_widget.h:28