Beispiel #1
0
def GCValues(arg):
    return rq.ValueList(
        arg, 4, 0,
        rq.Set('function', 1,
               (X.GXclear, X.GXand, X.GXandReverse, X.GXcopy, X.GXandInverted,
                X.GXnoop, X.GXxor, X.GXor, X.GXnor, X.GXequiv, X.GXinvert,
                X.GXorReverse, X.GXcopyInverted, X.GXorInverted, X.GXnand,
                X.GXset)), rq.Card32('plane_mask'), rq.Card32('foreground'),
        rq.Card32('background'), rq.Card16('line_width'),
        rq.Set('line_style', 1,
               (X.LineSolid, X.LineOnOffDash, X.LineDoubleDash)),
        rq.Set('cap_style', 1,
               (X.CapNotLast, X.CapButt, X.CapRound, X.CapProjecting)),
        rq.Set('join_style', 1, (X.JoinMiter, X.JoinRound, X.JoinBevel)),
        rq.Set(
            'fill_style', 1,
            (X.FillSolid, X.FillTiled, X.FillStippled, X.FillOpaqueStippled)),
        rq.Set('fill_rule', 1, (X.EvenOddRule, X.WindingRule)),
        rq.Pixmap('tile'), rq.Pixmap('stipple'),
        rq.Int16('tile_stipple_x_origin'), rq.Int16('tile_stipple_y_origin'),
        rq.Font('font'),
        rq.Set('subwindow_mode', 1, (X.ClipByChildren, X.IncludeInferiors)),
        rq.Bool('graphics_exposures'), rq.Int16('clip_x_origin'),
        rq.Int16('clip_y_origin'), rq.Pixmap('clip_mask'),
        rq.Card16('dash_offset'), rq.Card8('dashes'),
        rq.Set('arc_mode', 1, (X.ArcChord, X.ArcPieSlice)))
class ConfigureWindow(rq.Request):
    _request = rq.Struct(
        rq.Opcode(12), rq.Pad(1), rq.RequestLength(), rq.Window('window'),
        rq.ValueList(
            'attrs', 2, 2, rq.Int16('x'), rq.Int16('y'), rq.Card16('width'),
            rq.Card16('height'), rq.Int16('border_width'),
            rq.Window('sibling'),
            rq.Set('stack_mode', 1,
                   (X.Above, X.Below, X.TopIf, X.BottomIf, X.Opposite))))
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))))
Beispiel #4
0
def PictureValues(arg):
    return rq.ValueList(
        arg,
        2,
        2,
        Repeat('repeat'),
        rq.Picture('alpha_map'),
        rq.Int16('alpha_x_origin'),
        rq.Int16('alpha_y_origin'),
        rq.Int16('clip_x_origin'),
        rq.Int16('clip_y_origin'),
        rq.Pixmap('clip_mask'),
        rq.Bool('graphics_exposures'),
        rq.Set('subwindow_mode', 1, (X.ClipByChildren, X.IncludeInferiors)),
        PolyEdge('poly_edge'),
        PolyMode('poly_mode'),
        Atom('dither'),
        rq.Bool('component_alpha'),
    )
Beispiel #5
0
def WindowValues(arg):
    return rq.ValueList(
        arg,
        4,
        0,
        rq.Pixmap('background_pixmap'),
        rq.Card32('background_pixel'),
        rq.Pixmap('border_pixmap'),
        rq.Card32('border_pixel'),
        rq.Gravity('bit_gravity'),
        rq.Gravity('win_gravity'),
        rq.Set('backing_store', 1, (X.NotUseful, X.WhenMapped, X.Always)),
        rq.Card32('backing_planes'),
        rq.Card32('backing_pixel'),
        rq.Bool('override_redirect'),
        rq.Bool('save_under'),
        rq.Card32('event_mask'),
        rq.Card32('do_not_propagate_mask'),
        rq.Colormap('colormap'),
        rq.Cursor('cursor'),
    )