Example #1
0
class XIPassiveGrabDevice(rq.ReplyRequest):
    _request = rq.Struct(
        rq.Card8('opcode'),
        rq.Opcode(54),
        rq.RequestLength(),
        rq.Card32('time'),
        rq.Window('grab_window'),
        rq.Cursor('cursor', (X.NONE, )),
        rq.Card32('detail'),
        DEVICEID('deviceid'),
        rq.LengthOf('modifiers', 2),
        rq.LengthOf('mask', 2),
        rq.Set('grab_type', 1, (GrabtypeButton, GrabtypeKeycode, GrabtypeEnter,
                                GrabtypeFocusIn, GrabtypeTouchBegin)),
        rq.Set('grab_mode', 1, (GrabModeSync, GrabModeAsync)),
        rq.Set('paired_device_mode', 1, (GrabModeSync, GrabModeAsync)),
        rq.Bool('owner_events'),
        rq.Pad(2),
        Mask('mask'),
        rq.List('modifiers', rq.Card32),
    )

    _reply = rq.Struct(
        rq.ReplyCode(),
        rq.Pad(1),
        rq.Card16('sequence_number'),
        rq.ReplyLength(),
        rq.LengthOf('modifiers', 2),
        rq.Pad(22),
        rq.List('modifiers', rq.Card32),
    )
Example #2
0
class GetWindowAttributes(rq.ReplyRequest):
    _request = rq.Struct(
        rq.Opcode(3),
        rq.Pad(1),
        rq.RequestLength(),
        rq.Window('window')
        )

    _reply = rq.Struct(
        rq.ReplyCode(),
        rq.Card8('backing_store'),
        rq.Card16('sequence_number'),
        rq.ReplyLength(),
        rq.Card32('visual'),
        rq.Card16('win_class'),
        rq.Card8('bit_gravity'),
        rq.Card8('win_gravity'),
        rq.Card32('backing_bit_planes'),
        rq.Card32('backing_pixel'),
        rq.Card8('save_under'),
        rq.Card8('map_is_installed'),
        rq.Card8('map_state'),
        rq.Card8('override_redirect'),
        rq.Colormap('colormap', (X.NONE, )),
        rq.Card32('all_event_masks'),
        rq.Card32('your_event_mask'),
        rq.Card16('do_not_propagate_mask'),
        rq.Pad(2),
        )
Example #3
0
class SetPanning(rq.ReplyRequest):
    _request = rq.Struct(
        rq.Card8('opcode'),
        rq.Opcode(29),
        rq.RequestLength(),
        rq.Card32('crtc'),
        rq.Card32('timestamp'),
        rq.Card16('left'),
        rq.Card16('top'),
        rq.Card16('width'),
        rq.Card16('height'),
        rq.Card16('track_left'),
        rq.Card16('track_top'),
        rq.Card16('track_width'),
        rq.Card16('track_height'),
        rq.Int16('border_left'),
        rq.Int16('border_top'),
        rq.Int16('border_right'),
        rq.Int16('border_bottom'),
    )
    _reply = rq.Struct(
        rq.ReplyCode(),
        rq.Card8('status'),
        rq.Card16('sequence_number'),
        rq.ReplyLength(),
        rq.Card32('new_timestamp'),
        rq.Pad(20),
    )
Example #4
0
class GetScreenInfo(rq.ReplyRequest):
    _request = rq.Struct(
        rq.Card8('opcode'),
        rq.Opcode(5),
        rq.RequestLength(),
        rq.Window('window'),
    )
    _reply = rq.Struct(
        rq.ReplyCode(),
        rq.Card8('set_of_rotations'),
        rq.Card16('sequence_number'),
        rq.ReplyLength(),
        rq.Window('root'),
        rq.Card32('timestamp'),
        rq.Card32('config_timestamp'),
        rq.LengthOf('sizes', 2),
        rq.Card16('size_id'),
        rq.Card16('rotation'),
        rq.Card16('rate'),  # added in version 1.1
        rq.Card16(
            'n_rate_ents'
        ),  # XCB's protocol description disagrees with the X headers on this; ignoring.
        rq.Pad(2),
        rq.List('sizes', RandR_ScreenSizes),
        #rq.List('rates', RandR_Rates) #FIXME: Why does uncommenting this cause an error?
    )
Example #5
0
class _GetOutputInfo(rq.ReplyRequest):
    _request = rq.Struct(
        rq.Card8('opcode'),
        rq.Opcode(9),
        rq.RequestLength(),
        rq.Card32('output'),
        rq.Card32('config_timestamp'),
        )
    _reply = rq.Struct(
        rq.ReplyCode(),
        rq.Card8('status'),
        rq.Card16('sequence_number'),
        rq.ReplyLength(),
        rq.Card32('timestamp'),
        rq.Card32('crtc'),
        rq.Card32('mm_width'),
        rq.Card32('mm_height'),
        rq.Card8('connection'),
        rq.Card8('subpixel_order'),
        rq.LengthOf('crtcs', 2),
        rq.LengthOf('modes', 2),
        rq.Card16('num_preferred'),
        rq.LengthOf('clones', 2),
        rq.LengthOf('name', 2),
        rq.List('crtcs', rq.Card32Obj),
        rq.List('modes', rq.Card32Obj),
        rq.List('clones', rq.Card32Obj),
        rq.String8('name'),
)
Example #6
0
class _GetCrtcInfo(rq.ReplyRequest):
    _request = rq.Struct(
        rq.Card8('opcode'),
        rq.Opcode(20),
        rq.RequestLength(),
        rq.Card32('crtc'),
        rq.Card32('config_timestamp'),
        )
    _reply = rq.Struct(
        rq.ReplyCode(),
        rq.Card8('status'),
        rq.Card16('sequence_number'),
        rq.ReplyLength(),
        rq.Card32('timestamp'),
        rq.Int16('x'),
        rq.Int16('y'),
        rq.Card16('width'),
        rq.Card16('height'),
        rq.Card32('mode'),
        rq.Card16('rotation'),
        rq.Card16('possible_rotations'),
        rq.LengthOf('outputs', 2),
        rq.LengthOf('possible_outputs', 2),
        rq.List('outputs', rq.Card32Obj),
        rq.List('possible_outputs', rq.Card32Obj),
        )
Example #7
0
class QueryVersion(rq.ReplyRequest):
    _request = rq.Struct(rq.Card8('opcode'), rq.Opcode(0), rq.RequestLength(),
                         rq.Card16('major_version'),
                         rq.Card16('minor_version'))
    _reply = rq.Struct(rq.ReplyCode(), rq.Pad(1), rq.Card16('sequence_number'),
                       rq.ReplyLength(), rq.Card16('major_version'),
                       rq.Card16('minor_version'), rq.Pad(20))
Example #8
0
class AllocNamedColor(rq.ReplyRequest):
    _request = rq.Struct(
        rq.Opcode(85),
        rq.Pad(1),
        rq.RequestLength(),
        rq.Colormap('cmap'),
        rq.LengthOf('name', 2),
        rq.Pad(2),
        rq.String8('name'),
        )

    _reply = rq.Struct(
        rq.ReplyCode(),
        rq.Pad(1),
        rq.Card16('sequence_number'),
        rq.ReplyLength(),
        rq.Card32('pixel'),
        rq.Card16('exact_red'),
        rq.Card16('exact_green'),
        rq.Card16('exact_blue'),
        rq.Card16('screen_red'),
        rq.Card16('screen_green'),
        rq.Card16('screen_blue'),
        rq.Pad(8),
        )
Example #9
0
class GetCrtcTransform(rq.ReplyRequest):
    _request = rq.Struct(
        rq.Card8('opcode'),
        rq.Opcode(27),
        rq.RequestLength(),
        rq.Card32('crtc'),
    )
    _reply = rq.Struct(
        rq.ReplyCode(),
        rq.Card8('status'),
        rq.Card16('sequence_number'),
        rq.ReplyLength(),
        rq.Object('pending_transform', Render_Transform),
        rq.Bool('has_transforms'),
        rq.Pad(3),
        rq.Object('current_transform', Render_Transform),
        rq.Pad(4),
        rq.LengthOf('pending_filter_name', 2),
        rq.LengthOf('pending_filter_params', 2),
        rq.LengthOf('current_filter_name', 2),
        rq.LengthOf('current_filter_params', 2),
        rq.String8('pending_filter_name'),
        rq.List(
            'pending_filter_params', rq.Card32Obj
        ),  #FIXME: The protocol says FIXED? http://cgit.freedesktop.org/xorg/proto/randrproto/tree/randrproto.txt#n2161
        rq.String8('current_filter_name'),
        rq.List(
            'current_filter_params', rq.Card32Obj
        ),  #FIXME: The protocol says FIXED? http://cgit.freedesktop.org/xorg/proto/randrproto/tree/randrproto.txt#n2161
    )
Example #10
0
class QueryFont(rq.ReplyRequest):
    _request = rq.Struct(
        rq.Opcode(47),
        rq.Pad(1),
        rq.RequestLength(),
        rq.Fontable('font')
        )

    _reply = rq.Struct(
        rq.ReplyCode(),
        rq.Pad(1),
        rq.Card16('sequence_number'),
        rq.ReplyLength(),
        rq.Object('min_bounds', structs.CharInfo),
        rq.Pad(4),
        rq.Object('max_bounds', structs.CharInfo),
        rq.Pad(4),
        rq.Card16('min_char_or_byte2'),
        rq.Card16('max_char_or_byte2'),
        rq.Card16('default_char'),
        rq.LengthOf('properties', 2),
        rq.Card8('draw_direction'),
        rq.Card8('min_byte1'),
        rq.Card8('max_byte1'),
        rq.Card8('all_chars_exist'),
        rq.Int16('font_ascent'),
        rq.Int16('font_descent'),
        rq.LengthOf('char_infos', 4),
        rq.List('properties', structs.FontProp),
        rq.List('char_infos', structs.CharInfo),
        )
Example #11
0
class AllocColorPlanes(rq.ReplyRequest):
    _request = rq.Struct(
        rq.Opcode(87),
        rq.Bool('contiguous'),
        rq.RequestLength(),
        rq.Colormap('cmap'),
        rq.Card16('colors'),
        rq.Card16('red'),
        rq.Card16('green'),
        rq.Card16('blue'),
        )

    _reply = rq.Struct(
        rq.ReplyCode(),
        rq.Pad(1),
        rq.Card16('sequence_number'),
        rq.ReplyLength(),
        rq.LengthOf('pixels', 2),
        rq.Pad(2),
        rq.Card32('red_mask'),
        rq.Card32('green_mask'),
        rq.Card32('blue_mask'),
        rq.Pad(8),
        rq.List('pixels', rq.Card32Obj),
        )
Example #12
0
class QueryExtents(rq.ReplyRequest):

    _request = rq.Struct(
        rq.Card8('opcode'),
        rq.Opcode(5),
        rq.RequestLength(),
        rq.Window('destination_window'),
    )

    _reply = rq.Struct(
        rq.ReplyCode(),
        rq.Pad(1),
        rq.Card16('sequence_number'),
        rq.ReplyLength(),
        rq.Card8('bounding_shaped'),
        rq.Card8('clip_shaped'),
        rq.Pad(2),
        rq.Int16('bounding_shape_extents_x'),
        rq.Int16('bounding_shape_extents_y'),
        rq.Card16('bounding_shape_extents_width'),
        rq.Card16('bounding_shape_extents_height'),
        rq.Int16('clip_shape_extents_x'),
        rq.Int16('clip_shape_extents_y'),
        rq.Card16('clip_shape_extents_width'),
        rq.Card16('clip_shape_extents_height'),
    )
Example #13
0
class XIGrabDevice(rq.ReplyRequest):
    _request = rq.Struct(
        rq.Card8('opcode'),
        rq.Opcode(51),
        rq.RequestLength(),
        rq.Window('grab_window'),
        rq.Card32('time'),
        rq.Cursor('cursor', (X.NONE, )),
        DEVICEID('deviceid'),
        rq.Set('grab_mode', 1, (GrabModeSync, GrabModeAsync)),
        rq.Set('paired_device_mode', 1, (GrabModeSync, GrabModeAsync)),
        rq.Bool('owner_events'),
        rq.Pad(1),
        rq.LengthOf('mask', 2),
        Mask('mask'),
    )

    _reply = rq.Struct(
        rq.ReplyCode(),
        rq.Pad(1),
        rq.Card16('sequence_number'),
        rq.ReplyLength(),
        rq.Card8('status'),
        rq.Pad(23),
    )
Example #14
0
class QueryVersion(rq.ReplyRequest):
    _request = rq.Struct(rq.Card8("opcode"), rq.Opcode(ResQueryVersion),
                         rq.RequestLength(), rq.Card8("client_major"),
                         rq.Card8("client_minor"), rq.Pad(2))
    _reply = rq.Struct(rq.ReplyCode(), rq.Pad(1), rq.Card16("sequence_number"),
                       rq.ReplyLength(), rq.Card16("server_major"),
                       rq.Card16("server_minor"), rq.Pad(20))
Example #15
0
class QueryClientResources(rq.ReplyRequest):
    _request = rq.Struct(rq.Card8("opcode"),
                         rq.Opcode(ResQueryClientResources),
                         rq.RequestLength(), rq.Card32("client"))
    _reply = rq.Struct(rq.ReplyCode(), rq.Pad(1), rq.Card16("sequence_number"),
                       rq.ReplyLength(), rq.LengthOf("types", 4), rq.Pad(20),
                       rq.List("types", Type))
Example #16
0
class QueryClientIds(rq.ReplyRequest):
    _request = rq.Struct(rq.Card8("opcode"), rq.Opcode(ResQueryClientIds),
                         rq.RequestLength(), rq.LengthOf("specs", 4),
                         rq.List("specs", ClientIdSpec))
    _reply = rq.Struct(rq.ReplyCode(), rq.Pad(1), rq.Card16("sequence_number"),
                       rq.ReplyLength(), rq.LengthOf("ids", 4), rq.Pad(20),
                       rq.List("ids", ClientIdValue))
Example #17
0
class QueryClientPixmapBytes(rq.ReplyRequest):
    _request = rq.Struct(rq.Card8("opcode"),
                         rq.Opcode(ResQueryClientPixmapBytes),
                         rq.RequestLength(), rq.Card32("client"))
    _reply = rq.Struct(rq.ReplyCode(), rq.Pad(1), rq.Card16("sequence_number"),
                       rq.ReplyLength(), rq.Card32("bytes"),
                       rq.Card32("bytes_overflow"), rq.Pad(16))
Example #18
0
class _GetOutputProperty(rq.ReplyRequest):
    _request = rq.Struct(
        rq.Card8('opcode'),
        rq.Opcode(15),
        rq.RequestLength(),
        rq.Card32('output'),
        rq.Card32('property'),
        rq.Card32('type'),
        rq.Card32('long_offset'),
        rq.Card32('long_length'),
        rq.Bool('delete'),
        rq.Bool('pending'),
        rq.Pad(2),
        )
    _reply = rq.Struct(
        rq.ReplyCode(),
        rq.Format('value', 1),
        rq.Card16('sequence_number'),
        rq.ReplyLength(),
        rq.Card32('property_type'),
        rq.Card32('bytes_after'),
        rq.LengthOf('value', 4),
        rq.Pad(12),
        rq.List('value', rq.Card8Obj),
        )
Example #19
0
class QueryResourceBytes(rq.ReplyRequest):
    _request = rq.Struct(rq.Card8("opcode"), rq.Opcode(ResQueryResourceBytes),
                         rq.RequestLength(), rq.Card32("client"),
                         rq.LengthOf("specs", 4),
                         rq.List("specs", ResourceIdSpec))
    _reply = rq.Struct(rq.ReplyCode(), rq.Pad(1), rq.Card16("sequence_number"),
                       rq.ReplyLength(), rq.LengthOf("sizes", 4), rq.Pad(20),
                       rq.List("sizes", ResourceSizeValue))
class GetGeometry(rq.ReplyRequest):
    _request = rq.Struct(rq.Opcode(14), rq.Pad(1), rq.RequestLength(),
                         rq.Drawable('drawable'))

    _reply = rq.Struct(rq.ReplyCode(), rq.Card8('depth'),
                       rq.Card16('sequence_number'), rq.ReplyLength(),
                       rq.Window('root'), rq.Int16('x'), rq.Int16('y'),
                       rq.Card16('width'), rq.Card16('height'),
                       rq.Card16('border_width'), rq.Pad(10))
class GetModifierMapping(rq.ReplyRequest):
    _request = rq.Struct(
        rq.Opcode(119),
        rq.Pad(1),
        rq.RequestLength(),
    )

    _reply = rq.Struct(rq.ReplyCode(), rq.Format('keycodes', 1),
                       rq.Card16('sequence_number'), rq.ReplyLength(),
                       rq.Pad(24), rq.ModifierMapping('keycodes'))
Example #22
0
class GetOverlayWindow(rq.ReplyRequest):
    _request = rq.Struct(rq.Card8('opcode'), rq.Opcode(7), rq.RequestLength(),
                         rq.Window('window'))
    _reply = rq.Struct(
        rq.ReplyCode(),
        rq.Pad(1),
        rq.Card16('sequence_number'),
        rq.ReplyLength(),
        rq.Window('overlay_window'),
        rq.Pad(20),
    )
class GetSelectionOwner(rq.ReplyRequest):
    _request = rq.Struct(rq.Opcode(23), rq.Pad(1), rq.RequestLength(),
                         rq.Card32('selection'))

    _reply = rq.Struct(
        rq.ReplyCode(),
        rq.Pad(1),
        rq.Card16('sequence_number'),
        rq.ReplyLength(),
        rq.Window('owner', (X.NONE, )),
        rq.Pad(20),
    )
class ListProperties(rq.ReplyRequest):
    _request = rq.Struct(rq.Opcode(21), rq.Pad(1), rq.RequestLength(),
                         rq.Window('window'))

    _reply = rq.Struct(
        rq.ReplyCode(),
        rq.Pad(1),
        rq.Card16('sequence_number'),
        rq.ReplyLength(),
        rq.LengthOf('atoms', 2),
        rq.Pad(22),
        rq.List('atoms', rq.Card32Obj),
    )
class GetAtomName(rq.ReplyRequest):
    _request = rq.Struct(rq.Opcode(17), rq.Pad(1), rq.RequestLength(),
                         rq.Card32('atom'))

    _reply = rq.Struct(
        rq.ReplyCode(),
        rq.Pad(1),
        rq.Card16('sequence_number'),
        rq.ReplyLength(),
        rq.LengthOf('name', 2),
        rq.Pad(22),
        rq.String8('name'),
    )
Example #26
0
class SecurityGenerateAuthorization(rq.ReplyRequest):
    # The order of fields here does not match the specifications I've seen
    # online, but it *does* match with the X.org implementation.  I guess the
    # spec is out-of-date.
    _request = rq.Struct(rq.Card8('opcode'), rq.Opcode(1), rq.RequestLength(),
                         rq.LengthOf('auth_proto', 2),
                         rq.LengthOf('auth_data', 2), rq.Card32('value_mask'),
                         rq.String8('auth_proto'), rq.Binary('auth_data'),
                         rq.List('values', rq.Card32Obj))
    _reply = rq.Struct(rq.ReplyCode(), rq.Pad(1), rq.Card16('sequence_number'),
                       rq.ReplyLength(), AUTHID('authid'),
                       rq.LengthOf('auth_data_return', 2), rq.Pad(18),
                       rq.Binary('auth_data_return'))
class ListInstalledColormaps(rq.ReplyRequest):
    _request = rq.Struct(rq.Opcode(83), rq.Pad(1), rq.RequestLength(),
                         rq.Window('window'))

    _reply = rq.Struct(
        rq.ReplyCode(),
        rq.Pad(1),
        rq.Card16('sequence_number'),
        rq.ReplyLength(),
        rq.LengthOf('cmaps', 2),
        rq.Pad(22),
        rq.List('cmaps', rq.ColormapObj),
    )
Example #28
0
class IsActive(rq.ReplyRequest):
    _request = rq.Struct(
        rq.Card8('opcode'),
        rq.Opcode(4),
        rq.RequestLength(),
    )
    _reply = rq.Struct(
        rq.ReplyCode(),
        rq.Pad(1),
        rq.Card16('sequence_number'),
        rq.ReplyLength(),
        rq.Card32('state'),
        rq.Pad(20),
    )
Example #29
0
class QueryKeymap(rq.ReplyRequest):
    _request = rq.Struct(
        rq.Opcode(44),
        rq.Pad(1),
        rq.RequestLength(),
        )

    _reply = rq.Struct(
        rq.ReplyCode(),
        rq.Pad(1),
        rq.Card16('sequence_number'),
        rq.ReplyLength(),
        rq.FixedList('map', 32, rq.Card8Obj),
        )
Example #30
0
class InputSelected(rq.ReplyRequest):

    _request = rq.Struct(
        rq.Card8('opcode'),
        rq.Opcode(7),
        rq.RequestLength(),
        rq.Window('destination_window'),
    )

    _reply = rq.Struct(
        rq.ReplyCode(),
        rq.Card8('enabled'),
        rq.Card16('sequence_number'),
        rq.ReplyLength(),
    )