Make AddMouseRegion's index unsigned
[dockapps.git] / wmbattery / wmbattery.h
blobc41f6fc73e3da42855b91970040e77bc3bc58f26
1 #include "apm.h"
3 typedef struct {
4 Pixmap pixmap;
5 Pixmap mask;
6 XpmAttributes attributes;
7 } XpmIcon;
9 typedef struct image_info_type {
10 const char *filename;
11 const int width;
12 const int height;
13 const int x;
14 const int y;
15 const int charwidth;
16 } image_info_type;
18 /* Assign reference numbers to all images that are loaded. */
19 #define SMALLFONT 0
20 #define BIGFONT 1
21 #define BATTERY_HIGH 2
22 #define BATTERY_LOW 3
23 #define BATTERY_CRITICAL 4
24 #define BATTERY_NONE 5
25 #define BATTERY_BLINK 6
26 #define UNPLUGGED 7
27 #define PLUGGED 8
28 #define NOCHARGING 9
29 #define CHARGING 10
30 #define DIAL_BRIGHT 11
31 #define DIAL_DIM 12
32 #define FACE 13
34 #define NUM_IMAGES 14
37 * An array of the filenames of all images to load (minus .xpm extension),
38 * plus the size of the image, where to draw it on the icon, etc
40 static struct image_info_type image_info[] = {
41 {"smallfont", 7, 67, 0, 45, 6},
42 {"bigfont", 9, 73, 0, 23, 7},
43 {"battery_high", 25, 13, 33, 42, 0},
44 {"battery_medium", 25, 13, 33, 42, 0},
45 {"battery_low", 25, 13, 33, 42, 0},
46 {"battery_none", 25, 13, 33, 42, 0},
47 {"battery_blink", 25, 13, 33, 42, 0},
48 {"unplugged", 10, 8, 6, 45, 0},
49 {"plugged", 10, 8, 6, 45, 0},
50 {"nocharging", 15, 9, 17, 43, 0},
51 {"charging", 15, 9, 17, 43, 0},
52 {"dial_bright", 56, 31, 4, 4, 0},
53 {"dial_dim", 56, 31, 4, 4, 0},
54 {"face", 64, 64, 0, 0, 0},
57 #define DIAL_MULTIPLIER 0.56
59 /* Locations of letters in the percent remaining display. */
60 #define HUNDREDS_OFFSET 35
61 #define TENS_OFFSET 37
62 #define ONES_OFFSET 43
63 #define PERCENT_OFFSET 49
65 /* Locations of letters in the time remaining display. */
66 #define HOURS_TENS_OFFSET 15
67 #define HOURS_ONES_OFFSET 23
68 #define COLON_OFFSET 30
69 #define MINUTES_TENS_OFFSET 34
70 #define MINUTES_ONES_OFFSET 41
72 /* Replacement strings used by -x option */
73 #define STR_SUB_PERCENT "%percent%"
74 #define STR_SUB_MINUTES "%minutes%"
75 #define STR_SUB_SECONDS "%seconds%"