summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--ui/base/accessibility/accessible_view_state.h4
-rw-r--r--ui/base/animation/animation.h2
-rw-r--r--ui/base/animation/animation_container.h4
-rw-r--r--ui/base/animation/animation_container_element.h4
-rw-r--r--ui/base/animation/animation_container_observer.h4
-rw-r--r--ui/base/animation/animation_delegate.h4
-rw-r--r--ui/base/animation/linear_animation.h2
-rw-r--r--ui/base/animation/multi_animation.h2
-rw-r--r--ui/base/animation/slide_animation.h2
-rw-r--r--ui/base/animation/throb_animation.h2
-rw-r--r--ui/base/animation/tween.h4
-rw-r--r--ui/base/clipboard/clipboard.h4
-rw-r--r--ui/base/clipboard/clipboard_util_win.h4
-rw-r--r--ui/base/clipboard/scoped_clipboard_writer.h4
-rw-r--r--ui/base/dragdrop/drag_drop_types.h4
-rw-r--r--ui/base/dragdrop/drag_source.h6
-rw-r--r--ui/base/dragdrop/drop_target.h4
-rw-r--r--ui/base/dragdrop/gtk_dnd_util.h35
-rw-r--r--ui/base/dragdrop/os_exchange_data.h8
-rw-r--r--ui/base/dragdrop/os_exchange_data_provider_gtk.h2
-rw-r--r--ui/base/dragdrop/os_exchange_data_provider_win.h4
-rw-r--r--ui/base/gtk/event_synthesis_gtk.h12
-rw-r--r--ui/base/gtk/g_object_destructor_filo.h4
-rw-r--r--ui/base/gtk/gtk_im_context_util.h11
-rw-r--r--ui/base/gtk/gtk_signal_registrar.h4
-rw-r--r--ui/base/gtk/gtk_windowing.h4
-rw-r--r--ui/base/ime/composition_text.h4
-rw-r--r--ui/base/keycodes/keyboard_code_conversion_gtk.h8
-rw-r--r--ui/base/keycodes/keyboard_code_conversion_mac.h10
-rw-r--r--ui/base/keycodes/keyboard_code_conversion_win.h6
-rw-r--r--ui/base/keycodes/keyboard_code_conversion_x.h6
-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
-rw-r--r--ui/base/message_box_win.h10
-rw-r--r--ui/base/models/accelerator.h4
-rw-r--r--ui/base/models/accelerator_cocoa.h4
-rw-r--r--ui/base/models/button_menu_item_model.h6
-rw-r--r--ui/base/models/menu_model.h4
-rw-r--r--ui/base/models/simple_menu_model.h4
-rw-r--r--ui/base/models/table_model.h6
-rw-r--r--ui/base/models/table_model_observer.h4
-rw-r--r--ui/base/models/tree_model.h6
-rw-r--r--ui/base/range/range.h6
-rw-r--r--ui/base/resource/data_pack.h4
-rw-r--r--ui/base/resource/resource_bundle.h4
-rw-r--r--ui/base/text/bytes_formatting.h12
-rw-r--r--ui/base/text/text_elider.h38
-rw-r--r--ui/base/theme_provider.h4
-rw-r--r--ui/base/ui_base_paths.h4
-rw-r--r--ui/base/ui_base_switches.h6
-rw-r--r--ui/base/ui_export.h (renamed from ui/ui_api.h)18
-rw-r--r--ui/base/view_prop.h4
-rw-r--r--ui/base/win/hwnd_util.h24
-rw-r--r--ui/base/win/ime_input.h4
-rw-r--r--ui/base/win/shell.h8
-rw-r--r--ui/base/win/window_impl.h4
-rw-r--r--ui/base/x/active_window_watcher_x.h4
-rw-r--r--ui/base/x/x11_util.h67
-rw-r--r--ui/base/x/x11_util_internal.h13
-rw-r--r--ui/gfx/blit.h40
-rw-r--r--ui/gfx/canvas.h6
-rw-r--r--ui/gfx/canvas_direct2d.h2
-rw-r--r--ui/gfx/canvas_skia.h2
-rw-r--r--ui/gfx/codec/jpeg_codec.h4
-rw-r--r--ui/gfx/codec/png_codec.h6
-rw-r--r--ui/gfx/color_analysis.h14
-rw-r--r--ui/gfx/color_utils.h20
-rw-r--r--ui/gfx/font.h4
-rw-r--r--ui/gfx/gdi_util.h11
-rw-r--r--ui/gfx/gfx_paths.h4
-rw-r--r--ui/gfx/gtk_native_view_id_manager.h4
-rw-r--r--ui/gfx/gtk_preserve_window.h8
-rw-r--r--ui/gfx/gtk_util.h16
-rw-r--r--ui/gfx/icon_util.h4
-rw-r--r--ui/gfx/image/image.h4
-rw-r--r--ui/gfx/image/image_util.h14
-rw-r--r--ui/gfx/insets.h4
-rw-r--r--ui/gfx/interpolated_transform.h12
-rw-r--r--ui/gfx/mac/nsimage_cache.h4
-rw-r--r--ui/gfx/native_theme.h4
-rw-r--r--ui/gfx/native_theme_win.h2
-rw-r--r--ui/gfx/native_widget_types.h4
-rw-r--r--ui/gfx/path.h4
-rw-r--r--ui/gfx/platform_font.h4
-rw-r--r--ui/gfx/platform_font_gtk.h2
-rw-r--r--ui/gfx/platform_font_win.h4
-rw-r--r--ui/gfx/point.h6
-rw-r--r--ui/gfx/rect.h4
-rw-r--r--ui/gfx/render_text.h6
-rw-r--r--ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h4
-rw-r--r--ui/gfx/screen.h2
-rw-r--r--ui/gfx/scrollbar_size.h4
-rw-r--r--ui/gfx/size.h6
-rw-r--r--ui/gfx/skbitmap_operations.h4
-rw-r--r--ui/gfx/skia_util.h21
-rw-r--r--ui/gfx/skia_utils_gtk.h6
-rw-r--r--ui/gfx/transform.h4
-rw-r--r--ui/gfx/win_util.h4
-rw-r--r--ui/ui.gyp2
102 files changed, 484 insertions, 478 deletions
diff --git a/ui/base/accessibility/accessible_view_state.h b/ui/base/accessibility/accessible_view_state.h
index c5117ac..2feeec3 100644
--- a/ui/base/accessibility/accessible_view_state.h
+++ b/ui/base/accessibility/accessible_view_state.h
@@ -9,7 +9,7 @@
#include "base/basictypes.h"
#include "base/string16.h"
#include "ui/base/accessibility/accessibility_types.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
namespace ui {
@@ -21,7 +21,7 @@ namespace ui {
// that should be provided about any UI view to assistive technology (AT).
//
////////////////////////////////////////////////////////////////////////////////
-struct UI_API AccessibleViewState {
+struct UI_EXPORT AccessibleViewState {
public:
AccessibleViewState();
~AccessibleViewState();
diff --git a/ui/base/animation/animation.h b/ui/base/animation/animation.h
index 8de0f0c6a..3b8288d 100644
--- a/ui/base/animation/animation.h
+++ b/ui/base/animation/animation.h
@@ -25,7 +25,7 @@ class AnimationDelegate;
//
// To subclass override Step, which is invoked as the animation progresses and
// GetCurrentValue() to return the value appropriate to the animation.
-class UI_API Animation : public AnimationContainerElement {
+class UI_EXPORT Animation : public AnimationContainerElement {
public:
explicit Animation(base::TimeDelta timer_interval);
virtual ~Animation();
diff --git a/ui/base/animation/animation_container.h b/ui/base/animation/animation_container.h
index 04c3f0d..bf4db5d 100644
--- a/ui/base/animation/animation_container.h
+++ b/ui/base/animation/animation_container.h
@@ -11,7 +11,7 @@
#include "base/memory/ref_counted.h"
#include "base/time.h"
#include "base/timer.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
namespace ui {
@@ -26,7 +26,7 @@ class AnimationContainerObserver;
//
// AnimationContainer is ref counted. Each Animation contained within the
// AnimationContainer own it.
-class UI_API AnimationContainer
+class UI_EXPORT AnimationContainer
: public base::RefCounted<AnimationContainer> {
public:
AnimationContainer();
diff --git a/ui/base/animation/animation_container_element.h b/ui/base/animation/animation_container_element.h
index f49eb29..169347f35 100644
--- a/ui/base/animation/animation_container_element.h
+++ b/ui/base/animation/animation_container_element.h
@@ -7,13 +7,13 @@
#pragma once
#include "base/time.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
namespace ui {
// Interface for the elements the AnimationContainer contains. This is
// implemented by Animation.
-class UI_API AnimationContainerElement {
+class UI_EXPORT AnimationContainerElement {
public:
// Sets the start of the animation. This is invoked from
// AnimationContainer::Start.
diff --git a/ui/base/animation/animation_container_observer.h b/ui/base/animation/animation_container_observer.h
index 17fee92..5df7650 100644
--- a/ui/base/animation/animation_container_observer.h
+++ b/ui/base/animation/animation_container_observer.h
@@ -6,7 +6,7 @@
#define UI_BASE_ANIMATION_ANIMATION_CONTAINER_OBSERVER_H_
#pragma once
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
namespace ui {
@@ -14,7 +14,7 @@ class AnimationContainer;
// The observer is notified after every update of the animations managed by
// the container.
-class UI_API AnimationContainerObserver {
+class UI_EXPORT AnimationContainerObserver {
public:
// Invoked on every tick of the timer managed by the container and after
// all the animations have updated.
diff --git a/ui/base/animation/animation_delegate.h b/ui/base/animation/animation_delegate.h
index 8c65d8f..43e5062 100644
--- a/ui/base/animation/animation_delegate.h
+++ b/ui/base/animation/animation_delegate.h
@@ -6,7 +6,7 @@
#define UI_BASE_ANIMATION_ANIMATION_DELEGATE_H_
#pragma once
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
namespace ui {
@@ -16,7 +16,7 @@ class Animation;
//
// Implement this interface when you want to receive notifications about the
// state of an animation.
-class UI_API AnimationDelegate {
+class UI_EXPORT AnimationDelegate {
public:
// Called when an animation has completed.
virtual void AnimationEnded(const Animation* animation) {}
diff --git a/ui/base/animation/linear_animation.h b/ui/base/animation/linear_animation.h
index 7e09efb..a327c0a 100644
--- a/ui/base/animation/linear_animation.h
+++ b/ui/base/animation/linear_animation.h
@@ -15,7 +15,7 @@ class AnimationDelegate;
// Linear time bounded animation. As the animation progresses AnimateToState is
// invoked.
-class UI_API LinearAnimation : public Animation {
+class UI_EXPORT LinearAnimation : public Animation {
public:
// Initializes everything except the duration.
//
diff --git a/ui/base/animation/multi_animation.h b/ui/base/animation/multi_animation.h
index fcd18b5..ff4cd5d 100644
--- a/ui/base/animation/multi_animation.h
+++ b/ui/base/animation/multi_animation.h
@@ -17,7 +17,7 @@ namespace ui {
// To create a MultiAnimation pass in the parts, invoke Start() and the delegate
// is notified as the animation progresses. By default MultiAnimation runs until
// Stop is invoked, see |set_continuous()| for details.
-class UI_API MultiAnimation : public Animation {
+class UI_EXPORT MultiAnimation : public Animation {
public:
// Defines part of the animation. Each part consists of the following:
//
diff --git a/ui/base/animation/slide_animation.h b/ui/base/animation/slide_animation.h
index a715f75..7542845 100644
--- a/ui/base/animation/slide_animation.h
+++ b/ui/base/animation/slide_animation.h
@@ -45,7 +45,7 @@ namespace ui {
// private:
// scoped_ptr<SlideAnimation> animation_;
// }
-class UI_API SlideAnimation : public LinearAnimation {
+class UI_EXPORT SlideAnimation : public LinearAnimation {
public:
explicit SlideAnimation(AnimationDelegate* target);
virtual ~SlideAnimation();
diff --git a/ui/base/animation/throb_animation.h b/ui/base/animation/throb_animation.h
index 81b9ab4..ff6faa09 100644
--- a/ui/base/animation/throb_animation.h
+++ b/ui/base/animation/throb_animation.h
@@ -17,7 +17,7 @@ namespace ui {
//
// A ThrobAnimation has two durations: the duration used when behavior like
// a SlideAnimation, and the duration used when throbbing.
-class UI_API ThrobAnimation : public SlideAnimation {
+class UI_EXPORT ThrobAnimation : public SlideAnimation {
public:
explicit ThrobAnimation(AnimationDelegate* target);
virtual ~ThrobAnimation() {}
diff --git a/ui/base/animation/tween.h b/ui/base/animation/tween.h
index 9681bed..6bde5dd 100644
--- a/ui/base/animation/tween.h
+++ b/ui/base/animation/tween.h
@@ -7,7 +7,7 @@
#pragma once
#include "base/basictypes.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
namespace gfx {
class Rect;
@@ -15,7 +15,7 @@ class Rect;
namespace ui {
-class UI_API Tween {
+class UI_EXPORT Tween {
public:
enum Type {
LINEAR, // Linear.
diff --git a/ui/base/clipboard/clipboard.h b/ui/base/clipboard/clipboard.h
index 1adb5a0..9abce63 100644
--- a/ui/base/clipboard/clipboard.h
+++ b/ui/base/clipboard/clipboard.h
@@ -14,7 +14,7 @@
#include "base/process.h"
#include "base/shared_memory.h"
#include "base/string16.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
namespace gfx {
class Size;
@@ -29,7 +29,7 @@ typedef struct _GtkClipboard GtkClipboard;
namespace ui {
-class UI_API Clipboard {
+class UI_EXPORT Clipboard {
public:
typedef std::string FormatType;
diff --git a/ui/base/clipboard/clipboard_util_win.h b/ui/base/clipboard/clipboard_util_win.h
index a9c33e0..fd256d3 100644
--- a/ui/base/clipboard/clipboard_util_win.h
+++ b/ui/base/clipboard/clipboard_util_win.h
@@ -12,11 +12,11 @@
#include <string>
#include <vector>
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
namespace ui {
-class UI_API ClipboardUtil {
+class UI_EXPORT ClipboardUtil {
public:
/////////////////////////////////////////////////////////////////////////////
// Clipboard formats.
diff --git a/ui/base/clipboard/scoped_clipboard_writer.h b/ui/base/clipboard/scoped_clipboard_writer.h
index e0c296b..3e224a2 100644
--- a/ui/base/clipboard/scoped_clipboard_writer.h
+++ b/ui/base/clipboard/scoped_clipboard_writer.h
@@ -16,7 +16,7 @@
#include "base/string16.h"
#include "ui/base/clipboard/clipboard.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
class Pickle;
@@ -26,7 +26,7 @@ namespace ui {
// into a Clipboard::ObjectMap.
// NB: You should probably NOT be using this class if you include
// webkit_glue.h. Use ScopedClipboardWriterGlue instead.
-class UI_API ScopedClipboardWriter {
+class UI_EXPORT ScopedClipboardWriter {
public:
// Create an instance that is a simple wrapper around clipboard.
explicit ScopedClipboardWriter(Clipboard* clipboard);
diff --git a/ui/base/dragdrop/drag_drop_types.h b/ui/base/dragdrop/drag_drop_types.h
index b3d3c8c..e042332 100644
--- a/ui/base/dragdrop/drag_drop_types.h
+++ b/ui/base/dragdrop/drag_drop_types.h
@@ -7,11 +7,11 @@
#pragma once
#include "base/basictypes.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
namespace ui {
-class UI_API DragDropTypes {
+class UI_EXPORT DragDropTypes {
public:
enum DragOperation {
DRAG_NONE = 0,
diff --git a/ui/base/dragdrop/drag_source.h b/ui/base/dragdrop/drag_source.h
index fb332e2..777a8ee 100644
--- a/ui/base/dragdrop/drag_source.h
+++ b/ui/base/dragdrop/drag_source.h
@@ -10,7 +10,7 @@
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
namespace ui {
@@ -18,8 +18,8 @@ namespace ui {
// drag-drop operation as the user mouses over other drop targets on their
// system. This object tells Windows whether or not the drag should continue,
// and supplies the appropriate cursors.
-class UI_API DragSource : public IDropSource,
- public base::RefCountedThreadSafe<DragSource> {
+class UI_EXPORT DragSource : public IDropSource,
+ public base::RefCountedThreadSafe<DragSource> {
public:
DragSource();
virtual ~DragSource() {}
diff --git a/ui/base/dragdrop/drop_target.h b/ui/base/dragdrop/drop_target.h
index 53d88fa..8099a61 100644
--- a/ui/base/dragdrop/drop_target.h
+++ b/ui/base/dragdrop/drop_target.h
@@ -9,7 +9,7 @@
#include <objidl.h>
#include "base/memory/ref_counted.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
// Windows interface.
struct IDropTargetHelper;
@@ -25,7 +25,7 @@ namespace ui {
// before the HWND is deleted too.
//
// This class is meant to be used in a STA and is not multithread-safe.
-class UI_API DropTarget : public IDropTarget {
+class UI_EXPORT DropTarget : public IDropTarget {
public:
// Create a new DropTarget associating it with the given HWND.
explicit DropTarget(HWND hwnd);
diff --git a/ui/base/dragdrop/gtk_dnd_util.h b/ui/base/dragdrop/gtk_dnd_util.h
index ab3322e..7703428 100644
--- a/ui/base/dragdrop/gtk_dnd_util.h
+++ b/ui/base/dragdrop/gtk_dnd_util.h
@@ -11,7 +11,7 @@
#include <vector>
#include "base/string16.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
class GURL;
@@ -43,7 +43,7 @@ enum {
// Get the atom for a given target (of the above enum type). Will return NULL
// for non-custom targets, such as CHROME_TEXT_PLAIN.
-UI_API GdkAtom GetAtomForTarget(int target);
+UI_EXPORT GdkAtom GetAtomForTarget(int target);
// Creates a target list from the given mask. The mask should be an OR of
// CHROME_* values. The target list is returned with ref count 1; the caller
@@ -52,37 +52,38 @@ UI_API GdkAtom GetAtomForTarget(int target);
// Since the MIME type for WEBDROP_FILE_CONTENTS depends on the file's
// contents, that flag is ignored by this function. It is the responsibility
// of the client code to do the right thing.
-UI_API GtkTargetList* GetTargetListFromCodeMask(int code_mask);
+UI_EXPORT GtkTargetList* GetTargetListFromCodeMask(int code_mask);
// Set the drag target list for |source| with the target list that
// corresponds to |code_mask|.
-UI_API void SetSourceTargetListFromCodeMask(GtkWidget* source, int code_mask);
+UI_EXPORT void SetSourceTargetListFromCodeMask(GtkWidget* source,
+ int code_mask);
// Set the accepted targets list for |dest|. The |target_codes| array should
// be sorted in preference order and should be terminated with -1.
-UI_API void SetDestTargetList(GtkWidget* dest, const int* target_codes);
+UI_EXPORT void SetDestTargetList(GtkWidget* dest, const int* target_codes);
// Write a URL to the selection in the given type.
-UI_API void WriteURLWithName(GtkSelectionData* selection_data,
- const GURL& url,
- string16 title,
- int type);
+UI_EXPORT void WriteURLWithName(GtkSelectionData* selection_data,
+ const GURL& url,
+ string16 title,
+ int type);
// Extracts data of type CHROME_NAMED_URL from |selection_data| into
// |url| and |title|. Returns true if the url/title were safely extracted
// and the url is valid.
-UI_API bool ExtractNamedURL(GtkSelectionData* selection_data,
- GURL* url,
- string16* title);
+UI_EXPORT bool ExtractNamedURL(GtkSelectionData* selection_data,
+ GURL* url,
+ string16* title);
// Extracts data of type TEXT_URI_LIST from |selection_data| into |urls|.
-UI_API bool ExtractURIList(GtkSelectionData* selection_data,
- std::vector<GURL>* urls);
+UI_EXPORT bool ExtractURIList(GtkSelectionData* selection_data,
+ std::vector<GURL>* urls);
// Extracts a Netscape URL (url\ntitle) from |selection_data|.
-UI_API bool ExtractNetscapeURL(GtkSelectionData* selection_data,
- GURL* url,
- string16* title);
+UI_EXPORT bool ExtractNetscapeURL(GtkSelectionData* selection_data,
+ GURL* url,
+ string16* title);
} // namespace ui
diff --git a/ui/base/dragdrop/os_exchange_data.h b/ui/base/dragdrop/os_exchange_data.h
index 085048d..7de4e57 100644
--- a/ui/base/dragdrop/os_exchange_data.h
+++ b/ui/base/dragdrop/os_exchange_data.h
@@ -21,7 +21,7 @@
#include "base/file_path.h"
#include "base/memory/scoped_ptr.h"
#include "ui/base/dragdrop/download_file_interface.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
class GURL;
class Pickle;
@@ -42,7 +42,7 @@ namespace ui {
// TabContentsViewGtk uses a different class to handle drag support that does
// not use OSExchangeData. As such, file contents and html support is only
// compiled on windows.
-class UI_API OSExchangeData {
+class UI_EXPORT OSExchangeData {
public:
// CustomFormats are used for non-standard data types. For example, bookmark
// nodes are written using a CustomFormat.
@@ -65,7 +65,7 @@ class UI_API OSExchangeData {
};
// Encapsulates the info about a file to be downloaded.
- struct UI_API DownloadFileInfo {
+ struct UI_EXPORT DownloadFileInfo {
DownloadFileInfo(const FilePath& filename,
DownloadFileProvider* downloader);
~DownloadFileInfo();
@@ -76,7 +76,7 @@ class UI_API OSExchangeData {
// Provider defines the platform specific part of OSExchangeData that
// interacts with the native system.
- class UI_API Provider {
+ class UI_EXPORT Provider {
public:
Provider() {}
virtual ~Provider() {}
diff --git a/ui/base/dragdrop/os_exchange_data_provider_gtk.h b/ui/base/dragdrop/os_exchange_data_provider_gtk.h
index 840b956..e961e9d 100644
--- a/ui/base/dragdrop/os_exchange_data_provider_gtk.h
+++ b/ui/base/dragdrop/os_exchange_data_provider_gtk.h
@@ -25,7 +25,7 @@ namespace ui {
// types can be set on OSExchangeDataProviderGtk by way of the various setters.
// The various has methods return true if the format was supplied to the
// constructor, or explicitly set.
-class UI_API OSExchangeDataProviderGtk : public OSExchangeData::Provider {
+class UI_EXPORT OSExchangeDataProviderGtk : public OSExchangeData::Provider {
public:
OSExchangeDataProviderGtk(int known_formats,
const std::set<GdkAtom>& known_custom_formats_);
diff --git a/ui/base/dragdrop/os_exchange_data_provider_win.h b/ui/base/dragdrop/os_exchange_data_provider_win.h
index 3e150da..0d75a40 100644
--- a/ui/base/dragdrop/os_exchange_data_provider_win.h
+++ b/ui/base/dragdrop/os_exchange_data_provider_win.h
@@ -11,8 +11,8 @@
#include <string>
#include "base/win/scoped_comptr.h"
-#include "ui/ui_api.h"
#include "ui/base/dragdrop/os_exchange_data.h"
+#include "ui/base/ui_export.h"
namespace ui {
@@ -127,7 +127,7 @@ class DataObjectImpl : public DownloadFileObserver,
Observer* observer_;
};
-class UI_API OSExchangeDataProviderWin : public OSExchangeData::Provider {
+class UI_EXPORT OSExchangeDataProviderWin : public OSExchangeData::Provider {
public:
// Returns true if source has plain text that is a valid url.
static bool HasPlainTextURL(IDataObject* source);
diff --git a/ui/base/gtk/event_synthesis_gtk.h b/ui/base/gtk/event_synthesis_gtk.h
index 93ba86ca..f7d16d6 100644
--- a/ui/base/gtk/event_synthesis_gtk.h
+++ b/ui/base/gtk/event_synthesis_gtk.h
@@ -15,19 +15,19 @@
#include <vector>
#include "ui/base/keycodes/keyboard_codes.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
namespace ui {
// Creates and returns a key event. Passes ownership to the caller.
-UI_API GdkEvent* SynthesizeKeyEvent(GdkWindow* event_window,
- bool press,
- guint gdk_key,
- guint state);
+UI_EXPORT GdkEvent* SynthesizeKeyEvent(GdkWindow* event_window,
+ bool press,
+ guint gdk_key,
+ guint state);
// Creates the proper sequence of key events for a key press + release.
// Ownership of the events in the vector is passed to the caller.
-UI_API void SynthesizeKeyPressEvents(
+UI_EXPORT void SynthesizeKeyPressEvents(
GdkWindow* window,
KeyboardCode key,
bool control, bool shift, bool alt,
diff --git a/ui/base/gtk/g_object_destructor_filo.h b/ui/base/gtk/g_object_destructor_filo.h
index 0297a8c..d44bd7f 100644
--- a/ui/base/gtk/g_object_destructor_filo.h
+++ b/ui/base/gtk/g_object_destructor_filo.h
@@ -11,7 +11,7 @@
#include <list>
#include "base/memory/singleton.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
typedef struct _GObject GObject;
@@ -47,7 +47,7 @@ namespace ui {
// TODO(glotov): Probably worth adding ScopedGObjectDtor<T>.
//
// This class is a singleton. Not thread safe. Must be called within UI thread.
-class UI_API GObjectDestructorFILO {
+class UI_EXPORT GObjectDestructorFILO {
public:
typedef void (*DestructorHook)(void* context, GObject* where_the_object_was);
diff --git a/ui/base/gtk/gtk_im_context_util.h b/ui/base/gtk/gtk_im_context_util.h
index 0cd23db..ae7f2a1 100644
--- a/ui/base/gtk/gtk_im_context_util.h
+++ b/ui/base/gtk/gtk_im_context_util.h
@@ -8,7 +8,7 @@
#include <pango/pango-attributes.h>
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
namespace ui {
@@ -16,10 +16,11 @@ struct CompositionText;
// Extracts composition text information (text, underlines, selection range)
// from given Gtk preedit data (utf-8 text, pango attributes, cursor position).
-UI_API void ExtractCompositionTextFromGtkPreedit(const gchar* utf8_text,
- PangoAttrList* attrs,
- int cursor_position,
- CompositionText* composition);
+UI_EXPORT void ExtractCompositionTextFromGtkPreedit(
+ const gchar* utf8_text,
+ PangoAttrList* attrs,
+ int cursor_position,
+ CompositionText* composition);
} // namespace ui
diff --git a/ui/base/gtk/gtk_signal_registrar.h b/ui/base/gtk/gtk_signal_registrar.h
index 3c4e0e8..630ba31 100644
--- a/ui/base/gtk/gtk_signal_registrar.h
+++ b/ui/base/gtk/gtk_signal_registrar.h
@@ -11,7 +11,7 @@
#include <vector>
#include "base/basictypes.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
typedef void (*GCallback) (void);
typedef struct _GObject GObject;
@@ -38,7 +38,7 @@ namespace ui {
//
// When |signals_| goes down, it will disconnect the handlers connected via
// Connect.
-class UI_API GtkSignalRegistrar {
+class UI_EXPORT GtkSignalRegistrar {
public:
GtkSignalRegistrar();
~GtkSignalRegistrar();
diff --git a/ui/base/gtk/gtk_windowing.h b/ui/base/gtk/gtk_windowing.h
index 85696e3..93a9335 100644
--- a/ui/base/gtk/gtk_windowing.h
+++ b/ui/base/gtk/gtk_windowing.h
@@ -7,12 +7,12 @@
#include <gtk/gtk.h>
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
namespace ui {
// Stacks a |popup| window directly on top of a |toplevel| window.
-UI_API void StackPopupWindow(GtkWidget* popup, GtkWidget* toplevel);
+UI_EXPORT void StackPopupWindow(GtkWidget* popup, GtkWidget* toplevel);
} // namespace ui
diff --git a/ui/base/ime/composition_text.h b/ui/base/ime/composition_text.h
index f2b0821..89632d93 100644
--- a/ui/base/ime/composition_text.h
+++ b/ui/base/ime/composition_text.h
@@ -9,12 +9,12 @@
#include "base/string16.h"
#include "ui/base/ime/composition_underline.h"
#include "ui/base/range/range.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
namespace ui {
// A struct represents the status of an ongoing composition text.
-struct UI_API CompositionText {
+struct UI_EXPORT CompositionText {
CompositionText();
~CompositionText();
diff --git a/ui/base/keycodes/keyboard_code_conversion_gtk.h b/ui/base/keycodes/keyboard_code_conversion_gtk.h
index de17841..6a9d293 100644
--- a/ui/base/keycodes/keyboard_code_conversion_gtk.h
+++ b/ui/base/keycodes/keyboard_code_conversion_gtk.h
@@ -38,17 +38,17 @@
#pragma once
#include "ui/base/keycodes/keyboard_codes_posix.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
typedef struct _GdkEventKey GdkEventKey;
namespace ui {
-UI_API KeyboardCode WindowsKeyCodeForGdkKeyCode(int keycode);
+UI_EXPORT KeyboardCode WindowsKeyCodeForGdkKeyCode(int keycode);
-UI_API int GdkKeyCodeForWindowsKeyCode(KeyboardCode keycode, bool shift);
+UI_EXPORT int GdkKeyCodeForWindowsKeyCode(KeyboardCode keycode, bool shift);
-UI_API KeyboardCode KeyboardCodeFromGdkEventKey(GdkEventKey* event);
+UI_EXPORT KeyboardCode KeyboardCodeFromGdkEventKey(GdkEventKey* event);
} // namespace ui
diff --git a/ui/base/keycodes/keyboard_code_conversion_mac.h b/ui/base/keycodes/keyboard_code_conversion_mac.h
index 167f162..74499b7 100644
--- a/ui/base/keycodes/keyboard_code_conversion_mac.h
+++ b/ui/base/keycodes/keyboard_code_conversion_mac.h
@@ -9,7 +9,7 @@
#include "base/basictypes.h"
#include "ui/base/keycodes/keyboard_codes_posix.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
namespace ui {
@@ -26,10 +26,10 @@ namespace ui {
// This function is mainly for simulating keyboard events in unit tests.
// See third_party/WebKit/Source/WebKit/chromium/src/mac/WebInputEventFactory.mm for
// reverse conversion.
-UI_API int MacKeyCodeForWindowsKeyCode(KeyboardCode keycode,
- NSUInteger flags,
- unichar* character,
- unichar* characterIgnoringModifiers);
+UI_EXPORT int MacKeyCodeForWindowsKeyCode(KeyboardCode keycode,
+ NSUInteger flags,
+ unichar* character,
+ unichar* characterIgnoringModifiers);
} // namespace ui
diff --git a/ui/base/keycodes/keyboard_code_conversion_win.h b/ui/base/keycodes/keyboard_code_conversion_win.h
index a43d09f..bf9af37 100644
--- a/ui/base/keycodes/keyboard_code_conversion_win.h
+++ b/ui/base/keycodes/keyboard_code_conversion_win.h
@@ -7,13 +7,13 @@
#pragma once
#include "ui/base/keycodes/keyboard_codes.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
namespace ui {
// Methods to convert ui::KeyboardCode/Windows virtual key type methods.
-UI_API WORD WindowsKeyCodeForKeyboardCode(KeyboardCode keycode);
-UI_API KeyboardCode KeyboardCodeForWindowsKeyCode(WORD keycode);
+UI_EXPORT WORD WindowsKeyCodeForKeyboardCode(KeyboardCode keycode);
+UI_EXPORT KeyboardCode KeyboardCodeForWindowsKeyCode(WORD keycode);
} // namespace ui
diff --git a/ui/base/keycodes/keyboard_code_conversion_x.h b/ui/base/keycodes/keyboard_code_conversion_x.h
index c3d0f83..6adcb0b 100644
--- a/ui/base/keycodes/keyboard_code_conversion_x.h
+++ b/ui/base/keycodes/keyboard_code_conversion_x.h
@@ -6,15 +6,15 @@
#define UI_BASE_KEYCODES_KEYBOARD_CODE_CONVERSION_X_H_
#include "ui/base/keycodes/keyboard_codes_posix.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
typedef union _XEvent XEvent;
namespace ui {
-UI_API KeyboardCode KeyboardCodeFromXKeyEvent(XEvent* xev);
+UI_EXPORT KeyboardCode KeyboardCodeFromXKeyEvent(XEvent* xev);
-UI_API KeyboardCode KeyboardCodeFromXKeysym(unsigned int keysym);
+UI_EXPORT KeyboardCode KeyboardCodeFromXKeysym(unsigned int keysym);
// Converts a hardware keycode into a key symbol on a standard US PC keyboard.
unsigned int DefaultXKeysymFromHardwareKeycode(unsigned int keycode);
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.
diff --git a/ui/base/message_box_win.h b/ui/base/message_box_win.h
index 9d777c5..ce0512f 100644
--- a/ui/base/message_box_win.h
+++ b/ui/base/message_box_win.h
@@ -9,7 +9,7 @@
#include <windows.h>
#include "base/string16.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
namespace ui {
@@ -17,10 +17,10 @@ namespace ui {
// MessageBox function allows us to control certain RTL locale flags so that
// callers don't have to worry about adding these flags when running in a
// right-to-left locale.
-UI_API int MessageBox(HWND hwnd,
- const string16& text,
- const string16& caption,
- UINT flags);
+UI_EXPORT int MessageBox(HWND hwnd,
+ const string16& text,
+ const string16& caption,
+ UINT flags);
} // namespace ui
diff --git a/ui/base/models/accelerator.h b/ui/base/models/accelerator.h
index 8d8921b..83170b7 100644
--- a/ui/base/models/accelerator.h
+++ b/ui/base/models/accelerator.h
@@ -7,13 +7,13 @@
#pragma once
#include "ui/base/keycodes/keyboard_codes.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
namespace ui {
// This is a cross-platform base class for accelerator keys used in menus. It is
// meant to be subclassed for concrete toolkit implementations.
-class UI_API Accelerator {
+class UI_EXPORT Accelerator {
public:
Accelerator() : key_code_(ui::VKEY_UNKNOWN), modifiers_(0) {}
diff --git a/ui/base/models/accelerator_cocoa.h b/ui/base/models/accelerator_cocoa.h
index 66438ad..f1c980c 100644
--- a/ui/base/models/accelerator_cocoa.h
+++ b/ui/base/models/accelerator_cocoa.h
@@ -9,8 +9,8 @@
#include <Foundation/Foundation.h>
#include "base/memory/scoped_nsobject.h"
-#include "ui/ui_api.h"
#include "ui/base/models/accelerator.h"
+#include "ui/base/ui_export.h"
namespace ui {
@@ -18,7 +18,7 @@ namespace ui {
// support for Cocoa key equivalents. Note that the typical use case for this
// class is to initialize it with a string literal, which is why it sends
// |-copy| to the |key_code| paramater in the constructor.
-class UI_API AcceleratorCocoa : public Accelerator {
+class UI_EXPORT AcceleratorCocoa : public Accelerator {
public:
AcceleratorCocoa();
AcceleratorCocoa(NSString* key_code, NSUInteger mask);
diff --git a/ui/base/models/button_menu_item_model.h b/ui/base/models/button_menu_item_model.h
index 7e5d198..877d395 100644
--- a/ui/base/models/button_menu_item_model.h
+++ b/ui/base/models/button_menu_item_model.h
@@ -9,13 +9,13 @@
#include <vector>
#include "base/string16.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
namespace ui {
// A model representing the rows of buttons that should be inserted in a button
// containing menu item.
-class UI_API ButtonMenuItemModel {
+class UI_EXPORT ButtonMenuItemModel {
public:
// Types of buttons.
enum ButtonType {
@@ -24,7 +24,7 @@ class UI_API ButtonMenuItemModel {
TYPE_BUTTON_LABEL
};
- class UI_API Delegate {
+ class UI_EXPORT Delegate {
public:
// Some command ids have labels that change over time.
virtual bool IsItemForCommandIdDynamic(int command_id) const;
diff --git a/ui/base/models/menu_model.h b/ui/base/models/menu_model.h
index b4419fc..279ba96 100644
--- a/ui/base/models/menu_model.h
+++ b/ui/base/models/menu_model.h
@@ -9,8 +9,8 @@
#include "base/memory/scoped_ptr.h"
#include "base/string16.h"
#include "ui/base/models/menu_model_delegate.h"
+#include "ui/base/ui_export.h"
#include "ui/gfx/native_widget_types.h"
-#include "ui/ui_api.h"
class SkBitmap;
@@ -24,7 +24,7 @@ class Accelerator;
class ButtonMenuItemModel;
// An interface implemented by an object that provides the content of a menu.
-class UI_API MenuModel {
+class UI_EXPORT MenuModel {
public:
// The type of item.
enum ItemType {
diff --git a/ui/base/models/simple_menu_model.h b/ui/base/models/simple_menu_model.h
index 9f7136d..0e32c55 100644
--- a/ui/base/models/simple_menu_model.h
+++ b/ui/base/models/simple_menu_model.h
@@ -20,9 +20,9 @@ class ButtonMenuItemModel;
// items. This makes it easy to construct fixed menus. Menus populated by
// dynamic data sources may be better off implementing MenuModel directly.
// The breadth of MenuModel is not exposed through this API.
-class UI_API SimpleMenuModel : public MenuModel {
+class UI_EXPORT SimpleMenuModel : public MenuModel {
public:
- class UI_API Delegate {
+ class UI_EXPORT Delegate {
public:
// Methods for determining the state of specific command ids.
virtual bool IsCommandIdChecked(int command_id) const = 0;
diff --git a/ui/base/models/table_model.h b/ui/base/models/table_model.h
index 968edf1..a6dbbb3 100644
--- a/ui/base/models/table_model.h
+++ b/ui/base/models/table_model.h
@@ -9,7 +9,7 @@
#include <vector>
#include "base/string16.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
#include "unicode/coll.h"
class SkBitmap;
@@ -19,7 +19,7 @@ namespace ui {
class TableModelObserver;
// The model driving the TableView.
-class UI_API TableModel {
+class UI_EXPORT TableModel {
public:
// See HasGroups, get GetGroupID for details as to how this is used.
struct Group {
@@ -90,7 +90,7 @@ class UI_API TableModel {
};
// TableColumn specifies the title, alignment and size of a particular column.
-struct UI_API TableColumn {
+struct UI_EXPORT TableColumn {
enum Alignment {
LEFT, RIGHT, CENTER
};
diff --git a/ui/base/models/table_model_observer.h b/ui/base/models/table_model_observer.h
index 15e9851..38fca30 100644
--- a/ui/base/models/table_model_observer.h
+++ b/ui/base/models/table_model_observer.h
@@ -6,13 +6,13 @@
#define UI_BASE_MODELS_TABLE_MODEL_OBSERVER_H_
#pragma once
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
namespace ui {
// Observer for a TableModel. Anytime the model changes, it must notify its
// observer.
-class UI_API TableModelObserver {
+class UI_EXPORT TableModelObserver {
public:
// Invoked when the model has been completely changed.
virtual void OnModelChanged() = 0;
diff --git a/ui/base/models/tree_model.h b/ui/base/models/tree_model.h
index 77cb07a..5dfa8f9 100644
--- a/ui/base/models/tree_model.h
+++ b/ui/base/models/tree_model.h
@@ -9,7 +9,7 @@
#include <vector>
#include "base/string16.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
class SkBitmap;
@@ -30,7 +30,7 @@ class TreeModelNode {
};
// Observer for the TreeModel. Notified of significant events to the model.
-class UI_API TreeModelObserver {
+class UI_EXPORT TreeModelObserver {
public:
// Notification that nodes were added to the specified parent.
virtual void TreeNodesAdded(TreeModel* model,
@@ -54,7 +54,7 @@ class UI_API TreeModelObserver {
// TreeModel ------------------------------------------------------------------
// The model for TreeView.
-class UI_API TreeModel {
+class UI_EXPORT TreeModel {
public:
// Returns the root of the tree. This may or may not be shown in the tree,
// see SetRootShown for details.
diff --git a/ui/base/range/range.h b/ui/base/range/range.h
index df899e5..cc30dcf 100644
--- a/ui/base/range/range.h
+++ b/ui/base/range/range.h
@@ -8,7 +8,7 @@
#include <iosfwd>
#include "base/basictypes.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
#if defined(OS_MACOSX)
#if __OBJC__
@@ -30,7 +30,7 @@ namespace ui {
// position; when they are the same, the Range is akin to a caret. Note that
// |start_| can be greater than |end_| to respect the directionality of the
// range.
-class UI_API Range {
+class UI_EXPORT Range {
public:
// Creates an empty range {0,0}.
Range();
@@ -106,7 +106,7 @@ class UI_API Range {
size_t end_;
};
-UI_API std::ostream& operator<<(std::ostream& out, const ui::Range& range);
+UI_EXPORT std::ostream& operator<<(std::ostream& out, const ui::Range& range);
} // namespace gfx
diff --git a/ui/base/resource/data_pack.h b/ui/base/resource/data_pack.h
index f8d2e19..f6ee78d 100644
--- a/ui/base/resource/data_pack.h
+++ b/ui/base/resource/data_pack.h
@@ -14,7 +14,7 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
class FilePath;
class RefCountedStaticMemory;
@@ -29,7 +29,7 @@ class MemoryMappedFile;
namespace ui {
-class UI_API DataPack {
+class UI_EXPORT DataPack {
public:
DataPack();
~DataPack();
diff --git a/ui/base/resource/resource_bundle.h b/ui/base/resource/resource_bundle.h
index 85aee33..37d3ef1 100644
--- a/ui/base/resource/resource_bundle.h
+++ b/ui/base/resource/resource_bundle.h
@@ -22,8 +22,8 @@
#include "base/memory/ref_counted_memory.h"
#include "base/memory/scoped_ptr.h"
#include "base/string16.h"
+#include "ui/base/ui_export.h"
#include "ui/gfx/native_widget_types.h"
-#include "ui/ui_api.h"
class SkBitmap;
typedef uint32 SkColor;
@@ -57,7 +57,7 @@ class DataPack;
// ResourceBundle is a central facility to load images and other resources,
// such as theme graphics.
// Every resource is loaded only once.
-class UI_API ResourceBundle {
+class UI_EXPORT ResourceBundle {
public:
// An enumeration of the various font styles used throughout Chrome.
// The following holds true for the font sizes:
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
diff --git a/ui/base/theme_provider.h b/ui/base/theme_provider.h
index 1fde089..64da6ca 100644
--- a/ui/base/theme_provider.h
+++ b/ui/base/theme_provider.h
@@ -8,7 +8,7 @@
#include "base/basictypes.h"
#include "third_party/skia/include/core/SkColor.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
#if defined(OS_MACOSX)
#ifdef __OBJC__
@@ -40,7 +40,7 @@ namespace ui {
//
////////////////////////////////////////////////////////////////////////////////
-class UI_API ThemeProvider {
+class UI_EXPORT ThemeProvider {
public:
virtual ~ThemeProvider();
diff --git a/ui/base/ui_base_paths.h b/ui/base/ui_base_paths.h
index 92f10d6..2884ae9 100644
--- a/ui/base/ui_base_paths.h
+++ b/ui/base/ui_base_paths.h
@@ -6,7 +6,7 @@
#define UI_BASE_UI_BASE_PATHS_H_
#pragma once
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
// This file declares path keys for the app module. These can be used with
// the PathService to access various special directories and files.
@@ -28,7 +28,7 @@ enum {
};
// Call once to register the provider for the path keys defined above.
-UI_API void RegisterPathProvider();
+UI_EXPORT void RegisterPathProvider();
} // namespace ui
diff --git a/ui/base/ui_base_switches.h b/ui/base/ui_base_switches.h
index 15183e5..27f4f08 100644
--- a/ui/base/ui_base_switches.h
+++ b/ui/base/ui_base_switches.h
@@ -8,12 +8,12 @@
#define UI_BASE_UI_BASE_SWITCHES_H_
#pragma once
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
namespace switches {
-UI_API extern const char kLang[];
-UI_API extern const char kLocalePak[];
+UI_EXPORT extern const char kLang[];
+UI_EXPORT extern const char kLocalePak[];
} // namespace switches
diff --git a/ui/ui_api.h b/ui/base/ui_export.h
index 5494472..c54de1f 100644
--- a/ui/ui_api.h
+++ b/ui/base/ui_export.h
@@ -2,28 +2,28 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef UI_UI_API_H_
-#define UI_UI_API_H_
+#ifndef UI_UI_EXPORT_H_
+#define UI_UI_EXPORT_H_
#pragma once
-// Defines UI_API so that funtionality implemented by the UI module can be
+// Defines UI_EXPORT so that functionality implemented by the UI module can be
// exported to consumers.
#if defined(COMPONENT_BUILD)
#if defined(WIN32)
#if defined(UI_IMPLEMENTATION)
-#define UI_API __declspec(dllexport)
+#define UI_EXPORT __declspec(dllexport)
#else
-#define UI_API __declspec(dllimport)
+#define UI_EXPORT __declspec(dllimport)
#endif // defined(UI_IMPLEMENTATION)
#else // defined(WIN32)
-#define UI_API __attribute__((visibility("default")))
+#define UI_EXPORT __attribute__((visibility("default")))
#endif
-#else /// defined(COMPONENT_BUILD)
-#define UI_API
+#else // defined(COMPONENT_BUILD)
+#define UI_EXPORT
#endif
-#endif // UI_UI_API_H_
+#endif // UI_UI_EXPORT_H_
diff --git a/ui/base/view_prop.h b/ui/base/view_prop.h
index 04703be..b85cce4 100644
--- a/ui/base/view_prop.h
+++ b/ui/base/view_prop.h
@@ -8,8 +8,8 @@
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
+#include "ui/base/ui_export.h"
#include "ui/gfx/native_widget_types.h"
-#include "ui/ui_api.h"
namespace ui {
@@ -17,7 +17,7 @@ namespace ui {
// designed as a replacement for the Win32's SetProp, but does not make use of
// window manager memory. ViewProp shares similar semantics as SetProp, the
// value for a particular view/key pair comes from the last ViewProp created.
-class UI_API ViewProp {
+class UI_EXPORT ViewProp {
public:
// Associates data with a view/key pair. If a ViewProp has already been
// created for the specified pair |data| replaces the current value.
diff --git a/ui/base/win/hwnd_util.h b/ui/base/win/hwnd_util.h
index a5bef49..f46e4c7 100644
--- a/ui/base/win/hwnd_util.h
+++ b/ui/base/win/hwnd_util.h
@@ -9,7 +9,7 @@
#include <windows.h>
#include "base/string16.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
namespace gfx {
class Size;
@@ -19,35 +19,35 @@ namespace ui {
// A version of the GetClassNameW API that returns the class name in an
// string16. An empty result indicates a failure to get the class name.
-UI_API string16 GetClassName(HWND hwnd);
+UI_EXPORT string16 GetClassName(HWND hwnd);
// Useful for subclassing a HWND. Returns the previous window procedure.
-UI_API WNDPROC SetWindowProc(HWND hwnd, WNDPROC wndproc);
+UI_EXPORT WNDPROC SetWindowProc(HWND hwnd, WNDPROC wndproc);
// Pointer-friendly wrappers around Get/SetWindowLong(..., GWLP_USERDATA, ...)
// Returns the previously set value.
-UI_API void* SetWindowUserData(HWND hwnd, void* user_data);
-UI_API void* GetWindowUserData(HWND hwnd);
+UI_EXPORT void* SetWindowUserData(HWND hwnd, void* user_data);
+UI_EXPORT void* GetWindowUserData(HWND hwnd);
// Returns true if the specified window is the current active top window or one
// of its children.
-UI_API bool DoesWindowBelongToActiveWindow(HWND window);
+UI_EXPORT bool DoesWindowBelongToActiveWindow(HWND window);
// Sizes the window to have a client or window size (depending on the value of
// |pref_is_client|) of pref, then centers the window over parent, ensuring the
// window fits on screen.
-UI_API void CenterAndSizeWindow(HWND parent,
- HWND window,
- const gfx::Size& pref,
- bool pref_is_client);
+UI_EXPORT void CenterAndSizeWindow(HWND parent,
+ HWND window,
+ const gfx::Size& pref,
+ bool pref_is_client);
// If |hwnd| is NULL logs various thing and CHECKs. Invoke right after calling
// CreateWindow.
-UI_API void CheckWindowCreated(HWND hwnd);
+UI_EXPORT void CheckWindowCreated(HWND hwnd);
// Shows the system menu for |window| and sends the selected command (if the
// user selected something.
-UI_API void ShowSystemMenu(HWND window, int screen_x, int screen_y);
+UI_EXPORT void ShowSystemMenu(HWND window, int screen_x, int screen_y);
} // namespace ui
diff --git a/ui/base/win/ime_input.h b/ui/base/win/ime_input.h
index 887a5c3..ad0e517 100644
--- a/ui/base/win/ime_input.h
+++ b/ui/base/win/ime_input.h
@@ -15,7 +15,7 @@
#include "base/i18n/rtl.h"
#include "base/string16.h"
#include "ui/gfx/rect.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
namespace ui {
@@ -74,7 +74,7 @@ struct CompositionText;
// hand, we can NEVER disable either TSF or CUAS in Windows Vista, i.e.
// THIS CLASS IS NOT ONLY USED ON THE INPUT CONTEXTS OF EAST-ASIAN
// LANGUAGES BUT ALSO USED ON THE INPUT CONTEXTS OF ALL LANGUAGES.
-class UI_API ImeInput {
+class UI_EXPORT ImeInput {
public:
ImeInput();
~ImeInput();
diff --git a/ui/base/win/shell.h b/ui/base/win/shell.h
index 359954e..8fe8642 100644
--- a/ui/base/win/shell.h
+++ b/ui/base/win/shell.h
@@ -9,7 +9,7 @@
#include <windows.h>
#include "base/string16.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
class FilePath;
@@ -20,12 +20,12 @@ namespace win {
// default application registered for the file specified by 'full_path',
// ask the user, via the Windows "Open With" dialog.
// Returns 'true' on successful open, 'false' otherwise.
-UI_API bool OpenItemViaShell(const FilePath& full_path);
+UI_EXPORT bool OpenItemViaShell(const FilePath& full_path);
// The download manager now writes the alternate data stream with the
// zone on all downloads. This function is equivalent to OpenItemViaShell
// without showing the zone warning dialog.
-UI_API bool OpenItemViaShellNoZoneCheck(const FilePath& full_path);
+UI_EXPORT bool OpenItemViaShellNoZoneCheck(const FilePath& full_path);
// Ask the user, via the Windows "Open With" dialog, for an application to use
// to open the file specified by 'full_path'.
@@ -35,7 +35,7 @@ bool OpenItemWithExternalApp(const string16& full_path);
// Sets the application id given as the Application Model ID for the window
// specified. This method is used to insure that different web applications
// do not group together on the Win7 task bar.
-UI_API void SetAppIdForWindow(const string16& app_id, HWND hwnd);
+UI_EXPORT void SetAppIdForWindow(const string16& app_id, HWND hwnd);
} // namespace win
} // namespace ui
diff --git a/ui/base/win/window_impl.h b/ui/base/win/window_impl.h
index 863c484..d60fd1e 100644
--- a/ui/base/win/window_impl.h
+++ b/ui/base/win/window_impl.h
@@ -14,9 +14,9 @@
#include <string>
#include "base/logging.h"
+#include "ui/base/ui_export.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/rect.h"
-#include "ui/ui_api.h"
namespace ui {
@@ -41,7 +41,7 @@ class MessageMapInterface {
// Windows.
//
///////////////////////////////////////////////////////////////////////////////
-class UI_API WindowImpl : public MessageMapInterface {
+class UI_EXPORT WindowImpl : public MessageMapInterface {
public:
WindowImpl();
virtual ~WindowImpl();
diff --git a/ui/base/x/active_window_watcher_x.h b/ui/base/x/active_window_watcher_x.h
index b11c1ba..16c87a3 100644
--- a/ui/base/x/active_window_watcher_x.h
+++ b/ui/base/x/active_window_watcher_x.h
@@ -12,14 +12,14 @@
#include "base/memory/singleton.h"
#include "base/observer_list.h"
#include "ui/base/gtk/gtk_signal.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
namespace ui {
// This is a helper class that is used to keep track of which window the X
// window manager thinks is active. Add an Observer to listener for changes to
// the active window.
-class UI_API ActiveWindowWatcherX {
+class UI_EXPORT ActiveWindowWatcherX {
public:
class Observer {
public:
diff --git a/ui/base/x/x11_util.h b/ui/base/x/x11_util.h
index 6728c1e..710ab5b 100644
--- a/ui/base/x/x11_util.h
+++ b/ui/base/x/x11_util.h
@@ -16,7 +16,7 @@
#include <vector>
#include "base/basictypes.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
typedef unsigned long Atom;
typedef struct _GdkDrawable GdkWindow;
@@ -37,13 +37,13 @@ namespace ui {
// These functions cache their results ---------------------------------
// Check if there's an open connection to an X server.
-UI_API bool XDisplayExists();
+UI_EXPORT bool XDisplayExists();
// Return an X11 connection for the current, primary display.
// TODO(oshima|evan): This assume there is one display and dosn't work
// undef mutiple displays/monitor environment. Remove this and change the
// chrome codebase to get the display from window.
-UI_API Display* GetXDisplay();
+UI_EXPORT Display* GetXDisplay();
// X shared memory comes in three flavors:
// 1) No SHM support,
@@ -55,10 +55,10 @@ enum SharedMemorySupport {
SHARED_MEMORY_PIXMAP
};
// Return the shared memory type of our X connection.
-UI_API SharedMemorySupport QuerySharedMemorySupport(Display* dpy);
+UI_EXPORT SharedMemorySupport QuerySharedMemorySupport(Display* dpy);
// Return true iff the display supports Xrender
-UI_API bool QueryRenderSupport(Display* dpy);
+UI_EXPORT bool QueryRenderSupport(Display* dpy);
// Return the default screen number for the display
int GetDefaultScreen(Display* display);
@@ -66,32 +66,33 @@ int GetDefaultScreen(Display* display);
// These functions do not cache their results --------------------------
// Get the X window id for the default root window
-UI_API XID GetX11RootWindow();
+UI_EXPORT XID GetX11RootWindow();
// Returns the user's current desktop.
bool GetCurrentDesktop(int* desktop);
// Get the X window id for the given GTK widget.
-UI_API XID GetX11WindowFromGtkWidget(GtkWidget* widget);
+UI_EXPORT XID GetX11WindowFromGtkWidget(GtkWidget* widget);
XID GetX11WindowFromGdkWindow(GdkWindow* window);
// Get a Visual from the given widget. Since we don't include the Xlib
// headers, this is returned as a void*.
-UI_API void* GetVisualFromGtkWidget(GtkWidget* widget);
+UI_EXPORT void* GetVisualFromGtkWidget(GtkWidget* widget);
// Return the number of bits-per-pixel for a pixmap of the given depth
-UI_API int BitsPerPixelForPixmapDepth(Display* display, int depth);
+UI_EXPORT int BitsPerPixelForPixmapDepth(Display* display, int depth);
// Returns true if |window| is visible.
-UI_API bool IsWindowVisible(XID window);
+UI_EXPORT bool IsWindowVisible(XID window);
// Returns the bounds of |window|.
-UI_API bool GetWindowRect(XID window, gfx::Rect* rect);
+UI_EXPORT bool GetWindowRect(XID window, gfx::Rect* rect);
// Return true if |window| has any property with |property_name|.
-UI_API bool PropertyExists(XID window, const std::string& property_name);
+UI_EXPORT bool PropertyExists(XID window, const std::string& property_name);
// Get the value of an int, int array, atom array or string property. On
// success, true is returned and the value is stored in |value|.
-UI_API bool GetIntProperty(XID window, const std::string& property_name,
- int* value);
-UI_API bool GetIntArrayProperty(XID window, const std::string& property_name,
- std::vector<int>* value);
-UI_API bool GetAtomArrayProperty(XID window, const std::string& property_name,
- std::vector<Atom>* value);
-UI_API bool GetStringProperty(
+UI_EXPORT bool GetIntProperty(XID window, const std::string& property_name,
+ int* value);
+UI_EXPORT bool GetIntArrayProperty(XID window, const std::string& property_name,
+ std::vector<int>* value);
+UI_EXPORT bool GetAtomArrayProperty(XID window,
+ const std::string& property_name,
+ std::vector<Atom>* value);
+UI_EXPORT bool GetStringProperty(
XID window, const std::string& property_name, std::string* value);
// Get |window|'s parent window, or None if |window| is the root window.
@@ -119,12 +120,12 @@ class EnumerateWindowsDelegate {
// Enumerates all windows in the current display. Will recurse into child
// windows up to a depth of |max_depth|.
-UI_API bool EnumerateAllWindows(EnumerateWindowsDelegate* delegate,
- int max_depth);
+UI_EXPORT bool EnumerateAllWindows(EnumerateWindowsDelegate* delegate,
+ int max_depth);
// Returns all children windows of a given window in top-to-bottom stacking
// order.
-UI_API bool GetXWindowStack(XID window, std::vector<XID>* windows);
+UI_EXPORT bool GetXWindowStack(XID window, std::vector<XID>* windows);
// Restack a window in relation to one of its siblings. If |above| is true,
// |window| will be stacked directly above |sibling|; otherwise it will stacked
@@ -134,38 +135,38 @@ void RestackWindow(XID window, XID sibling, bool above);
// Return a handle to a X ShmSeg. |shared_memory_key| is a SysV
// IPC key. The shared memory region must contain 32-bit pixels.
-UI_API XSharedMemoryId AttachSharedMemory(Display* display,
- int shared_memory_support);
-UI_API void DetachSharedMemory(Display* display, XSharedMemoryId shmseg);
+UI_EXPORT XSharedMemoryId AttachSharedMemory(Display* display,
+ int shared_memory_support);
+UI_EXPORT void DetachSharedMemory(Display* display, XSharedMemoryId shmseg);
// Return a handle to an XRender picture where |pixmap| is a handle to a
// pixmap containing Skia ARGB data.
-UI_API XID CreatePictureFromSkiaPixmap(Display* display, XID pixmap);
+UI_EXPORT XID CreatePictureFromSkiaPixmap(Display* display, XID pixmap);
// Draws ARGB data on the given pixmap using the given GC, converting to the
// server side visual depth as needed. Destination is assumed to be the same
// dimensions as |data| or larger. |data| is also assumed to be in row order
// with each line being exactly |width| * 4 bytes long.
-UI_API void PutARGBImage(Display* display, void* visual, int depth, XID pixmap,
- void* pixmap_gc, const uint8* data, int width,
- int height);
+UI_EXPORT void PutARGBImage(Display* display, void* visual, int depth,
+ XID pixmap, void* pixmap_gc, const uint8* data,
+ int width, int height);
void FreePicture(Display* display, XID picture);
void FreePixmap(Display* display, XID pixmap);
// Get the window manager name.
-UI_API bool GetWindowManagerName(std::string* name);
+UI_EXPORT bool GetWindowManagerName(std::string* name);
// Change desktop for |window| to the desktop of |destination| window.
-UI_API bool ChangeWindowDesktop(XID window, XID destination);
+UI_EXPORT bool ChangeWindowDesktop(XID window, XID destination);
// Enable the default X error handlers. These will log the error and abort
// the process if called. Use SetX11ErrorHandlers() from x11_util_internal.h
// to set your own error handlers.
-UI_API void SetDefaultX11ErrorHandlers();
+UI_EXPORT void SetDefaultX11ErrorHandlers();
// Return true if a given window is in full-screen mode.
-UI_API bool IsX11WindowFullScreen(XID window);
+UI_EXPORT bool IsX11WindowFullScreen(XID window);
} // namespace ui
diff --git a/ui/base/x/x11_util_internal.h b/ui/base/x/x11_util_internal.h
index 778c012..70eb088 100644
--- a/ui/base/x/x11_util_internal.h
+++ b/ui/base/x/x11_util_internal.h
@@ -19,7 +19,7 @@ extern "C" {
#include <X11/extensions/Xrender.h>
}
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
namespace ui {
@@ -33,21 +33,22 @@ XRenderPictFormat* GetRenderARGB32Format(Display* dpy);
// Get the XRENDER format id for the default visual on the first screen. This
// is the format which our GTK window will have.
-UI_API XRenderPictFormat* GetRenderVisualFormat(Display* dpy, Visual* visual);
+UI_EXPORT XRenderPictFormat* GetRenderVisualFormat(Display* dpy,
+ Visual* visual);
// --------------------------------------------------------------------------
// X11 error handling.
// Sets the X Error Handlers. Passing NULL for either will enable the default
// error handler, which if called will log the error and abort the process.
-UI_API void SetX11ErrorHandlers(XErrorHandler error_handler,
- XIOErrorHandler io_error_handler);
+UI_EXPORT void SetX11ErrorHandlers(XErrorHandler error_handler,
+ XIOErrorHandler io_error_handler);
// NOTE: This function should not be called directly from the
// X11 Error handler because it queries the server to decode the
// error message, which may trigger other errors. A suitable workaround
// is to post a task in the error handler to call this function.
-UI_API void LogErrorEventDescription(Display* dpy,
- const XErrorEvent& error_event);
+UI_EXPORT void LogErrorEventDescription(Display* dpy,
+ const XErrorEvent& error_event);
} // namespace ui
diff --git a/ui/gfx/blit.h b/ui/gfx/blit.h
index 1b93877..5b440f9 100644
--- a/ui/gfx/blit.h
+++ b/ui/gfx/blit.h
@@ -7,7 +7,7 @@
#pragma once
#include "ui/gfx/native_widget_types.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
class SkCanvas;
@@ -17,35 +17,35 @@ class Point;
class Rect;
// Blits a rectangle from the source context into the destination context.
-UI_API void BlitContextToContext(NativeDrawingContext dst_context,
- const Rect& dst_rect,
- NativeDrawingContext src_context,
- const Point& src_origin);
+UI_EXPORT void BlitContextToContext(NativeDrawingContext dst_context,
+ const Rect& dst_rect,
+ NativeDrawingContext src_context,
+ const Point& src_origin);
// Blits a rectangle from the source context into the destination canvas.
-UI_API void BlitContextToCanvas(SkCanvas *dst_canvas,
- const Rect& dst_rect,
- NativeDrawingContext src_context,
- const Point& src_origin);
+UI_EXPORT void BlitContextToCanvas(SkCanvas *dst_canvas,
+ const Rect& dst_rect,
+ NativeDrawingContext src_context,
+ const Point& src_origin);
// Blits a rectangle from the source canvas into the destination context.
-UI_API void BlitCanvasToContext(NativeDrawingContext dst_context,
- const Rect& dst_rect,
- SkCanvas *src_canvas,
- const Point& src_origin);
+UI_EXPORT void BlitCanvasToContext(NativeDrawingContext dst_context,
+ const Rect& dst_rect,
+ SkCanvas *src_canvas,
+ const Point& src_origin);
// Blits a rectangle from the source canvas into the destination canvas.
-UI_API void BlitCanvasToCanvas(SkCanvas *dst_canvas,
- const Rect& dst_rect,
- SkCanvas *src_canvas,
- const Point& src_origin);
+UI_EXPORT void BlitCanvasToCanvas(SkCanvas *dst_canvas,
+ const Rect& dst_rect,
+ SkCanvas *src_canvas,
+ const Point& src_origin);
// Scrolls the given subset of the given canvas by the given amount.
// The canvas should not have a clip or a transform applied, since platforms
// may implement those operations differently.
-UI_API void ScrollCanvas(SkCanvas* canvas,
- const Rect& clip,
- const Point& amount);
+UI_EXPORT void ScrollCanvas(SkCanvas* canvas,
+ const Rect& clip,
+ const Point& amount);
} // namespace gfx
diff --git a/ui/gfx/canvas.h b/ui/gfx/canvas.h
index 5e32cd2..5fdce31 100644
--- a/ui/gfx/canvas.h
+++ b/ui/gfx/canvas.h
@@ -12,8 +12,8 @@
// TODO(beng): remove these includes when we no longer depend on SkTypes.
#include "third_party/skia/include/core/SkColor.h"
#include "third_party/skia/include/core/SkXfermode.h"
+#include "ui/base/ui_export.h"
#include "ui/gfx/native_widget_types.h"
-#include "ui/ui_api.h"
namespace ui {
class Transform;
@@ -30,7 +30,7 @@ class Point;
class Rect;
// TODO(beng): documentation.
-class UI_API Canvas {
+class UI_EXPORT Canvas {
public:
// Specifies the alignment for text rendered with the DrawStringInt method.
enum {
@@ -231,7 +231,7 @@ class UI_API Canvas {
virtual const CanvasSkia* AsCanvasSkia() const;
};
-class UI_API CanvasPaint {
+class UI_EXPORT CanvasPaint {
public:
virtual ~CanvasPaint() {}
diff --git a/ui/gfx/canvas_direct2d.h b/ui/gfx/canvas_direct2d.h
index bf454cf..35f9713 100644
--- a/ui/gfx/canvas_direct2d.h
+++ b/ui/gfx/canvas_direct2d.h
@@ -15,7 +15,7 @@
namespace gfx {
-class UI_API CanvasDirect2D : public Canvas {
+class UI_EXPORT CanvasDirect2D : public Canvas {
public:
// Creates an empty Canvas.
explicit CanvasDirect2D(ID2D1RenderTarget* rt);
diff --git a/ui/gfx/canvas_skia.h b/ui/gfx/canvas_skia.h
index d522115..e5c4bd9 100644
--- a/ui/gfx/canvas_skia.h
+++ b/ui/gfx/canvas_skia.h
@@ -34,7 +34,7 @@ class Canvas;
// source and destination colors are combined. Unless otherwise specified,
// the variant that does not take a SkXfermode::Mode uses a transfer mode
// of kSrcOver_Mode.
-class UI_API CanvasSkia : public skia::PlatformCanvas, public Canvas {
+class UI_EXPORT CanvasSkia : public skia::PlatformCanvas, public Canvas {
public:
enum TruncateFadeMode {
TruncateFadeTail,
diff --git a/ui/gfx/codec/jpeg_codec.h b/ui/gfx/codec/jpeg_codec.h
index 0106bad..60b33a3 100644
--- a/ui/gfx/codec/jpeg_codec.h
+++ b/ui/gfx/codec/jpeg_codec.h
@@ -9,7 +9,7 @@
#include <stddef.h>
#include <vector>
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
class SkBitmap;
@@ -19,7 +19,7 @@ namespace gfx {
// which has an inconvenient interface for callers. This is only used for UI
// elements, WebKit has its own more complicated JPEG decoder which handles,
// among other things, partially downloaded data.
-class UI_API JPEGCodec {
+class UI_EXPORT JPEGCodec {
public:
enum ColorFormat {
// 3 bytes per pixel (packed), in RGB order regardless of endianness.
diff --git a/ui/gfx/codec/png_codec.h b/ui/gfx/codec/png_codec.h
index a850b09..10ffac2 100644
--- a/ui/gfx/codec/png_codec.h
+++ b/ui/gfx/codec/png_codec.h
@@ -10,7 +10,7 @@
#include <vector>
#include "base/basictypes.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
class SkBitmap;
@@ -24,7 +24,7 @@ class Size;
// isn't as robust as would be required for a browser (see Decode() for more).
// WebKit has its own more complicated PNG decoder which handles, among other
// things, partially downloaded data.
-class UI_API PNGCodec {
+class UI_EXPORT PNGCodec {
public:
enum ColorFormat {
// 3 bytes per pixel (packed), in RGB order regardless of endianness.
@@ -44,7 +44,7 @@ class UI_API PNGCodec {
};
// Represents a comment in the tEXt ancillary chunk of the png.
- struct UI_API Comment {
+ struct UI_EXPORT Comment {
Comment(const std::string& k, const std::string& t);
~Comment();
diff --git a/ui/gfx/color_analysis.h b/ui/gfx/color_analysis.h
index 61f2cd7..7931b48 100644
--- a/ui/gfx/color_analysis.h
+++ b/ui/gfx/color_analysis.h
@@ -11,7 +11,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/ref_counted_memory.h"
#include "third_party/skia/include/core/SkColor.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
namespace color_utils {
@@ -19,7 +19,7 @@ namespace color_utils {
// stubbing out for things like unit tests. Might be useful to pass more
// arguments into the GetSample method in the future (such as which
// cluster is being worked on, etc.).
-class UI_API KMeanImageSampler {
+class UI_EXPORT KMeanImageSampler {
public:
virtual int GetSample(int width, int height) = 0;
@@ -38,7 +38,7 @@ class RandomSampler : public KMeanImageSampler {
};
// This sampler will pick pixels from an evenly spaced grid.
-class UI_API GridSampler : public KMeanImageSampler {
+class UI_EXPORT GridSampler : public KMeanImageSampler {
public:
GridSampler();
virtual ~GridSampler();
@@ -103,10 +103,10 @@ SkColor CalculateKMeanColorOfPNG(scoped_refptr<RefCountedMemory> png,
uint32_t darkness_limit,
uint32_t brightness_limit);
-UI_API SkColor CalculateKMeanColorOfPNG(scoped_refptr<RefCountedMemory> png,
- uint32_t darkness_limit,
- uint32_t brightness_limit,
- KMeanImageSampler& sampler);
+UI_EXPORT SkColor CalculateKMeanColorOfPNG(scoped_refptr<RefCountedMemory> png,
+ uint32_t darkness_limit,
+ uint32_t brightness_limit,
+ KMeanImageSampler& sampler);
} // namespace color_utils
diff --git a/ui/gfx/color_utils.h b/ui/gfx/color_utils.h
index 007d3a2..9b6bc14 100644
--- a/ui/gfx/color_utils.h
+++ b/ui/gfx/color_utils.h
@@ -7,7 +7,7 @@
#pragma once
#include "third_party/skia/include/core/SkColor.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
class SkBitmap;
@@ -23,11 +23,11 @@ struct HSL {
unsigned char GetLuminanceForColor(SkColor color);
// Calculated according to http://www.w3.org/TR/WCAG20/#relativeluminancedef
-UI_API double RelativeLuminance(SkColor color);
+UI_EXPORT double RelativeLuminance(SkColor color);
// Note: these transformations assume sRGB as the source color space
-UI_API void SkColorToHSL(SkColor c, HSL* hsl);
-UI_API SkColor HSLToSkColor(const HSL& hsl, SkAlpha alpha);
+UI_EXPORT void SkColorToHSL(SkColor c, HSL* hsl);
+UI_EXPORT SkColor HSLToSkColor(const HSL& hsl, SkAlpha alpha);
// HSL-Shift an SkColor. The shift values are in the range of 0-1, with the
// option to specify -1 for 'no change'. The shift values are defined as:
@@ -43,7 +43,7 @@ UI_API SkColor HSLToSkColor(const HSL& hsl, SkAlpha alpha);
// 0 = remove all lightness (make all pixels black).
// 0.5 = leave unchanged.
// 1 = full lightness (make all pixels white).
-UI_API SkColor HSLShift(SkColor color, const HSL& shift);
+UI_EXPORT SkColor HSLShift(SkColor color, const HSL& shift);
// Determine if a given alpha value is nearly completely transparent.
bool IsColorCloseToTransparent(SkAlpha alpha);
@@ -58,14 +58,14 @@ SkColor GetAverageColorOfFavicon(SkBitmap* bitmap, SkAlpha alpha);
// Builds a histogram based on the Y' of the Y'UV representation of
// this image.
-UI_API void BuildLumaHistogram(SkBitmap* bitmap, int histogram[256]);
+UI_EXPORT void BuildLumaHistogram(SkBitmap* bitmap, int histogram[256]);
// Returns a blend of the supplied colors, ranging from |background| (for
// |alpha| == 0) to |foreground| (for |alpha| == 255). The alpha channels of
// the supplied colors are also taken into account, so the returned color may
// be partially transparent.
-UI_API SkColor AlphaBlend(SkColor foreground, SkColor background,
- SkAlpha alpha);
+UI_EXPORT SkColor AlphaBlend(SkColor foreground, SkColor background,
+ SkAlpha alpha);
// Given a foreground and background color, try to return a foreground color
// that is "readable" over the background color by luma-inverting the foreground
@@ -74,10 +74,10 @@ UI_API SkColor AlphaBlend(SkColor foreground, SkColor background,
//
// NOTE: This won't do anything but waste time if the supplied foreground color
// has a luma value close to the midpoint (0.5 in the HSL representation).
-UI_API SkColor GetReadableColor(SkColor foreground, SkColor background);
+UI_EXPORT SkColor GetReadableColor(SkColor foreground, SkColor background);
// Gets a Windows system color as a SkColor
-UI_API SkColor GetSysSkColor(int which);
+UI_EXPORT SkColor GetSysSkColor(int which);
} // namespace color_utils
diff --git a/ui/gfx/font.h b/ui/gfx/font.h
index 9ccfadd2..b5f61d2 100644
--- a/ui/gfx/font.h
+++ b/ui/gfx/font.h
@@ -10,8 +10,8 @@
#include "base/memory/ref_counted.h"
#include "base/string16.h"
+#include "ui/base/ui_export.h"
#include "ui/gfx/native_widget_types.h"
-#include "ui/ui_api.h"
namespace gfx {
@@ -19,7 +19,7 @@ class PlatformFont;
// Font provides a wrapper around an underlying font. Copy and assignment
// operators are explicitly allowed, and cheap.
-class UI_API Font {
+class UI_EXPORT Font {
public:
// The following constants indicate the font style.
enum FontStyle {
diff --git a/ui/gfx/gdi_util.h b/ui/gfx/gdi_util.h
index 487a042..4badce5 100644
--- a/ui/gfx/gdi_util.h
+++ b/ui/gfx/gdi_util.h
@@ -9,13 +9,13 @@
#include <vector>
#include <windows.h>
+#include "ui/base/ui_export.h"
#include "ui/gfx/rect.h"
-#include "ui/ui_api.h"
namespace gfx {
// Creates a BITMAPINFOHEADER structure given the bitmap's size.
-UI_API void CreateBitmapHeader(int width, int height, BITMAPINFOHEADER* hdr);
+UI_EXPORT void CreateBitmapHeader(int width, int height, BITMAPINFOHEADER* hdr);
// Creates a BITMAPINFOHEADER structure given the bitmap's size and
// color depth in bits per pixel.
@@ -25,14 +25,15 @@ void CreateBitmapHeaderWithColorDepth(int width, int height, int color_depth,
// Creates a BITMAPV4HEADER structure given the bitmap's size. You probably
// only need to use BMP V4 if you need transparency (alpha channel). This
// function sets the AlphaMask to 0xff000000.
-UI_API void CreateBitmapV4Header(int width, int height, BITMAPV4HEADER* hdr);
+UI_EXPORT void CreateBitmapV4Header(int width, int height, BITMAPV4HEADER* hdr);
// Creates a monochrome bitmap header.
void CreateMonochromeBitmapHeader(int width, int height, BITMAPINFOHEADER* hdr);
// Modify the given hrgn by subtracting the given rectangles.
-UI_API void SubtractRectanglesFromRegion(HRGN hrgn,
- const std::vector<gfx::Rect>& cutouts);
+UI_EXPORT void SubtractRectanglesFromRegion(
+ HRGN hrgn,
+ const std::vector<gfx::Rect>& cutouts);
} // namespace gfx
diff --git a/ui/gfx/gfx_paths.h b/ui/gfx/gfx_paths.h
index d08225f..487c27e 100644
--- a/ui/gfx/gfx_paths.h
+++ b/ui/gfx/gfx_paths.h
@@ -6,7 +6,7 @@
#define UI_GFX_GFX_PATHS_H_
#pragma once
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
// This file declares path keys for the app module. These can be used with
// the PathService to access various special directories and files.
@@ -23,7 +23,7 @@ enum {
};
// Call once to register the provider for the path keys defined above.
-UI_API void RegisterPathProvider();
+UI_EXPORT void RegisterPathProvider();
} // namespace gfx
diff --git a/ui/gfx/gtk_native_view_id_manager.h b/ui/gfx/gtk_native_view_id_manager.h
index 2fe9b7b..9c207a7 100644
--- a/ui/gfx/gtk_native_view_id_manager.h
+++ b/ui/gfx/gtk_native_view_id_manager.h
@@ -10,8 +10,8 @@
#include "base/memory/singleton.h"
#include "base/synchronization/lock.h"
+#include "ui/base/ui_export.h"
#include "ui/gfx/native_widget_types.h"
-#include "ui/ui_api.h"
typedef unsigned long XID;
struct _GtkPreserveWindow;
@@ -31,7 +31,7 @@ struct _GtkPreserveWindow;
// pointers and observes the various signals from the widget for when an X
// window is created, destroyed etc. Thus it provides a thread safe mapping
// from NativeViewIds to the current XID for that widget.
-class UI_API GtkNativeViewManager {
+class UI_EXPORT GtkNativeViewManager {
public:
// Returns the singleton instance.
static GtkNativeViewManager* GetInstance();
diff --git a/ui/gfx/gtk_preserve_window.h b/ui/gfx/gtk_preserve_window.h
index 5caeefb..37657b3 100644
--- a/ui/gfx/gtk_preserve_window.h
+++ b/ui/gfx/gtk_preserve_window.h
@@ -9,7 +9,7 @@
#include <gdk/gdk.h>
#include <gtk/gtk.h>
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
// GtkFixed creates an X window when realized and destroys an X window
// when unrealized. GtkPreserveWindow allows overrides this
@@ -47,7 +47,7 @@ struct _GtkPreserveWindowClass {
};
GType gtk_preserve_window_get_type() G_GNUC_CONST;
-UI_API GtkWidget* gtk_preserve_window_new();
+UI_EXPORT GtkWidget* gtk_preserve_window_new();
// Whether or not we should preserve associated windows as the widget
// is realized or unrealized.
@@ -58,8 +58,8 @@ void gtk_preserve_window_set_preserve(GtkPreserveWindow* widget,
// Whether or not someone else will gdk_window_resize the GdkWindow associated
// with this widget (needed by the GPU process to synchronize resizing
// with swapped between front and back buffer).
-UI_API void gtk_preserve_window_delegate_resize(GtkPreserveWindow* widget,
- gboolean delegate);
+UI_EXPORT void gtk_preserve_window_delegate_resize(GtkPreserveWindow* widget,
+ gboolean delegate);
G_END_DECLS
diff --git a/ui/gfx/gtk_util.h b/ui/gfx/gtk_util.h
index 5b802af..1f72c01 100644
--- a/ui/gfx/gtk_util.h
+++ b/ui/gfx/gtk_util.h
@@ -13,7 +13,7 @@
#include <vector>
#include "base/memory/scoped_ptr.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
typedef struct _GdkPixbuf GdkPixbuf;
typedef struct _GdkRegion GdkRegion;
@@ -29,16 +29,16 @@ class Rect;
// Call gtk_init() using the argc and argv from command_line.
// gtk_init() wants an argc and argv that it can mutate; we provide those,
// but leave the original CommandLine unaltered.
-UI_API void GtkInitFromCommandLine(const CommandLine& command_line);
+UI_EXPORT void GtkInitFromCommandLine(const CommandLine& command_line);
// Convert and copy a SkBitmap to a GdkPixbuf. NOTE: this uses BGRAToRGBA, so
// it is an expensive operation. The returned GdkPixbuf will have a refcount of
// 1, and the caller is responsible for unrefing it when done.
-UI_API GdkPixbuf* GdkPixbufFromSkBitmap(const SkBitmap* bitmap);
+UI_EXPORT GdkPixbuf* GdkPixbufFromSkBitmap(const SkBitmap* bitmap);
// Modify the given region by subtracting the given rectangles.
-UI_API void SubtractRectanglesFromRegion(GdkRegion* region,
- const std::vector<Rect>& cutouts);
+UI_EXPORT void SubtractRectanglesFromRegion(GdkRegion* region,
+ const std::vector<Rect>& cutouts);
// Returns the resolution (DPI) used by pango. A negative values means the
// resolution hasn't been set.
@@ -46,15 +46,15 @@ double GetPangoResolution();
// Returns a static instance of a GdkCursor* object, sharable across the
// process. Caller must gdk_cursor_ref() it if they want to assume ownership.
-UI_API GdkCursor* GetCursor(int type);
+UI_EXPORT GdkCursor* GetCursor(int type);
// Change windows accelerator style to GTK style. (GTK uses _ for
// accelerators. Windows uses & with && as an escape for &.)
-UI_API std::string ConvertAcceleratorsFromWindowsStyle(
+UI_EXPORT std::string ConvertAcceleratorsFromWindowsStyle(
const std::string& label);
// Removes the "&" accelerators from a Windows label.
-UI_API std::string RemoveWindowsStyleAccelerators(const std::string& label);
+UI_EXPORT std::string RemoveWindowsStyleAccelerators(const std::string& label);
// Makes a copy of |pixels| with the ordering changed from BGRA to RGBA.
// The caller is responsible for free()ing the data. If |stride| is 0, it's
diff --git a/ui/gfx/icon_util.h b/ui/gfx/icon_util.h
index 439ba59..86c0544 100644
--- a/ui/gfx/icon_util.h
+++ b/ui/gfx/icon_util.h
@@ -11,7 +11,7 @@
#include <vector>
#include "base/basictypes.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
namespace gfx {
class Size;
@@ -50,7 +50,7 @@ class SkBitmap;
// ::DestroyIcon(icon);
//
///////////////////////////////////////////////////////////////////////////////
-class UI_API IconUtil {
+class UI_EXPORT IconUtil {
public:
// Given an SkBitmap object, the function converts the bitmap to a Windows
// icon and returns the corresponding HICON handle. If the function cannot
diff --git a/ui/gfx/image/image.h b/ui/gfx/image/image.h
index 6f6d161..c9aff41 100644
--- a/ui/gfx/image/image.h
+++ b/ui/gfx/image/image.h
@@ -23,8 +23,8 @@
#include "base/basictypes.h"
#include "base/gtest_prod_util.h"
#include "base/memory/ref_counted.h"
+#include "ui/base/ui_export.h"
#include "ui/gfx/native_widget_types.h"
-#include "ui/ui_api.h"
class SkBitmap;
@@ -40,7 +40,7 @@ class ImageRep;
class ImageStorage;
}
-class UI_API Image {
+class UI_EXPORT Image {
public:
enum RepresentationType {
kImageRepGdk,
diff --git a/ui/gfx/image/image_util.h b/ui/gfx/image/image_util.h
index 6e1d803..92f9224 100644
--- a/ui/gfx/image/image_util.h
+++ b/ui/gfx/image/image_util.h
@@ -9,7 +9,7 @@
#include <vector>
#include "base/basictypes.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
namespace gfx {
class Image;
@@ -19,18 +19,18 @@ namespace gfx {
// Creates an image from the given PNG-encoded input. The caller owns the
// returned Image. If there was an error creating the image, returns NULL.
-UI_API Image* ImageFromPNGEncodedData(const unsigned char* input,
- size_t input_size);
+UI_EXPORT Image* ImageFromPNGEncodedData(const unsigned char* input,
+ size_t input_size);
// Fills the |dst| vector with PNG-encoded bytes based on the given Image.
// Returns true if the Image was encoded successfully.
-UI_API bool PNGEncodedDataFromImage(const Image& image,
- std::vector<unsigned char>* dst);
+UI_EXPORT bool PNGEncodedDataFromImage(const Image& image,
+ std::vector<unsigned char>* dst);
// Fills the |dst| vector with JPEG-encoded bytes based on the given Image.
// Returns true if the Image was encoded successfully.
-UI_API bool JPEGEncodedDataFromImage(const Image& image,
- std::vector<unsigned char>* dst);
+UI_EXPORT bool JPEGEncodedDataFromImage(const Image& image,
+ std::vector<unsigned char>* dst);
}
diff --git a/ui/gfx/insets.h b/ui/gfx/insets.h
index 71af94d..ec9c54a 100644
--- a/ui/gfx/insets.h
+++ b/ui/gfx/insets.h
@@ -9,7 +9,7 @@
#include <string>
#include "build/build_config.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
#if defined(OS_POSIX) && !defined(OS_MACOSX)
#include <gtk/gtkstyle.h>
@@ -22,7 +22,7 @@ namespace gfx {
// leave at each of its edges).
//
-class UI_API Insets {
+class UI_EXPORT Insets {
public:
Insets() : top_(0), left_(0), bottom_(0), right_(0) {}
Insets(int top, int left, int bottom, int right)
diff --git a/ui/gfx/interpolated_transform.h b/ui/gfx/interpolated_transform.h
index dfd9809..b2220a8 100644
--- a/ui/gfx/interpolated_transform.h
+++ b/ui/gfx/interpolated_transform.h
@@ -23,7 +23,7 @@ namespace ui {
// scale from 0.3 to 1 from between times 0.75 and 1.
//
///////////////////////////////////////////////////////////////////////////////
-class UI_API InterpolatedTransform {
+class UI_EXPORT InterpolatedTransform {
public:
InterpolatedTransform();
// The interpolated transform varies only when t in (start_time, end_time).
@@ -72,7 +72,7 @@ class UI_API InterpolatedTransform {
// Represents an animated rotation.
//
///////////////////////////////////////////////////////////////////////////////
-class UI_API InterpolatedRotation : public InterpolatedTransform {
+class UI_EXPORT InterpolatedRotation : public InterpolatedTransform {
public:
InterpolatedRotation(float start_degrees, float end_degrees);
InterpolatedRotation(float start_degrees,
@@ -97,7 +97,7 @@ class UI_API InterpolatedRotation : public InterpolatedTransform {
// Represents an animated scale.
//
///////////////////////////////////////////////////////////////////////////////
-class UI_API InterpolatedScale : public InterpolatedTransform {
+class UI_EXPORT InterpolatedScale : public InterpolatedTransform {
public:
InterpolatedScale(float start_scale, float end_scale);
InterpolatedScale(float start_scale,
@@ -116,7 +116,7 @@ class UI_API InterpolatedScale : public InterpolatedTransform {
DISALLOW_COPY_AND_ASSIGN(InterpolatedScale);
};
-class UI_API InterpolatedTranslation : public InterpolatedTransform {
+class UI_EXPORT InterpolatedTranslation : public InterpolatedTransform {
public:
InterpolatedTranslation(const gfx::Point& start_pos,
const gfx::Point& end_pos);
@@ -145,7 +145,7 @@ class UI_API InterpolatedTranslation : public InterpolatedTransform {
// See InterpolatedTransformAboutPivot for an example of its usage.
//
///////////////////////////////////////////////////////////////////////////////
-class UI_API InterpolatedConstantTransform : public InterpolatedTransform {
+class UI_EXPORT InterpolatedConstantTransform : public InterpolatedTransform {
public:
InterpolatedConstantTransform(const ui::Transform& transform);
virtual ~InterpolatedConstantTransform();
@@ -167,7 +167,7 @@ class UI_API InterpolatedConstantTransform : public InterpolatedTransform {
// P * T * P^-1 where P is a constant transform to the new origin.
//
///////////////////////////////////////////////////////////////////////////////
-class UI_API InterpolatedTransformAboutPivot : public InterpolatedTransform {
+class UI_EXPORT InterpolatedTransformAboutPivot : public InterpolatedTransform {
public:
// Takes ownership of the passed transform.
InterpolatedTransformAboutPivot(const gfx::Point& pivot,
diff --git a/ui/gfx/mac/nsimage_cache.h b/ui/gfx/mac/nsimage_cache.h
index f89a230..64c1896 100644
--- a/ui/gfx/mac/nsimage_cache.h
+++ b/ui/gfx/mac/nsimage_cache.h
@@ -6,7 +6,7 @@
#define UI_GFX_MAC_NSIMAGE_CACHE_H_
#pragma once
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
#ifdef __OBJC__
@class NSImage;
@@ -25,7 +25,7 @@ namespace gfx {
// - This should only be called on the main thread.
// - The caller should retain the image if they want to keep it around, as
// the cache could have limit on size/lifetime, etc.
-UI_API NSImage* GetCachedImageWithName(NSString* name);
+UI_EXPORT NSImage* GetCachedImageWithName(NSString* name);
// Clears the image cache.
void ClearCachedImages(void);
diff --git a/ui/gfx/native_theme.h b/ui/gfx/native_theme.h
index 27507e4..da858a3 100644
--- a/ui/gfx/native_theme.h
+++ b/ui/gfx/native_theme.h
@@ -7,8 +7,8 @@
#pragma once
#include "third_party/skia/include/core/SkColor.h"
+#include "ui/base/ui_export.h"
#include "ui/gfx/native_widget_types.h"
-#include "ui/ui_api.h"
class SkCanvas;
@@ -32,7 +32,7 @@ class Size;
//
// NativeTheme also supports getting the default size of a given part with
// the GetPartSize() method.
-class UI_API NativeTheme {
+class UI_EXPORT NativeTheme {
public:
// The part to be painted / sized.
enum Part {
diff --git a/ui/gfx/native_theme_win.h b/ui/gfx/native_theme_win.h
index 4165b61..56be1db 100644
--- a/ui/gfx/native_theme_win.h
+++ b/ui/gfx/native_theme_win.h
@@ -30,7 +30,7 @@ namespace gfx {
// of several PaintXXX methods to an API, inherited from the NativeTheme base
// class, that consists of a single Paint() method with a argument to indicate
// what kind of part to paint.
-class UI_API NativeThemeWin : public NativeTheme {
+class UI_EXPORT NativeThemeWin : public NativeTheme {
public:
enum ThemeName {
BUTTON,
diff --git a/ui/gfx/native_widget_types.h b/ui/gfx/native_widget_types.h
index 479f366..a5afdbd 100644
--- a/ui/gfx/native_widget_types.h
+++ b/ui/gfx/native_widget_types.h
@@ -7,7 +7,7 @@
#pragma once
#include "base/basictypes.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
// This file provides cross platform typedefs for native widget types.
// NativeWindow: this is a handle to a native, top-level window
@@ -147,7 +147,7 @@ static inline NativeViewId IdFromNativeView(NativeView view) {
}
#elif defined(USE_X11)
// Not inlined because it involves pulling too many headers.
-UI_API NativeViewId IdFromNativeView(NativeView view);
+UI_EXPORT NativeViewId IdFromNativeView(NativeView view);
#endif // defined(USE_X11)
diff --git a/ui/gfx/path.h b/ui/gfx/path.h
index 88021db..d0b32bb 100644
--- a/ui/gfx/path.h
+++ b/ui/gfx/path.h
@@ -8,12 +8,12 @@
#include "base/basictypes.h"
#include "third_party/skia/include/core/SkPath.h"
+#include "ui/base/ui_export.h"
#include "ui/gfx/native_widget_types.h"
-#include "ui/ui_api.h"
namespace gfx {
-class UI_API Path : public SkPath {
+class UI_EXPORT Path : public SkPath {
public:
// Used by Path(Point,size_t) constructor.
struct Point {
diff --git a/ui/gfx/platform_font.h b/ui/gfx/platform_font.h
index 83c7df4..38fc779 100644
--- a/ui/gfx/platform_font.h
+++ b/ui/gfx/platform_font.h
@@ -10,14 +10,14 @@
#include "base/memory/ref_counted.h"
#include "base/string16.h"
+#include "ui/base/ui_export.h"
#include "ui/gfx/native_widget_types.h"
-#include "ui/ui_api.h"
namespace gfx {
class Font;
-class UI_API PlatformFont : public base::RefCounted<PlatformFont> {
+class UI_EXPORT PlatformFont : public base::RefCounted<PlatformFont> {
public:
// Create an appropriate PlatformFont implementation.
static PlatformFont* CreateDefault();
diff --git a/ui/gfx/platform_font_gtk.h b/ui/gfx/platform_font_gtk.h
index da47828..ad9c745 100644
--- a/ui/gfx/platform_font_gtk.h
+++ b/ui/gfx/platform_font_gtk.h
@@ -15,7 +15,7 @@ class SkPaint;
namespace gfx {
-class UI_API PlatformFontGtk : public PlatformFont {
+class UI_EXPORT PlatformFontGtk : public PlatformFont {
public:
PlatformFontGtk();
explicit PlatformFontGtk(const Font& other);
diff --git a/ui/gfx/platform_font_win.h b/ui/gfx/platform_font_win.h
index a76fc8d..e4be0de 100644
--- a/ui/gfx/platform_font_win.h
+++ b/ui/gfx/platform_font_win.h
@@ -7,12 +7,12 @@
#pragma once
#include "base/memory/ref_counted.h"
+#include "ui/base/ui_export.h"
#include "ui/gfx/platform_font.h"
-#include "ui/ui_api.h"
namespace gfx {
-class UI_API PlatformFontWin : public PlatformFont {
+class UI_EXPORT PlatformFontWin : public PlatformFont {
public:
PlatformFontWin();
explicit PlatformFontWin(const Font& other);
diff --git a/ui/gfx/point.h b/ui/gfx/point.h
index a872643..a290f59 100644
--- a/ui/gfx/point.h
+++ b/ui/gfx/point.h
@@ -10,7 +10,7 @@
#include <iosfwd>
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
#if defined(OS_WIN)
typedef unsigned long DWORD;
@@ -22,7 +22,7 @@ typedef struct tagPOINT POINT;
namespace gfx {
// A point has an x and y coordinate.
-class UI_API Point {
+class UI_EXPORT Point {
public:
Point();
Point(int x, int y);
@@ -96,7 +96,7 @@ class UI_API Point {
int y_;
};
-UI_API std::ostream& operator<<(std::ostream& out, const gfx::Point& p);
+UI_EXPORT std::ostream& operator<<(std::ostream& out, const gfx::Point& p);
} // namespace gfx
diff --git a/ui/gfx/rect.h b/ui/gfx/rect.h
index 0978edc..fdb3088 100644
--- a/ui/gfx/rect.h
+++ b/ui/gfx/rect.h
@@ -28,7 +28,7 @@ namespace gfx {
class Insets;
-class UI_API Rect {
+class UI_EXPORT Rect {
public:
Rect();
Rect(int width, int height);
@@ -177,7 +177,7 @@ class UI_API Rect {
gfx::Size size_;
};
-UI_API std::ostream& operator<<(std::ostream& out, const gfx::Rect& r);
+UI_EXPORT std::ostream& operator<<(std::ostream& out, const gfx::Rect& r);
} // namespace gfx
diff --git a/ui/gfx/render_text.h b/ui/gfx/render_text.h
index 99b4033..8a4f1d1 100644
--- a/ui/gfx/render_text.h
+++ b/ui/gfx/render_text.h
@@ -37,7 +37,7 @@ class Canvas;
class RenderTextTest;
// A visual style applicable to a range of text.
-struct UI_API StyleRange {
+struct UI_EXPORT StyleRange {
StyleRange();
Font font;
@@ -84,7 +84,7 @@ enum BreakType {
// the trailing side of the 2nd character 'c' when pointing to right half of
// 'c'. And it is bound to the leading edge of the 3rd character 'D' when
// pointing to right of 'D'.
-class UI_API SelectionModel {
+class UI_EXPORT SelectionModel {
public:
enum CaretPlacement {
// PREVIOUS_GRAPHEME_TRAILING means cursor is visually attached to the
@@ -142,7 +142,7 @@ class UI_API SelectionModel {
// visual layout. Support is built in for a cursor, a selection, simple styling,
// complex scripts, and bi-directional text. Implementations provide mechanisms
// for rendering and translation between logical and visual data.
-class UI_API RenderText {
+class UI_EXPORT RenderText {
public:
virtual ~RenderText();
diff --git a/ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h b/ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h
index 4826bcc..683cdf4 100644
--- a/ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h
+++ b/ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h
@@ -7,7 +7,7 @@
#pragma once
#include "base/basictypes.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
#if defined(__OBJC__)
@class NSGraphicsContext;
@@ -18,7 +18,7 @@ class NSGraphicsContext;
namespace gfx {
// A class to save/restore the state of the current context.
-class UI_API ScopedNSGraphicsContextSaveGState {
+class UI_EXPORT ScopedNSGraphicsContextSaveGState {
public:
ScopedNSGraphicsContextSaveGState();
~ScopedNSGraphicsContextSaveGState();
diff --git a/ui/gfx/screen.h b/ui/gfx/screen.h
index 53b99fc..efecc87 100644
--- a/ui/gfx/screen.h
+++ b/ui/gfx/screen.h
@@ -15,7 +15,7 @@ namespace gfx {
// A utility class for getting various info about screen size, monitors,
// cursor position, etc.
// TODO(erikkay) add more of those methods here
-class UI_API Screen {
+class UI_EXPORT Screen {
public:
static gfx::Point GetCursorScreenPoint();
diff --git a/ui/gfx/scrollbar_size.h b/ui/gfx/scrollbar_size.h
index 151a185..57e62a9 100644
--- a/ui/gfx/scrollbar_size.h
+++ b/ui/gfx/scrollbar_size.h
@@ -6,14 +6,14 @@
#define UI_GFX_SCROLLBAR_SIZE_H_
#pragma once
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
namespace gfx {
// This should return the thickness, in pixels, of a scrollbar in web content.
// This needs to match the values in WebCore's
// ScrollbarThemeChromiumXXX.cpp::scrollbarThickness().
-UI_API int scrollbar_size();
+UI_EXPORT int scrollbar_size();
} // namespace gfx
diff --git a/ui/gfx/size.h b/ui/gfx/size.h
index 20bff0f..a237a5e 100644
--- a/ui/gfx/size.h
+++ b/ui/gfx/size.h
@@ -9,7 +9,7 @@
#include <iosfwd>
#include "build/build_config.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
#if defined(OS_WIN)
typedef struct tagSIZE SIZE;
@@ -20,7 +20,7 @@ typedef struct tagSIZE SIZE;
namespace gfx {
// A size has width and height values.
-class UI_API Size {
+class UI_EXPORT Size {
public:
Size() : width_(0), height_(0) {}
Size(int width, int height);
@@ -76,7 +76,7 @@ class UI_API Size {
int height_;
};
-UI_API std::ostream& operator<<(std::ostream& out, const gfx::Size& s);
+UI_EXPORT std::ostream& operator<<(std::ostream& out, const gfx::Size& s);
} // namespace gfx
diff --git a/ui/gfx/skbitmap_operations.h b/ui/gfx/skbitmap_operations.h
index f96bc95..3b3be01 100644
--- a/ui/gfx/skbitmap_operations.h
+++ b/ui/gfx/skbitmap_operations.h
@@ -7,12 +7,12 @@
#pragma once
#include "base/gtest_prod_util.h"
+#include "ui/base/ui_export.h"
#include "ui/gfx/color_utils.h"
-#include "ui/ui_api.h"
class SkBitmap;
-class UI_API SkBitmapOperations {
+class UI_EXPORT SkBitmapOperations {
public:
// Create a bitmap that is an inverted image of the passed in image.
// Each color becomes its inverse in the color wheel. So (255, 15, 0) becomes
diff --git a/ui/gfx/skia_util.h b/ui/gfx/skia_util.h
index 7e3add6..29960f0 100644
--- a/ui/gfx/skia_util.h
+++ b/ui/gfx/skia_util.h
@@ -10,7 +10,7 @@
#include "third_party/skia/include/core/SkColor.h"
#include "third_party/skia/include/core/SkRect.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
class SkBitmap;
class SkShader;
@@ -20,8 +20,8 @@ namespace gfx {
class Rect;
// Convert between Skia and gfx rect types.
-UI_API SkRect RectToSkRect(const gfx::Rect& rect);
-UI_API gfx::Rect SkRectToRect(const SkRect& rect);
+UI_EXPORT SkRect RectToSkRect(const gfx::Rect& rect);
+UI_EXPORT gfx::Rect SkRectToRect(const SkRect& rect);
// Creates a vertical gradient shader. The caller owns the shader.
// Example usage to avoid leaks:
@@ -29,18 +29,19 @@ UI_API gfx::Rect SkRectToRect(const SkRect& rect);
//
// (The old shader in the paint, if any, needs to be freed, and SkSafeUnref will
// handle the NULL case.)
-UI_API SkShader* CreateGradientShader(int start_point,
- int end_point,
- SkColor start_color,
- SkColor end_color);
+UI_EXPORT SkShader* CreateGradientShader(int start_point,
+ int end_point,
+ SkColor start_color,
+ SkColor end_color);
// Returns true if the two bitmaps contain the same pixels.
-UI_API bool BitmapsAreEqual(const SkBitmap& bitmap1, const SkBitmap& bitmap2);
+UI_EXPORT bool BitmapsAreEqual(const SkBitmap& bitmap1,
+ const SkBitmap& bitmap2);
// Strip the accelerator char (typically '&') from a menu string. A
// double accelerator char ('&&') will be converted to a single char.
-UI_API std::string RemoveAcceleratorChar(const std::string& s,
- char accelerator_char);
+UI_EXPORT std::string RemoveAcceleratorChar(const std::string& s,
+ char accelerator_char);
} // namespace gfx;
diff --git a/ui/gfx/skia_utils_gtk.h b/ui/gfx/skia_utils_gtk.h
index f6af64c..a13aeaf 100644
--- a/ui/gfx/skia_utils_gtk.h
+++ b/ui/gfx/skia_utils_gtk.h
@@ -7,17 +7,17 @@
#pragma once
#include "third_party/skia/include/core/SkColor.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
typedef struct _GdkColor GdkColor;
namespace gfx {
// Converts GdkColors to the ARGB layout Skia expects.
-UI_API SkColor GdkColorToSkColor(GdkColor color);
+UI_EXPORT SkColor GdkColorToSkColor(GdkColor color);
// Converts ARGB to GdkColor.
-UI_API GdkColor SkColorToGdkColor(SkColor color);
+UI_EXPORT GdkColor SkColorToGdkColor(SkColor color);
} // namespace gfx
diff --git a/ui/gfx/transform.h b/ui/gfx/transform.h
index e69f196..483aa56 100644
--- a/ui/gfx/transform.h
+++ b/ui/gfx/transform.h
@@ -7,7 +7,7 @@
#pragma once
#include "third_party/skia/include/utils/SkMatrix44.h"
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
namespace gfx {
class Rect;
@@ -19,7 +19,7 @@ namespace ui {
// 4x4 transformation matrix. Transform is cheap and explicitly allows
// copy/assign.
-class UI_API Transform {
+class UI_EXPORT Transform {
public:
Transform();
~Transform();
diff --git a/ui/gfx/win_util.h b/ui/gfx/win_util.h
index 7d04f62..67074d0 100644
--- a/ui/gfx/win_util.h
+++ b/ui/gfx/win_util.h
@@ -6,12 +6,12 @@
#define UI_GFX_WIN_UTIL_H_
#pragma once
-#include "ui/ui_api.h"
+#include "ui/base/ui_export.h"
namespace gfx {
// Returns true if Direct2d is available, false otherwise.
-UI_API bool Direct2dIsAvailable();
+UI_EXPORT bool Direct2dIsAvailable();
// Returns true if DirectWrite is available, false otherwise.
bool DirectWriteIsAvailable();
diff --git a/ui/ui.gyp b/ui/ui.gyp
index 86a81f6..eb49803 100644
--- a/ui/ui.gyp
+++ b/ui/ui.gyp
@@ -181,6 +181,7 @@
'base/ui_base_paths.h',
'base/ui_base_switches.cc',
'base/ui_base_switches.h',
+ 'base/ui_export.h',
'base/view_prop.cc',
'base/view_prop.h',
'base/win/hwnd_util.cc',
@@ -274,7 +275,6 @@
'gfx/skia_utils_gtk.h',
'gfx/transform.h',
'gfx/transform.cc',
- 'ui_api.h',
],
'conditions': [
['toolkit_uses_gtk == 1', {