+void truecolor_startup(void)
+{
+ unsigned long red_mask, green_mask, blue_mask;
+ XImage *timage = NULL;
+
+ timage = XCreateImage(ob_display, render_visual, render_depth,
+ ZPixmap, 0, NULL, 1, 1, 32, 0);
+ g_assert(timage != NULL);
+ /* find the offsets for each color in the visual's masks */
+ red_mask = timage->red_mask;
+ green_mask = timage->green_mask;
+ blue_mask = timage->blue_mask;
+
+ render_red_offset = 0;
+ render_green_offset = 0;
+ render_blue_offset = 0;
+
+ while (! (red_mask & 1)) { render_red_offset++; red_mask >>= 1; }
+ while (! (green_mask & 1)) { render_green_offset++; green_mask >>= 1; }
+ while (! (blue_mask & 1)) { render_blue_offset++; blue_mask >>= 1; }
+
+ render_red_shift = render_green_shift = render_blue_shift = 8;
+ while (red_mask) { red_mask >>= 1; render_red_shift--; }
+ while (green_mask) { green_mask >>= 1; render_green_shift--; }
+ while (blue_mask) { blue_mask >>= 1; render_blue_shift--; }
+ XFree(timage);
+}
+
+void x_paint(Window win, Appearance *l, int x, int y, int w, int h)