~bennabiy/+junk/python-xlib

« back to all changes in this revision

Viewing changes to .pc/python3.patch/Xlib/protocol/structs.py

  • Committer: Package Import Robot
  • Author(s): Andrew Shadura, Ramkumar Ramachandra, Andrew Shadura
  • Date: 2015-08-13 08:14:19 UTC
  • mfrom: (6.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20150813081419-hdefinnghp2iydkx
Tags: 0.14+20091101-3
[ Ramkumar Ramachandra ]
* Remove useless debugging output (Closes: #565996)

[ Andrew Shadura ]
* Switch to 3.0 (quilt) format.
* Rename patches.
* Use debhelper 9 in its short form.
* Use pybuild.
* Bump Standards-Version.
* Don't build or install PostScript documentation and info files.
* Use system-provided texi2html instead of a shipped version
  (Closes: #795057).
* Update debian/copyright (Closes: #795057).
* Don't install Makefile or texi2html with the documentation.
* Set executable bit for examples.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Xlib.protocol.structs -- some common request structures
 
2
#
 
3
#    Copyright (C) 2000 Peter Liljenberg <petli@ctrl-c.liu.se>
 
4
#
 
5
#    This program is free software; you can redistribute it and/or modify
 
6
#    it under the terms of the GNU General Public License as published by
 
7
#    the Free Software Foundation; either version 2 of the License, or
 
8
#    (at your option) any later version.
 
9
#
 
10
#    This program is distributed in the hope that it will be useful,
 
11
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
#    GNU General Public License for more details.
 
14
#
 
15
#    You should have received a copy of the GNU General Public License
 
16
#    along with this program; if not, write to the Free Software
 
17
#    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
18
 
 
19
# Xlib modules
 
20
from Xlib import X
 
21
 
 
22
# Xlib.protocol modules
 
23
import rq
 
24
 
 
25
def WindowValues(arg):
 
26
    return rq.ValueList( arg, 4, 0,
 
27
                         rq.Pixmap('background_pixmap'),
 
28
                         rq.Card32('background_pixel'),
 
29
                         rq.Pixmap('border_pixmap'),
 
30
                         rq.Card32('border_pixel'),
 
31
                         rq.Gravity('bit_gravity'),
 
32
                         rq.Gravity('win_gravity'),
 
33
                         rq.Set('backing_store', 1,
 
34
                                (X.NotUseful, X.WhenMapped, X.Always)),
 
35
                         rq.Card32('backing_planes'),
 
36
                         rq.Card32('backing_pixel'),
 
37
                         rq.Bool('override_redirect'),
 
38
                         rq.Bool('save_under'),
 
39
                         rq.Card32('event_mask'),
 
40
                         rq.Card32('do_not_propagate_mask'),
 
41
                         rq.Colormap('colormap'),
 
42
                         rq.Cursor('cursor'),
 
43
                         )
 
44
 
 
45
def GCValues(arg):
 
46
    return rq.ValueList( arg, 4, 0,
 
47
                         rq.Set('function', 1,
 
48
                                (X.GXclear, X.GXand, X.GXandReverse,
 
49
                                 X.GXcopy, X.GXandInverted, X.GXnoop,
 
50
                                 X.GXxor, X.GXor, X.GXnor, X.GXequiv,
 
51
                                 X.GXinvert, X.GXorReverse, X.GXcopyInverted,
 
52
                                 X.GXorInverted, X.GXnand, X.GXset)),
 
53
                         rq.Card32('plane_mask'),
 
54
                         rq.Card32('foreground'),
 
55
                         rq.Card32('background'),
 
56
                         rq.Card16('line_width'),
 
57
                         rq.Set('line_style', 1,
 
58
                                (X.LineSolid, X.LineOnOffDash, X.LineDoubleDash)),
 
59
                         rq.Set('cap_style', 1,
 
60
                                (X.CapNotLast, X.CapButt,
 
61
                                 X.CapRound, X.CapProjecting)),
 
62
                         rq.Set('join_style', 1,
 
63
                                (X.JoinMiter, X.JoinRound, X.JoinBevel)),
 
64
                         rq.Set('fill_style', 1,
 
65
                                (X.FillSolid, X.FillTiled,
 
66
                                 X.FillStippled, X.FillOpaqueStippled)),
 
67
                         rq.Set('fill_rule', 1,
 
68
                                (X.EvenOddRule, X.WindingRule)),
 
69
                         rq.Pixmap('tile'),
 
70
                         rq.Pixmap('stipple'),
 
71
                         rq.Int16('tile_stipple_x_origin'),
 
72
                         rq.Int16('tile_stipple_y_origin'),
 
73
                         rq.Font('font'),
 
74
                         rq.Set('subwindow_mode', 1,
 
75
                                (X.ClipByChildren, X.IncludeInferiors)),
 
76
                         rq.Bool('graphics_exposures'),
 
77
                         rq.Int16('clip_x_origin'),
 
78
                         rq.Int16('clip_y_origin'),
 
79
                         rq.Pixmap('clip_mask'),
 
80
                         rq.Card16('dash_offset'),
 
81
                         rq.Card8('dashes'),
 
82
                         rq.Set('arc_mode', 1, (X.ArcChord, X.ArcPieSlice))
 
83
                         )
 
84
 
 
85
 
 
86
 
 
87
TimeCoord = rq.Struct(
 
88
    rq.Card32('time'),
 
89
    rq.Int16('x'),
 
90
    rq.Int16('y'),
 
91
    )
 
92
 
 
93
Host = rq.Struct(
 
94
    rq.Set('family', 1, (X.FamilyInternet, X.FamilyDECnet, X.FamilyChaos)),
 
95
    rq.Pad(1),
 
96
    rq.LengthOf('name', 2),
 
97
    rq.List('name', rq.Card8Obj)
 
98
    )
 
99
 
 
100
CharInfo = rq.Struct(
 
101
    rq.Int16('left_side_bearing'),
 
102
    rq.Int16('right_side_bearing'),
 
103
    rq.Int16('character_width'),
 
104
    rq.Int16('ascent'),
 
105
    rq.Int16('descent'),
 
106
    rq.Card16('attributes'),
 
107
    )
 
108
 
 
109
FontProp = rq.Struct(
 
110
    rq.Card32('name'),
 
111
    rq.Card32('value'),
 
112
    )
 
113
 
 
114
ColorItem = rq.Struct(
 
115
    rq.Card32('pixel'),
 
116
    rq.Card16('red'),
 
117
    rq.Card16('green'),
 
118
    rq.Card16('blue'),
 
119
    rq.Card8('flags'),
 
120
    rq.Pad(1),
 
121
    )
 
122
 
 
123
 
 
124
RGB = rq.Struct(
 
125
    rq.Card16('red'),
 
126
    rq.Card16('green'),
 
127
    rq.Card16('blue'),
 
128
    rq.Pad(2),
 
129
    )
 
130
 
 
131
 
 
132
Point = rq.Struct(
 
133
    rq.Int16('x'),
 
134
    rq.Int16('y'),
 
135
    )
 
136
 
 
137
Segment = rq.Struct(
 
138
    rq.Int16('x1'),
 
139
    rq.Int16('y1'),
 
140
    rq.Int16('x2'),
 
141
    rq.Int16('y2'),
 
142
    )
 
143
 
 
144
Rectangle = rq.Struct(
 
145
    rq.Int16('x'),
 
146
    rq.Int16('y'),
 
147
    rq.Card16('width'),
 
148
    rq.Card16('height'),
 
149
   )
 
150
 
 
151
Arc = rq.Struct(
 
152
    rq.Int16('x'),
 
153
    rq.Int16('y'),
 
154
    rq.Card16('width'),
 
155
    rq.Card16('height'),
 
156
    rq.Int16('angle1'),
 
157
    rq.Int16('angle2'),
 
158
   )