Exemple #1
0
class ConfigureOutputProperty(rq.Request):
    _request = rq.Struct(
        rq.Card8('opcode'),
        rq.Opcode(12),
        rq.RequestLength(),
        rq.Card32('output'),
        rq.Card32('property'),
        rq.Bool('pending'),
        rq.Bool('range'),
        rq.Pad(2),
        rq.List('valid_values', rq.Card32Obj),
    )
Exemple #2
0
class CreateContext(rq.Request):
    _request = rq.Struct(
        rq.Card8('opcode'),
        rq.Opcode(1),
        rq.RequestLength(),
        rq.Card32('context'),  # Record_RC
        rq.Card8('element_header'),  # Record_Element_Header
        rq.Pad(3),
        rq.LengthOf('clients', 4),
        rq.LengthOf('ranges', 4),
        rq.List('clients', rq.Card32Obj),
        rq.List('ranges', Record_Range))
Exemple #3
0
class TranslateCoords(rq.ReplyRequest):
    _request = rq.Struct(
        rq.Opcode(40),
        rq.Pad(1),
        rq.RequestLength(),
        rq.Window('src_wid'),
        rq.Window('dst_wid'),
        rq.Int16('src_x'),
        rq.Int16('src_y'),
    )

    _reply = rq.Struct(
        rq.ReplyCode(),
        rq.Card8('same_screen'),
        rq.Card16('sequence_number'),
        rq.ReplyLength(),
        rq.Window('child', (X.NONE,)),
        rq.Int16('x'),
        rq.Int16('y'),
        rq.Pad(16),
    )
Exemple #4
0
class SetCrtcGamma(rq.Request):
    _request = rq.Struct(
        rq.Card8('opcode'),
        rq.Opcode(24),
        rq.RequestLength(),
        rq.Card32('crtc'),
        rq.Card16('size'),
        rq.Pad(2),
        rq.List('red', rq.Card16Obj),
        rq.List('green', rq.Card16Obj),
        rq.List('blue', rq.Card16Obj),
    )
Exemple #5
0
class AllocColorCells(rq.ReplyRequest):
    _request = rq.Struct(
        rq.Opcode(86),
        rq.Bool('contiguous'),
        rq.RequestLength(),
        rq.Colormap('cmap'),
        rq.Card16('colors'),
        rq.Card16('planes'),
        )

    _reply = rq.Struct(
        rq.ReplyCode(),
        rq.Pad(1),
        rq.Card16('sequence_number'),
        rq.ReplyLength(),
        rq.LengthOf('pixels', 2),
        rq.LengthOf('masks', 2),
        rq.Pad(20),
        rq.List('pixels', rq.Card32Obj),
        rq.List('masks', rq.Card32Obj),
        )
Exemple #6
0
class GrabKey(rq.Request):
    _request = rq.Struct(
        rq.Opcode(33),
        rq.Bool('owner_events'),
        rq.RequestLength(),
        rq.Window('grab_window'),
        rq.Card16('modifiers'),
        rq.Card8('key'),
        rq.Set('pointer_mode', 1, (X.GrabModeSync, X.GrabModeAsync)),
        rq.Set('keyboard_mode', 1, (X.GrabModeSync, X.GrabModeAsync)),
        rq.Pad(3),
        )
class SetCrtcTransform(rq.Request):
    _request = rq.Struct(
        rq.Card8('opcode'),
        rq.Opcode(26),
        rq.RequestLength(),
        rq.Card32('crtc'),
        rq.Object('transform', Render_Transform),
        rq.LengthOf('filter_name', 2),
        rq.Pad(2),
        rq.String8('filter_name'),
        rq.List('filter_params', rq.Card32Obj), #FIXME: The protocol says FIXED? http://cgit.freedesktop.org/xorg/proto/randrproto/tree/randrproto.txt#n2161
        )
Exemple #8
0
class Offset(rq.Request):

    _request = rq.Struct(
        rq.Card8('opcode'),
        rq.Opcode(4),
        rq.RequestLength(),
        KIND('destination_kind'),
        rq.Pad(3),
        rq.Window('destination_window'),
        rq.Int16('x_offset'),
        rq.Int16('y_offset'),
    )
Exemple #9
0
class QueryExtension(rq.ReplyRequest):
    _request = rq.Struct(
        rq.Opcode(98),
        rq.Pad(1),
        rq.RequestLength(),
        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.Card8('present'),
        rq.Card8('major_opcode'),
        rq.Card8('first_event'),
        rq.Card8('first_error'),
        rq.Pad(20),
        )
class ChangeKeyboardControl(rq.Request):
    _request = rq.Struct(
        rq.Opcode(102), rq.Pad(1), rq.RequestLength(),
        rq.ValueList(
            'attrs', 4, 0, rq.Int8('key_click_percent'),
            rq.Int8('bell_percent'), rq.Int16('bell_pitch'),
            rq.Int16('bell_duration'), rq.Card8('led'),
            rq.Set('led_mode', 1,
                   (X.LedModeOff, X.LedModeOn)), rq.Card8('key'),
            rq.Set('auto_repeat_mode', 1,
                   (X.AutoRepeatModeOff, X.AutoRepeatModeOn,
                    X.AutoRepeatModeDefault))))
Exemple #11
0
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)
        )
Exemple #12
0
class OutputPropertyNotify(rq.Event):
    _code = None
    _fields = rq.Struct(
        rq.Card8('type'),
        rq.Card8('sub_code'),
        rq.Card16('sequence_number'),
        rq.Window('window'),
        rq.Card32('output'),
        rq.Card32('atom'),
        rq.Card32('timestamp'),
        rq.Card8('state'),
        rq.Pad(11),
    )
class Mask(rq.Request):
    _request = rq.Struct(
        rq.Card8('opcode'),
        rq.Opcode(2),
        rq.RequestLength(),
        rq.Card8('operation'),
        rq.Set('region', 1, (ShapeBounding, ShapeClip)),
        rq.Pad(2),
        rq.Window('window'),
        rq.Int16('x'),
        rq.Int16('y'),
        rq.Pixmap('source', (X.NONE, )),
    )
Exemple #14
0
class QueryPictFormats(rq.ReplyRequest):
    _request = rq.Struct(
        rq.Card8('opcode'),
        rq.Opcode(1),
        rq.RequestLength(),
    )

    _reply = rq.Struct(
        rq.ReplyCode(),
        rq.Pad(1),
        rq.Card16('sequence_number'),
        rq.ReplyLength(),
        rq.LengthOf('formats', 4),
        rq.LengthOf('screens', 4),
        rq.Card32('depths', 4),
        rq.Card32('visuals', 4),
        rq.LengthOf('subpixels', 4),
        rq.Pad(4),
        rq.List('formats', PictFormInfo),
        rq.List('screens', PictScreen),
        rq.List('subpixels', SubPixelObj),
    )
Exemple #15
0
class ChangeProperty(rq.Request):
    _request = rq.Struct(
        rq.Opcode(18),
        rq.Set('mode', 1, (X.PropModeReplace, X.PropModePrepend, X.PropModeAppend)),
        rq.RequestLength(),
        rq.Window('window'),
        rq.Card32('property'),
        rq.Card32('type'),
        rq.Format('data', 1),
        rq.Pad(3),
        rq.LengthOf('data', 4),
        rq.PropertyData('data'),
        )
Exemple #16
0
class QueryPointer(rq.ReplyRequest):
    _request = rq.Struct(
        rq.Opcode(38),
        rq.Pad(1),
        rq.RequestLength(),
        rq.Window('window')
        )

    _reply = rq.Struct(
        rq.ReplyCode(),
        rq.Card8('same_screen'),
        rq.Card16('sequence_number'),
        rq.ReplyLength(),
        rq.Window('root'),
        rq.Window('child', (X.NONE, )),
        rq.Int16('root_x'),
        rq.Int16('root_y'),
        rq.Int16('win_x'),
        rq.Int16('win_y'),
        rq.Card16('mask'),
        rq.Pad(6),
        )
Exemple #17
0
class RecolorCursor(rq.Request):
    _request = rq.Struct(
        rq.Opcode(96),
        rq.Pad(1),
        rq.RequestLength(),
        rq.Cursor('cursor'),
        rq.Card16('fore_red'),
        rq.Card16('fore_green'),
        rq.Card16('fore_blue'),
        rq.Card16('back_red'),
        rq.Card16('back_green'),
        rq.Card16('back_blue'),
        )
Exemple #18
0
class WarpPointer(rq.Request):
    _request = rq.Struct(
        rq.Opcode(41),
        rq.Pad(1),
        rq.RequestLength(),
        rq.Window('src_window'),
        rq.Window('dst_window'),
        rq.Int16('src_x'),
        rq.Int16('src_y'),
        rq.Card16('src_width'),
        rq.Card16('src_height'),
        rq.Int16('dst_x'),
        rq.Int16('dst_y'),
        )
Exemple #19
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 Combine(rq.Request):
    _request = rq.Struct(
        rq.Card8('opcode'),
        rq.Opcode(3),
        rq.RequestLength(),
        rq.Card8('operation'),
        rq.Set('dest_region', 1, (ShapeBounding, ShapeClip)),
        rq.Set('source_region', 1, (ShapeBounding, ShapeClip)),
        rq.Pad(1),
        rq.Window('dest'),
        rq.Int16('x'),
        rq.Int16('y'),
        rq.Window('source'),
    )
class Rectangles(rq.Request):
    _request = rq.Struct(
        rq.Card8('opcode'),
        rq.Opcode(1),
        rq.RequestLength(),
        rq.Card8('operation'),
        rq.Set('region', 1, (ShapeBounding, ShapeClip)),
        rq.Card8('ordering'),
        rq.Pad(1),
        rq.Window('window'),
        rq.Int16('x'),
        rq.Int16('y'),
        rq.List('rectangles', structs.Rectangle),
    )
Exemple #22
0
class _SetCrtcConfig(rq.ReplyRequest):
    _request = rq.Struct(
        rq.Card8('opcode'),
        rq.Opcode(21),
        rq.RequestLength(),
        rq.Card32('crtc'),
        rq.Card32('timestamp'),
        rq.Card32('config_timestamp'),
        rq.Int16('x'),
        rq.Int16('y'),
        rq.Card32('mode'),
        rq.Card16('rotation'),
        rq.Pad(2),
        rq.List('outputs', rq.Card32Obj),
        )
    _reply = rq.Struct(
        rq.ReplyCode(),
        rq.Card8('status'),
        rq.Card16('sequence_number'),
        rq.ReplyLength(),
        rq.Card32('new_timestamp'),
        rq.Pad(20),
        )
Exemple #23
0
class TriFan(rq.Request):
    _request = rq.Struct(
        rq.Card8('opcode'),
        rq.Opcode(13),
        rq.RequestLength(),
        PictOp('op'),
        rq.Pad(3),
        rq.Picture('src'),
        rq.Picture('dst'),
        PictFormat('mask_format', (X.NONE, )),
        rq.Int16('src_x'),
        rq.Int16('src_y'),
        rq.List('points', PointFix),
    )
Exemple #24
0
class ChangeOutputProperty(rq.Request):
    _request = rq.Struct(
        rq.Card8('opcode'),
        rq.Opcode(13),
        rq.RequestLength(),
        rq.Card32('output'),
        rq.Card32('property'),
        rq.Card32('type'),
        rq.Format('value', 1),
        rq.Card8('mode'),
        rq.Pad(2),
        rq.LengthOf('value', 4),
        rq.PropertyData('value'),
    )
Exemple #25
0
class Triangles(rq.Request):
    _request = rq.Struct(
        rq.Card8('opcode'),
        rq.Opcode(11),
        rq.RequestLength(),
        PictOp('op'),
        rq.Pad(3),
        rq.Picture('src'),
        rq.Picture('dst'),
        PictFormat('mask_format', (X.NONE, )),
        rq.Int16('src_x'),
        rq.Int16('src_y'),
        rq.List('triangles', Triangle),
    )
Exemple #26
0
class ShapeNotify(rq.Event):
    _code = None
    _fields = rq.Struct(rq.Card8('type'),
                        rq.Set('region', 1, (ShapeBounding, ShapeClip)),
                        rq.Card16('sequence_number'),
                        rq.Window('window'),
                        rq.Int16('x'),
                        rq.Int16('y'),
                        rq.Card16('width'),
                        rq.Card16('height'),
                        rq.Card32('time'),
                        rq.Bool('shaped'),
                        rq.Pad(11),
                        )
Exemple #27
0
class Mask(rq.Request):

    _request = rq.Struct(
        rq.Card8('opcode'),
        rq.Opcode(2),
        rq.RequestLength(),
        OP('operation'),
        KIND('destination_kind'),
        rq.Pad(2),
        rq.Window('destination_window'),
        rq.Int16('x_offset'),
        rq.Int16('y_offset'),
        rq.Pixmap('source_bitmap'),
    )
Exemple #28
0
class Combine(rq.Request):

    _request = rq.Struct(
        rq.Card8('opcode'),
        rq.Opcode(3),
        rq.RequestLength(),
        OP('operation'),
        KIND('destination_kind'),
        KIND('source_kind'),
        rq.Pad(1),
        rq.Window('destination_window'),
        rq.Int16('x_offset'),
        rq.Int16('y_offset'),
        rq.Window('source_window'),
    )
Exemple #29
0
class Rectangles(rq.Request):

    _request = rq.Struct(
        rq.Card8('opcode'),
        rq.Opcode(1),
        rq.RequestLength(),
        OP('operation'),
        KIND('destination_kind'),
        rq.Card8('ordering'),
        rq.Pad(1),
        rq.Window('destination_window'),
        rq.Int16('x_offset'),
        rq.Int16('y_offset'),
        rq.List('rectangles', structs.Rectangle, pad=0),
    )
Exemple #30
0
class NotifyEventData(rq.Event):
    _code = None
    _fields = rq.Struct(
        rq.Card8('type'),
        KIND('shape_kind'),
        rq.Card16('sequence_number'),
        rq.Window('affected_window'),
        rq.Int16('extents_x'),
        rq.Int16('extents_y'),
        rq.Card16('extents_width'),
        rq.Card16('extents_height'),
        rq.Card32('server_time'),
        rq.Card8('shaped'),
        rq.Pad(11),
    )