summaryrefslogtreecommitdiff
path: root/render/test.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-06-20 07:58:51 +0000
committerDana Jansens <danakj@orodu.net>2003-06-20 07:58:51 +0000
commit3f32dfa87e08556d7f6a58efab9b7479e515be26 (patch)
tree95aba7a2acfefeab50b6f98b6dcad92f4c0a53c7 /render/test.c
parent49268650b4564def10eeb0d21d5c0dffa4972857 (diff)
this is going to break the kernel/ building.
lots of modifications to the render API, prefixing everything, making proper names for everything. the structures are not hidden/opaque yet, but the naming scheme of the public API works much better now.
Diffstat (limited to 'render/test.c')
-rw-r--r--render/test.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/render/test.c b/render/test.c
index 9ae7eada..38cd7a99 100644
--- a/render/test.c
+++ b/render/test.c
@@ -21,7 +21,8 @@ Window ob_root;
int main()
{
Window win;
- Appearance *look;
+ RrInstance *inst;
+ RrAppearance *look;
Window root;
XEvent report;
@@ -42,32 +43,35 @@ int main()
XMapWindow(ob_display, win);
XSelectInput(ob_display, win, ExposureMask | StructureNotifyMask);
root = RootWindow (ob_display, DefaultScreen (ob_display));
- render_startup();
+ inst = RrInstanceNew(ob_display, ob_screen);
- look = appearance_new(0);
- look->surface.grad = Background_Pyramid;
- look->surface.secondary = color_parse("Yellow");
- look->surface.primary = color_parse("Blue");
+ look = RrAppearanceNew(inst, 0);
+ look->surface.grad = RR_SURFACE_PYRAMID;
+ look->surface.secondary = RrColorParse(inst, "Yellow");
+ look->surface.primary = RrColorParse(inst, "Blue");
look->surface.interlaced = FALSE;
if (ob_display == NULL) {
fprintf(stderr, "couldn't connect to X server :0\n");
return 0;
}
- paint(win, look, w, h);
+ RrPaint(look, win, w, h);
while (1) {
XNextEvent(ob_display, &report);
switch (report.type) {
case Expose:
break;
case ConfigureNotify:
- paint(win, look,
- report.xconfigure.width,
- report.xconfigure.height);
+ RrPaint(look, win,
+ report.xconfigure.width,
+ report.xconfigure.height);
break;
}
}
+ RrAppearanceFree (look);
+ RrInstanceFree (inst);
+
return 1;
}