summaryrefslogtreecommitdiffstats
path: root/ui/base/text
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-06 04:51:07 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-06 04:51:07 +0000
commit507bad5377a236f93f8ec190ca4354dd3cb47b39 (patch)
tree690a510a35e4b1d41eba5948c2d9e78044b6a7fb /ui/base/text
parent843ccb24f7b092580c48cf659865def0758ed976 (diff)
downloadchromium_src-507bad5377a236f93f8ec190ca4354dd3cb47b39.zip
chromium_src-507bad5377a236f93f8ec190ca4354dd3cb47b39.tar.gz
chromium_src-507bad5377a236f93f8ec190ca4354dd3cb47b39.tar.bz2
Rename UI_API to UI_EXPORT.
R=rvargas@chromium.org Review URL: http://codereview.chromium.org/7569005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95730 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base/text')
-rw-r--r--ui/base/text/bytes_formatting.h12
-rw-r--r--ui/base/text/text_elider.h38
2 files changed, 25 insertions, 25 deletions
diff --git a/ui/base/text/bytes_formatting.h b/ui/base/text/bytes_formatting.h
index 7e5d336..024c25d 100644
--- a/ui/base/text/bytes_formatting.h
+++ b/ui/base/text/bytes_formatting.h
@@ -8,7 +8,7 @@
#include "base/basictypes.h"
#include "base/string16.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
namespace ui {
@@ -17,12 +17,12 @@ namespace ui {
// Simple call to return a byte quantity as a string in human-readable format.
// Ex: FormatBytes(512) => "512 B"
// Ex: FormatBytes(101479) => "99.1 kB"
-UI_API string16 FormatBytes(int64 bytes);
+UI_EXPORT string16 FormatBytes(int64 bytes);
// Simple call to return a speed as a string in human-readable format.
// Ex: FormatSpeed(512) => "512 B/s"
// Ex: FormatSpeed(101479) => "99.1 kB/s"
-UI_API string16 FormatSpeed(int64 bytes);
+UI_EXPORT string16 FormatSpeed(int64 bytes);
// Less-Simple API -------------------------------------------------------------
@@ -38,14 +38,14 @@ enum DataUnits {
// Return the unit type that is appropriate for displaying the amount of bytes
// passed in. Most of the time, an explicit call to this isn't necessary; just
// use FormatBytes()/FormatSpeed() above.
-UI_API DataUnits GetByteDisplayUnits(int64 bytes);
+UI_EXPORT DataUnits GetByteDisplayUnits(int64 bytes);
// Return a byte quantity as a string in human-readable format with an optional
// unit suffix. Specify in the |units| argument the units to be used.
// Ex: FormatBytes(512, DATA_UNITS_KIBIBYTE, true) => "0.5 kB"
// Ex: FormatBytes(10*1024, DATA_UNITS_MEBIBYTE, false) => "0.1"
-UI_API string16 FormatBytesWithUnits(int64 bytes, DataUnits units,
- bool show_units);
+UI_EXPORT string16 FormatBytesWithUnits(int64 bytes, DataUnits units,
+ bool show_units);
// As above, but with "/s" units for speed values.
// Ex: FormatSpeed(512, DATA_UNITS_KIBIBYTE, true) => "0.5 kB/s"
diff --git a/ui/base/text/text_elider.h b/ui/base/text/text_elider.h
index c87011f..fe2a141 100644
--- a/ui/base/text/text_elider.h
+++ b/ui/base/text/text_elider.h
@@ -11,15 +11,15 @@
#include "base/basictypes.h"
#include "base/string16.h"
+#include "ui/base/ui_export.h"
#include "ui/gfx/font.h"
-#include "ui/ui_api.h"
class FilePath;
class GURL;
namespace ui {
-UI_API extern const char kEllipsis[];
+UI_EXPORT extern const char kEllipsis[];
// This function takes a GURL object and elides it. It returns a string
// which composed of parts from subdomain, domain, path, filename and query.
@@ -34,18 +34,18 @@ UI_API extern const char kEllipsis[];
// as an LTR string (using base::i18n::WrapStringWithLTRFormatting()) so that it
// is displayed properly in an RTL context. Please refer to
// http://crbug.com/6487 for more information.
-UI_API string16 ElideUrl(const GURL& url,
- const gfx::Font& font,
- int available_pixel_width,
- const std::string& languages);
+UI_EXPORT string16 ElideUrl(const GURL& url,
+ const gfx::Font& font,
+ int available_pixel_width,
+ const std::string& languages);
// Elides |text| to fit in |available_pixel_width|. If |elide_in_middle| is
// set the ellipsis is placed in the middle of the string; otherwise it is
// placed at the end.
-UI_API string16 ElideText(const string16& text,
- const gfx::Font& font,
- int available_pixel_width,
- bool elide_in_middle);
+UI_EXPORT string16 ElideText(const string16& text,
+ const gfx::Font& font,
+ int available_pixel_width,
+ bool elide_in_middle);
// Elide a filename to fit a given pixel width, with an emphasis on not hiding
// the extension unless we have to. If filename contains a path, the path will
@@ -53,16 +53,16 @@ UI_API string16 ElideText(const string16& text,
// filename is forced to have LTR directionality, which means that in RTL UI
// the elided filename is wrapped with LRE (Left-To-Right Embedding) mark and
// PDF (Pop Directional Formatting) mark.
-UI_API string16 ElideFilename(const FilePath& filename,
- const gfx::Font& font,
- int available_pixel_width);
+UI_EXPORT string16 ElideFilename(const FilePath& filename,
+ const gfx::Font& font,
+ int available_pixel_width);
// SortedDisplayURL maintains a string from a URL suitable for display to the
// use. SortedDisplayURL also provides a function used for comparing two
// SortedDisplayURLs for use in visually ordering the SortedDisplayURLs.
//
// SortedDisplayURL is relatively cheap and supports value semantics.
-class UI_API SortedDisplayURL {
+class UI_EXPORT SortedDisplayURL {
public:
SortedDisplayURL(const GURL& url, const std::string& languages);
SortedDisplayURL();
@@ -103,8 +103,8 @@ class UI_API SortedDisplayURL {
// puts "Hell...Tom" in str and returns true.
// TODO(tsepez): Doesn't handle UTF-16 surrogate pairs properly.
// TODO(tsepez): Doesn't handle bidi properly.
-UI_API bool ElideString(const string16& input, int max_len,
- string16* output);
+UI_EXPORT bool ElideString(const string16& input, int max_len,
+ string16* output);
// Reformat |input| into |output| so that it fits into a |max_rows| by
// |max_cols| rectangle of characters. Input newlines are respected, but
@@ -115,9 +115,9 @@ UI_API bool ElideString(const string16& input, int max_len,
// intra-word (respecting UTF-16 surrogate pairs) as necssary. Truncation
// (indicated by an added 3 dots) occurs if the result is still too long.
// Returns true if the input had to be truncated (and not just reformatted).
-UI_API bool ElideRectangleString(const string16& input, size_t max_rows,
- size_t max_cols, bool strict,
- string16* output);
+UI_EXPORT bool ElideRectangleString(const string16& input, size_t max_rows,
+ size_t max_cols, bool strict,
+ string16* output);
} // namespace ui