intl/icu/source/i18n/unicode/udisplaycontext.h

Wed, 31 Dec 2014 07:22:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:22:50 +0100
branch
TOR_BUG_3246
changeset 4
fc2d59ddac77
permissions
-rw-r--r--

Correct previous dual key logic pending first delivery installment.

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

mercurial