Wed, 31 Dec 2014 07:22:50 +0100
Correct previous dual key logic pending first delivery installment.
1 /*
2 *****************************************************************************************
3 * Copyright (C) 2013, International Business Machines
4 * Corporation and others. All Rights Reserved.
5 *****************************************************************************************
6 */
8 #ifndef UDISPLAYCONTEXT_H
9 #define UDISPLAYCONTEXT_H
11 #include "unicode/utypes.h"
13 #if !UCONFIG_NO_FORMATTING
15 /* Dont hide with #ifndef U_HIDE_DRAFT_API, needed by virtual methods */
16 /**
17 * \file
18 * \brief C API: Display context types (enum values)
19 */
21 /**
22 * Display context types, for getting values of a particular setting.
23 * Note, the specific numeric values are internal and may change.
24 * @draft ICU 51
25 */
26 enum UDisplayContextType {
27 #ifndef U_HIDE_DRAFT_API
28 /**
29 * Type to retrieve the dialect handling setting, e.g.
30 * UDISPCTX_STANDARD_NAMES or UDISPCTX_DIALECT_NAMES.
31 * @draft ICU 51
32 */
33 UDISPCTX_TYPE_DIALECT_HANDLING = 0,
34 /**
35 * Type to retrieve the capitalization context setting, e.g.
36 * UDISPCTX_CAPITALIZATION_NONE, UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE,
37 * UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE, etc.
38 * @draft ICU 51
39 */
40 UDISPCTX_TYPE_CAPITALIZATION = 1
41 #endif /* U_HIDE_DRAFT_API */
42 };
43 /**
44 * @draft ICU 51
45 */
46 typedef enum UDisplayContextType UDisplayContextType;
48 /* Dont hide with #ifndef U_HIDE_DRAFT_API, needed by virtual methods */
49 /**
50 * Display context settings.
51 * Note, the specific numeric values are internal and may change.
52 * @draft ICU 51
53 */
54 enum UDisplayContext {
55 #ifndef U_HIDE_DRAFT_API
56 /**
57 * ================================
58 * DIALECT_HANDLING can be set to one of UDISPCTX_STANDARD_NAMES or
59 * UDISPCTX_DIALECT_NAMES. Use UDisplayContextType UDISPCTX_TYPE_DIALECT_HANDLING
60 * to get the value.
61 */
62 /**
63 * A possible setting for DIALECT_HANDLING:
64 * use standard names when generating a locale name,
65 * e.g. en_GB displays as 'English (United Kingdom)'.
66 * @draft ICU 51
67 */
68 UDISPCTX_STANDARD_NAMES = (UDISPCTX_TYPE_DIALECT_HANDLING<<8) + 0,
69 /**
70 * A possible setting for DIALECT_HANDLING:
71 * use dialect names, when generating a locale name,
72 * e.g. en_GB displays as 'British English'.
73 * @draft ICU 51
74 */
75 UDISPCTX_DIALECT_NAMES = (UDISPCTX_TYPE_DIALECT_HANDLING<<8) + 1,
76 /**
77 * ================================
78 * CAPITALIZATION can be set to one of UDISPCTX_CAPITALIZATION_NONE,
79 * UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE,
80 * UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE,
81 * UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU, or
82 * UDISPCTX_CAPITALIZATION_FOR_STANDALONE.
83 * Use UDisplayContextType UDISPCTX_TYPE_CAPITALIZATION to get the value.
84 */
85 /**
86 * The capitalization context to be used is unknown (this is the default value).
87 * @draft ICU 51
88 */
89 UDISPCTX_CAPITALIZATION_NONE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 0,
90 /**
91 * The capitalization context if a date, date symbol or display name is to be
92 * formatted with capitalization appropriate for the middle of a sentence.
93 * @draft ICU 51
94 */
95 UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 1,
96 /**
97 * The capitalization context if a date, date symbol or display name is to be
98 * formatted with capitalization appropriate for the beginning of a sentence.
99 * @draft ICU 51
100 */
101 UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 2,
102 /**
103 * The capitalization context if a date, date symbol or display name is to be
104 * formatted with capitalization appropriate for a user-interface list or menu item.
105 * @draft ICU 51
106 */
107 UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 3,
108 /**
109 * The capitalization context if a date, date symbol or display name is to be
110 * formatted with capitalization appropriate for stand-alone usage such as an
111 * isolated name on a calendar page.
112 * @draft ICU 51
113 */
114 UDISPCTX_CAPITALIZATION_FOR_STANDALONE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 4
115 #endif /* U_HIDE_DRAFT_API */
116 };
117 /**
118 * @draft ICU 51
119 */
120 typedef enum UDisplayContext UDisplayContext;
122 #endif /* #if !UCONFIG_NO_FORMATTING */
124 #endif