[Xcb] Problem with xpyb and setCrtcConfig()
Peter Harris
peter.harris at hummingbird.com
Mon Nov 3 09:51:02 PST 2008
Alberto Milone wrote:
>
> Now it says that "SetCrtcConfig" takes exactly 10 arguments (9 given).
>
> But I guess it should take 9 arguments:
> cookie = self.conn.randr.SetCrtcConfig(crtc.id, crtc.timestamp,
> resources.config_timestamp, x, y, mode.id, rotation, map(lambda n:
> n.id, outputs))
The C binding needs a length or count for the last parameter, since C
does not know how long a list is. I'm guessing (guessing, mind you,
since I don't actually know anything about the python binding) that the
python binding author decided to follow the XCB C binding implementation
as closely as possible, and you need to put in a redundant length or
count somewhere.
See also PolyPoint (and etc), as I mentioned previously.
> Also what's the function of padding bytes?
To allow the C binding (or Xlib before it) to cast a data buffer
directly to a structure.
http://en.wikipedia.org/wiki/Data_structure_alignment#Data_Structure_Padding
Peter Harris
--
Hummingbird Connectivity - A Division of Open Text
Peter Harris http://connectivity.hummingbird.com
Research and Development Phone: +1 905 762 6001
peter.harris at hummingbird.com Toll Free: 1 877 359 4866
More information about the Xcb
mailing list