Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/unicode/udisplaycontext.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // © 2016 and later: Unicode, Inc. and others.
0002 // License & terms of use: http://www.unicode.org/copyright.html
0003 /*
0004 *****************************************************************************************
0005 * Copyright (C) 2014-2016, International Business Machines
0006 * Corporation and others. All Rights Reserved.
0007 *****************************************************************************************
0008 */
0009 
0010 #ifndef UDISPLAYCONTEXT_H
0011 #define UDISPLAYCONTEXT_H
0012 
0013 #include "unicode/utypes.h"
0014 
0015 #if !UCONFIG_NO_FORMATTING
0016 
0017 /**
0018  * \file
0019  * \brief C API: Display context types (enum values)
0020  */
0021 
0022 /**
0023  * Display context types, for getting values of a particular setting.
0024  * Note, the specific numeric values are internal and may change.
0025  * @stable ICU 51
0026  */
0027 enum UDisplayContextType {
0028     /**
0029      * Type to retrieve the dialect handling setting, e.g.
0030      * UDISPCTX_STANDARD_NAMES or UDISPCTX_DIALECT_NAMES.
0031      * @stable ICU 51
0032      */
0033     UDISPCTX_TYPE_DIALECT_HANDLING = 0,
0034     /**
0035      * Type to retrieve the capitalization context setting, e.g.
0036      * UDISPCTX_CAPITALIZATION_NONE, UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE,
0037      * UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE, etc.
0038      * @stable ICU 51
0039      */
0040     UDISPCTX_TYPE_CAPITALIZATION = 1,
0041     /**
0042      * Type to retrieve the display length setting, e.g.
0043      * UDISPCTX_LENGTH_FULL, UDISPCTX_LENGTH_SHORT.
0044      * @stable ICU 54
0045      */
0046     UDISPCTX_TYPE_DISPLAY_LENGTH = 2,
0047     /**
0048      * Type to retrieve the substitute handling setting, e.g.
0049      * UDISPCTX_SUBSTITUTE, UDISPCTX_NO_SUBSTITUTE.
0050      * @stable ICU 58
0051      */
0052     UDISPCTX_TYPE_SUBSTITUTE_HANDLING = 3
0053 };
0054 /**
0055 *  @stable ICU 51
0056 */
0057 typedef enum UDisplayContextType UDisplayContextType;
0058 
0059 /**
0060  * Display context settings.
0061  * Note, the specific numeric values are internal and may change.
0062  * @stable ICU 51
0063  */
0064 enum UDisplayContext {
0065     /**
0066      * ================================
0067      * DIALECT_HANDLING can be set to one of UDISPCTX_STANDARD_NAMES or
0068      * UDISPCTX_DIALECT_NAMES. Use UDisplayContextType UDISPCTX_TYPE_DIALECT_HANDLING
0069      * to get the value.
0070      */
0071     /**
0072      * A possible setting for DIALECT_HANDLING:
0073      * use standard names when generating a locale name,
0074      * e.g. en_GB displays as 'English (United Kingdom)'.
0075      * @stable ICU 51
0076      */
0077     UDISPCTX_STANDARD_NAMES = (UDISPCTX_TYPE_DIALECT_HANDLING<<8) + 0,
0078     /**
0079      * A possible setting for DIALECT_HANDLING:
0080      * use dialect names, when generating a locale name,
0081      * e.g. en_GB displays as 'British English'.
0082      * @stable ICU 51
0083      */
0084     UDISPCTX_DIALECT_NAMES = (UDISPCTX_TYPE_DIALECT_HANDLING<<8) + 1,
0085     /**
0086      * ================================
0087      * CAPITALIZATION can be set to one of UDISPCTX_CAPITALIZATION_NONE,
0088      * UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE,
0089      * UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE,
0090      * UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU, or
0091      * UDISPCTX_CAPITALIZATION_FOR_STANDALONE.
0092      * Use UDisplayContextType UDISPCTX_TYPE_CAPITALIZATION to get the value.
0093      */
0094     /**
0095      * The capitalization context to be used is unknown (this is the default value).
0096      * @stable ICU 51
0097      */
0098     UDISPCTX_CAPITALIZATION_NONE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 0,
0099     /**
0100      * The capitalization context if a date, date symbol or display name is to be
0101      * formatted with capitalization appropriate for the middle of a sentence.
0102      * @stable ICU 51
0103      */
0104     UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 1,
0105     /**
0106      * The capitalization context if a date, date symbol or display name is to be
0107      * formatted with capitalization appropriate for the beginning of a sentence.
0108      * @stable ICU 51
0109      */
0110     UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 2,
0111     /**
0112      * The capitalization context if a date, date symbol or display name is to be
0113      * formatted with capitalization appropriate for a user-interface list or menu item.
0114      * @stable ICU 51
0115      */
0116     UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 3,
0117     /**
0118      * The capitalization context if a date, date symbol or display name is to be
0119      * formatted with capitalization appropriate for stand-alone usage such as an
0120      * isolated name on a calendar page.
0121      * @stable ICU 51
0122      */
0123     UDISPCTX_CAPITALIZATION_FOR_STANDALONE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 4,
0124     /**
0125      * ================================
0126      * DISPLAY_LENGTH can be set to one of UDISPCTX_LENGTH_FULL or
0127      * UDISPCTX_LENGTH_SHORT. Use UDisplayContextType UDISPCTX_TYPE_DISPLAY_LENGTH
0128      * to get the value.
0129      */
0130     /**
0131      * A possible setting for DISPLAY_LENGTH:
0132      * use full names when generating a locale name,
0133      * e.g. "United States" for US.
0134      * @stable ICU 54
0135      */
0136     UDISPCTX_LENGTH_FULL = (UDISPCTX_TYPE_DISPLAY_LENGTH<<8) + 0,
0137     /**
0138      * A possible setting for DISPLAY_LENGTH:
0139      * use short names when generating a locale name,
0140      * e.g. "U.S." for US.
0141      * @stable ICU 54
0142      */
0143     UDISPCTX_LENGTH_SHORT = (UDISPCTX_TYPE_DISPLAY_LENGTH<<8) + 1,
0144     /**
0145      * ================================
0146      * SUBSTITUTE_HANDLING can be set to one of UDISPCTX_SUBSTITUTE or
0147      * UDISPCTX_NO_SUBSTITUTE. Use UDisplayContextType UDISPCTX_TYPE_SUBSTITUTE_HANDLING
0148      * to get the value.
0149      */
0150     /**
0151      * A possible setting for SUBSTITUTE_HANDLING:
0152      * Returns a fallback value (e.g., the input code) when no data is available.
0153      * This is the default value.
0154      * @stable ICU 58
0155      */
0156     UDISPCTX_SUBSTITUTE = (UDISPCTX_TYPE_SUBSTITUTE_HANDLING<<8) + 0,
0157     /**
0158      * A possible setting for SUBSTITUTE_HANDLING:
0159      * Returns a null value with error code set to U_ILLEGAL_ARGUMENT_ERROR when no
0160      * data is available.
0161      * @stable ICU 58
0162      */
0163     UDISPCTX_NO_SUBSTITUTE = (UDISPCTX_TYPE_SUBSTITUTE_HANDLING<<8) + 1
0164 
0165 };
0166 /**
0167 *  @stable ICU 51
0168 */
0169 typedef enum UDisplayContext UDisplayContext;
0170 
0171 #endif /* #if !UCONFIG_NO_FORMATTING */
0172 
0173 #endif