2010-11-12 11:03:57 +03:00
|
|
|
|
|
|
|
/** \file gauge.h
|
|
|
|
* \brief Header: WGauge widget
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MC__WIDGET_GAUGE_H
|
|
|
|
#define MC__WIDGET_GAUGE_H
|
|
|
|
|
|
|
|
/*** typedefs(not structures) and defined constants **********************************************/
|
|
|
|
|
2012-10-11 12:25:07 +04:00
|
|
|
#define GAUGE(x) ((WGauge *)(x))
|
|
|
|
|
2010-11-12 11:03:57 +03:00
|
|
|
/*** 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 ************************************************************/
|
|
|
|
|
2012-12-24 13:36:29 +04:00
|
|
|
WGauge *gauge_new (int y, int x, int cols, gboolean shown, int max, int current);
|
2010-11-12 11:03:57 +03:00
|
|
|
void gauge_set_value (WGauge * g, int max, int current);
|
|
|
|
void gauge_show (WGauge * g, gboolean shown);
|
|
|
|
|
|
|
|
/*** inline functions ****************************************************************************/
|
|
|
|
|
|
|
|
#endif /* MC__WIDGET_GAUGE_H */
|