+
+struct jwxyz_vtbl {
+ Window (*root) (Display *);
+ Visual *(*visual) (Display *);
+ struct jwxyz_sources_data *(*display_sources_data) (Display *);
+
+ unsigned long *(*window_background) (Display *);
+ int (*draw_arc) (Display *dpy, Drawable d, GC gc, int x, int y,
+ unsigned int width, unsigned int height,
+ int angle1, int angle2, Bool fill_p);
+ void (*fill_rects) (Display *dpy, Drawable d, GC gc,
+ const XRectangle *rectangles,
+ unsigned long nrects, unsigned long pixel);
+ XGCValues *(*gc_gcv) (GC gc);
+ unsigned int (*gc_depth) (GC gc);
+ int (*draw_string) (Display *dpy, Drawable d, GC gc, int x, int y,
+ const char *str, size_t len, Bool utf8);
+
+ void (*copy_area) (Display *dpy, Drawable src, Drawable dst, GC gc,
+ int src_x, int src_y,
+ unsigned int width, unsigned int height,
+ int dst_x, int dst_y);
+
+ int (*DrawPoints) (Display *, Drawable, GC, XPoint *, int n, int mode);
+ int (*DrawSegments) (Display *, Drawable, GC, XSegment *, int n);
+ GC (*CreateGC) (Display *, Drawable, unsigned long mask, XGCValues *);
+ int (*FreeGC) (Display *, GC);
+ int (*ClearWindow) (Display *, Window);
+ int (*SetClipMask) (Display *, GC, Pixmap);
+ int (*SetClipOrigin) (Display *, GC, int x, int y);
+ int (*FillPolygon) (Display *, Drawable, GC,
+ XPoint * points, int npoints, int shape, int mode);
+ int (*DrawLines) (Display *, Drawable, GC, XPoint *, int n, int mode);
+
+ int (*PutImage) (Display *, Drawable, GC, XImage *,
+ int src_x, int src_y, int dest_x, int dest_y,
+ unsigned int w, unsigned int h);
+ XImage *(*GetSubImage) (Display *dpy, Drawable d, int x, int y,
+ unsigned int width, unsigned int height,
+ unsigned long plane_mask, int format,
+ XImage *dest_image, int dest_x, int dest_y);
+};
+
+#define JWXYZ_VTBL(dpy) (*(struct jwxyz_vtbl **)(dpy))
+
+#define XRootWindow(dpy, screen) \
+ ((dpy) ? JWXYZ_VTBL(dpy)->root(dpy) : 0)
+#define XDefaultVisualOfScreen(screen) \
+ ((screen) ? JWXYZ_VTBL(screen)->visual(screen) : 0)
+
+#define XDrawPoints(dpy, d, gc, points, n, mode) \
+ (JWXYZ_VTBL(dpy)->DrawPoints (dpy, d, gc, points, n, mode))
+#define XDrawSegments(dpy, d, gc, segments, n) \
+ (JWXYZ_VTBL(dpy)->DrawSegments (dpy, d, gc, segments, n))
+#define XCreateGC(dpy, d, mask, gcv) \
+ (JWXYZ_VTBL(dpy)->CreateGC (dpy, d, mask, gcv))
+#define XFreeGC(dpy, gc) \
+ (JWXYZ_VTBL(dpy)->FreeGC (dpy, gc))
+#define XClearWindow(dpy, win) \
+ (JWXYZ_VTBL(dpy)->ClearWindow(dpy, win))
+#define XSetClipMask(dpy, gc, m) \
+ (JWXYZ_VTBL(dpy)->SetClipMask (dpy, gc, m))
+#define XSetClipOrigin(dpy, gc, x, y) \
+ (JWXYZ_VTBL(dpy)->SetClipOrigin (dpy, gc, x, y))
+#define XFillPolygon(dpy, d, gc, points, npoints, shape, mode) \
+ (JWXYZ_VTBL(dpy)->FillPolygon (dpy, d, gc, points, npoints, shape, mode))
+#define XDrawLines(dpy, d, gc, points, n, mode) \
+ (JWXYZ_VTBL(dpy)->DrawLines (dpy, d, gc, points, n, mode))
+#define XPutImage(dpy, d, gc, image, src_x, src_y, dest_x, dest_y, w, h) \
+ (JWXYZ_VTBL(dpy)->PutImage (dpy, d, gc, image, src_x, src_y, \
+ dest_x, dest_y, w, h))
+#define XGetSubImage(dpy, d, x, y, width, height, plane_mask, \
+ format, dest_image, dest_x, dest_y) \
+ (JWXYZ_VTBL(dpy)->GetSubImage (dpy, d, x, y, width, height, plane_mask, \
+ format, dest_image, dest_x, dest_y))
+
+