Arguments

Arguments and argument order to ProXL primitives are not always directly predictable from their Xlib counterparts, but some rules of thumb can be helpful:

  1. Almost all Xlib functions take a display as first argument. ProXL doesn't need this argument at all if any X resource (i.e., a server-side resource, like a window or GC or font) appears in the call. So few ProXL primitives take a display argument.
  2. All the ProXL primitives that DO require a display have a version that allows the display to be defaulted. Also, several ProXL primitives require a screen as argument, and these, too, allow that argument to be defaulted. See the section on the default screen below for details.
  3. Several Xlib functions take a window as argument (or some other X resource) when all they really want to know is a screen. In these cases, the analogous ProXL primitive takes a screen as argument. Note that rule 2 above applies in these cases.

ProXL doesn't always use the same argument order as Xlib. There are a few reasons for different argument order. Firstly, ProXL has defaults for some arguments, so sometimes argument orders are changed to facilitate defaults. ProXL also rearranges arguments to make parallels among families of procedures more obvious. In most cases, however, the argument order for ProXL procedures is the same as their Xlib counterparts.