|
|
@ -6,17 +6,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
/* static */
|
|
|
|
/* static */
|
|
|
|
|
|
|
|
|
|
|
|
static unsigned int
|
|
|
|
|
|
|
|
textnw(const char *text, unsigned int len) {
|
|
|
|
|
|
|
|
XRectangle r;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(dc.font.set) {
|
|
|
|
|
|
|
|
XmbTextExtents(dc.font.set, text, len, NULL, &r);
|
|
|
|
|
|
|
|
return r.width;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return XTextWidth(dc.font.xfont, text, len);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
static void
|
|
|
|
drawsquare(Bool filled, Bool empty, unsigned long col[ColLast]) {
|
|
|
|
drawsquare(Bool filled, Bool empty, unsigned long col[ColLast]) {
|
|
|
|
int x;
|
|
|
|
int x;
|
|
|
@ -48,6 +37,17 @@ isoccupied(unsigned int t) {
|
|
|
|
return False;
|
|
|
|
return False;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static unsigned int
|
|
|
|
|
|
|
|
textnw(const char *text, unsigned int len) {
|
|
|
|
|
|
|
|
XRectangle r;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(dc.font.set) {
|
|
|
|
|
|
|
|
XmbTextExtents(dc.font.set, text, len, NULL, &r);
|
|
|
|
|
|
|
|
return r.width;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return XTextWidth(dc.font.xfont, text, len);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* extern */
|
|
|
|
/* extern */
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
|