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 FreePixmap(rq.Request): _request = rq.Struct( rq.Opcode(54), rq.Pad(1), rq.RequestLength(), rq.Pixmap('pixmap') )
class CreateCursor(rq.Request): _request = rq.Struct( rq.Opcode(93), rq.Pad(1), rq.RequestLength(), rq.Cursor('cid'), rq.Pixmap('source'), rq.Pixmap('mask'), rq.Card16('fore_red'), rq.Card16('fore_green'), rq.Card16('fore_blue'), rq.Card16('back_red'), rq.Card16('back_green'), rq.Card16('back_blue'), rq.Card16('x'), rq.Card16('y'), )
class NameWindowPixmap(rq.Request): _request = rq.Struct( rq.Card8('opcode'), rq.Opcode(6), rq.RequestLength(), rq.Window('window'), rq.Pixmap('pixmap'), )
class CreatePixmap(rq.Request): _request = rq.Struct( rq.Opcode(53), rq.Card8('depth'), rq.RequestLength(), rq.Pixmap('pid'), rq.Drawable('drawable'), rq.Card16('width'), rq.Card16('height'), )
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'), )
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, )), )
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'), )
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'), )
rq.Int32('base_height', default = 0), rq.Int32('win_gravity', default = 0), ) WMHints = rq.Struct( rq.Card32('flags'), rq.Card32('input', default = 0), rq.Set('initial_state', 4, # withdrawn is totally bogus according to # ICCCM, but some window managers seem to # use this value to identify dockapps. # Oh well. ( Xutil.WithdrawnState, Xutil.NormalState, Xutil.IconicState ), default = Xutil.NormalState), rq.Pixmap('icon_pixmap', default = 0), rq.Window('icon_window', default = 0), rq.Int32('icon_x', default = 0), rq.Int32('icon_y', default = 0), rq.Pixmap('icon_mask', default = 0), rq.Window('window_group', default = 0), ) WMState = rq.Struct( rq.Set('state', 4, ( Xutil.WithdrawnState, Xutil.NormalState, Xutil.IconicState )), rq.Window('icon', ( X.NONE, )), )