[Xcb] use of value_mask and value_list parameters
Vincent Torri
vtorri at univ-evry.fr
Mon Jul 24 13:28:26 PDT 2006
Hey,
I would like a precision about how to usethese 2 parameters.
Suppose that one has 5 possible flags (f0, ..., f4, with value 1<<0,...
1<<4) and one wants to set only 2 of them (f1 and f3) to 0 and 1
respectively.
I would do that :
CARD32 value_mask;
CARD32 value_list[2]; /* because I want to set 2 flags */
value_mask = f1 | f3;
value_list[0] = 0;
value_list[1] = 1;
is it correct ? that is, xcb will check all the set flag (f1 and f3) and
will use the values in value_list in that precise order.
Now, another question: Suppose that I already have a value for value_mask
(i don't know which flags are set a priori). Is there an easy way to
declare correctly value_list and set its values as I want (I have all the
5 possible values for f0,...f4, but I want to set only those defined in
value_mask)
thank you
Vincent
More information about the Xcb
mailing list