1
2 /** \file gauge.h
3 * \brief Header: WGauge widget
4 */
5
6 #ifndef MC__WIDGET_GAUGE_H
7 #define MC__WIDGET_GAUGE_H
8
9 /*** typedefs(not structures) and defined constants **********************************************/
10
11 #define GAUGE(x) ((WGauge *) (x))
12
13 /*** enums ***************************************************************************************/
14
15 /*** structures declarations (and typedefs of structures)*****************************************/
16
17 typedef struct WGauge
18 {
19 Widget widget;
20 gboolean shown;
21 int max;
22 int current;
23 gboolean from_left_to_right;
24 gboolean terminal_progress; // report the progress to the terminal as well (OSC 9;4)
25 int terminal_percentage; // last percentage reported to the terminal, -1 if none
26 } WGauge;
27
28 /*** global variables defined in .c file *********************************************************/
29
30 /*** declarations of public functions ************************************************************/
31
32 WGauge *gauge_new (int y, int x, int cols, gboolean shown, int max, int current,
33 gboolean from_left_to_right, gboolean terminal_progress);
34 void gauge_set_value (WGauge *g, int max, int current);
35 void gauge_show (WGauge *g, gboolean shown);
36
37 /*** inline functions ****************************************************************************/
38
39 #endif