aboutsummaryrefslogtreecommitdiffstats
path: root/gadgets/dbar.h
diff options
context:
space:
mode:
authorgotmor <gotmor@f2baff5b-bf2c-0410-a398-912abdc3d8b2>2008-01-04 21:57:27 +0000
committergotmor <gotmor@f2baff5b-bf2c-0410-a398-912abdc3d8b2>2008-01-04 21:57:27 +0000
commited61be747386029fcf009002c5bf02126aebd835 (patch)
tree39c931a580f8b6521e96421fc33537cbe3a49e87 /gadgets/dbar.h
parentfacf378ae7400168a95bdfec8126cd251d25a02e (diff)
downloaddzen-ed61be747386029fcf009002c5bf02126aebd835.tar.gz
dzen-ed61be747386029fcf009002c5bf02126aebd835.zip
made dbar functions reusable
gdbar, gcpubar make use of the api git-svn-id: http://dzen.googlecode.com/svn/trunk@190 f2baff5b-bf2c-0410-a398-912abdc3d8b2
Diffstat (limited to 'gadgets/dbar.h')
-rw-r--r--gadgets/dbar.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/gadgets/dbar.h b/gadgets/dbar.h
new file mode 100644
index 0000000..90e02e1
--- /dev/null
+++ b/gadgets/dbar.h
@@ -0,0 +1,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 };
+
+void fdbar(Dbar *dbar, FILE *stream);
+void dbardefaults(Dbar *dbar, int mode);
+
+#endif /* __DBAR_H */