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

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

Issue 2042503002: ozone/platform/wayland: Add support for wl_output_interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: hide the use of the base::Closure 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/callback.h"
11 #include "base/macros.h"
12 #include "ui/gfx/geometry/rect.h"
13 #include "ui/ozone/platform/wayland/wayland_object.h"
14
15 struct wl_output;
rjkroege 2016/06/14 23:29:49 It would be nice if we didn't have to expose Wayla
joone 2016/06/20 22:22:42 They are already forward-declared in wayland_obje
16 struct wl_registry;
17
18 namespace ui {
19
20 // WaylandScreen objects keep track of the current outputs (screens/monitors)
rjkroege 2016/06/14 23:29:49 In chrome terminology, a Display corresponds to a
Michael Forney 2016/06/14 23:44:54 I think this class corresponds to a wl_output whic
joone 2016/06/20 22:22:42 Thanks for suggestions. The name of the classes wi
Michael Forney 2016/07/07 21:18:01 Would you consider moving the rename of WaylandDis
joone 2016/07/12 19:22:41 I've created a separate CL: https://codereview.chr
21 // that are available to the application.
22 class WaylandScreen {
23 public:
24 WaylandScreen(wl_registry* registry, uint32_t name, wl_output*);
25 ~WaylandScreen();
26
27 // Returns the active allocation of the screen.
rjkroege 2016/06/14 23:29:49 These are are in DIP coordinates or DDP? Please in
joone 2016/06/20 22:22:42 This is the resolution of the screen.
28 gfx::Rect Geometry() const { return rect_; }
29
30 void OutputReadyForUse();
31 void WaitforOutputAvailable();
32
33 private:
34 // Callback functions that allows the display to initialize the screen's
35 // position and available modes.
36 static void OutputHandleGeometry(void* data,
37 wl_output* output,
38 int32_t x,
39 int32_t y,
40 int32_t physical_width,
41 int32_t physical_height,
42 int32_t subpixel,
43 const char* make,
44 const char* model,
45 int32_t output_transform);
46
47 static void OutputHandleMode(void* data,
48 wl_output* wl_output,
49 uint32_t flags,
50 int32_t width,
51 int32_t height,
52 int32_t refresh);
53
54 wl::Object<wl_output> output_;
55 base::Closure output_complete_closure_;
56
57 int32_t name_;
58 gfx::Rect rect_;
59
60 DISALLOW_COPY_AND_ASSIGN(WaylandScreen);
61 };
62
63 } // namespace ui
64
65 #endif // UI_OZONE_PLATFORM_WAYLAND_WAYLAND_SCREEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698