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 */
25enum 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};
40/**
41*  @stable ICU 51
42*/
43typedef enum UDisplayContextType UDisplayContextType;
44
45/**
46 * Display context settings.
47 * Note, the specific numeric values are internal and may change.
48 * @stable ICU 51
49 */
50enum UDisplayContext {
51    /**
52     * ================================
53     * DIALECT_HANDLING can be set to one of UDISPCTX_STANDARD_NAMES or
54     * UDISPCTX_DIALECT_NAMES. Use UDisplayContextType UDISPCTX_TYPE_DIALECT_HANDLING
55     * to get the value.
56     */
57    /**
58     * A possible setting for DIALECT_HANDLING:
59     * use standard names when generating a locale name,
60     * e.g. en_GB displays as 'English (United Kingdom)'.
61     * @stable ICU 51
62     */
63    UDISPCTX_STANDARD_NAMES = (UDISPCTX_TYPE_DIALECT_HANDLING<<8) + 0,
64    /**
65     * A possible setting for DIALECT_HANDLING:
66     * use dialect names, when generating a locale name,
67     * e.g. en_GB displays as 'British English'.
68     * @stable ICU 51
69     */
70    UDISPCTX_DIALECT_NAMES = (UDISPCTX_TYPE_DIALECT_HANDLING<<8) + 1,
71    /**
72     * ================================
73     * CAPITALIZATION can be set to one of UDISPCTX_CAPITALIZATION_NONE,
74     * UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE,
75     * UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE,
76     * UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU, or
77     * UDISPCTX_CAPITALIZATION_FOR_STANDALONE.
78     * Use UDisplayContextType UDISPCTX_TYPE_CAPITALIZATION to get the value.
79     */
80    /**
81     * The capitalization context to be used is unknown (this is the default value).
82     * @stable ICU 51
83     */
84    UDISPCTX_CAPITALIZATION_NONE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 0,
85    /**
86     * The capitalization context if a date, date symbol or display name is to be
87     * formatted with capitalization appropriate for the middle of a sentence.
88     * @stable ICU 51
89     */
90    UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 1,
91    /**
92     * The capitalization context if a date, date symbol or display name is to be
93     * formatted with capitalization appropriate for the beginning of a sentence.
94     * @stable ICU 51
95     */
96    UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 2,
97    /**
98     * The capitalization context if a date, date symbol or display name is to be
99     * formatted with capitalization appropriate for a user-interface list or menu item.
100     * @stable ICU 51
101     */
102    UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 3,
103    /**
104     * The capitalization context if a date, date symbol or display name is to be
105     * formatted with capitalization appropriate for stand-alone usage such as an
106     * isolated name on a calendar page.
107     * @stable ICU 51
108     */
109    UDISPCTX_CAPITALIZATION_FOR_STANDALONE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 4
110};
111/**
112*  @stable ICU 51
113*/
114typedef enum UDisplayContext UDisplayContext;
115
116#endif /* #if !UCONFIG_NO_FORMATTING */
117
118#endif
119