1 // Copyright 2014 Intel Corporation. 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.
5 #ifndef OZONE_WAYLAND_PROXY_DISPLAY_H_
6 #define OZONE_WAYLAND_PROXY_DISPLAY_H_
8 #if !defined(__STDC_FORMAT_MACROS)
9 #define __STDC_FORMAT_MACROS
12 #include <wayland-client.h>
13 #include "ozone/ui/gfx/ozone_display.h"
15 namespace ozonewayland {
18 // WaylandProxyDisplay is a wrapper around wl_display. Once we get a valid
19 // wl_display, the Wayland server will send different events to register
20 // the Wayland compositor, shell, screens, input devices, ...
21 class WaylandProxyDisplay : public ui::OzoneDisplay {
23 explicit WaylandProxyDisplay();
24 virtual ~WaylandProxyDisplay();
26 virtual void LookAheadOutputGeometry() OVERRIDE;
29 // This handler resolves only screen registration. In general you don't want
30 // to use this but the one below.
31 static void DisplayHandleOutputOnly(
33 struct wl_registry *registry,
35 const char *interface,
38 // WaylandProxyDisplay manages the memory of all these pointers.
39 WaylandScreen* screen_;
40 DISALLOW_COPY_AND_ASSIGN(WaylandProxyDisplay);
43 } // namespace ozonewayland
45 #endif // OZONE_WAYLAND_PROXY_DISPLAY_H_