GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
gp_widget_int.h
1//SPDX-License-Identifier: LGPL-2.0-or-later
2
3/*
4
5 Copyright (c) 2014-2023 Cyril Hrubis <metan@ucw.cz>
6
7 */
8
9#ifndef GP_WIDGET_INT_H
10#define GP_WIDGET_INT_H
11
12enum gp_widget_int_flags {
13 GP_WIDGET_HORIZ = 0,
14 GP_WIDGET_VERT = 1
15};
16
17struct gp_widget_int {
18 int64_t min;
19 int64_t max;
20 int64_t val;
21
22 int alert:1;
23 int dir:2;
24
25 char payload[];
26};
27
28int64_t gp_widget_int_val_get(gp_widget *self);
29
30void gp_widget_int_set(gp_widget *self, int64_t min, int64_t max, int64_t val);
31
32void gp_widget_int_val_set(gp_widget *self, int64_t val);
33
34void gp_widget_int_max_set(gp_widget *self, int64_t max);
35
36void gp_widget_int_min_set(gp_widget *self, int64_t min);
37
38void gp_widget_int_set_range(gp_widget *self, int64_t min, int64_t max);
39
40#endif /* GP_WIDGET_INT_H */