wmwork: Add version 0.2.5 to repository.
[dockapps.git] / wmhdplop / wmhdplop.h
blobb105684638c1b49d10c1d59ae8f88fed1c2baf2e
1 #ifndef WMHDPLOP_H
2 #define WMHDPLOP_H
3 #ifdef GKRELLM
4 #include <gkrellm2/gkrellm.h>
5 #endif
6 #include "config.h"
7 #include "dockapp_imlib2.h"
8 #include "procstat.h"
9 #include "devnames.h"
12 typedef struct {
13 int nrow, ncol;
14 int w;
15 unsigned char **pre_cnt;
16 char **intensity; /* > 0 for swap in, < 0 for swap out */
17 } SwapMatrix;
19 typedef struct IO_op_lst {
20 enum { OP_READ, OP_WRITE } op;
21 int n; /* "magnitude" of operation (log2 of kb/s) */
22 int i,j; /* location of the IOMatrix */
23 struct IO_op_lst *next;
24 } IO_op_lst;
26 #define CMAPSZ 256
27 typedef struct colormap {
28 DATA32 p[CMAPSZ];
29 } cmap;
31 typedef struct {
32 int w,h;
33 int * __restrict * __restrict v; /* dim w+2, h+4 */
34 cmap cm;
35 IO_op_lst *ops;
36 } IOMatrix;
38 typedef struct {
39 DockImlib2 *dock;
40 Imlib_Font bigfont,smallfont;
42 char *current_bigfont_name, *current_smallfont_name;
43 unsigned update_display_delay_ms;
44 unsigned update_stats_mult;
46 unsigned char swap_matrix_luminosity, swap_matrix_lighting;
48 SwapMatrix sm;
49 IOMatrix iom;
51 int nb_hd, nb_dev;
52 enum {HD_ACTIVE, HD_STANDBY, HD_SLEEP, HD_UNKNOWN} *disk_power_mode;
53 int *disk_temperature;
55 int filter_hd, filter_part;
56 int displayed_hd_changed;
57 int reshape_cnt;
58 } App;
60 void reshape(int w, int h);
61 #ifdef GKRELLM
62 int hdplop_main(int w, int h, GdkDrawable *gkdrawable);
63 void gkrellm_hdplop_update(int update_options);
64 #endif
65 void change_displayed_hd(int dir);
66 void next_displayed_hd();
67 void prev_displayed_hd();
68 void init_fonts(App*);
69 DECL_GLOB_INIT(App *app, NULL);
70 #endif