1/*
2*****************************************************************************************
3* Copyright (C) 2013, 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_DRAFT_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 * @draft ICU 51
20 */
21enum UDisplayContextType {
22#ifndef U_HIDE_DRAFT_API
23    /**
24     * Type to retrieve the dialect handling setting, e.g.
25     * UDISPCTX_STANDARD_NAMES or UDISPCTX_DIALECT_NAMES.
26     * @draft ICU 51
27     */
28    UDISPCTX_TYPE_DIALECT_HANDLING = 0,
29    /**
30     * Type to retrieve the capitalization context setting, e.g.
31     * UDISPCTX_CAPITALIZATION_NONE, UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE,
32     * UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE, etc.
33     * @draft ICU 51
34     */
35    UDISPCTX_TYPE_CAPITALIZATION = 1
36#endif /* U_HIDE_DRAFT_API */
37};
38/**
39*  @draft ICU 51
40*/
41typedef enum UDisplayContextType UDisplayContextType;
42
43/* Dont hide with #ifndef U_HIDE_DRAFT_API, needed by virtual methods */
44/**
45 * Display context settings.
46 * Note, the specific numeric values are internal and may change.
47 * @draft ICU 51
48 */
49enum UDisplayContext {
50#ifndef U_HIDE_DRAFT_API
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     * @draft 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     * @draft 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     * @draft 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     * @draft 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     * @draft 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     * @draft 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     * @draft ICU 51
108     */
109    UDISPCTX_CAPITALIZATION_FOR_STANDALONE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 4
110#endif /* U_HIDE_DRAFT_API */
111};
112/**
113*  @draft ICU 51
114*/
115typedef enum UDisplayContext UDisplayContext;
116
117#endif /* #if !UCONFIG_NO_FORMATTING */
118
119#endif
120