]> git.ipfire.org Git - thirdparty/cups.git/blob - cups/language.h
OS/2 porting stuff.
[thirdparty/cups.git] / cups / language.h
1 /*
2 * "$Id: language.h,v 1.21 2002/01/27 21:16:11 mike Exp $"
3 *
4 * Multi-language support for the Common UNIX Printing System (CUPS).
5 *
6 * Copyright 1997-2002 by Easy Software Products.
7 *
8 * These coded instructions, statements, and computer programs are the
9 * property of Easy Software Products and are protected by Federal
10 * copyright law. Distribution and use rights are outlined in the file
11 * "LICENSE.txt" which should have been included with this file. If this
12 * file is missing or damaged please contact Easy Software Products
13 * at:
14 *
15 * Attn: CUPS Licensing Information
16 * Easy Software Products
17 * 44141 Airport View Drive, Suite 204
18 * Hollywood, Maryland 20636-3111 USA
19 *
20 * Voice: (301) 373-9603
21 * EMail: cups-info@cups.org
22 * WWW: http://www.cups.org
23 */
24
25 #ifndef _CUPS_LANGUAGE_H_
26 # define _CUPS_LANGUAGE_H_
27
28 /*
29 * Include necessary headers...
30 */
31
32 # include <locale.h>
33
34 # ifdef __cplusplus
35 extern "C" {
36 # endif /* __cplusplus */
37
38 /*
39 * Messages...
40 */
41
42 typedef enum /**** Message Indices ****/
43 {
44 CUPS_MSG_OK,
45 CUPS_MSG_CANCEL,
46 CUPS_MSG_HELP,
47 CUPS_MSG_QUIT,
48 CUPS_MSG_CLOSE,
49 CUPS_MSG_YES,
50 CUPS_MSG_NO,
51 CUPS_MSG_ON,
52 CUPS_MSG_OFF,
53 CUPS_MSG_SAVE,
54 CUPS_MSG_DISCARD,
55 CUPS_MSG_DEFAULT,
56 CUPS_MSG_OPTIONS,
57 CUPS_MSG_MORE_INFO,
58 CUPS_MSG_BLACK,
59 CUPS_MSG_COLOR,
60 CUPS_MSG_CYAN,
61 CUPS_MSG_MAGENTA,
62 CUPS_MSG_YELLOW,
63 CUPS_MSG_COPYRIGHT,
64 CUPS_MSG_GENERAL,
65 CUPS_MSG_PRINTER,
66 CUPS_MSG_IMAGE,
67 CUPS_MSG_HPGL2,
68 CUPS_MSG_EXTRA,
69 CUPS_MSG_DOCUMENT,
70 CUPS_MSG_OTHER,
71 CUPS_MSG_PRINT_PAGES,
72 CUPS_MSG_ENTIRE_DOCUMENT,
73 CUPS_MSG_PAGE_RANGE,
74 CUPS_MSG_REVERSE_ORDER,
75 CUPS_MSG_PAGE_FORMAT,
76 CUPS_MSG_1_UP,
77 CUPS_MSG_2_UP,
78 CUPS_MSG_4_UP,
79 CUPS_MSG_IMAGE_SCALING,
80 CUPS_MSG_USE_NATURAL_IMAGE_SIZE,
81 CUPS_MSG_ZOOM_BY_PERCENT,
82 CUPS_MSG_ZOOM_BY_PPI,
83 CUPS_MSG_MIRROR_IMAGE,
84 CUPS_MSG_COLOR_SATURATION,
85 CUPS_MSG_COLOR_HUE,
86 CUPS_MSG_FIT_TO_PAGE,
87 CUPS_MSG_SHADING,
88 CUPS_MSG_DEFAULT_PEN_WIDTH,
89 CUPS_MSG_GAMMA_CORRECTION,
90 CUPS_MSG_BRIGHTNESS,
91 CUPS_MSG_ADD,
92 CUPS_MSG_DELETE,
93 CUPS_MSG_MODIFY,
94 CUPS_MSG_PRINTER_URI,
95 CUPS_MSG_PRINTER_NAME,
96 CUPS_MSG_PRINTER_LOCATION,
97 CUPS_MSG_PRINTER_INFO,
98 CUPS_MSG_PRINTER_MAKE_AND_MODEL,
99 CUPS_MSG_DEVICE_URI,
100 CUPS_MSG_FORMATTING_PAGE,
101 CUPS_MSG_PRINTING_PAGE,
102 CUPS_MSG_INITIALIZING_PRINTER,
103 CUPS_MSG_PRINTER_STATE,
104 CUPS_MSG_ACCEPTING_JOBS,
105 CUPS_MSG_NOT_ACCEPTING_JOBS,
106 CUPS_MSG_PRINT_JOBS,
107 CUPS_MSG_CLASS,
108 CUPS_MSG_LOCAL,
109 CUPS_MSG_REMOTE,
110 CUPS_MSG_DUPLEXING,
111 CUPS_MSG_STAPLING,
112 CUPS_MSG_FAST_COPIES,
113 CUPS_MSG_COLLATED_COPIES,
114 CUPS_MSG_PUNCHING,
115 CUPS_MSG_COVERING,
116 CUPS_MSG_BINDING,
117 CUPS_MSG_SORTING,
118 CUPS_MSG_SMALL,
119 CUPS_MSG_MEDIUM,
120 CUPS_MSG_LARGE,
121 CUPS_MSG_VARIABLE,
122 CUPS_MSG_IDLE,
123 CUPS_MSG_PROCESSING,
124 CUPS_MSG_STOPPED,
125 CUPS_MSG_ALL,
126 CUPS_MSG_ODD,
127 CUPS_MSG_EVEN_PAGES,
128 CUPS_MSG_DARKER_LIGHTER,
129 CUPS_MSG_MEDIA_SIZE,
130 CUPS_MSG_MEDIA_TYPE,
131 CUPS_MSG_MEDIA_SOURCE,
132 CUPS_MSG_ORIENTATION,
133 CUPS_MSG_PORTRAIT,
134 CUPS_MSG_LANDSCAPE,
135 CUPS_MSG_JOB_STATE,
136 CUPS_MSG_JOB_NAME,
137 CUPS_MSG_USER_NAME,
138 CUPS_MSG_PRIORITY,
139 CUPS_MSG_COPIES,
140 CUPS_MSG_FILE_SIZE,
141 CUPS_MSG_PENDING,
142 CUPS_MSG_OUTPUT_MODE,
143 CUPS_MSG_RESOLUTION,
144 CUPS_MSG_TEXT,
145 CUPS_MSG_PRETTYPRINT,
146 CUPS_MSG_MARGINS,
147 CUPS_MSG_LEFT,
148 CUPS_MSG_RIGHT,
149 CUPS_MSG_BOTTOM,
150 CUPS_MSG_TOP,
151 CUPS_MSG_FILENAME,
152 CUPS_MSG_PRINT,
153 CUPS_MSG_HTTP_BASE = 200,
154 CUPS_MSG_HTTP_END = 505,
155 CUPS_MSG_MAX
156 } cups_msg_t;
157
158 typedef enum /**** Language Encodings ****/
159 {
160 CUPS_US_ASCII,
161 CUPS_ISO8859_1,
162 CUPS_ISO8859_2,
163 CUPS_ISO8859_3,
164 CUPS_ISO8859_4,
165 CUPS_ISO8859_5,
166 CUPS_ISO8859_6,
167 CUPS_ISO8859_7,
168 CUPS_ISO8859_8,
169 CUPS_ISO8859_9,
170 CUPS_ISO8859_10,
171 CUPS_UTF8,
172 CUPS_ISO8859_13,
173 CUPS_ISO8859_14,
174 CUPS_ISO8859_15,
175 CUPS_WINDOWS_874,
176 CUPS_WINDOWS_1250,
177 CUPS_WINDOWS_1251,
178 CUPS_WINDOWS_1252,
179 CUPS_WINDOWS_1253,
180 CUPS_WINDOWS_1254,
181 CUPS_WINDOWS_1255,
182 CUPS_WINDOWS_1256,
183 CUPS_WINDOWS_1257,
184 CUPS_WINDOWS_1258
185 } cups_encoding_t;
186
187 typedef struct cups_lang_str /**** Language Cache Structure ****/
188 {
189 struct cups_lang_str *next; /* Next language in cache */
190 int used; /* Number of times this entry has been used. */
191 cups_encoding_t encoding; /* Text encoding */
192 char language[16]; /* Language/locale name */
193 char *messages[CUPS_MSG_MAX];
194 /* Message array */
195 } cups_lang_t;
196
197
198 /*
199 * Prototypes...
200 */
201
202 # if defined(WIN32) || defined(__EMX__)
203 # define cupsLangDefault() cupsLangGet(setlocale(LC_ALL, ""))
204 # else
205 # define cupsLangDefault() cupsLangGet(setlocale(LC_MESSAGES, ""))
206 # endif /* WIN32 || __EMX__ */
207
208 extern char *cupsLangEncoding(cups_lang_t *lang);
209 extern void cupsLangFlush(void);
210 extern void cupsLangFree(cups_lang_t *lang);
211 extern cups_lang_t *cupsLangGet(const char *language);
212 # define cupsLangString(lang,msg) (lang)->messages[(msg)]
213
214 # ifdef __cplusplus
215 }
216 # endif /* __cplusplus */
217
218 #endif /* !_CUPS_LANGUAGE_H_ */
219
220 /*
221 * End of "$Id: language.h,v 1.21 2002/01/27 21:16:11 mike Exp $".
222 */