[Xcb] about api changes

Thomas Hunger hto at arcor.de
Tue Jun 12 15:02:37 PDT 2007


> Another thing I discovered: for example xcb_char2b_iterator_t
> (guess that there are others too) is of no use - because there's no
> function returning such an iterator ... :) I don't think that they
> really make sense and they could be removed.

This is unfortunally not so simple: The iterators could be used by 
extension protocols. It is true that no CHAR2B is used anywhere 
(yet). A different example is the RECTANGLE iterator. It is not 
needed in xproto, but xfixes has a reply with a list of RECTANGLEs, 
so the iterator is needed.

Extensions could be installed much later than xproto, so there are two 
possibilities:

1) The extension creates its own private iterator if it does not
   exist yet.
2) It can expect that an iterator already exists if the type is
   known.

I believe that 2) is the only way to go. So we should create all 
iterators even if they are not needed.





More information about the Xcb mailing list