mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
2176e5f283
Initial step: get rid of hardcoded width of progress bar. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
37 lines
1.1 KiB
C
37 lines
1.1 KiB
C
|
|
/** \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 */
|