gcc484perl-5.22
|
Last change
on this file since 9c8fcb1 was
c5c522c,
checked in by Edwin Eefting <edwin@datux.nl>, 9 years ago
|
|
initial commit, transferred from cleaned syn3 svn tree
|
-
Property mode set to
100644
|
|
File size:
1.2 KB
|
| Line | |
|---|
| 1 | #ifndef MODE_H |
|---|
| 2 | #define MODE_H |
|---|
| 3 | |
|---|
| 4 | /* |
|---|
| 5 | Don't use this yet! It's barely even started! |
|---|
| 6 | */ |
|---|
| 7 | |
|---|
| 8 | int stat_init(); |
|---|
| 9 | void stat_close(); |
|---|
| 10 | |
|---|
| 11 | typedef struct status |
|---|
| 12 | { |
|---|
| 13 | // should hold persistent data somehow... |
|---|
| 14 | // data_type data; |
|---|
| 15 | |
|---|
| 16 | // Takes position onscreen (x,y), and |
|---|
| 17 | // format (i=int, f=float, h=horz bar, v=vert bar, 2=24-hour, 1=12-hour, |
|---|
| 18 | // x=xload-style, etc...) |
|---|
| 19 | // Each stat will only draw valid formats... |
|---|
| 20 | // size is max size (graphs) or num digits, etc... (0 is "max" size) |
|---|
| 21 | // reread specifies to re-grab the value first. |
|---|
| 22 | void (*draw)(int x, int y, int size, char format, int reread); |
|---|
| 23 | void (*read)(int reread); |
|---|
| 24 | |
|---|
| 25 | // Should also maybe be able to return the data? |
|---|
| 26 | // return_type (*get)(); |
|---|
| 27 | |
|---|
| 28 | }; |
|---|
| 29 | |
|---|
| 30 | |
|---|
| 31 | extern status cpu; |
|---|
| 32 | extern status cpu_nice; |
|---|
| 33 | extern status cpu_idle; |
|---|
| 34 | extern status cpu_sys; |
|---|
| 35 | extern status cpu_usr; |
|---|
| 36 | |
|---|
| 37 | extern status mem_free; |
|---|
| 38 | extern status mem_total; |
|---|
| 39 | extern status swap_free; |
|---|
| 40 | extern status swap_total; |
|---|
| 41 | |
|---|
| 42 | extern status load; |
|---|
| 43 | |
|---|
| 44 | extern status date; |
|---|
| 45 | extern status uptime; |
|---|
| 46 | |
|---|
| 47 | extern status os_ver; |
|---|
| 48 | |
|---|
| 49 | extern status disk_activity; |
|---|
| 50 | extern status disk_free; |
|---|
| 51 | extern status disk_total; |
|---|
| 52 | |
|---|
| 53 | extern status net_sent; |
|---|
| 54 | extern status net_recv; |
|---|
| 55 | extern status net_rate; |
|---|
| 56 | |
|---|
| 57 | |
|---|
| 58 | #endif |
|---|
Note: See
TracBrowser
for help on using the repository browser.