blob: 037cc89d957d366c3174de312f1eb2a32c9a74e2 [file] [log] [blame]
[email protected]f1b2cd02011-08-10 16:50:441// 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
12namespace gfx {
13
14// static
15gfx::Point Screen::GetCursorScreenPoint() {
16 NOTIMPLEMENTED();
17 return gfx::Point();
18}
19
20gfx::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
29gfx::Rect Screen::GetMonitorWorkAreaNearestWindow(gfx::NativeView view) {
30 // TODO(dnicoara): use |view|.
31 return GetPrimaryMonitorBounds();
32}
33
34// static
35gfx::Rect Screen::GetMonitorAreaNearestWindow(gfx::NativeView view) {
36 NOTIMPLEMENTED();
37 return gfx::Rect();
38}
39
40// static
41gfx::Rect Screen::GetMonitorWorkAreaNearestPoint(const gfx::Point& point) {
42 return GetMonitorAreaNearestPoint(point);
43}
44
45// static
46gfx::Rect Screen::GetMonitorAreaNearestPoint(const gfx::Point& point) {
47 NOTIMPLEMENTED();
48 return gfx::Rect();
49}
50
51gfx::NativeWindow Screen::GetWindowAtCursorScreenPoint() {
52 NOTIMPLEMENTED();
53 return NULL;
54}
55
56} // namespace gfx
57