]>
Commit | Line | Data |
---|---|---|
1 | /* | |
2 | ****************************************************************************** | |
3 | * * | |
4 | * Copyright (C) 2003-2004, International Business Machines * | |
5 | * Corporation and others. All Rights Reserved. * | |
6 | * * | |
7 | ****************************************************************************** | |
8 | * file name: ulocdata.h | |
9 | * encoding: US-ASCII | |
10 | * tab size: 8 (not used) | |
11 | * indentation:4 | |
12 | * | |
13 | * created on: 2003Oct21 | |
14 | * created by: Ram Viswanadha | |
15 | */ | |
16 | ||
17 | #ifndef __ULOCDATA_H__ | |
18 | #define __ULOCDATA_H__ | |
19 | ||
20 | #include "unicode/ures.h" | |
21 | #include "unicode/uloc.h" | |
22 | #include "unicode/uset.h" | |
23 | ||
24 | ||
25 | /** | |
26 | * Returns the set of exemplar characters for a locale. | |
27 | * | |
28 | * @param fillIn Pointer to a USet object to receive the | |
29 | * exemplar character set for the given locale. Previous | |
30 | * contents of fillIn are lost. <em>If fillIn is NULL, | |
31 | * then a new USet is created and returned. The caller | |
32 | * owns the result and must dispose of it by calling | |
33 | * uset_close.</em> | |
34 | * @param localeID Locale id for which the exemplar character set | |
35 | * is to be retrieved. | |
36 | * @param options Bitmask for options to apply to the exemplar pattern. | |
37 | * Specify zero to retrieve the exemplar set as it is | |
38 | * defined in the locale data. Specify | |
39 | * USET_CASE_INSENSITIVE to retrieve a case-folded | |
40 | * exemplar set. See uset_applyPattern for a complete | |
41 | * list of valid options. The USET_IGNORE_SPACE bit is | |
42 | * always set, regardless of the value of 'options'. | |
43 | * @param status Pointer to an input-output error code value; | |
44 | * must not be NULL. | |
45 | * @return USet* Either fillIn, or if fillIn is NULL, a pointer to | |
46 | * a newly-allocated USet that the user must close. | |
47 | * @draft ICU 3.0 | |
48 | */ | |
49 | U_DRAFT USet* U_EXPORT2 | |
50 | ulocdata_getExemplarSet(USet *fillIn, const char *localeID, | |
51 | uint32_t options, UErrorCode *status); | |
52 | ||
53 | #ifndef U_HIDE_DRAFT_API | |
54 | /** | |
55 | * Enumeration for representing the measurement systems. | |
56 | * @draft ICU 2.8 | |
57 | */ | |
58 | typedef enum UMeasurementSystem { | |
59 | UMS_SI, /** Measurement system specified by SI otherwise known as Metric system. */ | |
60 | UMS_US, /** Measurement system followed in the United States of America. */ | |
61 | UMS_LIMIT | |
62 | } UMeasurementSystem; | |
63 | #endif /*U_HIDE_DRAFT_API */ | |
64 | ||
65 | /** | |
66 | * Returns the measurement system used in the locale specified by the localeID. | |
67 | * | |
68 | * @param localeID The id of the locale for which the measurement system to be retrieved. | |
69 | * @param status Must be a valid pointer to an error code value, | |
70 | * which must not indicate a failure before the function call. | |
71 | * @return UMeasurementSystem the measurement system used in the locale. | |
72 | * @draft ICU 2.8 | |
73 | */ | |
74 | U_DRAFT UMeasurementSystem U_EXPORT2 | |
75 | ulocdata_getMeasurementSystem(const char *localeID, UErrorCode *status); | |
76 | ||
77 | /** | |
78 | * Returns the element gives the normal business letter size, and customary units. | |
79 | * The units for the numbers are always in <em>milli-meters</em>. | |
80 | * For US since 8.5 and 11 do not yeild an integral value when converted to milli-meters, | |
81 | * the values are rounded off. | |
82 | * So for A4 size paper the height and width are 297 mm and 210 mm repectively, | |
83 | * and for US letter size the height and width are 279 mm and 216 mm respectively. | |
84 | * | |
85 | * @param localeID The id of the locale for which the paper size information to be retrieved. | |
86 | * @param height A pointer to int to recieve the height information. | |
87 | * @param width A pointer to int to recieve the width information. | |
88 | * @param status Must be a valid pointer to an error code value, | |
89 | * which must not indicate a failure before the function call. | |
90 | * @draft ICU 2.8 | |
91 | */ | |
92 | U_DRAFT void U_EXPORT2 | |
93 | ulocdata_getPaperSize(const char *localeID, int32_t *height, int32_t *width, UErrorCode *status); | |
94 | ||
95 | #endif |