Xinqi Bao's Git
1 /* See LICENSE file for copyright and license details. */
3 #define FG(dc, col) ((col)[(dc)->invert ? ColBG : ColFG])
4 #define BG(dc, col) ((col)[(dc)->invert ? ColFG : ColBG])
6 enum { ColBG
, ColFG
, ColBorder
, ColLast
};
22 } DC
; /* draw context */
24 void drawrect(DC
*dc
, int x
, int y
, unsigned int w
, unsigned int h
, Bool fill
, unsigned long color
);
25 void drawtext(DC
*dc
, const char *text
, unsigned long col
[ColLast
]);
26 void drawtextn(DC
*dc
, const char *text
, size_t n
, unsigned long col
[ColLast
]);
27 void eprintf(const char *fmt
, ...);
29 unsigned long getcolor(DC
*dc
, const char *colstr
);
31 void initfont(DC
*dc
, const char *fontstr
);
32 void mapdc(DC
*dc
, Window win
, unsigned int w
, unsigned int h
);
33 void resizedc(DC
*dc
, unsigned int w
, unsigned int h
);
34 int textnw(DC
*dc
, const char *text
, size_t len
);
35 int textw(DC
*dc
, const char *text
);