Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Side by Side Diff: ui/ozone/platform/wayland/wayland_screen.h

Issue 2027943002: [WIP] Make content_shell run under Wayland Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 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_OZONE_PLATFORM_WAYLAND_WAYLAND_SCREEN_H_
6 #define UI_OZONE_PLATFORM_WAYLAND_WAYLAND_SCREEN_H_
7
8 #include <stdint.h>
9
10 #include "base/macros.h"
11 #include "ui/gfx/geometry/rect.h"
12 #include "ui/ozone/platform/wayland/wayland_object.h"
13
14 struct wl_output;
15 struct wl_registry;
16
17 namespace ui {
18
19 class WaylandDisplay;
20
21 // WaylandScreen objects keep track of the current outputs (screens/monitors)
22 // that are available to the application.
23 class WaylandScreen {
24 public:
25 WaylandScreen(wl_registry* registry, uint32_t name);
26 ~WaylandScreen();
27
28 // Returns the active allocation of the screen.
29 gfx::Rect Geometry() const { return rect_; }
30
31 private:
32 // Callback functions that allows the display to initialize the screen's
33 // position and available modes.
34 static void OutputHandleGeometry(void* data,
35 wl_output* output,
36 int32_t x,
37 int32_t y,
38 int32_t physical_width,
39 int32_t physical_height,
40 int32_t subpixel,
41 const char* make,
42 const char* model,
43 int32_t output_transform);
44
45 static void OutputHandleMode(void* data,
46 wl_output* wl_output,
47 uint32_t flags,
48 int32_t width,
49 int32_t height,
50 int32_t refresh);
51
52 wl::Object<wl_output> output_;
53
54 int32_t name_;
55 int32_t refresh_;
56 gfx::Rect rect_;
57
58 DISALLOW_COPY_AND_ASSIGN(WaylandScreen);
59 };
60
61 } // namespace ui
62
63 #endif // UI_OZONE_PLATFORM_WAYLAND_WAYLAND_SCREEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698