Remove now unnecessary files as everything is implemented in xcbgen.
[free-sw/xcb/proto] / src / xprint.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <!--
3 Copyright (C) 2005 Jeremy Kolb.
4 All Rights Reserved.
5
6 Permission is hereby granted, free of charge, to any person ob/Sintaining a copy
7 of this software and associated documentation files (the "Software"), to deal
8 in the Software without restriction, including without limitation the rights
9 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 copies of the Software, and to permit persons to whom the Software is
11 furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice shall be included in all
14 copies or substantial portions of the Software.
15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
23 Except as contained in this notice, the names of the authors or their
24 institutions shall not be used in advertising or otherwise to promote the
25 sale, use or other dealings in this Software without prior written
26 authorization from the authors.
27 -->
28
29 <xcb header="xprint" extension-xname="XpExtension" extension-name="XPrint"
30     extension-multiword="true" major-version="1" minor-version="0">
31
32     <!-- Conforms to XPRINT 1.0 -->
33
34     <import>xproto</import>
35     
36     <typedef oldname="char" newname="STRING8" />
37
38     <!-- Types -->
39     <struct name="PRINTER">
40         <field type="CARD32" name="nameLen" />
41         <list type="STRING8" name="name">
42             <fieldref>nameLen</fieldref>
43         </list>
44         <!-- Padding -->
45         <field type="CARD32" name="descLen" />
46         <list type="STRING8" name="description">
47             <fieldref>descLen</fieldref>
48         </list>
49         <!-- More padding -->
50     </struct>
51
52     <!--<typedef oldname="CARD32" newname="PCONTEXT" />-->
53     <xidtype name="PCONTEXT" />
54
55     <!-- "PrintGetDocumentData" -->
56     <enum name="GetDoc">
57         <item name="Finished"><value>0</value></item>
58             <item name="SecondConsumer"><value>1</value></item>
59     </enum>
60
61     <!-- Event Mask ("PrintSelectInput") -->
62     <enum name="EvMask">
63         <item name="NoEventMask"><value>0</value></item>
64         <item name="PrintMask"><bit>0</bit></item>
65         <item name="AttributeMask"><bit>1</bit></item>
66     </enum>
67
68     <!-- "PrintNotify" detail -->
69     <enum name="Detail">
70         <item name="StartJobNotify"><value>1</value></item>
71         <item name="EndJobNotify"><value>2</value></item>
72         <item name="StartDocNotify"><value>3</value></item>
73         <item name="EndDocNotify"><value>4</value></item>
74         <item name="StartPageNotify"><value>5</value></item>
75         <item name="EndPageNotify"><value>6</value></item>
76     </enum>
77
78     <!-- "AttributeNotify" detail -->
79     <enum name="Attr">
80         <item name="JobAttr"><value>1</value></item>
81         <item name="DocAttr"><value>2</value></item>
82         <item name="PageAttr"><value>3</value></item>
83         <item name="PrinterAttr"><value>4</value></item>
84         <item name="ServerAttr"><value>5</value></item>
85         <item name="MediumAttr"><value>6</value></item>
86         <item name="SpoolerAttr"><value>7</value></item>
87     </enum>
88     
89     
90     <!-- Requests -->
91     <request name="PrintQueryVersion" opcode="0">
92         <reply>
93             <pad bytes="1" />
94             <field type="CARD16" name="major_version" />
95             <field type="CARD16" name="minor_version" />
96         </reply>
97     </request>
98
99     <request name="PrintGetPrinterList" opcode="1">
100         <field type="CARD32" name="printerNameLen" />
101         <field type="CARD32" name="localeLen" />
102         <list type="STRING8" name="printer_name">
103             <fieldref>printerNameLen</fieldref>
104         </list>
105         <!-- There's some padding in here... -->
106         <list type="STRING8" name="locale">
107             <fieldref>localeLen</fieldref>
108         </list>
109         <reply>
110             <pad bytes="1" />
111             <field type="CARD32" name="listCount" />
112             <pad bytes="20" />
113             <list type="PRINTER" name="printers">
114                 <fieldref>listCount</fieldref>
115             </list>
116         </reply>
117     </request>
118
119     <request name="PrintRehashPrinterList" opcode="20" />
120
121     <request name="CreateContext" opcode="2">
122         <field type="CARD32" name="context_id" />
123         <field type="CARD32" name="printerNameLen" />
124         <field type="CARD32" name="localeLen" />
125         <list type="STRING8" name="printerName">
126             <fieldref>printerNameLen</fieldref>
127         </list>
128         <!-- padding -->
129         <list type="STRING8" name="locale">
130             <fieldref>localeLen</fieldref>
131         </list>
132     </request>
133
134     <request name="PrintSetContext" opcode="3">
135         <field type="CARD32" name="context" />
136     </request>
137
138     <request name="PrintGetContext" opcode="4">
139         <reply>
140             <pad bytes="1" />
141             <field type="CARD32" name="context" />
142         </reply>
143     </request>
144
145     <request name="PrintDestroyContext" opcode="5">
146         <field type="CARD32" name="context" />
147     </request>
148
149     <request name="PrintGetScreenOfContext" opcode="6">
150         <reply>
151             <pad bytes="1" />
152             <field type="WINDOW" name="root" />
153         </reply>
154     </request>
155
156     <request name="PrintStartJob" opcode="7">
157         <field type="CARD8" name="output_mode"/>
158     </request>
159
160     <request name="PrintEndJob" opcode="8">
161         <field type="BOOL"  name="cancel" />
162     </request>
163
164     <request name="PrintStartDoc" opcode="9">
165         <field type="CARD8" name="driver_mode" />
166     </request>
167
168     <request name="PrintEndDoc" opcode="10">
169         <field type="BOOL" name="cancel" />
170     </request>
171
172     <request name="PrintPutDocumentData" opcode="11">
173         <field type="DRAWABLE" name="drawable" />
174         <field type="CARD32" name="len_data" />
175         <field type="CARD16" name="len_fmt" />
176         <field type="CARD16" name="len_options" />
177         <list type="BYTE" name="data">
178             <fieldref>len_data</fieldref>
179         </list>
180         <!-- padding -->
181         <list type="STRING8" name="doc_format" />
182         <!-- padding -->
183         <list type="STRING8" name="options" />
184     </request>
185
186     <request name="PrintGetDocumentData" opcode="12">
187         <field type="PCONTEXT" name="context" />
188         <field type="CARD32" name="max_bytes" />
189         <reply>
190             <pad bytes="1" />
191             <field type="CARD32" name="status_code" />
192             <field type="CARD32" name="finished_flag" />
193             <field type="CARD32" name="dataLen" />
194             <pad bytes="12" />
195             <list type="BYTE" name="data">
196                 <fieldref>dataLen</fieldref>
197             </list>
198         </reply>
199     </request>
200
201     <request name="PrintStartPage" opcode="13">
202         <field type="WINDOW" name="window" />
203     </request>
204
205     <request name="PrintEndPage" opcode="14">
206         <field type="BOOL" name="cancel" />
207         <pad bytes="3" />
208     </request>
209
210     <request name="PrintSelectInput" opcode="15">
211         <field type="PCONTEXT" name="context" />
212         <valueparam value-mask-type="CARD32"
213                     value-mask-name="event_mask"
214                     value-list-name="event_list" />
215     </request>
216
217     <request name="PrintInputSelected" opcode="16">
218         <field type="PCONTEXT" name="context" />
219         <reply>
220             <pad bytes="1" />
221             <valueparam value-mask-type="CARD32"
222                             value-mask-name="event_mask"
223                             value-list-name="event_list" />
224             <valueparam value-mask-type="CARD32"
225                             value-mask-name="all_events_mask"
226                             value-list-name="all_events_list" />
227         </reply>
228     </request>
229
230     <request name="PrintGetAttributes" opcode="17">
231         <field type="PCONTEXT" name="context" />
232         <field type="CARD8" name="pool" />
233         <pad bytes="3" />
234         <reply>
235             <pad bytes="1" />
236             <field type="CARD32" name="stringLen" />
237             <pad bytes="20" />
238             <field type="STRING8" name="attributes" />
239         </reply>
240     </request>
241
242     <request name="PrintGetOneAttributes" opcode="19">
243         <field type="PCONTEXT" name="context" />
244         <field type="CARD32" name="nameLen" />
245         <field type="CARD8" name="pool" />
246         <pad bytes="3" />
247         <list type="STRING8" name="name">
248             <fieldref>nameLen</fieldref>
249         </list>
250         <reply>
251             <pad bytes="1" />
252             <field type="CARD32" name="valueLen" />
253             <pad bytes="20" />
254             <list type="STRING8" name="value">
255                 <fieldref>valueLen</fieldref>
256             </list>
257         </reply>
258     </request>
259
260     <request name="PrintSetAttributes" opcode="18">
261         <field type="PCONTEXT" name="context" />
262         <field type="CARD32" name="stringLen" />
263         <field type="CARD8" name="pool" />
264         <field type="CARD8" name="rule" />
265         <pad bytes="2" />
266         <list type="STRING8" name="attributes" />
267     </request>
268
269     <request name="PrintGetPageDimensions" opcode="21">
270         <field type="PCONTEXT" name="context" />
271         <reply>
272             <pad bytes="1" />
273             <field type="CARD16" name="width" />
274             <field type="CARD16" name="height" />
275             <field type="CARD16" name="offset_x" />
276             <field type="CARD16" name="offset_y" />
277             <field type="CARD16" name="reproducible_width" />
278             <field type="CARD16" name="reproducible_height" />
279         </reply>
280     </request>
281
282     <request name="PrintQueryScreens" opcode="22">
283         <reply>
284             <pad bytes="1" />
285             <field type="CARD32" name="listCount" />
286             <pad bytes="20" />
287             <list type="WINDOW" name="roots">
288                 <fieldref>listCount</fieldref>
289             </list>
290             <!-- There may be a WINDOW rootWindow here... -->
291         </reply>
292     </request>
293
294     <request name="PrintSetImageResolution" opcode="23">
295         <field type="PCONTEXT" name="context" />
296         <field type="CARD16" name="image_resolution" />
297         <reply>
298             <field type="BOOL" name="status" />
299             <field type="CARD16" name="previous_resolutions" />
300         </reply>
301     </request>
302
303     <request name="PrintGetImageResolution" opcode="24">
304         <field type="PCONTEXT" name="context" />
305         <reply>
306             <pad bytes="1" />
307             <field type="CARD16" name="image_resolution" />
308         </reply>
309     </request>
310
311
312     <!-- Events -->
313     <event name="Notify" number="0">
314         <field type="CARD8" name="detail" />
315         <field type="PCONTEXT" name="context" />
316         <field type="BOOL" name="cancel" />
317     </event>
318
319     <event name="AttributNotify" number="1">
320         <field type="CARD8" name="detail" />
321         <field type="PCONTEXT" name="context" />
322     </event>
323
324     <!-- Errors -->
325     <error name="BadContext" number="0" />
326     <error name="BadSequence" number="1" />
327
328 </xcb>
329