]> git.saurik.com Git - apple/icu.git/blob - icuSources/i18n/unicode/udisplaycontext.h
ICU-551.24.tar.gz
[apple/icu.git] / icuSources / i18n / unicode / udisplaycontext.h
1 /*
2 *****************************************************************************************
3 * Copyright (C) 2014, International Business Machines
4 * Corporation and others. All Rights Reserved.
5 *****************************************************************************************
6 */
7
8 #ifndef UDISPLAYCONTEXT_H
9 #define UDISPLAYCONTEXT_H
10
11 #include "unicode/utypes.h"
12
13 #if !UCONFIG_NO_FORMATTING
14
15 /**
16 * \file
17 * \brief C API: Display context types (enum values)
18 */
19
20 /**
21 * Display context types, for getting values of a particular setting.
22 * Note, the specific numeric values are internal and may change.
23 * @stable ICU 51
24 */
25 enum UDisplayContextType {
26 /**
27 * Type to retrieve the dialect handling setting, e.g.
28 * UDISPCTX_STANDARD_NAMES or UDISPCTX_DIALECT_NAMES.
29 * @stable ICU 51
30 */
31 UDISPCTX_TYPE_DIALECT_HANDLING = 0,
32 /**
33 * Type to retrieve the capitalization context setting, e.g.
34 * UDISPCTX_CAPITALIZATION_NONE, UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE,
35 * UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE, etc.
36 * @stable ICU 51
37 */
38 UDISPCTX_TYPE_CAPITALIZATION = 1
39 #ifndef U_HIDE_DRAFT_API
40 ,
41 /**
42 * Type to retrieve the display length setting, e.g.
43 * UDISPCTX_LENGTH_FULL, UDISPCTX_LENGTH_SHORT.
44 * @draft ICU 54
45 */
46 UDISPCTX_TYPE_DISPLAY_LENGTH = 2
47 #endif /* U_HIDE_DRAFT_API */
48 #ifndef U_HIDE_INTERNAL_API
49 ,
50 /**
51 * Apple-specific type to retrieve the display length setting, e.g.
52 * UADISPCTX_LENGTH_STANDARD, UADISPCTX_LENGTH_SHORT
53 * @internal ICU 54
54 */
55 UADISPCTX_TYPE_LENGTH = 32,
56 #endif /* U_HIDE_INTERNAL_API */
57 };
58 /**
59 * @stable ICU 51
60 */
61 typedef enum UDisplayContextType UDisplayContextType;
62
63 /**
64 * Display context settings.
65 * Note, the specific numeric values are internal and may change.
66 * @stable ICU 51
67 */
68 enum UDisplayContext {
69 /**
70 * ================================
71 * DIALECT_HANDLING can be set to one of UDISPCTX_STANDARD_NAMES or
72 * UDISPCTX_DIALECT_NAMES. Use UDisplayContextType UDISPCTX_TYPE_DIALECT_HANDLING
73 * to get the value.
74 */
75 /**
76 * A possible setting for DIALECT_HANDLING:
77 * use standard names when generating a locale name,
78 * e.g. en_GB displays as 'English (United Kingdom)'.
79 * @stable ICU 51
80 */
81 UDISPCTX_STANDARD_NAMES = (UDISPCTX_TYPE_DIALECT_HANDLING<<8) + 0,
82 /**
83 * A possible setting for DIALECT_HANDLING:
84 * use dialect names, when generating a locale name,
85 * e.g. en_GB displays as 'British English'.
86 * @stable ICU 51
87 */
88 UDISPCTX_DIALECT_NAMES = (UDISPCTX_TYPE_DIALECT_HANDLING<<8) + 1,
89 /**
90 * ================================
91 * CAPITALIZATION can be set to one of UDISPCTX_CAPITALIZATION_NONE,
92 * UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE,
93 * UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE,
94 * UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU, or
95 * UDISPCTX_CAPITALIZATION_FOR_STANDALONE.
96 * Use UDisplayContextType UDISPCTX_TYPE_CAPITALIZATION to get the value.
97 */
98 /**
99 * The capitalization context to be used is unknown (this is the default value).
100 * @stable ICU 51
101 */
102 UDISPCTX_CAPITALIZATION_NONE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 0,
103 /**
104 * The capitalization context if a date, date symbol or display name is to be
105 * formatted with capitalization appropriate for the middle of a sentence.
106 * @stable ICU 51
107 */
108 UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 1,
109 /**
110 * The capitalization context if a date, date symbol or display name is to be
111 * formatted with capitalization appropriate for the beginning of a sentence.
112 * @stable ICU 51
113 */
114 UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 2,
115 /**
116 * The capitalization context if a date, date symbol or display name is to be
117 * formatted with capitalization appropriate for a user-interface list or menu item.
118 * @stable ICU 51
119 */
120 UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 3,
121 /**
122 * The capitalization context if a date, date symbol or display name is to be
123 * formatted with capitalization appropriate for stand-alone usage such as an
124 * isolated name on a calendar page.
125 * @stable ICU 51
126 */
127 UDISPCTX_CAPITALIZATION_FOR_STANDALONE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 4
128 #ifndef U_HIDE_DRAFT_API
129 ,
130 /**
131 * ================================
132 * DISPLAY_LENGTH can be set to one of UDISPCTX_LENGTH_FULL or
133 * UDISPCTX_LENGTH_SHORT. Use UDisplayContextType UDISPCTX_TYPE_DISPLAY_LENGTH
134 * to get the value.
135 */
136 /**
137 * A possible setting for DISPLAY_LENGTH:
138 * use full names when generating a locale name,
139 * e.g. "United States" for US.
140 * @draft ICU 54
141 */
142 UDISPCTX_LENGTH_FULL = (UDISPCTX_TYPE_DISPLAY_LENGTH<<8) + 0,
143 /**
144 * A possible setting for DISPLAY_LENGTH:
145 * use short names when generating a locale name,
146 * e.g. "U.S." for US.
147 * @draft ICU 54
148 */
149 UDISPCTX_LENGTH_SHORT = (UDISPCTX_TYPE_DISPLAY_LENGTH<<8) + 1
150 #endif /* U_HIDE_DRAFT_API */
151 #ifndef U_HIDE_INTERNAL_API
152 ,
153 /**
154 * ================================
155 * Apple-specific LENGTH can be set to one of UADISPCTX_LENGTH_STANDARD or
156 * UADISPCTX_LENGTH_SHORT. Use UDisplayContextType UADISPCTX_TYPE_LENGTH
157 * to get the value.
158 */
159 /**
160 * A possible Apple-specific setting for LENGTH:
161 * use standard length names when generating a locale name.
162 * @internal ICU 54
163 */
164 UADISPCTX_LENGTH_STANDARD = (UADISPCTX_TYPE_LENGTH<<8) + 0,
165 /**
166 * A possible Apple-specific setting for LENGTH:
167 * use short length names (if available) when generating a locale name
168 * (in most cases short names are not available and the standard
169 * name will be used).
170 * @internal ICU 54
171 */
172 UADISPCTX_LENGTH_SHORT = (UADISPCTX_TYPE_LENGTH<<8) + 1,
173 #endif /* U_HIDE_INTERNAL_API */
174 };
175 /**
176 * @stable ICU 51
177 */
178 typedef enum UDisplayContext UDisplayContext;
179
180 #endif /* #if !UCONFIG_NO_FORMATTING */
181
182 #endif