]> git.ipfire.org Git - thirdparty/cups.git/blob - cups/language.h
Load cups into easysw/current.
[thirdparty/cups.git] / cups / language.h
1 /*
2 * "$Id: language.h 5085 2006-02-06 13:27:53Z mike $"
3 *
4 * Multi-language support for the Common UNIX Printing System (CUPS).
5 *
6 * Copyright 1997-2006 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 USA
19 *
20 * Voice: (301) 373-9600
21 * EMail: cups-info@cups.org
22 * WWW: http://www.cups.org
23 *
24 * This file is subject to the Apple OS-Developed Software exception.
25 */
26
27 #ifndef _CUPS_LANGUAGE_H_
28 # define _CUPS_LANGUAGE_H_
29
30 /*
31 * Include necessary headers...
32 */
33
34 # include <locale.h>
35 # include "array.h"
36
37 # ifdef __cplusplus
38 extern "C" {
39 # endif /* __cplusplus */
40
41
42 /*
43 * Types...
44 */
45
46 typedef enum cups_encoding_e /**** Language Encodings ****/
47 {
48 CUPS_AUTO_ENCODING = -1, /* Auto-detect the encoding @private@ */
49 CUPS_US_ASCII, /* US ASCII */
50 CUPS_ISO8859_1, /* ISO-8859-1 */
51 CUPS_ISO8859_2, /* ISO-8859-2 */
52 CUPS_ISO8859_3, /* ISO-8859-3 */
53 CUPS_ISO8859_4, /* ISO-8859-4 */
54 CUPS_ISO8859_5, /* ISO-8859-5 */
55 CUPS_ISO8859_6, /* ISO-8859-6 */
56 CUPS_ISO8859_7, /* ISO-8859-7 */
57 CUPS_ISO8859_8, /* ISO-8859-8 */
58 CUPS_ISO8859_9, /* ISO-8859-9 */
59 CUPS_ISO8859_10, /* ISO-8859-10 */
60 CUPS_UTF8, /* UTF-8 */
61 CUPS_ISO8859_13, /* ISO-8859-13 */
62 CUPS_ISO8859_14, /* ISO-8859-14 */
63 CUPS_ISO8859_15, /* ISO-8859-15 */
64 CUPS_WINDOWS_874, /* CP-874 */
65 CUPS_WINDOWS_1250, /* CP-1250 */
66 CUPS_WINDOWS_1251, /* CP-1251 */
67 CUPS_WINDOWS_1252, /* CP-1252 */
68 CUPS_WINDOWS_1253, /* CP-1253 */
69 CUPS_WINDOWS_1254, /* CP-1254 */
70 CUPS_WINDOWS_1255, /* CP-1255 */
71 CUPS_WINDOWS_1256, /* CP-1256 */
72 CUPS_WINDOWS_1257, /* CP-1257 */
73 CUPS_WINDOWS_1258, /* CP-1258 */
74 CUPS_KOI8_R, /* KOI-8-R */
75 CUPS_KOI8_U, /* KOI-8-U */
76 CUPS_ISO8859_11, /* ISO-8859-11 */
77 CUPS_ISO8859_16, /* ISO-8859-16 */
78 CUPS_MAC_ROMAN, /* MacRoman */
79 CUPS_ENCODING_SBCS_END = 63, /* End of single-bybte encodings @private@ */
80
81 CUPS_WINDOWS_932, /* Japanese JIS X0208-1990 */
82 CUPS_WINDOWS_936, /* Simplified Chinese GB 2312-80 */
83 CUPS_WINDOWS_949, /* Korean KS C5601-1992 */
84 CUPS_WINDOWS_950, /* Traditional Chinese Big Five */
85 CUPS_WINDOWS_1361, /* Korean Johab */
86 CUPS_ENCODING_DBCS_END = 127, /* End of double-byte encodings @private@ */
87
88 CUPS_EUC_CN, /* EUC Simplified Chinese */
89 CUPS_EUC_JP, /* EUC Japanese */
90 CUPS_EUC_KR, /* EUC Korean */
91 CUPS_EUC_TW, /* EUC Traditional Chinese */
92 CUPS_ENCODING_VBCS_END = 191 /* End of variable-length encodings @private@ */
93 } cups_encoding_t;
94
95 typedef struct cups_lang_s /**** Language Cache Structure ****/
96 {
97 struct cups_lang_s *next; /* Next language in cache */
98 int used; /* Number of times this entry has been used. */
99 cups_encoding_t encoding; /* Text encoding */
100 char language[16]; /* Language/locale name */
101 cups_array_t *strings; /* Message strings @private@ */
102 } cups_lang_t;
103
104
105 /*
106 * Prototypes...
107 */
108
109 extern cups_lang_t *cupsLangDefault(void);
110 extern const char *cupsLangEncoding(cups_lang_t *lang);
111 extern void cupsLangFlush(void);
112 extern void cupsLangFree(cups_lang_t *lang);
113 extern cups_lang_t *cupsLangGet(const char *language);
114
115 # ifdef __cplusplus
116 }
117 # endif /* __cplusplus */
118
119 #endif /* !_CUPS_LANGUAGE_H_ */
120
121 /*
122 * End of "$Id: language.h 5085 2006-02-06 13:27:53Z mike $".
123 */