Beispiel #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())
Beispiel #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())
Beispiel #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())
Beispiel #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())
Beispiel #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())
Beispiel #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())
Beispiel #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())
Beispiel #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())
Beispiel #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())
Beispiel #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())
Beispiel #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())
Beispiel #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())
Beispiel #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())
Beispiel #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)
Beispiel #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())
Beispiel #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())
Beispiel #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())
Beispiel #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())
Beispiel #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())
Beispiel #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)
Beispiel #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)
Beispiel #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()
     )
Beispiel #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
     )
Beispiel #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()
     )
Beispiel #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)
Beispiel #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)
Beispiel #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
     )
Beispiel #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)
Beispiel #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
     )
Beispiel #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())