Ejemplo n.º 1
0
 def damage_add(self, region):
     drawable = get_internal(self)
     region = get_internal(region)
     buf = StringIO.StringIO()
     buf.write(pack("=xxxxII", drawable, region))
     return self.conn.damage.send_request(ooxcb.Request(self.conn, buf.getvalue(), 4, True, False), \
         ooxcb.VoidCookie())
Ejemplo n.º 2
0
 def create(self, damage, drawable, level):
     damage = get_internal(damage)
     drawable = get_internal(drawable)
     buf = StringIO.StringIO()
     buf.write(pack("=xxxxIIBxxx", damage, drawable, level))
     return self.conn.damage.send_request(ooxcb.Request(self.conn, buf.getvalue(), 1, True, False), \
         ooxcb.VoidCookie())
Ejemplo n.º 3
0
 def create_region_from_bitmap(self, region, bitmap):
     region = get_internal(region)
     bitmap = get_internal(bitmap)
     buf = StringIO.StringIO()
     buf.write(pack("=xxxxII", region, bitmap))
     return self.conn.xfixes.send_request(ooxcb.Request(self.conn, buf.getvalue(), 6, True, False), \
         ooxcb.VoidCookie())
Ejemplo n.º 4
0
 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())
Ejemplo n.º 5
0
 def create_region_from_window(self, region, window, kind):
     region = get_internal(region)
     window = get_internal(window)
     buf = StringIO.StringIO()
     buf.write(pack("=xxxxIIBxxx", region, window, kind))
     return self.conn.xfixes.send_request(ooxcb.Request(self.conn, buf.getvalue(), 7, True, False), \
         ooxcb.VoidCookie())
Ejemplo n.º 6
0
 def set_shape_region(self, dest_kind, x_offset, y_offset, region):
     dest = get_internal(self)
     region = get_internal(region)
     buf = StringIO.StringIO()
     buf.write(pack("=xxxxIBxxxhhI", dest, dest_kind, x_offset, y_offset, region))
     return self.conn.xfixes.send_request(ooxcb.Request(self.conn, buf.getvalue(), 21, True, False), \
         ooxcb.VoidCookie())
Ejemplo n.º 7
0
 def expand(self, destination, left, right, top, bottom):
     source = get_internal(self)
     destination = get_internal(destination)
     buf = StringIO.StringIO()
     buf.write(pack("=xxxxIIHHHH", source, destination, left, right, top, bottom))
     return self.conn.xfixes.send_request(ooxcb.Request(self.conn, buf.getvalue(), 28, True, False), \
         ooxcb.VoidCookie())
Ejemplo n.º 8
0
 def create_region_from_picture(self, region, picture):
     region = get_internal(region)
     picture = get_internal(picture)
     buf = StringIO.StringIO()
     buf.write(pack("=xxxxII", region, picture))
     return self.conn.xfixes.send_request(ooxcb.Request(self.conn, buf.getvalue(), 9, True, False), \
         ooxcb.VoidCookie())
Ejemplo n.º 9
0
 def set_clip_region_checked(self, region, x_origin, y_origin):
     picture = get_internal(self)
     region = get_internal(region)
     buf = StringIO.StringIO()
     buf.write(pack("=xxxxIIhh", picture, region, x_origin, y_origin))
     return self.conn.xfixes.send_request(ooxcb.Request(self.conn, buf.getvalue(), 22, True, True), \
         ooxcb.VoidCookie())
Ejemplo n.º 10
0
 def set_clip_region(self, region, x_origin, y_origin):
     gc = get_internal(self)
     region = get_internal(region)
     buf = StringIO.StringIO()
     buf.write(pack("=xxxxIIhh", gc, region, x_origin, y_origin))
     return self.conn.xfixes.send_request(ooxcb.Request(self.conn, buf.getvalue(), 20, True, False), \
         ooxcb.VoidCookie())
Ejemplo n.º 11
0
 def change(self, destination):
     source = get_internal(self)
     destination = get_internal(destination)
     buf = StringIO.StringIO()
     buf.write(pack("=xxxxII", source, destination))
     return self.conn.xfixes.send_request(ooxcb.Request(self.conn, buf.getvalue(), 26, True, False), \
         ooxcb.VoidCookie())
Ejemplo n.º 12
0
 def create_region_from_g_c(self, region, gc):
     region = get_internal(region)
     gc = get_internal(gc)
     buf = StringIO.StringIO()
     buf.write(pack("=xxxxII", region, gc))
     return self.conn.xfixes.send_request(ooxcb.Request(self.conn, buf.getvalue(), 8, True, False), \
         ooxcb.VoidCookie())
Ejemplo n.º 13
0
 def shape_mask_checked(self, operation, destination_kind, x_offset, y_offset, source_bitmap):
     destination_window = get_internal(self)
     source_bitmap = get_internal(source_bitmap)
     buf = StringIO.StringIO()
     buf.write(
         pack("=xxxxBBxxIhhI", operation, destination_kind, destination_window, x_offset, y_offset, source_bitmap)
     )
     return self.conn.shape.send_request(ooxcb.Request(self.conn, buf.getvalue(), 2, True, True), ooxcb.VoidCookie())
Ejemplo n.º 14
0
 def compare_cursor_unchecked(self, cursor):
     window = get_internal(self)
     cursor = get_internal(cursor)
     buf = StringIO.StringIO()
     buf.write(pack("=xxxxII", window, cursor))
     return self.conn.xtest.send_request(ooxcb.Request(self.conn, buf.getvalue(), 1, False, False), \
         CompareCursorCookie(),
         CompareCursorReply)
Ejemplo n.º 15
0
 def subtract(self, repair, parts):
     damage = get_internal(self)
     repair = get_internal(repair)
     parts = get_internal(parts)
     buf = StringIO.StringIO()
     buf.write(pack("=xxxxIII", damage, repair, parts))
     return self.conn.damage.send_request(ooxcb.Request(self.conn, buf.getvalue(), 3, True, False), \
         ooxcb.VoidCookie())
Ejemplo n.º 16
0
 def subtract(self, source2, destination):
     source1 = get_internal(self)
     source2 = get_internal(source2)
     destination = get_internal(destination)
     buf = StringIO.StringIO()
     buf.write(pack("=xxxxIII", source1, source2, destination))
     return self.conn.xfixes.send_request(ooxcb.Request(self.conn, buf.getvalue(), 15, True, False), \
         ooxcb.VoidCookie())
Ejemplo n.º 17
0
 def invert(self, bounds, destination):
     source = get_internal(self)
     destination = get_internal(destination)
     buf = StringIO.StringIO()
     buf.write(pack("=xxxxI", source))
     bounds.build(buf)
     buf.write(pack("=I", destination))
     return self.conn.xfixes.send_request(ooxcb.Request(self.conn, buf.getvalue(), 16, True, False), \
         ooxcb.VoidCookie())
Ejemplo n.º 18
0
 def create_context(self, context, element_header, client_specs, ranges):
     num_client_specs = len(client_specs)
     num_ranges = len(ranges)
     context = get_internal(context)
     element_header = get_internal(element_header)
     buf = StringIO.StringIO()
     buf.write(pack("=xxxxIBxxxII", context, element_header, num_client_specs, num_ranges))
     buf.write(make_array(client_specs, "I"))
     for elt in ranges:
         elt.build(buf)
     return self.conn.record.send_request(ooxcb.Request(self.conn, buf.getvalue(), 1, True, False), \
         ooxcb.VoidCookie())
Ejemplo n.º 19
0
 def set_attributes(self, x, y, width, height, border_width, _class, depth, visual, value_mask, value_list):
     value_mask, value_list = 0, []
     if "back_pixmap" in values:
         value_mask |= 1
         value_list.append(get_internal(values["back_pixmap"]))
     if "back_pixel" in values:
         value_mask |= 2
         value_list.append(values["back_pixel"])
     if "border_pixmap" in values:
         value_mask |= 4
         value_list.append(values["border_pixmap"])
     if "border_pixel" in values:
         value_mask |= 8
         value_list.append(values["border_pixel"])
     if "bit_gravity" in values:
         value_mask |= 16
         value_list.append(values["bit_gravity"])
     if "win_gravity" in values:
         value_mask |= 32
         value_list.append(values["win_gravity"])
     if "backing_store" in values:
         value_mask |= 64
         value_list.append(values["backing_store"])
     if "backing_planes" in values:
         value_mask |= 128
         value_list.append(values["backing_planes"])
     if "backing_pixel" in values:
         value_mask |= 256
         value_list.append(values["backing_pixel"])
     if "override_redirect" in values:
         value_mask |= 512
         value_list.append(values["override_redirect"])
     if "save_under" in values:
         value_mask |= 1024
         value_list.append(values["save_under"])
     if "event_mask" in values:
         value_mask |= 2048
         value_list.append(values["event_mask"])
     if "dont_propagate" in values:
         value_mask |= 4096
         value_list.append(values["dont_propagate"])
     if "colormap" in values:
         value_mask |= 8192
         value_list.append(get_internal(values["colormap"]))
     if "cursor" in values:
         value_mask |= 16384
         value_list.append(get_internal(values["cursor"]))
     drawable = get_internal(self)
     buf = StringIO.StringIO()
     buf.write(pack("=xxxxIhhHHHBBII", drawable, x, y, width, height, border_width, _class, depth, visual, value_mask))
     buf.write(make_array(value_list, "I"))
     return self.conn.screensaver.send_request(ooxcb.Request(self.conn, buf.getvalue(), 3, True, False), \
         ooxcb.VoidCookie())
Ejemplo n.º 20
0
 def enable_unchecked(self):
     context = get_internal(self)
     buf = StringIO.StringIO()
     buf.write(pack("=xxxxI", context))
     return self.conn.record.send_request(ooxcb.Request(self.conn, buf.getvalue(), 5, False, False), \
         EnableContextCookie(),
         EnableContextReply)
Ejemplo n.º 21
0
 def get(self):
     context = get_internal(self)
     buf = StringIO.StringIO()
     buf.write(pack("=xxxxI", context))
     return self.conn.record.send_request(ooxcb.Request(self.conn, buf.getvalue(), 4, False, True), \
         GetContextCookie(),
         GetContextReply)
Ejemplo n.º 22
0
 def shape_offset(self, destination_kind, x_offset, y_offset):
     destination_window = get_internal(self)
     buf = StringIO.StringIO()
     buf.write(pack("=xxxxBxxxIhh", destination_kind, destination_window, x_offset, y_offset))
     return self.conn.shape.send_request(
         ooxcb.Request(self.conn, buf.getvalue(), 4, True, False), ooxcb.VoidCookie()
     )
Ejemplo n.º 23
0
 def shape_query_extents_unchecked(self):
     destination_window = get_internal(self)
     buf = StringIO.StringIO()
     buf.write(pack("=xxxxI", destination_window))
     return self.conn.shape.send_request(
         ooxcb.Request(self.conn, buf.getvalue(), 5, False, False), QueryExtentsCookie(), QueryExtentsReply
     )
Ejemplo n.º 24
0
 def shape_select_input(self, enable):
     destination_window = get_internal(self)
     buf = StringIO.StringIO()
     buf.write(pack("=xxxxIBxxx", destination_window, enable))
     return self.conn.shape.send_request(
         ooxcb.Request(self.conn, buf.getvalue(), 6, True, False), ooxcb.VoidCookie()
     )
Ejemplo n.º 25
0
 def fetch_unchecked(self):
     region = get_internal(self)
     buf = StringIO.StringIO()
     buf.write(pack("=xxxxI", region))
     return self.conn.xfixes.send_request(ooxcb.Request(self.conn, buf.getvalue(), 19, False, False), \
         FetchRegionCookie(),
         FetchRegionReply)
Ejemplo n.º 26
0
 def get_cursor_name_unchecked(self, cursor):
     cursor = get_internal(cursor)
     buf = StringIO.StringIO()
     buf.write(pack("=xxxxI", cursor))
     return self.conn.xfixes.send_request(ooxcb.Request(self.conn, buf.getvalue(), 24, False, False), \
         GetCursorNameCookie(),
         GetCursorNameReply)
Ejemplo n.º 27
0
 def shape_input_selected_unchecked(self):
     destination_window = get_internal(self)
     buf = StringIO.StringIO()
     buf.write(pack("=xxxxI", destination_window))
     return self.conn.shape.send_request(
         ooxcb.Request(self.conn, buf.getvalue(), 7, False, False), InputSelectedCookie(), InputSelectedReply
     )
Ejemplo n.º 28
0
 def query_info_unchecked(self):
     drawable = get_internal(self)
     buf = StringIO.StringIO()
     buf.write(pack("=xxxxI", drawable))
     return self.conn.screensaver.send_request(ooxcb.Request(self.conn, buf.getvalue(), 1, False, False), \
         QueryInfoCookie(),
         QueryInfoReply)
Ejemplo n.º 29
0
 def shape_get_rectangles_unchecked(self, source_kind):
     window = get_internal(self)
     buf = StringIO.StringIO()
     buf.write(pack("=xxxxIBxxx", window, source_kind))
     return self.conn.shape.send_request(
         ooxcb.Request(self.conn, buf.getvalue(), 8, False, False), GetRectanglesCookie(), GetRectanglesReply
     )
Ejemplo n.º 30
0
 def shape_rectangles_checked(self, operation, destination_kind, ordering, x_offset, y_offset, rectangles):
     rectangles_len = len(rectangles)
     destination_window = get_internal(self)
     buf = StringIO.StringIO()
     buf.write(pack("=xxxxBBBxIhh", operation, destination_kind, ordering, destination_window, x_offset, y_offset))
     rectangles.build(buf)
     return self.conn.shape.send_request(ooxcb.Request(self.conn, buf.getvalue(), 1, True, True), ooxcb.VoidCookie())