2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these librararies and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /* $XConsortium: PdmOid.h /main/9 1996/08/12 18:42:42 cde-hp $ */
28 * (c) Copyright 1996 Digital Equipment Corporation.
29 * (c) Copyright 1996 Hewlett-Packard Company.
30 * (c) Copyright 1996 International Business Machines Corp.
31 * (c) Copyright 1996 Sun Microsystems, Inc.
32 * (c) Copyright 1996 Novell, Inc.
33 * (c) Copyright 1996 FUJITSU LIMITED.
34 * (c) Copyright 1996 Hitachi.
39 #include <X11/Intrinsic.h>
42 * include the auto-generated PdmOid enum definition
44 #include "PdmOidDefs.h"
47 * list of object identifiers
49 typedef struct _PdmOidList
56 * linked list of object identifiers
58 typedef struct PdmOidNodeStruct
61 struct PdmOidNodeStruct* next;
64 typedef struct _PdmOidLinkedList
73 * PdmOidMediumSourceSize and related definitions
81 } PdmOidArea; /* (not used by PDM) */
84 * XXX need to update continuous size spec to use reals
88 unsigned long lower_bound;
89 unsigned long upper_bound;
90 } PdmOidUnsignedRange; /* (not used by PDM) */
94 PdmOidUnsignedRange range_across_feed;
95 unsigned long increment_across_feed;
96 PdmOidUnsignedRange range_in_feed;
97 unsigned long increment_in_feed;
98 Boolean long_edge_feeds;
99 PdmOidArea assured_reproduction_area;
100 } PdmOidMediumContinuousSize; /* (not used by PDM) */
105 Boolean long_edge_feeds; /* (not used by PDM) */
106 PdmOidArea assured_reproduction_area; /* (not used by PDM) */
107 } PdmOidMediumDiscreteSize;
111 PdmOidMediumDiscreteSize* list;
113 } PdmOidMediumDiscreteSizeList;
118 PdmOid input_tray; /* may be set to pdmoid_none */
119 enum { PdmOidMediumSS_DISCRETE, PdmOidMediumSS_CONTINUOUS } mstag;
122 PdmOidMediumDiscreteSizeList* discrete;
123 PdmOidMediumContinuousSize* continuous_size; /* (not used by PDM) */
124 } ms; /* "ms" is short for medium-size */
126 } PdmOidMediumSourceSize;
130 PdmOidMediumSourceSize* mss;
142 PdmOidTrayMedium* list;
144 } PdmOidTrayMediumList;
147 PDMOID_NOTIFY_UNSUPPORTED,
153 * PdmOid public methods
155 extern const char* PdmOidString(PdmOid);
156 extern int PdmOidStringLength(PdmOid);
157 extern PdmOid PdmOidFromString(const char* value);
158 extern int PdmOidMsgSet(PdmOid);
159 extern int PdmOidMsgNum(PdmOid);
160 extern const char* PdmOidDefaultMsg(PdmOid);
161 extern const char* PdmOidLocalString(PdmOid pdm_oid);
164 * PdmOidList public methods
166 extern PdmOidList* PdmOidListNew(const char* value_string);
167 extern void PdmOidListDelete(PdmOidList*);
168 #define PdmOidListCount(l) ((l) ? (l)->count : 0)
169 #define PdmOidListGetOid(l, i) ((l) ? (l)->list[(i)] : pdmoid_none)
170 extern int PdmOidListGetIndex(const PdmOidList* list, PdmOid oid);
171 extern Boolean PdmOidListHasOid(const PdmOidList* list, PdmOid oid);
174 * PdmOidLinkedList public methods
176 extern PdmOidLinkedList* PdmOidLinkedListNew();
177 extern void PdmOidLinkedListDelete(PdmOidLinkedList*);
178 #define PdmOidLinkedListCount(l) ((l) ? (l)->count : 0)
179 extern PdmOid PdmOidLinkedListGetOid(PdmOidLinkedList* list, int i);
180 extern void PdmOidLinkedListAddOid(PdmOidLinkedList* list, PdmOid oid);
181 extern int PdmOidLinkedListGetIndex(PdmOidLinkedList* list, PdmOid oid);
182 extern Boolean PdmOidLinkedListHasOid(PdmOidLinkedList* list,
184 extern PdmOid PdmOidLinkedListFirstOid(PdmOidLinkedList* list);
185 extern PdmOid PdmOidLinkedListNextOid(PdmOidLinkedList* list);
188 * PdmOidMediumSourceSize public methods
190 extern PdmOidMediumSS* PdmOidMediumSSNew(const char* value_string);
191 extern void PdmOidMediumSSDelete(PdmOidMediumSS*);
192 #define PdmOidMediumSSCount(me) ((me) ? (me)->count : 0)
193 extern PdmOidLinkedList* PdmOidMediumSSGetAllSizes(PdmOidMediumSS*);
194 extern void PdmOidMediumSSGetTraysSizes(PdmOidMediumSS*,
195 PdmOidTrayMediumList*,
200 * PdmOidTrayMediumList public methods
202 extern PdmOidTrayMediumList* PdmOidTrayMediumListNew(const char* value_string);
203 extern void PdmOidTrayMediumListDelete(PdmOidTrayMediumList* me);
204 #define PdmOidTrayMediumListCount(me) ((me) ? (me)->count : 0)
205 #define PdmOidTrayMediumListTray(me, i) \
206 ((me) ? (me)->list[(i)].input_tray : pdmoid_none)
207 #define PdmOidTrayMediumListMedium(me, i) \
208 ((me) ? (me)->list[(i)].medium : pdmoid_none)
211 * PdmOidNotify public methods
213 extern PdmOidNotify PdmOidNotifyParse(const char* value_string);
214 extern const char* PdmOidNotifyString(PdmOidNotify notify);
217 * PdmOidDocumentFormat public methods
219 extern char* PdmOidDocumentFormatParse(const char* value_string);
220 extern char* PdmOidDocumentFormatDefault(const char* value_string);
222 #endif /* _PdmOid_h - don't add any thing after this line */