[Xcb] missing xcb_setup_roots function ?

Vincent Torri vtorri at univ-evry.fr
Thu Nov 9 23:10:57 PST 2006



On Thu, 9 Nov 2006, Jamey Sharp wrote:

> On Thu, Nov 09, 2006 at 10:41:37AM +0100, Vincent Torri wrote:
>> Also, what does xcb_setup_roots_length return ? the number of  screens ?
>> (like iter.rem if iter is the screen iterator) or is it a byte unity ?
>
> It's the number of screens, like iter.rem. That's what the _length
> functions always do in XCB.


There's something I didn't understand, then.

For example, for the ListProperties reply:

1) there's a field (in the reply structure) named atoms_len. For me, it's
the number of atoms.

2) there's 2 functions:
       xcb_list_properties_atoms_length
and
       xcb_list_properties_atoms
and for me, the first returns the number of *bytes* used by all the atoms,
and the second returns a pointer on the atoms and I can use a memcpy to
copy in a buffer, like that:
       memcpy (buf,
               xcb_list_properties_atoms(r),
               xcb_list_properties_atoms_length(r));

and I don't multiply xcb_list_properties_atoms_length(r) by the size of an
atom.

3) xcb_list_properties_atoms_iterator that returns an iterator and then,
if iter is that iterator, iter.rem == r->atoms_len

Am I wrong ?

Vincent


More information about the Xcb mailing list