ProXL has many primitives that are very similar (though none that are
identical) to Xlib functions. Unfortunately, Xlib's naming conventions
are not very convenient in Prolog, so ProXL uses different names. ProXL
names are all lowercase, with underscores used to separate words.
Also, ProXL names do not have prefixes or suffixes to specify the context
they are to be used in; in Prolog, context is sufficient to
disambiguate. For example, the line style called LineDoubleDash
by
Xlib is called simply double_dash
by Prolog, since the context in which
it is used will make clear that it is a line style.
To be a little more formal about it, here's a rough algorithm for translating names:
So XOpenDisplay
would become open_display
, NorthWestGravity
would
become north_west
, and LSBFirst
would become lsb_first
.
Note that not all X functions have direct ProXL counterparts. In some
cases, a single ProXL procedure fills the role of many Xlib functions.
For example, ProXL has no set_fill_rule
procedure, instead you use
put_graphics_attributes/2
. Also, in a few cases, Xlib functions that
take boolean arguments have been split into two different ProXL
procedures, one for each boolean state.