summaryrefslogtreecommitdiffstats
path: root/lib/widget/gauge.h
blob: e1f5d2c5498169150becf720719ae964ba0fbfc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/** \file gauge.h
 *  \brief Header: WGauge widget
 */

#ifndef MC__WIDGET_GAUGE_H
#define MC__WIDGET_GAUGE_H

/*** typedefs(not structures) and defined constants **********************************************/

#define GAUGE(x) ((WGauge *)(x))

/*** enums ***************************************************************************************/

/*** structures declarations (and typedefs of structures)*****************************************/

typedef struct WGauge
{
    Widget widget;
    gboolean shown;
    int max;
    int current;
    gboolean from_left_to_right;
} WGauge;

/*** global variables defined in .c file *********************************************************/

/*** declarations of public functions ************************************************************/

WGauge *gauge_new (int y, int x, int cols, gboolean shown, int max, int current);
void gauge_set_value (WGauge * g, int max, int current);
void gauge_show (WGauge * g, gboolean shown);

/*** inline functions ****************************************************************************/

#endif /* MC__WIDGET_GAUGE_H */