1 | /* $Xorg: attributes.h,v 1.4 2001/03/14 18:42:44 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 |
|
---|
11 | Permission is hereby granted, free of charge, to any person obtaining a copy
|
---|
12 | of this software and associated documentation files (the "Software"), to deal
|
---|
13 | in the Software without restriction, including without limitation the rights
|
---|
14 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
---|
15 | copies of the Software, and to permit persons to whom the Software is
|
---|
16 | furnished to do so, subject to the following conditions:
|
---|
17 |
|
---|
18 | The above copyright notice and this permission notice shall be included in
|
---|
19 | all copies or substantial portions of the Software.
|
---|
20 |
|
---|
21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
---|
22 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
---|
23 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
---|
24 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
---|
25 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
---|
26 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
---|
27 |
|
---|
28 | Except as contained in this notice, the names of the copyright holders shall
|
---|
29 | not be used in advertising or otherwise to promote the sale, use or other
|
---|
30 | dealings in this Software without prior written authorization from said
|
---|
31 | copyright holders.
|
---|
32 | */
|
---|
33 |
|
---|
34 | #ifdef HAVE_DIX_CONFIG_H
|
---|
35 | #include <dix-config.h>
|
---|
36 | #endif
|
---|
37 |
|
---|
38 | #ifndef _Xp_attributes_h
|
---|
39 | #define _Xp_attributes_h 1
|
---|
40 |
|
---|
41 | #include "scrnintstr.h"
|
---|
42 | #include "AttrValid.h"
|
---|
43 |
|
---|
44 | #define BFuncArgs int ndx, ScreenPtr pScreen, int argc, char **argv
|
---|
45 | typedef Bool (*pBFunc)(BFuncArgs);
|
---|
46 |
|
---|
47 | #define VFuncArgs char *name, XpValidatePoolsRec *pValRec, float *width, float *height, int *res
|
---|
48 | typedef void (*pVFunc)(VFuncArgs);
|
---|
49 |
|
---|
50 | /*
|
---|
51 | * attributes.c
|
---|
52 | */
|
---|
53 | void XpInitAttributes(XpContextPtr pContext);
|
---|
54 | void XpBuildAttributeStore(char *printerName,
|
---|
55 | char *qualifierName);
|
---|
56 | void XpAddPrinterAttribute(char *printerName,
|
---|
57 | char *printerQualifier,
|
---|
58 | char *attributeName,
|
---|
59 | char *attributeValue);
|
---|
60 | void XpDestroyAttributes(XpContextPtr pContext);
|
---|
61 | char *XpGetConfigDir(Bool useLocale);
|
---|
62 | char *XpGetOneAttribute(XpContextPtr pContext,
|
---|
63 | XPAttributes class,
|
---|
64 | char *attributeName);
|
---|
65 | void XpPutOneAttribute(XpContextPtr pContext,
|
---|
66 | XPAttributes class,
|
---|
67 | const char* attributeName,
|
---|
68 | const char* value);
|
---|
69 | int XpRehashAttributes(void);
|
---|
70 | char *XpGetAttributes(XpContextPtr pContext,
|
---|
71 | XPAttributes class);
|
---|
72 | int XpAugmentAttributes(XpContextPtr pContext,
|
---|
73 | XPAttributes class,
|
---|
74 | char *attributes);
|
---|
75 | int XpSetAttributes(XpContextPtr pContext,
|
---|
76 | XPAttributes class,
|
---|
77 | char *attributes);
|
---|
78 | const char *XpGetPrinterAttribute(const char *printerName,
|
---|
79 | const char *attribute);
|
---|
80 | void XpGetTrayMediumFromContext(XpContextPtr pCon,
|
---|
81 | char **medium,
|
---|
82 | char **tray);
|
---|
83 | int XpSubmitJob(char *fileName, XpContextPtr pContext);
|
---|
84 |
|
---|
85 | /*
|
---|
86 | * mediaSizes.c
|
---|
87 | */
|
---|
88 | int XpGetResolution(XpContextPtr pContext);
|
---|
89 | XpOid XpGetContentOrientation(XpContextPtr pContext);
|
---|
90 | XpOid XpGetAvailableCompression(XpContextPtr pContext);
|
---|
91 | XpOid XpGetPlex(XpContextPtr pContext);
|
---|
92 | XpOid XpGetPageSize(XpContextPtr pContext,
|
---|
93 | XpOid* pTray,
|
---|
94 | const XpOidMediumSS* msss);
|
---|
95 | void XpGetMediumMillimeters(XpOid page_size,
|
---|
96 | float *width,
|
---|
97 | float *height);
|
---|
98 | void XpGetMediumDimensions(XpContextPtr pContext,
|
---|
99 | unsigned short *width,
|
---|
100 | unsigned short *height);
|
---|
101 | void XpGetReproductionArea(XpContextPtr pContext,
|
---|
102 | xRectangle *pRect);
|
---|
103 | void XpGetMaxWidthHeightRes(const char *printer_name,
|
---|
104 | const XpValidatePoolsRec* vpr,
|
---|
105 | float *width,
|
---|
106 | float *height,
|
---|
107 | int* resolution);
|
---|
108 |
|
---|
109 | /* Util.c */
|
---|
110 | char *ReplaceAnyString(char *string,
|
---|
111 | char *target,
|
---|
112 | char *replacement);
|
---|
113 | char *ReplaceFileString(char *string,
|
---|
114 | char *inFileName,
|
---|
115 | char *outFileName);
|
---|
116 | int TransferBytes(FILE *pSrcFile,
|
---|
117 | FILE *pDstFile,
|
---|
118 | int numBytes);
|
---|
119 | Bool CopyContentsAndDelete(FILE **ppSrcFile,
|
---|
120 | char **pSrcFileName,
|
---|
121 | FILE *pDstFile);
|
---|
122 | int XpSendDocumentData(ClientPtr client,
|
---|
123 | FILE *fp,
|
---|
124 | int fileLen,
|
---|
125 | int maxBufSize);
|
---|
126 | int XpFinishDocData(ClientPtr client);
|
---|
127 | Bool XpOpenTmpFile(char *mode,
|
---|
128 | char **fname,
|
---|
129 | FILE **stream);
|
---|
130 |
|
---|
131 | #endif /* _Xp_attributes_h */
|
---|