class QueryVersionReply(ooxcb.Reply): def __init__(self, conn): ooxcb.Reply.__init__(self, conn) self.major_version = None self.minor_version = None def read(self, stream): self._address = stream.address _unpacked = unpack_from_stream("=xxxxxxxxHH", stream) self.major_version = _unpacked[0] self.minor_version = _unpacked[1] def build(self, stream): count = 0 stream.write(pack("=xxxxxxxxHH", self.major_version, self.minor_version)) _events = { } _errors = { 0: (ContextError, BadContext), } for ev in _events.itervalues(): if isinstance(ev.event_target_class, str): ev.event_target_class = globals()[ev.event_target_class] ooxcb._add_ext(key, recordExtension, _events, _errors) def mixin(): pass
self.bounding_shape_extents_height, self.clip_shape_extents_x, self.clip_shape_extents_y, self.clip_shape_extents_width, self.clip_shape_extents_height, ) ) class GetRectanglesCookie(ooxcb.Cookie): pass class InputSelectedCookie(ooxcb.Cookie): pass _events = {0: NotifyEvent} _errors = {} for ev in _events.itervalues(): if isinstance(ev.event_target_class, str): ev.event_target_class = globals()[ev.event_target_class] ooxcb._add_ext(key, shapeExtension, _events, _errors) def mixin(): WindowMixin.mixin()
def change_by_name(self, name): if isinstance(name, unicode): name = name.encode("utf-8") nbytes = len(name) name = map(ord, name) return self.conn.xfixes.send_request(ooxcb.Request(self.conn, buf.getvalue(), 27, True, False), \ ooxcb.VoidCookie()) _events = { 1: CursorNotifyEvent, 0: SelectionNotifyEvent, } _errors = { 0: (RegionError, BadRegion), } for ev in _events.itervalues(): if isinstance(ev.event_target_class, str): ev.event_target_class = globals()[ev.event_target_class] ooxcb._add_ext(key, xfixesExtension, _events, _errors) def mixin(): CursorMixin.mixin() PictureMixin.mixin() WindowMixin.mixin() GContextMixin.mixin()
self._address = stream.address _unpacked = unpack_from_stream("=xBxxxxxxIIIIBxxxxxxx", stream) self.state = _unpacked[0] self.saver_window = Window(self.conn, _unpacked[1]) self.ms_until_server = _unpacked[2] self.ms_since_user_input = _unpacked[3] self.event_mask = _unpacked[4] self.kind = _unpacked[5] def build(self, stream): count = 0 stream.write(pack("=xBxxxxxxIIIIBxxxxxxx", self.state, get_internal(self.saver_window), self.ms_until_server, self.ms_since_user_input, self.event_mask, self.kind)) _events = { 0: NotifyEvent, } _errors = { } for ev in _events.itervalues(): if isinstance(ev.event_target_class, str): ev.event_target_class = globals()[ev.event_target_class] ooxcb._add_ext(key, screensaverExtension, _events, _errors) def mixin(): DrawableMixin.mixin() WindowMixin.mixin()
def read(self, stream): self._address = stream.address _unpacked = unpack_from_stream("=xBxxxxxx", stream) self.same = _unpacked[0] def build(self, stream): count = 0 stream.write(pack("=xBxxxxxx", self.same)) class CompareCursorCookie(ooxcb.Cookie): pass class GetVersionCookie(ooxcb.Cookie): pass _events = { } _errors = { } for ev in _events.itervalues(): if isinstance(ev.event_target_class, str): ev.event_target_class = globals()[ev.event_target_class] ooxcb._add_ext(key, xtestExtension, _events, _errors) def mixin(): WindowMixin.mixin()
self.major_version = None self.minor_version = None def read(self, stream): self._address = stream.address _unpacked = unpack_from_stream("=xxxxxxxxIIxxxxxxxxxxxxxxxx", stream) self.major_version = _unpacked[0] self.minor_version = _unpacked[1] def build(self, stream): count = 0 stream.write(pack("=xxxxxxxxIIxxxxxxxxxxxxxxxx", self.major_version, self.minor_version)) _events = { 0: DamageNotifyEvent, } _errors = { 0: (DamageError, BadDamage), } for ev in _events.itervalues(): if isinstance(ev.event_target_class, str): ev.event_target_class = globals()[ev.event_target_class] ooxcb._add_ext(key, damageExtension, _events, _errors) def mixin(): DrawableMixin.mixin()
window = get_internal(window) buf = StringIO.StringIO() buf.write(pack("=xxxxII", region, window)) return self.conn.composite.send_request(ooxcb.Request(self.conn, buf.getvalue(), 5, True, True), \ ooxcb.VoidCookie()) def create_region_from_border_clip(self, region, window): region = get_internal(region) window = get_internal(window) buf = StringIO.StringIO() buf.write(pack("=xxxxII", region, window)) return self.conn.composite.send_request(ooxcb.Request(self.conn, buf.getvalue(), 5, True, False), \ ooxcb.VoidCookie()) _events = { } _errors = { } for ev in _events.itervalues(): if isinstance(ev.event_target_class, str): ev.event_target_class = globals()[ev.event_target_class] ooxcb._add_ext(key, compositeExtension, _events, _errors) def mixin(): WindowMixin.mixin() RegionMixin.mixin()
buf.write(pack("=xxxx", )) return self.conn.bigreq.send_request(ooxcb.Request(self.conn, buf.getvalue(), 0, False, True), \ EnableCookie(), EnableReply) def enable_unchecked(self): buf = StringIO.StringIO() buf.write(pack("=xxxx", )) return self.conn.bigreq.send_request(ooxcb.Request(self.conn, buf.getvalue(), 0, False, False), \ EnableCookie(), EnableReply) class EnableCookie(ooxcb.Cookie): pass _events = { } _errors = { } for ev in _events.itervalues(): if isinstance(ev.event_target_class, str): ev.event_target_class = globals()[ev.event_target_class] ooxcb._add_ext(key, bigreqExtension, _events, _errors) def mixin(): pass