def __len__(self): """ Return the amount of all properties defined on this device. """ number_of_properties, property_atoms = xinput.list_properties( self.display, self.id) with scoped_pointer(property_atoms, xlib.free): return number_of_properties
def _iter_property_atoms(self): number_of_properties, property_atoms = xinput.list_properties( self.display, self.id) with scoped_pointer(property_atoms, xlib.free): for i in xrange(number_of_properties): yield Atom(self.display, property_atoms[i])