chiark
/
gitweb
/
~ian
/
chiark-utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use meaningful colour names in pix_...
[chiark-utils.git]
/
cprogs
/
xacpi-simple.c
diff --git
a/cprogs/xacpi-simple.c
b/cprogs/xacpi-simple.c
index bf0cf7863f82f343c514beb0673e0b09d95e6217..cbbe292991714cb49ec6e5692b1ca455ae2c9695 100644
(file)
--- a/
cprogs/xacpi-simple.c
+++ b/
cprogs/xacpi-simple.c
@@
-576,7
+576,7
@@
typedef struct {
unsigned long lastfg;
} Gcstate;
unsigned long lastfg;
} Gcstate;
-#define C(c,u) static unsigned long pix_##
c
;
+#define C(c,u) static unsigned long pix_##
u
;
#define GC(g) static Gcstate gc_##g;
COLOURS
#undef C
#define GC(g) static Gcstate gc_##g;
COLOURS
#undef C
@@
-622,23
+622,23
@@
static void show(void) {
int i, leftmost_lit, leftmost_nondeg, beyond, first_beyond;
if (!charging_mask)
int i, leftmost_lit, leftmost_nondeg, beyond, first_beyond;
if (!charging_mask)
- return show_solid(pix_
darkgreen
);
+ return show_solid(pix_
absent
);
if (charging_mask & (1u << CHGST_ERROR))
if (charging_mask & (1u << CHGST_ERROR))
- return show_solid(pix_
yellow
);
+ return show_solid(pix_
error
);
- setbackground(pix_d
imgrey
);
+ setbackground(pix_d
egraded
);
XClearWindow(disp,win);
setforeground(&gc_remain,
!(charging_mask & CHGMASK_CHG_DIS) ?
(~charging_mask & (1u << CHGST_CHARGED) ?
XClearWindow(disp,win);
setforeground(&gc_remain,
!(charging_mask & CHGMASK_CHG_DIS) ?
(~charging_mask & (1u << CHGST_CHARGED) ?
- pix_
lightgrey : pix_cyan
) :
- !(~charging_mask & CHGMASK_CHG_DIS) ? pix_
grey
:
+ pix_
notcharging : pix_charged
) :
+ !(~charging_mask & CHGMASK_CHG_DIS) ? pix_
confusing
:
charging_mask & (1u<<CHGST_CHARGING)
charging_mask & (1u<<CHGST_CHARGING)
- ? pix_
green : pix_blue
);
+ ? pix_
charging : pix_discharging
);
- setforeground(&gc_empty, alarmed ? pix_
red : pix_black
);
+ setforeground(&gc_empty, alarmed ? pix_
low : pix_normal
);
for (i=0, first_beyond=1; i<height; i++) {
elap= !i ? 0 :
for (i=0, first_beyond=1; i<height; i++) {
elap= !i ? 0 :
@@
-676,7
+676,7
@@
static void initgc(Gcstate *gc_r) {
memset(&gcv,0,sizeof(gcv));
gcv.function= GXcopy;
gcv.line_width= 1;
memset(&gcv,0,sizeof(gcv));
gcv.function= GXcopy;
gcv.line_width= 1;
- gc_r->lastfg= gcv.foreground= pix_
white
;
+ gc_r->lastfg= gcv.foreground= pix_
equilibrium
;
gc_r->gc= XCreateGC(disp,win, GCFunction|GCLineWidth|GCForeground, &gcv);
}
gc_r->gc= XCreateGC(disp,win, GCFunction|GCLineWidth|GCForeground, &gcv);
}
@@
-724,15
+724,15
@@
static void initgraphics(int argc, char **argv) {
pos_x,pos_y,width,height,0,0,0);
cmap= DefaultColormap(disp,screen);
pos_x,pos_y,width,height,0,0,0);
cmap= DefaultColormap(disp,screen);
-#define C(c,u) colour(&pix_##
c
, #u "Color");
+#define C(c,u) colour(&pix_##
u
, #u "Color");
#define GC(g) initgc(&gc_##g);
COLOURS
#undef C
#undef GC
#define GC(g) initgc(&gc_##g);
COLOURS
#undef C
#undef GC
- r= XSetWindowBackground(disp,win,pix_d
imgrey
);
+ r= XSetWindowBackground(disp,win,pix_d
egraded
);
if (!r) fail("init set background");
if (!r) fail("init set background");
- lastbackground= pix_d
imgrey
;
+ lastbackground= pix_d
egraded
;
normal_hints->flags= PWinGravity;
normal_hints->win_gravity= gravity;
normal_hints->flags= PWinGravity;
normal_hints->win_gravity= gravity;