GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
gp_widget_radiobutton.h
1//SPDX-License-Identifier: LGPL-2.0-or-later
2
3/*
4
5 Copyright (c) 2014-2021 Cyril Hrubis <metan@ucw.cz>
6
7 */
8
9#ifndef GP_WIDGET_RADIOBUTTON_H
10#define GP_WIDGET_RADIOBUTTON_H
11
12#include <widgets/gp_widget_choice.h>
13
25static inline gp_widget *gp_widget_radiobutton_new(const char *choices[],
26 size_t cnt, size_t sel)
27{
28 return gp_widget_choice_new(GP_WIDGET_RADIOBUTTON, choices, cnt, sel);
29}
30
39static inline gp_widget *
40gp_widget_radiobutton_ops_new(const struct gp_widget_choice_ops *ops)
41{
42 return gp_widget_choice_ops_new(GP_WIDGET_RADIOBUTTON, ops);
43}
44
60static inline gp_widget *
61gp_widget_radiobutton_arr_new(const void *array,
62 size_t memb_cnt, uint16_t memb_size,
63 uint16_t memb_off, size_t sel, int flags)
64{
65 return gp_widget_choice_arr_new(GP_WIDGET_RADIOBUTTON, array,
66 memb_cnt, memb_size, memb_off,
67 sel, flags);
68}
69
70#endif /* GP_WIDGET_RADIOBUTTON_H */