GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
gp_widget_spinbutton.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_SPINBUTTON_H
10#define GP_WIDGET_SPINBUTTON_H
11
12#include <widgets/gp_widget_choice.h>
13
25static inline gp_widget *gp_widget_spinbutton_new(const char *choices[],
26 size_t cnt, size_t sel)
27{
28 return gp_widget_choice_new(GP_WIDGET_SPINBUTTON, choices, cnt, sel);
29}
30
31
40static inline gp_widget *
41gp_widget_spinbutton_ops_new(const struct gp_widget_choice_ops *ops)
42{
43 return gp_widget_choice_ops_new(GP_WIDGET_SPINBUTTON, ops);
44}
45
61static inline gp_widget *
62gp_widget_spinbutton_arr_new(const void *array,
63 size_t memb_cnt, uint16_t memb_size,
64 uint16_t memb_off, size_t sel, int flags)
65{
66 return gp_widget_choice_arr_new(GP_WIDGET_SPINBUTTON, array,
67 memb_cnt, memb_size, memb_off,
68 sel, flags);
69}
70
71#endif /* GP_WIDGET_SPINBUTTON_H */