17777dab0Sopenharmony_ci// © 2016 and later: Unicode, Inc. and others.
27777dab0Sopenharmony_ci// License & terms of use: http://www.unicode.org/copyright.html
37777dab0Sopenharmony_ci/*
47777dab0Sopenharmony_ci*****************************************************************************************
57777dab0Sopenharmony_ci* Copyright (C) 2014-2016, International Business Machines
67777dab0Sopenharmony_ci* Corporation and others. All Rights Reserved.
77777dab0Sopenharmony_ci*****************************************************************************************
87777dab0Sopenharmony_ci*/
97777dab0Sopenharmony_ci
107777dab0Sopenharmony_ci#ifndef UDISPLAYCONTEXT_H
117777dab0Sopenharmony_ci#define UDISPLAYCONTEXT_H
127777dab0Sopenharmony_ci
137777dab0Sopenharmony_ci#include "unicode/utypes.h"
147777dab0Sopenharmony_ci
157777dab0Sopenharmony_ci#if !UCONFIG_NO_FORMATTING
167777dab0Sopenharmony_ci
177777dab0Sopenharmony_ci/**
187777dab0Sopenharmony_ci * \file
197777dab0Sopenharmony_ci * \brief C API: Display context types (enum values)
207777dab0Sopenharmony_ci */
217777dab0Sopenharmony_ci
227777dab0Sopenharmony_ci/**
237777dab0Sopenharmony_ci * Display context types, for getting values of a particular setting.
247777dab0Sopenharmony_ci * Note, the specific numeric values are internal and may change.
257777dab0Sopenharmony_ci * @stable ICU 51
267777dab0Sopenharmony_ci */
277777dab0Sopenharmony_cienum UDisplayContextType {
287777dab0Sopenharmony_ci    /**
297777dab0Sopenharmony_ci     * Type to retrieve the dialect handling setting, e.g.
307777dab0Sopenharmony_ci     * UDISPCTX_STANDARD_NAMES or UDISPCTX_DIALECT_NAMES.
317777dab0Sopenharmony_ci     * @stable ICU 51
327777dab0Sopenharmony_ci     */
337777dab0Sopenharmony_ci    UDISPCTX_TYPE_DIALECT_HANDLING = 0,
347777dab0Sopenharmony_ci    /**
357777dab0Sopenharmony_ci     * Type to retrieve the capitalization context setting, e.g.
367777dab0Sopenharmony_ci     * UDISPCTX_CAPITALIZATION_NONE, UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE,
377777dab0Sopenharmony_ci     * UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE, etc.
387777dab0Sopenharmony_ci     * @stable ICU 51
397777dab0Sopenharmony_ci     */
407777dab0Sopenharmony_ci    UDISPCTX_TYPE_CAPITALIZATION = 1,
417777dab0Sopenharmony_ci    /**
427777dab0Sopenharmony_ci     * Type to retrieve the display length setting, e.g.
437777dab0Sopenharmony_ci     * UDISPCTX_LENGTH_FULL, UDISPCTX_LENGTH_SHORT.
447777dab0Sopenharmony_ci     * @stable ICU 54
457777dab0Sopenharmony_ci     */
467777dab0Sopenharmony_ci    UDISPCTX_TYPE_DISPLAY_LENGTH = 2,
477777dab0Sopenharmony_ci    /**
487777dab0Sopenharmony_ci     * Type to retrieve the substitute handling setting, e.g.
497777dab0Sopenharmony_ci     * UDISPCTX_SUBSTITUTE, UDISPCTX_NO_SUBSTITUTE.
507777dab0Sopenharmony_ci     * @stable ICU 58
517777dab0Sopenharmony_ci     */
527777dab0Sopenharmony_ci    UDISPCTX_TYPE_SUBSTITUTE_HANDLING = 3
537777dab0Sopenharmony_ci};
547777dab0Sopenharmony_ci/**
557777dab0Sopenharmony_ci*  @stable ICU 51
567777dab0Sopenharmony_ci*/
577777dab0Sopenharmony_citypedef enum UDisplayContextType UDisplayContextType;
587777dab0Sopenharmony_ci
597777dab0Sopenharmony_ci/**
607777dab0Sopenharmony_ci * Display context settings.
617777dab0Sopenharmony_ci * Note, the specific numeric values are internal and may change.
627777dab0Sopenharmony_ci * @stable ICU 51
637777dab0Sopenharmony_ci */
647777dab0Sopenharmony_cienum UDisplayContext {
657777dab0Sopenharmony_ci    /**
667777dab0Sopenharmony_ci     * ================================
677777dab0Sopenharmony_ci     * DIALECT_HANDLING can be set to one of UDISPCTX_STANDARD_NAMES or
687777dab0Sopenharmony_ci     * UDISPCTX_DIALECT_NAMES. Use UDisplayContextType UDISPCTX_TYPE_DIALECT_HANDLING
697777dab0Sopenharmony_ci     * to get the value.
707777dab0Sopenharmony_ci     */
717777dab0Sopenharmony_ci    /**
727777dab0Sopenharmony_ci     * A possible setting for DIALECT_HANDLING:
737777dab0Sopenharmony_ci     * use standard names when generating a locale name,
747777dab0Sopenharmony_ci     * e.g. en_GB displays as 'English (United Kingdom)'.
757777dab0Sopenharmony_ci     * @stable ICU 51
767777dab0Sopenharmony_ci     */
777777dab0Sopenharmony_ci    UDISPCTX_STANDARD_NAMES = (UDISPCTX_TYPE_DIALECT_HANDLING<<8) + 0,
787777dab0Sopenharmony_ci    /**
797777dab0Sopenharmony_ci     * A possible setting for DIALECT_HANDLING:
807777dab0Sopenharmony_ci     * use dialect names, when generating a locale name,
817777dab0Sopenharmony_ci     * e.g. en_GB displays as 'British English'.
827777dab0Sopenharmony_ci     * @stable ICU 51
837777dab0Sopenharmony_ci     */
847777dab0Sopenharmony_ci    UDISPCTX_DIALECT_NAMES = (UDISPCTX_TYPE_DIALECT_HANDLING<<8) + 1,
857777dab0Sopenharmony_ci    /**
867777dab0Sopenharmony_ci     * ================================
877777dab0Sopenharmony_ci     * CAPITALIZATION can be set to one of UDISPCTX_CAPITALIZATION_NONE,
887777dab0Sopenharmony_ci     * UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE,
897777dab0Sopenharmony_ci     * UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE,
907777dab0Sopenharmony_ci     * UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU, or
917777dab0Sopenharmony_ci     * UDISPCTX_CAPITALIZATION_FOR_STANDALONE.
927777dab0Sopenharmony_ci     * Use UDisplayContextType UDISPCTX_TYPE_CAPITALIZATION to get the value.
937777dab0Sopenharmony_ci     */
947777dab0Sopenharmony_ci    /**
957777dab0Sopenharmony_ci     * The capitalization context to be used is unknown (this is the default value).
967777dab0Sopenharmony_ci     * @stable ICU 51
977777dab0Sopenharmony_ci     */
987777dab0Sopenharmony_ci    UDISPCTX_CAPITALIZATION_NONE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 0,
997777dab0Sopenharmony_ci    /**
1007777dab0Sopenharmony_ci     * The capitalization context if a date, date symbol or display name is to be
1017777dab0Sopenharmony_ci     * formatted with capitalization appropriate for the middle of a sentence.
1027777dab0Sopenharmony_ci     * @stable ICU 51
1037777dab0Sopenharmony_ci     */
1047777dab0Sopenharmony_ci    UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 1,
1057777dab0Sopenharmony_ci    /**
1067777dab0Sopenharmony_ci     * The capitalization context if a date, date symbol or display name is to be
1077777dab0Sopenharmony_ci     * formatted with capitalization appropriate for the beginning of a sentence.
1087777dab0Sopenharmony_ci     * @stable ICU 51
1097777dab0Sopenharmony_ci     */
1107777dab0Sopenharmony_ci    UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 2,
1117777dab0Sopenharmony_ci    /**
1127777dab0Sopenharmony_ci     * The capitalization context if a date, date symbol or display name is to be
1137777dab0Sopenharmony_ci     * formatted with capitalization appropriate for a user-interface list or menu item.
1147777dab0Sopenharmony_ci     * @stable ICU 51
1157777dab0Sopenharmony_ci     */
1167777dab0Sopenharmony_ci    UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 3,
1177777dab0Sopenharmony_ci    /**
1187777dab0Sopenharmony_ci     * The capitalization context if a date, date symbol or display name is to be
1197777dab0Sopenharmony_ci     * formatted with capitalization appropriate for stand-alone usage such as an
1207777dab0Sopenharmony_ci     * isolated name on a calendar page.
1217777dab0Sopenharmony_ci     * @stable ICU 51
1227777dab0Sopenharmony_ci     */
1237777dab0Sopenharmony_ci    UDISPCTX_CAPITALIZATION_FOR_STANDALONE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 4,
1247777dab0Sopenharmony_ci    /**
1257777dab0Sopenharmony_ci     * ================================
1267777dab0Sopenharmony_ci     * DISPLAY_LENGTH can be set to one of UDISPCTX_LENGTH_FULL or
1277777dab0Sopenharmony_ci     * UDISPCTX_LENGTH_SHORT. Use UDisplayContextType UDISPCTX_TYPE_DISPLAY_LENGTH
1287777dab0Sopenharmony_ci     * to get the value.
1297777dab0Sopenharmony_ci     */
1307777dab0Sopenharmony_ci    /**
1317777dab0Sopenharmony_ci     * A possible setting for DISPLAY_LENGTH:
1327777dab0Sopenharmony_ci     * use full names when generating a locale name,
1337777dab0Sopenharmony_ci     * e.g. "United States" for US.
1347777dab0Sopenharmony_ci     * @stable ICU 54
1357777dab0Sopenharmony_ci     */
1367777dab0Sopenharmony_ci    UDISPCTX_LENGTH_FULL = (UDISPCTX_TYPE_DISPLAY_LENGTH<<8) + 0,
1377777dab0Sopenharmony_ci    /**
1387777dab0Sopenharmony_ci     * A possible setting for DISPLAY_LENGTH:
1397777dab0Sopenharmony_ci     * use short names when generating a locale name,
1407777dab0Sopenharmony_ci     * e.g. "U.S." for US.
1417777dab0Sopenharmony_ci     * @stable ICU 54
1427777dab0Sopenharmony_ci     */
1437777dab0Sopenharmony_ci    UDISPCTX_LENGTH_SHORT = (UDISPCTX_TYPE_DISPLAY_LENGTH<<8) + 1,
1447777dab0Sopenharmony_ci    /**
1457777dab0Sopenharmony_ci     * ================================
1467777dab0Sopenharmony_ci     * SUBSTITUTE_HANDLING can be set to one of UDISPCTX_SUBSTITUTE or
1477777dab0Sopenharmony_ci     * UDISPCTX_NO_SUBSTITUTE. Use UDisplayContextType UDISPCTX_TYPE_SUBSTITUTE_HANDLING
1487777dab0Sopenharmony_ci     * to get the value.
1497777dab0Sopenharmony_ci     */
1507777dab0Sopenharmony_ci    /**
1517777dab0Sopenharmony_ci     * A possible setting for SUBSTITUTE_HANDLING:
1527777dab0Sopenharmony_ci     * Returns a fallback value (e.g., the input code) when no data is available.
1537777dab0Sopenharmony_ci     * This is the default value.
1547777dab0Sopenharmony_ci     * @stable ICU 58
1557777dab0Sopenharmony_ci     */
1567777dab0Sopenharmony_ci    UDISPCTX_SUBSTITUTE = (UDISPCTX_TYPE_SUBSTITUTE_HANDLING<<8) + 0,
1577777dab0Sopenharmony_ci    /**
1587777dab0Sopenharmony_ci     * A possible setting for SUBSTITUTE_HANDLING:
1597777dab0Sopenharmony_ci     * Returns a null value with error code set to U_ILLEGAL_ARGUMENT_ERROR when no
1607777dab0Sopenharmony_ci     * data is available.
1617777dab0Sopenharmony_ci     * @stable ICU 58
1627777dab0Sopenharmony_ci     */
1637777dab0Sopenharmony_ci    UDISPCTX_NO_SUBSTITUTE = (UDISPCTX_TYPE_SUBSTITUTE_HANDLING<<8) + 1
1647777dab0Sopenharmony_ci
1657777dab0Sopenharmony_ci};
1667777dab0Sopenharmony_ci/**
1677777dab0Sopenharmony_ci*  @stable ICU 51
1687777dab0Sopenharmony_ci*/
1697777dab0Sopenharmony_citypedef enum UDisplayContext UDisplayContext;
1707777dab0Sopenharmony_ci
1717777dab0Sopenharmony_ci#endif /* #if !UCONFIG_NO_FORMATTING */
1727777dab0Sopenharmony_ci
1737777dab0Sopenharmony_ci#endif
174