1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/intl/icu/source/i18n/unicode/udisplaycontext.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,124 @@ 1.4 +/* 1.5 +***************************************************************************************** 1.6 +* Copyright (C) 2013, International Business Machines 1.7 +* Corporation and others. All Rights Reserved. 1.8 +***************************************************************************************** 1.9 +*/ 1.10 + 1.11 +#ifndef UDISPLAYCONTEXT_H 1.12 +#define UDISPLAYCONTEXT_H 1.13 + 1.14 +#include "unicode/utypes.h" 1.15 + 1.16 +#if !UCONFIG_NO_FORMATTING 1.17 + 1.18 +/* Dont hide with #ifndef U_HIDE_DRAFT_API, needed by virtual methods */ 1.19 +/** 1.20 + * \file 1.21 + * \brief C API: Display context types (enum values) 1.22 + */ 1.23 + 1.24 +/** 1.25 + * Display context types, for getting values of a particular setting. 1.26 + * Note, the specific numeric values are internal and may change. 1.27 + * @draft ICU 51 1.28 + */ 1.29 +enum UDisplayContextType { 1.30 +#ifndef U_HIDE_DRAFT_API 1.31 + /** 1.32 + * Type to retrieve the dialect handling setting, e.g. 1.33 + * UDISPCTX_STANDARD_NAMES or UDISPCTX_DIALECT_NAMES. 1.34 + * @draft ICU 51 1.35 + */ 1.36 + UDISPCTX_TYPE_DIALECT_HANDLING = 0, 1.37 + /** 1.38 + * Type to retrieve the capitalization context setting, e.g. 1.39 + * UDISPCTX_CAPITALIZATION_NONE, UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE, 1.40 + * UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE, etc. 1.41 + * @draft ICU 51 1.42 + */ 1.43 + UDISPCTX_TYPE_CAPITALIZATION = 1 1.44 +#endif /* U_HIDE_DRAFT_API */ 1.45 +}; 1.46 +/** 1.47 +* @draft ICU 51 1.48 +*/ 1.49 +typedef enum UDisplayContextType UDisplayContextType; 1.50 + 1.51 +/* Dont hide with #ifndef U_HIDE_DRAFT_API, needed by virtual methods */ 1.52 +/** 1.53 + * Display context settings. 1.54 + * Note, the specific numeric values are internal and may change. 1.55 + * @draft ICU 51 1.56 + */ 1.57 +enum UDisplayContext { 1.58 +#ifndef U_HIDE_DRAFT_API 1.59 + /** 1.60 + * ================================ 1.61 + * DIALECT_HANDLING can be set to one of UDISPCTX_STANDARD_NAMES or 1.62 + * UDISPCTX_DIALECT_NAMES. Use UDisplayContextType UDISPCTX_TYPE_DIALECT_HANDLING 1.63 + * to get the value. 1.64 + */ 1.65 + /** 1.66 + * A possible setting for DIALECT_HANDLING: 1.67 + * use standard names when generating a locale name, 1.68 + * e.g. en_GB displays as 'English (United Kingdom)'. 1.69 + * @draft ICU 51 1.70 + */ 1.71 + UDISPCTX_STANDARD_NAMES = (UDISPCTX_TYPE_DIALECT_HANDLING<<8) + 0, 1.72 + /** 1.73 + * A possible setting for DIALECT_HANDLING: 1.74 + * use dialect names, when generating a locale name, 1.75 + * e.g. en_GB displays as 'British English'. 1.76 + * @draft ICU 51 1.77 + */ 1.78 + UDISPCTX_DIALECT_NAMES = (UDISPCTX_TYPE_DIALECT_HANDLING<<8) + 1, 1.79 + /** 1.80 + * ================================ 1.81 + * CAPITALIZATION can be set to one of UDISPCTX_CAPITALIZATION_NONE, 1.82 + * UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE, 1.83 + * UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE, 1.84 + * UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU, or 1.85 + * UDISPCTX_CAPITALIZATION_FOR_STANDALONE. 1.86 + * Use UDisplayContextType UDISPCTX_TYPE_CAPITALIZATION to get the value. 1.87 + */ 1.88 + /** 1.89 + * The capitalization context to be used is unknown (this is the default value). 1.90 + * @draft ICU 51 1.91 + */ 1.92 + UDISPCTX_CAPITALIZATION_NONE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 0, 1.93 + /** 1.94 + * The capitalization context if a date, date symbol or display name is to be 1.95 + * formatted with capitalization appropriate for the middle of a sentence. 1.96 + * @draft ICU 51 1.97 + */ 1.98 + UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 1, 1.99 + /** 1.100 + * The capitalization context if a date, date symbol or display name is to be 1.101 + * formatted with capitalization appropriate for the beginning of a sentence. 1.102 + * @draft ICU 51 1.103 + */ 1.104 + UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 2, 1.105 + /** 1.106 + * The capitalization context if a date, date symbol or display name is to be 1.107 + * formatted with capitalization appropriate for a user-interface list or menu item. 1.108 + * @draft ICU 51 1.109 + */ 1.110 + UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 3, 1.111 + /** 1.112 + * The capitalization context if a date, date symbol or display name is to be 1.113 + * formatted with capitalization appropriate for stand-alone usage such as an 1.114 + * isolated name on a calendar page. 1.115 + * @draft ICU 51 1.116 + */ 1.117 + UDISPCTX_CAPITALIZATION_FOR_STANDALONE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 4 1.118 +#endif /* U_HIDE_DRAFT_API */ 1.119 +}; 1.120 +/** 1.121 +* @draft ICU 51 1.122 +*/ 1.123 +typedef enum UDisplayContext UDisplayContext; 1.124 + 1.125 +#endif /* #if !UCONFIG_NO_FORMATTING */ 1.126 + 1.127 +#endif