wmshutdown: Destroy dialog window before shutting down. This is especially useful...
[dockapps.git] / wmhdplop / global.h
blobe7e94eb06f97e8fbab589baf8017a6699f258ea1
1 #ifndef GLOBAL_H
2 #define GLOBAL_H
4 //#include "config.h"
6 #ifdef __GNUC__
7 # define UNUSED __attribute((unused))
8 #else
9 # define UNUSED
10 #endif
12 #ifdef GLOBALS_HERE
13 # define DECL_GLOB(x) x;
14 # define DECL_GLOB_INIT(x,y) x = y
15 #else
16 # define DECL_GLOB(x) extern x
17 # define DECL_GLOB_INIT(x,y) extern x
18 #endif
21 #ifndef NO_BLAHBLAH
22 # define BLAHBLAH(n,x) if (Prefs.verbosity >= n) { x; fflush(stdout); }
23 #else
24 # define BLAHBLAH(n,x)
25 #endif
27 #ifndef NO_BITFIELDS
28 # define BITFIELD(n) :n
29 #else
30 # define BITFIELD(n)
31 #endif
33 #include "dockapp_imlib2.h"
35 typedef enum { AL_NONE=0, AL_LEFT=1, AL_HCENTER=2, AL_RIGHT=4, AL_TOP=8, AL_VCENTER=16,AL_BOTTOM=32} align_enum;
37 typedef struct {
38 int verbosity;
39 int enable_hddtemp; /* enable querying and display of hd temp */
40 unsigned hddtemp_port;
41 int enable_power_status; /* enable querying of power status */
42 int disable_swap_matrix; /* disable the animation reflecting swap activity */
43 int disable_io_matrix; /* disable background animation reflecting disk activity */
44 int disable_hd_leds; /* hide the small led indicating disk activity (if !disable_hd_leds) */
45 int disable_hd_list; /* hide the list of monitored drives */
46 char *bigfontname, *smallfontname; /* ttf font name + "/size" in pixels */
47 float popup_throughput_threshold;
48 unsigned iomatrix_colormap;
49 unsigned debug_swapio, debug_disk_wr, debug_disk_rd;
50 unsigned popup_throughput_pos, hdlist_pos;
51 int temperatures_unit; /* 'C' or 'F' */
52 DockImlib2Prefs xprefs;
53 } structPrefs;
55 DECL_GLOB(structPrefs Prefs);
57 #define ASSIGN_STRING(a,v) { if (a) { free(a); a = NULL; } a = strdup(v); assert(a); }
59 #endif