summaryrefslogtreecommitdiff
path: root/render/test.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-06-20 02:17:23 +0000
committerDana Jansens <danakj@orodu.net>2003-06-20 02:17:23 +0000
commitcd12a2eae5b5b72df08d588ac71d1f6cf6725dfb (patch)
tree56413723ec877b3da05e2ece758b45b98d5b589c /render/test.c
parent349d0167dbee10ccb1c6200709286a5134ac7121 (diff)
simply the render interface by not requiring the setting of all the areas. only take a w and h in paint(). best font layout ever.
Diffstat (limited to 'render/test.c')
-rw-r--r--render/test.c24
1 files changed, 7 insertions, 17 deletions
diff --git a/render/test.c b/render/test.c
index 4dfed619..9ae7eada 100644
--- a/render/test.c
+++ b/render/test.c
@@ -21,25 +21,19 @@ Window ob_root;
int main()
{
Window win;
- GC gc;
- Pixmap pm;
Appearance *look;
- int grabbed = 0;
Window root;
- XGCValues values;
XEvent report;
- int h = 500, w = 500, tmp;
- XVisualInfo *vi;
- int i;
+ int h = 500, w = 500;
ob_display = XOpenDisplay(NULL);
XSetErrorHandler(x_error_handler);
ob_screen = DefaultScreen(ob_display);
ob_root = RootWindow(ob_display, ob_screen);
win =
- XCreateWindow(ob_display, RootWindow(ob_display, 0)
- , 10, 10, w, h, 10,
+ XCreateWindow(ob_display, RootWindow(ob_display, 0),
+ 10, 10, w, h, 10,
CopyFromParent, /* depth */
CopyFromParent, /* class */
CopyFromParent, /* visual */
@@ -55,25 +49,21 @@ int main()
look->surface.secondary = color_parse("Yellow");
look->surface.primary = color_parse("Blue");
look->surface.interlaced = FALSE;
- look->area.x = 0;
- look->area.y = 0;
- look->area.width = 500;
- look->area.height = 500;
if (ob_display == NULL) {
fprintf(stderr, "couldn't connect to X server :0\n");
return 0;
}
- paint(win, look);
+ paint(win, look, w, h);
while (1) {
XNextEvent(ob_display, &report);
switch (report.type) {
case Expose:
break;
case ConfigureNotify:
- look->area.width = report.xconfigure.width;
- look->area.height = report.xconfigure.height;
- paint(win, look);
+ paint(win, look,
+ report.xconfigure.width,
+ report.xconfigure.height);
break;
}