OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef UI_AURA_MONITOR_H_ |
| 6 #define UI_AURA_MONITOR_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "base/basictypes.h" |
| 10 #include "ui/aura/aura_export.h" |
| 11 #include "ui/gfx/insets.h" |
| 12 #include "ui/gfx/rect.h" |
| 13 |
| 14 namespace aura { |
| 15 |
| 16 class AURA_EXPORT Monitor { |
| 17 public: |
| 18 Monitor(); |
| 19 |
| 20 // Sets/gets monitor's bounds in |gfx::screen|'s coordinates, |
| 21 // which is relative to the primary screen's origin. |
| 22 void set_bounds(gfx::Rect& bounds) { bounds_ = bounds;} |
| 23 const gfx::Rect& bounds() const { return bounds_; }; |
| 24 |
| 25 // Sets/gets monitor's workarea insets. |
| 26 void set_work_area_insets(const gfx::Insets& insets) { |
| 27 work_area_insets_ = insets; |
| 28 } |
| 29 const gfx::Insets& work_area_insets() const { return work_area_insets_; } |
| 30 |
| 31 // Returns the monitor's size. |
| 32 const gfx::Size& size() const { return bounds_.size(); } |
| 33 |
| 34 // Returns the monitor's work area. |
| 35 gfx::Rect GetWorkAreaBounds() const; |
| 36 |
| 37 private: |
| 38 // Insets for the work area. |
| 39 gfx::Insets work_area_insets_; |
| 40 |
| 41 gfx::Rect bounds_; |
| 42 |
| 43 DISALLOW_COPY_AND_ASSIGN(Monitor); |
| 44 }; |
| 45 |
| 46 } // namespace aura |
| 47 |
| 48 #endif // UI_AURA_MONITOR_H_ |
OLD | NEW |