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

Side by Side Diff: ui/ozone/platform/wayland/wayland_object.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: [For landding] update comments Created 4 years, 2 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_OZONE_PLATFORM_WAYLAND_WAYLAND_OBJECT_H_ 5 #ifndef UI_OZONE_PLATFORM_WAYLAND_WAYLAND_OBJECT_H_
6 #define UI_OZONE_PLATFORM_WAYLAND_WAYLAND_OBJECT_H_ 6 #define UI_OZONE_PLATFORM_WAYLAND_WAYLAND_OBJECT_H_
7 7
8 #include <wayland-client-core.h> 8 #include <wayland-client-core.h>
9 9
10 #include <memory> 10 #include <memory>
11 11
12 struct wl_buffer; 12 struct wl_buffer;
13 struct wl_compositor; 13 struct wl_compositor;
14 struct wl_output;
14 struct wl_pointer; 15 struct wl_pointer;
15 struct wl_registry; 16 struct wl_registry;
16 struct wl_seat; 17 struct wl_seat;
17 struct wl_shm; 18 struct wl_shm;
18 struct wl_shm_pool; 19 struct wl_shm_pool;
19 struct wl_surface; 20 struct wl_surface;
20 struct xdg_shell; 21 struct xdg_shell;
21 struct xdg_surface; 22 struct xdg_surface;
22 23
23 namespace wl { 24 namespace wl {
(...skipping 13 matching lines...) Expand all
37 static void (*deleter)(wl_compositor*); 38 static void (*deleter)(wl_compositor*);
38 }; 39 };
39 40
40 template <> 41 template <>
41 struct ObjectTraits<wl_display> { 42 struct ObjectTraits<wl_display> {
42 static const wl_interface* interface; 43 static const wl_interface* interface;
43 static void (*deleter)(wl_display*); 44 static void (*deleter)(wl_display*);
44 }; 45 };
45 46
46 template <> 47 template <>
48 struct ObjectTraits<wl_output> {
49 static const wl_interface* interface;
50 static void (*deleter)(wl_output*);
51 };
52
53 template <>
47 struct ObjectTraits<wl_pointer> { 54 struct ObjectTraits<wl_pointer> {
48 static const wl_interface* interface; 55 static const wl_interface* interface;
49 static void (*deleter)(wl_pointer*); 56 static void (*deleter)(wl_pointer*);
50 }; 57 };
51 58
52 template <> 59 template <>
53 struct ObjectTraits<wl_registry> { 60 struct ObjectTraits<wl_registry> {
54 static const wl_interface* interface; 61 static const wl_interface* interface;
55 static void (*deleter)(wl_registry*); 62 static void (*deleter)(wl_registry*);
56 }; 63 };
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 119
113 template <typename T> 120 template <typename T>
114 wl::Object<T> Bind(wl_registry* registry, uint32_t name, uint32_t version) { 121 wl::Object<T> Bind(wl_registry* registry, uint32_t name, uint32_t version) {
115 return wl::Object<T>(static_cast<T*>( 122 return wl::Object<T>(static_cast<T*>(
116 wl_registry_bind(registry, name, ObjectTraits<T>::interface, version))); 123 wl_registry_bind(registry, name, ObjectTraits<T>::interface, version)));
117 } 124 }
118 125
119 } // namespace wl 126 } // namespace wl
120 127
121 #endif // UI_OZONE_PLATFORM_WAYLAND_WAYLAND_OBJECT_H_ 128 #endif // UI_OZONE_PLATFORM_WAYLAND_WAYLAND_OBJECT_H_
OLDNEW
« no previous file with comments | « ui/ozone/platform/wayland/wayland_connection_unittest.cc ('k') | ui/ozone/platform/wayland/wayland_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698