GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
include
widgets
gp_widget_pbar.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
37
#ifndef GP_WIDGET_PBAR_H
38
#define GP_WIDGET_PBAR_H
39
40
#include <stdint.h>
41
43
enum
gp_widget_pbar_unit
{
49
GP_WIDGET_PBAR_NONE
,
57
GP_WIDGET_PBAR_PERCENTS
,
66
GP_WIDGET_PBAR_SECONDS
,
68
GP_WIDGET_PBAR_UNIT_MASK
= 0x7f,
75
GP_WIDGET_PBAR_INVERSE
= 0x80,
76
};
77
79
enum
gp_widget_pbar_event_type
{
86
GP_WIDGET_PBAR_VAL_CHANGED
,
87
};
88
98
gp_widget
*
gp_widget_pbar_new
(uint64_t val, uint64_t max,
99
enum
gp_widget_pbar_unit
unit);
100
107
void
gp_widget_pbar_val_set
(
gp_widget
*self, uint64_t val);
108
115
void
gp_widget_pbar_max_set
(
gp_widget
*self, uint64_t max);
116
124
uint64_t
gp_widget_pbar_val_get
(
gp_widget
*self);
125
133
uint64_t
gp_widget_pbar_max_get
(
gp_widget
*self);
134
135
#endif
/* GP_WIDGET_PBAR_H */
gp_widget_pbar_max_set
void gp_widget_pbar_max_set(gp_widget *self, uint64_t max)
Sets a progress bar maximum.
gp_widget_pbar_val_set
void gp_widget_pbar_val_set(gp_widget *self, uint64_t val)
Sets a progress bar value.
gp_widget_pbar_val_get
uint64_t gp_widget_pbar_val_get(gp_widget *self)
Returns progressbar value.
gp_widget_pbar_max_get
uint64_t gp_widget_pbar_max_get(gp_widget *self)
Returns progress bar max value.
gp_widget_pbar_unit
gp_widget_pbar_unit
A progress bar widget units.
Definition
gp_widget_pbar.h:43
GP_WIDGET_PBAR_SECONDS
@ GP_WIDGET_PBAR_SECONDS
Progress bar is in seconds.
Definition
gp_widget_pbar.h:66
GP_WIDGET_PBAR_INVERSE
@ GP_WIDGET_PBAR_INVERSE
Inverse the value shown on the screen.
Definition
gp_widget_pbar.h:75
GP_WIDGET_PBAR_UNIT_MASK
@ GP_WIDGET_PBAR_UNIT_MASK
Unit mask.
Definition
gp_widget_pbar.h:68
GP_WIDGET_PBAR_NONE
@ GP_WIDGET_PBAR_NONE
No unit.
Definition
gp_widget_pbar.h:49
GP_WIDGET_PBAR_PERCENTS
@ GP_WIDGET_PBAR_PERCENTS
Progress bar is in percents.
Definition
gp_widget_pbar.h:57
gp_widget_pbar_new
gp_widget * gp_widget_pbar_new(uint64_t val, uint64_t max, enum gp_widget_pbar_unit unit)
Allocate and initialize new progress bar widget.
gp_widget_pbar_event_type
gp_widget_pbar_event_type
A gp_widget_event::sub_type for a progress bar widget.
Definition
gp_widget_pbar.h:79
GP_WIDGET_PBAR_VAL_CHANGED
@ GP_WIDGET_PBAR_VAL_CHANGED
Emitted when progress bar value is changed.
Definition
gp_widget_pbar.h:86
gp_widget
A widget base.
Definition
gp_widget.h:28
Generated by
1.9.8