File: wmhdplop.h

package info (click to toggle)
wmhdplop 0.9.11-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 704 kB
  • sloc: sh: 4,147; ansic: 2,469; makefile: 25
file content (70 lines) | stat: -rw-r--r-- 1,520 bytes parent folder | download
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#ifndef WMHDPLOP_H
#define WMHDPLOP_H
#ifdef GKRELLM
#include <gkrellm2/gkrellm.h>
#endif
#include "config.h"
#include "dockapp_imlib2.h"
#include "procstat.h"
#include "devnames.h"


typedef struct {
  int nrow, ncol;
  int w;
  unsigned char **pre_cnt;
  char **intensity; /* > 0 for swap in, < 0 for swap out */
} SwapMatrix;

typedef struct IO_op_lst {
  enum { OP_READ, OP_WRITE } op;
  int n; /* "magnitude" of operation (log2 of kb/s) */
  int i,j; /* location of the IOMatrix */
  struct IO_op_lst *next;
} IO_op_lst;

#define CMAPSZ 256
typedef struct colormap {
  DATA32 p[CMAPSZ];
} cmap;

typedef struct {
  int w,h;
  int * __restrict * __restrict v; /* dim w+2, h+4 */
  cmap cm;
  IO_op_lst *ops;
} IOMatrix;

typedef struct {
  DockImlib2 *dock;
  Imlib_Font bigfont,smallfont;

  char *current_bigfont_name, *current_smallfont_name;
  unsigned update_display_delay_ms;
  unsigned update_stats_mult;

  unsigned char swap_matrix_luminosity, swap_matrix_lighting;

  SwapMatrix sm;
  IOMatrix iom;

  int nb_hd, nb_dev;
  enum {HD_ACTIVE, HD_STANDBY, HD_SLEEP, HD_UNKNOWN} *disk_power_mode;
  int *disk_temperature;

  int filter_hd, filter_part;
  int displayed_hd_changed;
  int reshape_cnt;
} App;

void reshape(int w, int h);
#ifdef GKRELLM
int hdplop_main(int w, int h, GdkDrawable *gkdrawable);
void gkrellm_hdplop_update(int update_options);
#endif
void change_displayed_hd(int dir);
void next_displayed_hd();
void prev_displayed_hd();
void init_fonts(App*);
DECL_GLOB_INIT(App *app, NULL);
#endif