4 * Copyright (c) Tuomo Valkonen 1999-2001.
5 * See the included file LICENSE for details.
8 #ifndef INCLUDED_DRAWP_H
9 #define INCLUDED_DRAWP_H
17 ALIGN_LEFT
, ALIGN_CENTER
, ALIGN_RIGHT
32 #define WIN dinfo->win
34 #define BORDER dinfo->border
35 #define COLORS dinfo->colors
36 #define GRDATA dinfo->grdata
38 #define X dinfo->geom.x
39 #define Y dinfo->geom.y
40 #define W dinfo->geom.w
41 #define H dinfo->geom.h
42 #define C_X ((X)+(BORDER)->tl)
43 #define C_Y ((Y)+(BORDER)->tl)
44 #define C_W ((W)-(BORDER)->tl-(BORDER)->br)
45 #define C_H ((H)-(BORDER)->tl-(BORDER)->br)
46 #define I_X BORDER_IX(BORDER, X)
47 #define I_Y BORDER_IY(BORDER, Y)
48 #define I_W BORDER_IW(BORDER, W)
49 #define I_H BORDER_IH(BORDER, H)
51 #define FONT (dinfo->font)
53 extern void do_draw_border(Window win
, GC gc
, int x
, int y
, int w
, int h
,
54 int tl
, int br
, Pixel tlc
, Pixel brc
);
55 extern void draw_border(DrawInfo
*dinfo
);
56 extern void draw_box(DrawInfo
*dinfo
, bool fill
);
57 extern void draw_textbox(DrawInfo
*dinfo
,
58 const char *str
, int align
, bool fill
);
60 #endif /* INCLUDED_DRAWP_H */