OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "ui/gfx/screen.h" |
| 6 |
| 7 #include "base/logging.h" |
| 8 #include "ui/gfx/gl/gl_surface_egl.h" |
| 9 #include "ui/wayland/wayland_display.h" |
| 10 #include "ui/wayland/wayland_screen.h" |
| 11 |
| 12 namespace gfx { |
| 13 |
| 14 // static |
| 15 gfx::Point Screen::GetCursorScreenPoint() { |
| 16 NOTIMPLEMENTED(); |
| 17 return gfx::Point(); |
| 18 } |
| 19 |
| 20 gfx::Rect static GetPrimaryMonitorBounds() { |
| 21 ui::WaylandDisplay* display = ui::WaylandDisplay::GetDisplay( |
| 22 gfx::GLSurfaceEGL::GetNativeDisplay()); |
| 23 std::list<ui::WaylandScreen*> screens = display->GetScreenList(); |
| 24 |
| 25 return screens.empty() ? gfx::Rect() : screens.front()->GetAllocation(); |
| 26 } |
| 27 |
| 28 // static |
| 29 gfx::Rect Screen::GetMonitorWorkAreaNearestWindow(gfx::NativeView view) { |
| 30 // TODO(dnicoara): use |view|. |
| 31 return GetPrimaryMonitorBounds(); |
| 32 } |
| 33 |
| 34 // static |
| 35 gfx::Rect Screen::GetMonitorAreaNearestWindow(gfx::NativeView view) { |
| 36 NOTIMPLEMENTED(); |
| 37 return gfx::Rect(); |
| 38 } |
| 39 |
| 40 // static |
| 41 gfx::Rect Screen::GetMonitorWorkAreaNearestPoint(const gfx::Point& point) { |
| 42 return GetMonitorAreaNearestPoint(point); |
| 43 } |
| 44 |
| 45 // static |
| 46 gfx::Rect Screen::GetMonitorAreaNearestPoint(const gfx::Point& point) { |
| 47 NOTIMPLEMENTED(); |
| 48 return gfx::Rect(); |
| 49 } |
| 50 |
| 51 gfx::NativeWindow Screen::GetWindowAtCursorScreenPoint() { |
| 52 NOTIMPLEMENTED(); |
| 53 return NULL; |
| 54 } |
| 55 |
| 56 } // namespace gfx |
| 57 |
OLD | NEW |