def value(self): e = _xcb.xcb_generic_error_t() reply = _xcb.xcb_get_atom_name_reply(self.connection._connection, self._cookie, ctypes.pointer(ctypes.pointer(e))) # TODO: error handling? if not reply: raise Exception('Null reply') # TODO: better exceptions value = ctypes.cast(_xcb.xcb_get_atom_name_name(reply), ctypes.c_char_p) length = _xcb.xcb_get_atom_name_name_length(reply) return value.value[:length]
def _value(self): e = _xcb.xcb_generic_error_t() c = _xcb.xcb_get_property_reply(self.connection._connection, self._cookie, \ ctypes.pointer(ctypes.pointer(e))).contents # TODO: error handling? return c
def _value(self): e = _xcb.xcb_generic_error_t() cookie = _xcb.xcb_intern_atom_reply(self.connection._connection, \ self._cookie, ctypes.pointer(ctypes.pointer(e))) # TODO: error handling? - it makes it much slower! return cookie.contents