Make UEFI boot-platform build again
[haiku.git] / headers / os / locale / Language.h
blob6f1136e710ccb9b66cca8434f7f18f4cf7af18eb
1 /*
2 * Copyright 2003-2011, Haiku, Inc.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef _LANGUAGE_H_
6 #define _LANGUAGE_H_
9 #include <LocaleStrings.h>
10 #include <String.h>
11 #include <SupportDefs.h>
14 class BBitmap;
16 // We must not include the icu headers in there as it could mess up binary
17 // compatibility.
18 #ifndef U_ICU_NAMESPACE
19 #define U_ICU_NAMESPACE icu
20 #endif
21 namespace U_ICU_NAMESPACE {
22 class Locale;
26 enum script_direction {
27 B_LEFT_TO_RIGHT = 0,
28 B_RIGHT_TO_LEFT,
29 B_TOP_TO_BOTTOM, // seems not to be supported anywhere else?
33 class BLanguage {
34 public:
35 BLanguage();
36 BLanguage(const char* language);
37 BLanguage(const BLanguage& other);
38 ~BLanguage();
40 status_t SetTo(const char* language);
42 status_t GetNativeName(BString& name) const;
43 status_t GetName(BString& name,
44 const BLanguage* displayLanguage = NULL
45 ) const;
46 const char* GetString(uint32 id) const;
47 status_t GetIcon(BBitmap* result) const;
49 const char* Code() const;
50 // ISO-639-1
51 const char* CountryCode() const;
52 // ISO-3166
53 const char* ScriptCode() const;
54 // ISO-15924
55 const char* Variant() const;
56 const char* ID() const;
58 bool IsCountrySpecific() const;
59 bool IsVariant() const;
61 uint8 Direction() const;
63 BLanguage& operator=(const BLanguage& source);
65 class Private;
66 private:
67 friend class Private;
69 uint8 fDirection;
70 U_ICU_NAMESPACE::Locale* fICULocale;
74 #endif // _LANGUAGE_H_