• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2 *****************************************************************************************
3 * Copyright (C) 2012, 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 /* Dont hide with #ifndef U_HIDE_INTERNAL_API, needed by virtual methods */
16 /**
17  * Display context types, for getting values of a particular setting.
18  * Note, the specific numeric values are internal and may change.
19  * @internal ICU 50 technology preview
20  */
21 enum UDisplayContextType {
22     /**
23      * Type to retrieve the dialect handling setting, e.g.
24      * UDISPCTX_STANDARD_NAMES or UDISPCTX_DIALECT_NAMES.
25      * @internal ICU 50 technology preview
26      */
27     UDISPCTX_TYPE_DIALECT_HANDLING = 0,
28     /**
29      * Type to retrieve the capitalization context setting, e.g.
30      * UDISPCTX_CAPITALIZATION_NONE, UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE,
31      * UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE, etc.
32      * @internal ICU 50 technology preview
33      */
34     UDISPCTX_TYPE_CAPITALIZATION = 1
35 };
36 /**
37 *  @internal ICU 50 technology preview
38 */
39 typedef enum UDisplayContextType UDisplayContextType;
40 
41 /* Dont hide with #ifndef U_HIDE_INTERNAL_API, needed by virtual methods */
42 /**
43  * Display context settings.
44  * Note, the specific numeric values are internal and may change.
45  * @internal ICU 50 technology preview
46  */
47 enum UDisplayContext {
48     /**
49      * ================================
50      * DIALECT_HANDLING can be set to one of UDISPCTX_STANDARD_NAMES or
51      * UDISPCTX_DIALECT_NAMES. Use UDisplayContextType UDISPCTX_TYPE_DIALECT_HANDLING
52      * to get the value.
53      */
54     /**
55      * A possible setting for DIALECT_HANDLING:
56      * use standard names when generating a locale name,
57      * e.g. en_GB displays as 'English (United Kingdom)'.
58      * @internal ICU 50 technology preview
59      */
60     UDISPCTX_STANDARD_NAMES = (UDISPCTX_TYPE_DIALECT_HANDLING<<8) + 0,
61     /**
62      * A possible setting for DIALECT_HANDLING:
63      * use dialect names, when generating a locale name,
64      * e.g. en_GB displays as 'British English'.
65      * @internal ICU 50 technology preview
66      */
67     UDISPCTX_DIALECT_NAMES = (UDISPCTX_TYPE_DIALECT_HANDLING<<8) + 1,
68     /**
69      * ================================
70      * CAPITALIZATION can be set to one of UDISPCTX_CAPITALIZATION_NONE,
71      * UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE,
72      * UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE,
73      * UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU, or
74      * UDISPCTX_CAPITALIZATION_FOR_STANDALONE.
75      * Use UDisplayContextType UDISPCTX_TYPE_CAPITALIZATION to get the value.
76      */
77     /**
78      * The capitalization context to be used is unknown (this is the default value).
79      * @internal ICU 50 technology preview
80      */
81     UDISPCTX_CAPITALIZATION_NONE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 0,
82     /**
83      * The capitalization context if a date, date symbol or display name is to be
84      * formatted with capitalization appropriate for the middle of a sentence.
85      * @internal ICU 50 technology preview
86      */
87     UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 1,
88     /**
89      * The capitalization context if a date, date symbol or display name is to be
90      * formatted with capitalization appropriate for the beginning of a sentence.
91      * @internal ICU 50 technology preview
92      */
93     UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 2,
94     /**
95      * The capitalization context if a date, date symbol or display name is to be
96      * formatted with capitalization appropriate for a user-interface list or menu item.
97      * @internal ICU 50 technology preview
98      */
99     UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 3,
100     /**
101      * The capitalization context if a date, date symbol or display name is to be
102      * formatted with capitalization appropriate for stand-alone usage such as an
103      * isolated name on a calendar page.
104      * @internal ICU 50 technology preview
105      */
106     UDISPCTX_CAPITALIZATION_FOR_STANDALONE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 4
107 };
108 /**
109 *  @internal ICU 50 technology preview
110 */
111 typedef enum UDisplayContext UDisplayContext;
112 
113 #endif /* #if !UCONFIG_NO_FORMATTING */
114 
115 #endif
116