summaryrefslogtreecommitdiffstats
path: root/ui/base
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-06 04:51:07 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-06 04:51:07 +0000
commit507bad5377a236f93f8ec190ca4354dd3cb47b39 (patch)
tree690a510a35e4b1d41eba5948c2d9e78044b6a7fb /ui/base
parent843ccb24f7b092580c48cf659865def0758ed976 (diff)
downloadchromium_src-507bad5377a236f93f8ec190ca4354dd3cb47b39.zip
chromium_src-507bad5377a236f93f8ec190ca4354dd3cb47b39.tar.gz
chromium_src-507bad5377a236f93f8ec190ca4354dd3cb47b39.tar.bz2
Rename UI_API to UI_EXPORT.
R=rvargas@chromium.org Review URL: http://codereview.chromium.org/7569005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95730 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base')
-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.h29
-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
62 files changed, 363 insertions, 330 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/base/ui_export.h b/ui/base/ui_export.h
new file mode 100644
index 0000000..c54de1f
--- /dev/null
+++ b/ui/base/ui_export.h
@@ -0,0 +1,29 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_UI_EXPORT_H_
+#define UI_UI_EXPORT_H_
+#pragma once
+
+// 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_EXPORT __declspec(dllexport)
+#else
+#define UI_EXPORT __declspec(dllimport)
+#endif // defined(UI_IMPLEMENTATION)
+
+#else // defined(WIN32)
+#define UI_EXPORT __attribute__((visibility("default")))
+#endif
+
+#else // defined(COMPONENT_BUILD)
+#define UI_EXPORT
+#endif
+
+#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