X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=render%2Ftest.c;h=38cd7a99a2aad9155d897e474d09a7d5da82509e;hb=5be23ec5a4dcacb8b1adf1d352ad5600f426f3ed;hp=9ae7eada2215e3978e8e3adf53fb52fc0d30a6d9;hpb=cd12a2eae5b5b72df08d588ac71d1f6cf6725dfb;p=chaz%2Fopenbox 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; }