summaryrefslogtreecommitdiffstats
path: root/ui/base/l10n
diff options
context:
space:
mode:
Diffstat (limited to 'ui/base/l10n')
-rw-r--r--ui/base/l10n/l10n_font_util.h16
-rw-r--r--ui/base/l10n/l10n_util.h116
-rw-r--r--ui/base/l10n/l10n_util_collator.h6
-rw-r--r--ui/base/l10n/l10n_util_mac.h76
-rw-r--r--ui/base/l10n/l10n_util_win.h18
5 files changed, 116 insertions, 116 deletions
diff --git a/ui/base/l10n/l10n_font_util.h b/ui/base/l10n/l10n_font_util.h
index 4478569..6688d31 100644
--- a/ui/base/l10n/l10n_font_util.h
+++ b/ui/base/l10n/l10n_font_util.h
@@ -6,8 +6,8 @@
#define UI_BASE_L10N_FONT_UTIL_H_
#pragma once
+#include "ui/base/ui_export.h"
#include "ui/gfx/size.h"
-#include "ui/ui_api.h"
namespace gfx {
class Font;
@@ -19,13 +19,13 @@ namespace ui {
// its localized size data and the given font. The width in cols is held in a
// localized string resource identified by |col_resource_id|, the height in the
// same fashion.
-UI_API int GetLocalizedContentsWidthForFont(int col_resource_id,
- const gfx::Font& font);
-UI_API int GetLocalizedContentsHeightForFont(int row_resource_id,
- const gfx::Font& font);
-UI_API gfx::Size GetLocalizedContentsSizeForFont(int col_resource_id,
- int row_resource_id,
- const gfx::Font& font);
+UI_EXPORT int GetLocalizedContentsWidthForFont(int col_resource_id,
+ const gfx::Font& font);
+UI_EXPORT int GetLocalizedContentsHeightForFont(int row_resource_id,
+ const gfx::Font& font);
+UI_EXPORT gfx::Size GetLocalizedContentsSizeForFont(int col_resource_id,
+ int row_resource_id,
+ const gfx::Font& font);
} // namespace ui
diff --git a/ui/base/l10n/l10n_util.h b/ui/base/l10n/l10n_util.h
index 8c7cabc..8fd0240 100644
--- a/ui/base/l10n/l10n_util.h
+++ b/ui/base/l10n/l10n_util.h
@@ -14,7 +14,7 @@
#include "base/string16.h"
#include "base/string_util.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
#if defined(OS_MACOSX)
#include "ui/base/l10n/l10n_util_mac.h"
@@ -31,7 +31,7 @@ namespace l10n_util {
// as |pref_locale|), finally, we fall back on the system locale. We only return
// a value if there's a corresponding resource DLL for the locale. Otherwise,
// we fall back to en-us.
-UI_API std::string GetApplicationLocale(const std::string& pref_locale);
+UI_EXPORT std::string GetApplicationLocale(const std::string& pref_locale);
// Given a locale code, return true if the OS is capable of supporting it.
// For instance, Oriya is not well supported on Windows XP and we return
@@ -47,18 +47,18 @@ bool IsLocaleSupportedByOS(const std::string& locale);
// in the UI thread.
// If |is_for_ui| is true, U+200F is appended so that it can be
// rendered properly in a RTL Chrome.
-UI_API string16 GetDisplayNameForLocale(const std::string& locale,
- const std::string& display_locale,
- bool is_for_ui);
+UI_EXPORT string16 GetDisplayNameForLocale(const std::string& locale,
+ const std::string& display_locale,
+ bool is_for_ui);
// Converts all - into _, to be consistent with ICU and file system names.
-UI_API std::string NormalizeLocale(const std::string& locale);
+UI_EXPORT std::string NormalizeLocale(const std::string& locale);
// Produce a vector of parent locales for given locale.
// It includes the current locale in the result.
// sr_Cyrl_RS generates sr_Cyrl_RS, sr_Cyrl and sr.
-UI_API void GetParentLocales(const std::string& current_locale,
- std::vector<std::string>* parent_locales);
+UI_EXPORT void GetParentLocales(const std::string& current_locale,
+ std::vector<std::string>* parent_locales);
// Checks if a string is plausibly a syntactically-valid locale string,
// for cases where we want the valid input to be a locale string such as
@@ -68,67 +68,67 @@ UI_API void GetParentLocales(const std::string& current_locale,
// accepted, but 'z', 'German', 'en-$1', or 'abcd-1234' should not.
// Case-insensitive. Based on BCP 47, see:
// http://unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers
-UI_API bool IsValidLocaleSyntax(const std::string& locale);
+UI_EXPORT bool IsValidLocaleSyntax(const std::string& locale);
//
// Mac Note: See l10n_util_mac.h for some NSString versions and other support.
//
// Pulls resource string from the string bundle and returns it.
-UI_API std::string GetStringUTF8(int message_id);
-UI_API string16 GetStringUTF16(int message_id);
+UI_EXPORT std::string GetStringUTF8(int message_id);
+UI_EXPORT string16 GetStringUTF16(int message_id);
// Get a resource string and replace $1-$2-$3 with |a| and |b|
// respectively. Additionally, $$ is replaced by $.
-UI_API string16 GetStringFUTF16(int message_id,
- const string16& a);
-UI_API string16 GetStringFUTF16(int message_id,
- const string16& a,
- const string16& b);
-UI_API string16 GetStringFUTF16(int message_id,
- const string16& a,
- const string16& b,
- const string16& c);
-UI_API string16 GetStringFUTF16(int message_id,
- const string16& a,
- const string16& b,
- const string16& c,
- const string16& d);
-UI_API string16 GetStringFUTF16(int message_id,
- const string16& a,
- const string16& b,
- const string16& c,
- const string16& d,
- const string16& e);
-UI_API std::string GetStringFUTF8(int message_id,
- const string16& a);
-UI_API std::string GetStringFUTF8(int message_id,
- const string16& a,
- const string16& b);
-UI_API std::string GetStringFUTF8(int message_id,
- const string16& a,
- const string16& b,
- const string16& c);
-UI_API std::string GetStringFUTF8(int message_id,
- const string16& a,
- const string16& b,
- const string16& c,
- const string16& d);
+UI_EXPORT string16 GetStringFUTF16(int message_id,
+ const string16& a);
+UI_EXPORT string16 GetStringFUTF16(int message_id,
+ const string16& a,
+ const string16& b);
+UI_EXPORT string16 GetStringFUTF16(int message_id,
+ const string16& a,
+ const string16& b,
+ const string16& c);
+UI_EXPORT string16 GetStringFUTF16(int message_id,
+ const string16& a,
+ const string16& b,
+ const string16& c,
+ const string16& d);
+UI_EXPORT string16 GetStringFUTF16(int message_id,
+ const string16& a,
+ const string16& b,
+ const string16& c,
+ const string16& d,
+ const string16& e);
+UI_EXPORT std::string GetStringFUTF8(int message_id,
+ const string16& a);
+UI_EXPORT std::string GetStringFUTF8(int message_id,
+ const string16& a,
+ const string16& b);
+UI_EXPORT std::string GetStringFUTF8(int message_id,
+ const string16& a,
+ const string16& b,
+ const string16& c);
+UI_EXPORT std::string GetStringFUTF8(int message_id,
+ const string16& a,
+ const string16& b,
+ const string16& c,
+ const string16& d);
// Variants that return the offset(s) of the replaced parameters. The
// vector based version returns offsets ordered by parameter. For example if
// invoked with a and b offsets[0] gives the offset for a and offsets[1] the
// offset of b regardless of where the parameters end up in the string.
-UI_API string16 GetStringFUTF16(int message_id,
- const string16& a,
- size_t* offset);
-UI_API string16 GetStringFUTF16(int message_id,
- const string16& a,
- const string16& b,
- std::vector<size_t>* offsets);
+UI_EXPORT string16 GetStringFUTF16(int message_id,
+ const string16& a,
+ size_t* offset);
+UI_EXPORT string16 GetStringFUTF16(int message_id,
+ const string16& a,
+ const string16& b,
+ std::vector<size_t>* offsets);
// Convenience functions to get a string with a single number as a parameter.
-UI_API string16 GetStringFUTF16Int(int message_id, int a);
+UI_EXPORT string16 GetStringFUTF16Int(int message_id, int a);
string16 GetStringFUTF16Int(int message_id, int64 a);
// Truncates the string to length characters. This breaks the string at
@@ -136,18 +136,18 @@ string16 GetStringFUTF16Int(int message_id, int64 a);
// character (unicode character 0x2026) to render ...
// The supplied string is returned if the string has length characters or
// less.
-UI_API string16 TruncateString(const string16& string, size_t length);
+UI_EXPORT string16 TruncateString(const string16& string, size_t length);
// In place sorting of string16 strings using collation rules for |locale|.
-UI_API void SortStrings16(const std::string& locale,
- std::vector<string16>* strings);
+UI_EXPORT void SortStrings16(const std::string& locale,
+ std::vector<string16>* strings);
// Returns a vector of available locale codes. E.g., a vector containing
// en-US, es, fr, fi, pt-PT, pt-BR, etc.
-UI_API const std::vector<std::string>& GetAvailableLocales();
+UI_EXPORT const std::vector<std::string>& GetAvailableLocales();
// Returns a vector of locale codes usable for accept-languages.
-UI_API void GetAcceptLanguagesForLocale(
+UI_EXPORT void GetAcceptLanguagesForLocale(
const std::string& display_locale,
std::vector<std::string>* locale_codes);
diff --git a/ui/base/l10n/l10n_util_collator.h b/ui/base/l10n/l10n_util_collator.h
index 11afe78..04a5272 100644
--- a/ui/base/l10n/l10n_util_collator.h
+++ b/ui/base/l10n/l10n_util_collator.h
@@ -13,13 +13,13 @@
#include "base/memory/scoped_ptr.h"
#include "base/utf_string_conversions.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
#include "unicode/coll.h"
namespace l10n_util {
// Compares the two strings using the specified collator.
-UI_API UCollationResult CompareString16WithCollator(
+UI_EXPORT UCollationResult CompareString16WithCollator(
const icu::Collator* collator,
const string16& lhs,
const string16& rhs);
@@ -112,7 +112,7 @@ class StringComparator : public std::binary_function<const Element&,
};
// Specialization of operator() method for string16 version.
-template <> UI_API
+template <> UI_EXPORT
bool StringComparator<string16>::operator()(const string16& lhs,
const string16& rhs);
diff --git a/ui/base/l10n/l10n_util_mac.h b/ui/base/l10n/l10n_util_mac.h
index cbf251d..cdb044f 100644
--- a/ui/base/l10n/l10n_util_mac.h
+++ b/ui/base/l10n/l10n_util_mac.h
@@ -11,7 +11,7 @@
#include "base/basictypes.h"
#include "base/string16.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
#ifdef __OBJC__
@class NSString;
@@ -24,59 +24,59 @@ namespace l10n_util {
// Remove the Windows-style accelerator marker (for labels, menuitems, etc.)
// and change "..." into an ellipsis.
// Returns the result in an autoreleased NSString.
-UI_API NSString* FixUpWindowsStyleLabel(const string16& label);
+UI_EXPORT NSString* FixUpWindowsStyleLabel(const string16& label);
// Pulls resource string from the string bundle and returns it.
-UI_API NSString* GetNSString(int message_id);
+UI_EXPORT NSString* GetNSString(int message_id);
// Get a resource string and replace $1-$2-$3 with |a| and |b|
// respectively. Additionally, $$ is replaced by $.
-UI_API NSString* GetNSStringF(int message_id,
- const string16& a);
-UI_API NSString* GetNSStringF(int message_id,
- const string16& a,
- const string16& b);
-UI_API NSString* GetNSStringF(int message_id,
- const string16& a,
- const string16& b,
- const string16& c);
-UI_API NSString* GetNSStringF(int message_id,
- const string16& a,
- const string16& b,
- const string16& c,
- const string16& d);
+UI_EXPORT NSString* GetNSStringF(int message_id,
+ const string16& a);
+UI_EXPORT NSString* GetNSStringF(int message_id,
+ const string16& a,
+ const string16& b);
+UI_EXPORT NSString* GetNSStringF(int message_id,
+ const string16& a,
+ const string16& b,
+ const string16& c);
+UI_EXPORT NSString* GetNSStringF(int message_id,
+ const string16& a,
+ const string16& b,
+ const string16& c,
+ const string16& d);
// Variants that return the offset(s) of the replaced parameters. (See
// app/l10n_util.h for more details.)
-UI_API NSString* GetNSStringF(int message_id,
- const string16& a,
- const string16& b,
- std::vector<size_t>* offsets);
+UI_EXPORT NSString* GetNSStringF(int message_id,
+ const string16& a,
+ const string16& b,
+ std::vector<size_t>* offsets);
// Same as GetNSString, but runs the result through FixUpWindowsStyleLabel
// before returning it.
-UI_API NSString* GetNSStringWithFixup(int message_id);
+UI_EXPORT NSString* GetNSStringWithFixup(int message_id);
// Same as GetNSStringF, but runs the result through FixUpWindowsStyleLabel
// before returning it.
-UI_API NSString* GetNSStringFWithFixup(int message_id,
- const string16& a);
-UI_API NSString* GetNSStringFWithFixup(int message_id,
- const string16& a,
- const string16& b);
-UI_API NSString* GetNSStringFWithFixup(int message_id,
- const string16& a,
- const string16& b,
- const string16& c);
-UI_API NSString* GetNSStringFWithFixup(int message_id,
- const string16& a,
- const string16& b,
- const string16& c,
- const string16& d);
+UI_EXPORT NSString* GetNSStringFWithFixup(int message_id,
+ const string16& a);
+UI_EXPORT NSString* GetNSStringFWithFixup(int message_id,
+ const string16& a,
+ const string16& b);
+UI_EXPORT NSString* GetNSStringFWithFixup(int message_id,
+ const string16& a,
+ const string16& b,
+ const string16& c);
+UI_EXPORT NSString* GetNSStringFWithFixup(int message_id,
+ const string16& a,
+ const string16& b,
+ const string16& c,
+ const string16& d);
// Support the override of the locale with the value from Cocoa.
-UI_API void OverrideLocaleWithCocoaLocale();
-UI_API const std::string& GetLocaleOverride();
+UI_EXPORT void OverrideLocaleWithCocoaLocale();
+UI_EXPORT const std::string& GetLocaleOverride();
} // namespace l10n_util
diff --git a/ui/base/l10n/l10n_util_win.h b/ui/base/l10n/l10n_util_win.h
index 7e61719..1063a1a 100644
--- a/ui/base/l10n/l10n_util_win.h
+++ b/ui/base/l10n/l10n_util_win.h
@@ -10,7 +10,7 @@
#include <string>
#include <vector>
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
namespace l10n_util {
@@ -19,17 +19,17 @@ namespace l10n_util {
// (e.g. WS_EX_LAYOUTRTL, WS_EX_RTLREADING, etc.) when creating a window.
// Callers should OR this value into their extended style value when creating
// a window.
-UI_API int GetExtendedStyles();
+UI_EXPORT int GetExtendedStyles();
// TODO(xji):
// This is a temporary name, it will eventually replace GetExtendedStyles
-UI_API int GetExtendedTooltipStyles();
+UI_EXPORT int GetExtendedTooltipStyles();
// Give an HWND, this function sets the WS_EX_LAYOUTRTL extended style for the
// underlying window. When this style is set, the UI for the window is going to
// be mirrored. This is generally done for the UI of right-to-left languages
// such as Hebrew.
-UI_API void HWNDSetRTLLayout(HWND hwnd);
+UI_EXPORT void HWNDSetRTLLayout(HWND hwnd);
// See http://blogs.msdn.com/oldnewthing/archive/2005/09/15/467598.aspx
// and http://blogs.msdn.com/oldnewthing/archive/2006/06/26/647365.aspx
@@ -39,22 +39,22 @@ UI_API void HWNDSetRTLLayout(HWND hwnd);
// to use in the UI of the current UI (e.g. Malayalam, Bengali). If
// override_font_family and font_size_scaler are not null, they'll be
// filled with the font family name and the size scaler.
-UI_API bool NeedOverrideDefaultUIFont(std::wstring* override_font_family,
- double* font_size_scaler);
+UI_EXPORT bool NeedOverrideDefaultUIFont(std::wstring* override_font_family,
+ double* font_size_scaler);
// If the default UI font stored in |logfont| is not suitable, its family
// and size are replaced with those stored in the per-locale resource.
-UI_API void AdjustUIFont(LOGFONT* logfont);
+UI_EXPORT void AdjustUIFont(LOGFONT* logfont);
// If the font for a given window (pointed to by HWND) is not suitable for the
// UI in the current UI langauge, its family and size are replaced with those
// stored in the per-locale resource.
-UI_API void AdjustUIFontForWindow(HWND hwnd);
+UI_EXPORT void AdjustUIFontForWindow(HWND hwnd);
// Allow processes to override the configured locale with the user's Windows UI
// languages. This function should generally be called once early in
// Application startup.
-UI_API void OverrideLocaleWithUILanguageList();
+UI_EXPORT void OverrideLocaleWithUILanguageList();
// Retrieve the locale override, or an empty vector if the locale has not been
// or failed to be overridden.