summaryrefslogtreecommitdiffstats
path: root/draw.c
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@suckless.org>2007-02-20 13:48:02 +0100
committerAnselm R. Garbe <arg@suckless.org>2007-02-20 13:48:02 +0100
commit138b7fbd0563e176e4f4dce8ac771263f74ff6cb (patch)
tree709f6944d63930c44cb8e613969601a8d7c4ce5f /draw.c
parentadded draw.c again (except getcolor and setfont which are helpers in main.c) (diff)
downloaddwm-138b7fbd0563e176e4f4dce8ac771263f74ff6cb.tar.gz
dwm-138b7fbd0563e176e4f4dce8ac771263f74ff6cb.zip
fixed order
Diffstat (limited to 'draw.c')
-rw-r--r--draw.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/draw.c b/draw.c
index 25b08c6..8369082 100644
--- a/draw.c
+++ b/draw.c
@@ -6,17 +6,6 @@
6 6
7/* static */ 7/* static */
8 8
9static unsigned int
10textnw(const char *text, unsigned int len) {
11 XRectangle r;
12
13 if(dc.font.set) {
14 XmbTextExtents(dc.font.set, text, len, NULL, &r);
15 return r.width;
16 }
17 return XTextWidth(dc.font.xfont, text, len);
18}
19
20static void 9static void
21drawsquare(Bool filled, Bool empty, unsigned long col[ColLast]) { 10drawsquare(Bool filled, Bool empty, unsigned long col[ColLast]) {
22 int x; 11 int x;
@@ -48,6 +37,17 @@ isoccupied(unsigned int t) {
48 return False; 37 return False;
49} 38}
50 39
40static unsigned int
41textnw(const char *text, unsigned int len) {
42 XRectangle r;
43
44 if(dc.font.set) {
45 XmbTextExtents(dc.font.set, text, len, NULL, &r);
46 return r.width;
47 }
48 return XTextWidth(dc.font.xfont, text, len);
49}
50
51/* extern */ 51/* extern */
52 52
53void 53void