[Xcb] extended XCL macro language

Jamey Sharp jamey@cs.pdx.edu
Wed, 26 Mar 2003 18:27:16 -0800


--S1BNGpv0yoYahz37
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

I've added a couple of features to XCL's macro language that allow a
bunch more Xlib functions to be written as macros. Hopefully soon we can
use these to implement a big chunk of Xlib that's not in XCL yet.
However, what I need right now is somebody to convert the simpler source
files that are already in XCL into these macros. Whoever does this will
probably be the sensible choice for the other work, too.

The XCLCALL macro specifies which XCB function to call, overriding the
default where e.g. XClearArea calls XCBClearArea. For example,
XMoveResizeWindow, XResizeWindow, and XMoveWindow all call
XCBConfigureWindow, and XDrawPoint calls XCBPolyPoint. So these
declarations (in lib/XCL/proto.m4) look like this:

XCLREQ(ResizeWindow, XCLCALL(ConfigureWindow), ...)
XCLREQ(MoveResizeWindow, XCLCALL(ConfigureWindow), ...)
XCLREQ(MoveWindow, XCLCALL(ConfigureWindow), ...)
XCLREQ(DrawPoint, XCLCALL(PolyPoint), ...)

The XCLLOCAL macro allows for variable declarations. With this, the
parameters to XCB don't have to exactly match the parameters to Xlib.
For example, XDrawPoint needs to set the coordinate mode to a constant
value, and also needs to pack its x and y arguments into a one-element
array of POINT structures.

XCLREQ(DrawPoint, XCLCALL(PolyPoint), XCLGC(gc),
XCLPARAMS(Drawable drawable, GC gc, int x, int y),
XCLLOCAL(`BYTE coordinate_mode =3D CoordModeOrigin'),
XCLLOCAL(`CARD16 points_len =3D 1'),
XCLLOCAL(`POINT points[] =3D { { x, y } }'))

Hmmm... another desperate need we have is for documentation of the XCL
macros, and of course better documentation for the XCB ones too.
--=20
Jamey Sharp <jamey@minilop.net> - http://minilop.net/

--S1BNGpv0yoYahz37
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.0 (GNU/Linux)

iD8DBQE+gmGENgAXSpyH6VcRAuqMAJ40CSX4jSa2Uhak/pBuBSaBqjvbWwCbBCZy
U75G+n55SjRqAyY7dv7SmhA=
=laqu
-----END PGP SIGNATURE-----

--S1BNGpv0yoYahz37--