aboutsummaryrefslogtreecommitdiffstats
path: root/gadgets/dbar.h
blob: 1c55909ec86044bf43d10079b98882a9d5c0b2c8 (plain) (blame)
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
37
38
39
#ifndef __DBAR_H
#define __DBAR_H

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>

#define MAX_GRAPH_VALS 1024

typedef struct {
  const char *bg;
  const char *fg; 
  const char *label;
  char sym;
  double val;
  double minval;
  double maxval;
  int mode;
  int style;
  int width;
  int height;
  int segw;
  int segh;
  int segb;
  int gs;
  int gw;
  int gc;
  char gb[MAX_GRAPH_VALS];
  int pnl;
} Dbar; 

enum mode  { textual, graphical };
enum style { norm, outlined, vertical, graph, pie };

void fdbar(Dbar *dbar, FILE *stream);
void dbardefaults(Dbar *dbar, int mode);

#endif /* __DBAR_H */