VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.0.1/AttrValid.h@ 69348

Last change on this file since 69348 was 51223, checked in by vboxsync, 11 years ago

Additions/x11/x11include: added header files for X.Org Server 1.0 and 1.1.

  • Property svn:eol-style set to native
File size: 6.8 KB
Line 
1/* $Xorg: AttrValid.h,v 1.4 2001/03/14 18:43:40 pookie Exp $ */
2/*
3(c) Copyright 1996 Hewlett-Packard Company
4(c) Copyright 1996 International Business Machines Corp.
5(c) Copyright 1996 Sun Microsystems, Inc.
6(c) Copyright 1996 Novell, Inc.
7(c) Copyright 1996 Digital Equipment Corp.
8(c) Copyright 1996 Fujitsu Limited
9(c) Copyright 1996 Hitachi, Ltd.
10
11Permission is hereby granted, free of charge, to any person obtaining a copy
12of this software and associated documentation files (the "Software"), to deal
13in the Software without restriction, including without limitation the rights
14to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15copies of the Software, and to permit persons to whom the Software is
16furnished to do so, subject to the following conditions:
17
18The above copyright notice and this permission notice shall be included in
19all copies or substantial portions of the Software.
20
21THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
25IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
26CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27
28Except as contained in this notice, the names of the copyright holders shall
29not be used in advertising or otherwise to promote the sale, use or other
30dealings in this Software without prior written authorization from said
31copyright holders.
32*/
33
34#ifdef HAVE_DIX_CONFIG_H
35#include <dix-config.h>
36#endif
37
38#ifndef _Xp_AttrValid_h
39#define _Xp_AttrValid_h
40
41#include <X11/extensions/Printstr.h>
42#include "Oid.h"
43
44#define XpNumber(a) (sizeof(a) / sizeof(*(a)))
45
46/*
47 * Attribute pool validation valid values and defaults
48 */
49typedef struct
50{
51 XpOidList* valid_content_orientations_supported;
52 XpOidList* default_content_orientations_supported;
53
54 XpOidDocFmtList* valid_document_formats_supported;
55 XpOidDocFmtList* default_document_formats_supported;
56
57 XpOidList* valid_input_trays;
58 XpOidList* valid_medium_sizes;
59
60 XpOidList* valid_plexes_supported;
61 XpOidList* default_plexes_supported;
62
63 XpOidCardList* valid_printer_resolutions_supported;
64 XpOidCardList* default_printer_resolutions_supported;
65
66 XpOidDocFmtList* valid_xp_embedded_formats_supported;
67 XpOidDocFmtList* default_xp_embedded_formats_supported;
68
69 XpOidList* valid_xp_listfonts_modes_supported;
70 XpOidList* default_xp_listfonts_modes_supported;
71
72 XpOidDocFmtList* valid_xp_raw_formats_supported;
73 XpOidDocFmtList* default_xp_raw_formats_supported;
74
75 XpOidList* valid_xp_setup_proviso;
76
77 XpOidDocFmt* default_document_format;
78 XpOidList* valid_available_compressions_supported;
79 XpOidList* default_available_compressions_supported;
80
81} XpValidatePoolsRec;
82
83/*
84 * XpOid resource access
85 */
86#define XpGetStringAttr(pContext, pool, oid) \
87 (const char*)XpGetOneAttribute(pContext, pool, (char*)XpOidString(oid))
88#define XpPutStringAttr(pContext, pool, oid, value) \
89 XpPutOneAttribute(pContext, pool, XpOidString(oid), value)
90
91#ifdef _XP_PRINT_SERVER_ /* needed for XpContextPtr in Printstr.h */
92
93/*
94 * XpOid-valued attribute access
95 */
96XpOid XpGetOidAttr(XpContextPtr pContext,
97 XPAttributes pool,
98 XpOid oid,
99 const XpOidList* valid_oid_list);
100void XpPutOidAttr(XpContextPtr pContext,
101 XPAttributes pool,
102 XpOid oid,
103 XpOid value_oid);
104void XpValidateOidAttr(XpContextPtr pContext,
105 XPAttributes pool,
106 XpOid oid,
107 const XpOidList* valid_oids,
108 XpOid default_oid);
109/*
110 * cardinal-valued attribute access
111 */
112unsigned long XpGetCardAttr(XpContextPtr pContext,
113 XPAttributes pool,
114 XpOid oid,
115 const XpOidCardList* valid_card_list);
116void XpPutCardAttr(XpContextPtr pContext,
117 XPAttributes pool,
118 XpOid oid,
119 unsigned long value_card);
120void XpValidateCardAttr(XpContextPtr pContext,
121 XPAttributes pool,
122 XpOid oid,
123 const XpOidCardList* valid_cards,
124 unsigned long default_card);
125/*
126 * XpOidList-valued attribute access
127 */
128XpOidList* XpGetListAttr(XpContextPtr pContext,
129 XPAttributes pool,
130 XpOid oid,
131 const XpOidList* valid_oid_list);
132void XpPutListAttr(XpContextPtr pContext,
133 XPAttributes pool,
134 XpOid oid,
135 const XpOidList* list);
136void XpValidateListAttr(XpContextPtr pContext,
137 XPAttributes pool,
138 XpOid oid,
139 const XpOidList* valid_oids,
140 const XpOidList* default_oids);
141/*
142 * XpOidCardList-valued attribute access
143 */
144XpOidCardList* XpGetCardListAttr(XpContextPtr pContext,
145 XPAttributes pool,
146 XpOid oid,
147 const XpOidCardList* valid_card_list);
148void XpPutCardListAttr(XpContextPtr pContext,
149 XPAttributes pool,
150 XpOid oid,
151 const XpOidCardList* list);
152void XpValidateCardListAttr(XpContextPtr pContext,
153 XPAttributes pool,
154 XpOid oid,
155 const XpOidCardList* valid_cards,
156 const XpOidCardList* default_cards);
157/*
158 * XpOidDocFmtList-valued attribute access
159 */
160XpOidDocFmtList* XpGetDocFmtListAttr(XpContextPtr pContext,
161 XPAttributes pool,
162 XpOid oid,
163 const XpOidDocFmtList* valid_fmt_list);
164void XpPutDocFmtListAttr(XpContextPtr pContext,
165 XPAttributes pool,
166 XpOid oid,
167 const XpOidDocFmtList* list);
168void XpValidateDocFmtListAttr(XpContextPtr pContext,
169 XPAttributes pool,
170 XpOid oid,
171 const XpOidDocFmtList* valid_fmts,
172 const XpOidDocFmtList* default_fmts);
173/*
174 * XpOidMediumSS-valued attribute access
175 */
176XpOidMediumSS* XpGetMediumSSAttr(XpContextPtr pContext,
177 XPAttributes pool,
178 XpOid oid,
179 const XpOidList* valid_trays,
180 const XpOidList* valid_sizes);
181void XpPutMediumSSAttr(XpContextPtr pContext,
182 XPAttributes pool,
183 XpOid oid,
184 const XpOidMediumSS* msss);
185const XpOidMediumSS* XpGetDefaultMediumSS();
186
187/*
188 * XpOidTrayMediumList-valued attribute access
189 */
190XpOidTrayMediumList* XpGetTrayMediumListAttr(XpContextPtr pContext,
191 XPAttributes pool,
192 XpOid oid,
193 const XpOidList* valid_trays,
194 const XpOidMediumSS* msss);
195void XpPutTrayMediumListAttr(XpContextPtr pContext,
196 XPAttributes pool,
197 XpOid oid,
198 const XpOidTrayMediumList* tm);
199/*
200 * Attribute pool validation
201 */
202void XpValidateAttributePool(XpContextPtr pContext,
203 XPAttributes pool,
204 const XpValidatePoolsRec* vpr);
205void XpValidatePrinterPool(XpContextPtr pContext,
206 const XpValidatePoolsRec* vpr);
207void XpValidateJobPool(XpContextPtr pContext,
208 const XpValidatePoolsRec* vpr);
209void XpValidateDocumentPool(XpContextPtr pContext,
210 const XpValidatePoolsRec* vpr);
211void XpValidatePagePool(XpContextPtr pContext,
212 const XpValidatePoolsRec* vpr);
213
214#endif /* _XP_PRINT_SERVER_ */
215
216#endif /* _Xp_AttrValid_h - don't add anything after this line */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette