| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_GFX_SIZE_H_ | 5 #ifndef UI_GFX_SIZE_H_ |
| 6 #define UI_GFX_SIZE_H_ | 6 #define UI_GFX_SIZE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <iosfwd> | 9 #include <iosfwd> |
| 10 | 10 |
| 11 #include "build/build_config.h" | 11 #include "build/build_config.h" |
| 12 #include "ui/ui_api.h" | 12 #include "ui/base/ui_export.h" |
| 13 | 13 |
| 14 #if defined(OS_WIN) | 14 #if defined(OS_WIN) |
| 15 typedef struct tagSIZE SIZE; | 15 typedef struct tagSIZE SIZE; |
| 16 #elif defined(OS_MACOSX) | 16 #elif defined(OS_MACOSX) |
| 17 #include <ApplicationServices/ApplicationServices.h> | 17 #include <ApplicationServices/ApplicationServices.h> |
| 18 #endif | 18 #endif |
| 19 | 19 |
| 20 namespace gfx { | 20 namespace gfx { |
| 21 | 21 |
| 22 // A size has width and height values. | 22 // A size has width and height values. |
| 23 class UI_API Size { | 23 class UI_EXPORT Size { |
| 24 public: | 24 public: |
| 25 Size() : width_(0), height_(0) {} | 25 Size() : width_(0), height_(0) {} |
| 26 Size(int width, int height); | 26 Size(int width, int height); |
| 27 #if defined(OS_MACOSX) | 27 #if defined(OS_MACOSX) |
| 28 explicit Size(const CGSize& s); | 28 explicit Size(const CGSize& s); |
| 29 #endif | 29 #endif |
| 30 | 30 |
| 31 ~Size() {} | 31 ~Size() {} |
| 32 | 32 |
| 33 #if defined(OS_MACOSX) | 33 #if defined(OS_MACOSX) |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 SIZE ToSIZE() const; | 69 SIZE ToSIZE() const; |
| 70 #elif defined(OS_MACOSX) | 70 #elif defined(OS_MACOSX) |
| 71 CGSize ToCGSize() const; | 71 CGSize ToCGSize() const; |
| 72 #endif | 72 #endif |
| 73 | 73 |
| 74 private: | 74 private: |
| 75 int width_; | 75 int width_; |
| 76 int height_; | 76 int height_; |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 UI_API std::ostream& operator<<(std::ostream& out, const gfx::Size& s); | 79 UI_EXPORT std::ostream& operator<<(std::ostream& out, const gfx::Size& s); |
| 80 | 80 |
| 81 } // namespace gfx | 81 } // namespace gfx |
| 82 | 82 |
| 83 #endif // UI_GFX_SIZE_H_ | 83 #endif // UI_GFX_SIZE_H_ |
| OLD | NEW |