michael@0: /* michael@0: ***************************************************************************************** michael@0: * Copyright (C) 2013, International Business Machines michael@0: * Corporation and others. All Rights Reserved. michael@0: ***************************************************************************************** michael@0: */ michael@0: michael@0: #ifndef UDISPLAYCONTEXT_H michael@0: #define UDISPLAYCONTEXT_H michael@0: michael@0: #include "unicode/utypes.h" michael@0: michael@0: #if !UCONFIG_NO_FORMATTING michael@0: michael@0: /* Dont hide with #ifndef U_HIDE_DRAFT_API, needed by virtual methods */ michael@0: /** michael@0: * \file michael@0: * \brief C API: Display context types (enum values) michael@0: */ michael@0: michael@0: /** michael@0: * Display context types, for getting values of a particular setting. michael@0: * Note, the specific numeric values are internal and may change. michael@0: * @draft ICU 51 michael@0: */ michael@0: enum UDisplayContextType { michael@0: #ifndef U_HIDE_DRAFT_API michael@0: /** michael@0: * Type to retrieve the dialect handling setting, e.g. michael@0: * UDISPCTX_STANDARD_NAMES or UDISPCTX_DIALECT_NAMES. michael@0: * @draft ICU 51 michael@0: */ michael@0: UDISPCTX_TYPE_DIALECT_HANDLING = 0, michael@0: /** michael@0: * Type to retrieve the capitalization context setting, e.g. michael@0: * UDISPCTX_CAPITALIZATION_NONE, UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE, michael@0: * UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE, etc. michael@0: * @draft ICU 51 michael@0: */ michael@0: UDISPCTX_TYPE_CAPITALIZATION = 1 michael@0: #endif /* U_HIDE_DRAFT_API */ michael@0: }; michael@0: /** michael@0: * @draft ICU 51 michael@0: */ michael@0: typedef enum UDisplayContextType UDisplayContextType; michael@0: michael@0: /* Dont hide with #ifndef U_HIDE_DRAFT_API, needed by virtual methods */ michael@0: /** michael@0: * Display context settings. michael@0: * Note, the specific numeric values are internal and may change. michael@0: * @draft ICU 51 michael@0: */ michael@0: enum UDisplayContext { michael@0: #ifndef U_HIDE_DRAFT_API michael@0: /** michael@0: * ================================ michael@0: * DIALECT_HANDLING can be set to one of UDISPCTX_STANDARD_NAMES or michael@0: * UDISPCTX_DIALECT_NAMES. Use UDisplayContextType UDISPCTX_TYPE_DIALECT_HANDLING michael@0: * to get the value. michael@0: */ michael@0: /** michael@0: * A possible setting for DIALECT_HANDLING: michael@0: * use standard names when generating a locale name, michael@0: * e.g. en_GB displays as 'English (United Kingdom)'. michael@0: * @draft ICU 51 michael@0: */ michael@0: UDISPCTX_STANDARD_NAMES = (UDISPCTX_TYPE_DIALECT_HANDLING<<8) + 0, michael@0: /** michael@0: * A possible setting for DIALECT_HANDLING: michael@0: * use dialect names, when generating a locale name, michael@0: * e.g. en_GB displays as 'British English'. michael@0: * @draft ICU 51 michael@0: */ michael@0: UDISPCTX_DIALECT_NAMES = (UDISPCTX_TYPE_DIALECT_HANDLING<<8) + 1, michael@0: /** michael@0: * ================================ michael@0: * CAPITALIZATION can be set to one of UDISPCTX_CAPITALIZATION_NONE, michael@0: * UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE, michael@0: * UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE, michael@0: * UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU, or michael@0: * UDISPCTX_CAPITALIZATION_FOR_STANDALONE. michael@0: * Use UDisplayContextType UDISPCTX_TYPE_CAPITALIZATION to get the value. michael@0: */ michael@0: /** michael@0: * The capitalization context to be used is unknown (this is the default value). michael@0: * @draft ICU 51 michael@0: */ michael@0: UDISPCTX_CAPITALIZATION_NONE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 0, michael@0: /** michael@0: * The capitalization context if a date, date symbol or display name is to be michael@0: * formatted with capitalization appropriate for the middle of a sentence. michael@0: * @draft ICU 51 michael@0: */ michael@0: UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 1, michael@0: /** michael@0: * The capitalization context if a date, date symbol or display name is to be michael@0: * formatted with capitalization appropriate for the beginning of a sentence. michael@0: * @draft ICU 51 michael@0: */ michael@0: UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 2, michael@0: /** michael@0: * The capitalization context if a date, date symbol or display name is to be michael@0: * formatted with capitalization appropriate for a user-interface list or menu item. michael@0: * @draft ICU 51 michael@0: */ michael@0: UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 3, michael@0: /** michael@0: * The capitalization context if a date, date symbol or display name is to be michael@0: * formatted with capitalization appropriate for stand-alone usage such as an michael@0: * isolated name on a calendar page. michael@0: * @draft ICU 51 michael@0: */ michael@0: UDISPCTX_CAPITALIZATION_FOR_STANDALONE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 4 michael@0: #endif /* U_HIDE_DRAFT_API */ michael@0: }; michael@0: /** michael@0: * @draft ICU 51 michael@0: */ michael@0: typedef enum UDisplayContext UDisplayContext; michael@0: michael@0: #endif /* #if !UCONFIG_NO_FORMATTING */ michael@0: michael@0: #endif