ooxcb.list

class ooxcb.list.List(conn, stream, length, type, size=-1)

List is a list subclass that reads its members from a memory stream. It also provides with methods to convert this data to more useful values.

static from_atoms(atoms)

returns an ordinary Python list that contains the atom ids of the atoms in atoms.

Note:Actually that’s the same as from_resources(). But explicit is better than implicit ...
static from_resources(resources)

returns an ordinary Python list that contains the X ids of the resources in resources.

static from_string(string)

returns a Python list containing the ordinal values of string‘s chars (should also for unicode objects)

static from_stringlist(stringlist)

returns a Python list containing the ordinal values of each string in stringlist, all of them linked together by x00 bytes and with a trailing x00 byte.

to_atoms()

my value is a list of atom ids, return a list of Atom instances.

to_resources(cls)

interpret the data as a homogenous list of X ids.

Parameters:cls – The resource class to instantiate if the corresponding X id couldn’t be found in the cache.
Returns:a list of cls instances
to_string()

my value is a list of ordinal values; return the string.

to_utf8()

interpret the string returned by to_string() as utf-8 and return a Python unicode object.

to_windows()

I am a list of ooxcb.protocol.xproto.Window Ids. Just a shortcut for to_resources().