[Xr] What happended to the idea of getting rid of the xrs argument?

Keith Packard keithp at keithp.com
Tue Jun 3 15:35:48 PDT 2003


Around 21 o'clock on Jun 2, Bill Spitzak wrote:

> Is this dead or not? I still feel it would be a very good idea. I need to 
> know what kind of outcome we can expect from this as it affects whether fltk 
> will use Xr or not.

I think the issues with object-oriented languages and threading make it 
unreasonable for the default Xr APIs to not include some kind of context 
information; having a place to hold persistent state that the application 
passes around avoids too many potential issues with drawing operations 
scattered across multiple objects.  The examples given where each drawing 
operation needed to save and restore the complete graphics state were 
reasonably compelling.

Probably the most compelling reason is that we can provide a API which 
doesn't include explicit state on top of an API which does, while the 
converse is very difficult.

Xr goes to a lot of effort to reduce the number of arguments to each 
function, and eliminating yet another one in every call would be nice to 
accomplish.  Perhaps in a higher level it could be done.

-keith






More information about the cairo mailing list