Thursday, January 17, 2019

My xcb interface

XcbConnect( xcb);
XcbWindow(xcb);
XcharsTest(xchars);
xcb->xchars = xchars;
XcbGC(xcb);
xchars->gc=xcb->gc;
XcbGeometry(xcb);

The sequence above creates the connection, window, gc in the proper order, and in between fills in a rectangle called xchars. That thing called xcb is my box of xcb stuff which gets filled in by the various cutnpaste code on the other side. So I call in the proper sequence and the xcb box gets filled in proper order. My only value added is I make something called a rectangle. I can loop through these sequences in test mode.  The snippet interface simply translates from symbols into elements of an xcb box, and it checks for some syntax errors. The entire process, dumb and mechanical, an easy debug.

No comments: