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