How to make X11/Extension API changes?

Joe Krahn krahn at niehs.nih.gov
Tue Sep 6 09:15:20 PDT 2005


How does one make API changes that need extended data structures without 
backwards compatibility problems? X was designed carefully enough that 
this is seldom an issue.

MS-Windows likes to have callers initialized a struct with a 
sizeof(struct) value, so structures can be extended, with additional 
data returned according to the structure size. It also uses -Ex suffixes 
for a one-time function prototype change.

X solves this partly by protocol versioning. But, what is the right way 
to make structure/function changes at the API level?

For example:

Can XListInputDevices contain a pointer to an extended XValuatorInfo 
structure, as long as the initial structure members match the current 
structure?

XInput Device Controls are 'almost' extensible as-is, if controlType 
were changed from int to Atom, which are binary compatible. What is the 
best way to update a function like this without something weird like 
adding an -Ex suffix?

Joe



More information about the xorg mailing list