[TUHS] X and NeWS history (long)

Richard Tobin richard at inf.ed.ac.uk
Thu Sep 14 22:30:41 AEST 2017

> I really kind of liked that toolkit, it was all key/value like so:
>         panel = xv_create(
> 	    frame, PANEL,
>             XV_WIDTH, WIDTH,
> 	    XV_HEIGHT, 30,
>             XV_SHOW, FALSE,
> 	    NULL);
> So the order of the args didn't really matter, I think the first one
> maybe did because that was the parent but not sure, the rest could
> be any order you wanted.  Pretty simple.

The first two were fixed; the prototype was

  Xv_object xv_create (Xv_opaque owner, Xv_pkg *pkg, ...);

The keywords (XV_WIDTH etc) contained a bitfield encoding the type and
cardinality of the value argument(s) so that the argument list could
be traversed without knowing every package's keywords.

Using NULL as the terminating argument looks unportable.

-- Richard

The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

More information about the TUHS mailing list