GNUstep CoreBase Library 0.2
CFLocale.h
1/* CFLocale.h
2
3 Copyright (C) 2010 Free Software Foundation, Inc.
4
5 Written by: Stefan Bidigaray
6 Date: March, 2011
7
8 This file is part of the GNUstep CoreBase Library.
9
10 This library is free software; you can redistribute it and/or
11 modify it under the terms of the GNU Lesser General Public
12 License as published by the Free Software Foundation; either
13 version 2.1 of the License, or (at your option) any later version.
14
15 This library is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
19
20 You should have received a copy of the GNU Lesser General Public
21 License along with this library; see the file COPYING.LIB.
22 If not, see <http://www.gnu.org/licenses/> or write to the
23 Free Software Foundation, 51 Franklin Street, Fifth Floor,
24 Boston, MA 02110-1301, USA.
25*/
26
27#ifndef __COREFOUNDATION_CFLOCALE__
28#define __COREFOUNDATION_CFLOCALE__ 1
29
30#include <CoreFoundation/CFBase.h>
31
32#include <CoreFoundation/CFArray.h>
33#include <CoreFoundation/CFDictionary.h>
34
35#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
36
37CF_EXTERN_C_BEGIN
38
51typedef const struct __CFLocale *CFLocaleRef;
52
55enum
56{
57 kCFLocaleLanguageDirectionUnknown = 0,
58 kCFLocaleLanguageDirectionLeftToRight = 1,
59 kCFLocaleLanguageDirectionRightToLeft = 2,
60 kCFLocaleLanguageDirectionTopToBottom = 3,
61 kCFLocaleLanguageDirectionBottomToTop = 4
62};
63typedef CFIndex CFLocaleLanguageDirection;
64
68CF_EXPORT const CFStringRef kCFLocaleMeasurementSystem; /* CFString */
69CF_EXPORT const CFStringRef kCFLocaleDecimalSeparator; /* CFString */
70CF_EXPORT const CFStringRef kCFLocaleGroupingSeparator; /* CFString */
71CF_EXPORT const CFStringRef kCFLocaleCurrencySymbol; /* CFString */
72CF_EXPORT const CFStringRef kCFLocaleCurrencyCode; /* CFString */
73#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
74CF_EXPORT const CFStringRef kCFLocaleIdentifier; /* CFString */
75CF_EXPORT const CFStringRef kCFLocaleLanguageCode; /* CFString */
76CF_EXPORT const CFStringRef kCFLocaleCountryCode; /* CFString */
77CF_EXPORT const CFStringRef kCFLocaleScriptCode; /* CFString */
78CF_EXPORT const CFStringRef kCFLocaleVariantCode; /* CFString */
79CF_EXPORT const CFStringRef kCFLocaleExemplarCharacterSet; /* CFCharacterSet */
80CF_EXPORT const CFStringRef kCFLocaleCalendarIdentifier; /* CFString */
81CF_EXPORT const CFStringRef kCFLocaleCalendar; /* CFCalendar */
82CF_EXPORT const CFStringRef kCFLocaleCollationIdentifier; /* CFString */
83CF_EXPORT const CFStringRef kCFLocaleUsesMetricSystem; /* CFBoolean */
84#endif
85#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
86CF_EXPORT const CFStringRef kCFLocaleCollatorIdentifier; /* CFString */
87CF_EXPORT const CFStringRef kCFLocaleQuotationBeginDelimiterKey; /* CFString */
88CF_EXPORT const CFStringRef kCFLocaleQuotationEndDelimiterKey; /* CFString */
89CF_EXPORT const CFStringRef kCFLocaleAlternateQuotationBeginDelimiterKey; /* CFString */
90CF_EXPORT const CFStringRef kCFLocaleAlternateQuotationEndDelimiterKey; /* CFString */
91#endif
97CF_EXPORT const CFStringRef kCFGregorianCalendar;
98#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
99CF_EXPORT const CFStringRef kCFBuddhistCalendar;
100CF_EXPORT const CFStringRef kCFChineseCalendar;
101CF_EXPORT const CFStringRef kCFHebrewCalendar;
102CF_EXPORT const CFStringRef kCFIslamicCalendar;
103CF_EXPORT const CFStringRef kCFIslamicCivilCalendar;
104CF_EXPORT const CFStringRef kCFJapaneseCalendar;
105#endif
106#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
107CF_EXPORT const CFStringRef kCFRepublicOfChinaCalendar;
108CF_EXPORT const CFStringRef kCFPersianCalendar;
109CF_EXPORT const CFStringRef kCFIndianCalendar;
110CF_EXPORT const CFStringRef kCFISO8601Calendar;
111#endif
117
118
119
123CF_EXPORT CFLocaleRef
124CFLocaleCopyCurrent (void);
125
126CF_EXPORT CFLocaleRef
127CFLocaleCreate (CFAllocatorRef allocator,
128 CFStringRef localeIdent);
129
130CF_EXPORT CFLocaleRef
131CFLocaleCreateCopy (CFAllocatorRef allocator,
132 CFLocaleRef locale);
133
134CF_EXPORT CFLocaleRef
135CFLocaleGetSystem (void);
141#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
142CF_EXPORT CFArrayRef
143CFLocaleCopyAvailableLocaleIdentifiers (void);
144#endif
150#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
151CF_EXPORT CFArrayRef
152CFLocaleCopyISOCountryCodes (void);
153
154CF_EXPORT CFArrayRef
155CFLocaleCopyISOLanguageCodes (void);
156
157CF_EXPORT CFArrayRef
158CFLocaleCopyISOCurrencyCodes (void);
159#endif
160
161#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
162CF_EXPORT CFArrayRef
163CFLocaleCopyCommonISOCurrencyCodes (void);
164#endif
170#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
171CF_EXPORT CFArrayRef
172CFLocaleCopyPreferredLanguages (void);
173#endif
174
175#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
176CF_EXPORT CFLocaleLanguageDirection
177CFLocaleGetLanguageCharacterDirection (CFStringRef isoLangCode);
178
179CF_EXPORT CFLocaleLanguageDirection
180CFLocaleGetLanguageLineDirection (CFStringRef isoLangCode);
181#endif
187CF_EXPORT CFStringRef
188CFLocaleCopyDisplayNameForPropertyValue (CFLocaleRef displayLocale,
189 CFStringRef key,
190 CFStringRef value);
191
192CF_EXPORT CFTypeRef
193CFLocaleGetValue (CFLocaleRef locale,
194 CFStringRef key);
195
196CF_EXPORT CFStringRef
197CFLocaleGetIdentifier (CFLocaleRef locale);
203CF_EXPORT CFStringRef
204CFLocaleCreateCanonicalLocaleIdentifierFromString (CFAllocatorRef allocator,
205 CFStringRef localeIdent);
206
207#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
208CF_EXPORT CFStringRef
209CFLocaleCreateCanonicalLanguageIdentifierFromString (CFAllocatorRef allocator,
210 CFStringRef localeIdent);
211
212CF_EXPORT CFDictionaryRef
213CFLocaleCreateComponentsFromLocaleIdentifier (CFAllocatorRef allocator,
214 CFStringRef localeIdent);
215
216CF_EXPORT CFStringRef
217CFLocaleCreateLocaleIdentifierFromComponents (CFAllocatorRef allocator,
218 CFDictionaryRef dictionary);
219#endif
225#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
226CF_EXPORT CFStringRef
227CFLocaleCreateLocaleIdentifierFromWindowsLocaleCode (CFAllocatorRef allocator,
228 UInt32 lcid);
229
230CF_EXPORT UInt32
231CFLocaleGetWindowsLocaleCodeFromLocaleIdentifier (CFStringRef localeIdent);
232#endif
238CF_EXPORT CFTypeID
239CFLocaleGetTypeID (void);
244CF_EXTERN_C_END
245
246#endif /* OS_API_VERSION >= MAC_OS_X_VERSION_10_3 */
247
248#endif /* __COREFOUNDATION_CFLOCALE__ */
249
signed long CFIndex
Definition CFBase.h:165
const struct __CFAllocator * CFAllocatorRef
A reference to a CFAllocator object.
Definition CFBase.h:301
const struct __CFArray * CFArrayRef
Reference to an immutable array object.
Definition CFArray.h:37
const CFStringRef kCFLocaleCurrentLocaleDidChangeNotification
Definition CFLocale.h:116