OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // 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 | 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 VIEWS_WIDGET_NATIVE_WIDGET_WAYLAND_H_ | 5 #ifndef VIEWS_WIDGET_NATIVE_WIDGET_WAYLAND_H_ |
6 #define VIEWS_WIDGET_NATIVE_WIDGET_WAYLAND_H_ | 6 #define VIEWS_WIDGET_NATIVE_WIDGET_WAYLAND_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <wayland-client.h> | 9 #include <wayland-client.h> |
10 | 10 |
11 #include "base/memory/scoped_vector.h" | 11 #include "base/memory/scoped_vector.h" |
12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
13 #include "ui/gfx/compositor/compositor.h" | 13 #include "ui/gfx/compositor/compositor.h" |
14 #include "ui/gfx/gl/gl_context.h" | 14 #include "ui/gfx/gl/gl_context.h" |
15 #include "ui/gfx/gl/gl_surface.h" | 15 #include "ui/gfx/gl/gl_surface.h" |
16 #include "ui/gfx/size.h" | 16 #include "ui/gfx/size.h" |
17 #include "ui/wayland/wayland_widget.h" | 17 #include "ui/wayland/wayland_widget.h" |
18 #include "views/widget/native_widget_private.h" | 18 #include "views/widget/native_widget_private.h" |
19 #include "views/widget/widget.h" | 19 #include "views/widget/widget.h" |
20 | 20 |
21 typedef struct _cairo_device cairo_device_t; | 21 typedef struct _cairo_device cairo_device_t; |
22 typedef struct _cairo_surface cairo_surface_t; | 22 typedef struct _cairo_surface cairo_surface_t; |
23 | 23 |
| 24 namespace base { |
| 25 namespace wayland { |
| 26 union WaylandEvent; |
| 27 } |
| 28 } |
| 29 |
24 namespace gfx { | 30 namespace gfx { |
25 class Rect; | 31 class Rect; |
26 } | 32 } |
27 | 33 |
28 namespace ui { | 34 namespace ui { |
29 class ViewProp; | 35 class ViewProp; |
30 class WaylandDisplay; | 36 class WaylandDisplay; |
31 class WaylandInputDevice; | 37 class WaylandInputDevice; |
32 class WaylandWindow; | 38 class WaylandWindow; |
33 } | 39 } |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 virtual void RunShellDrag(View* view, | 126 virtual void RunShellDrag(View* view, |
121 const ui::OSExchangeData& data, | 127 const ui::OSExchangeData& data, |
122 int operation) OVERRIDE; | 128 int operation) OVERRIDE; |
123 virtual void SchedulePaintInRect(const gfx::Rect& rect) OVERRIDE; | 129 virtual void SchedulePaintInRect(const gfx::Rect& rect) OVERRIDE; |
124 virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE; | 130 virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE; |
125 virtual void ClearNativeFocus() OVERRIDE; | 131 virtual void ClearNativeFocus() OVERRIDE; |
126 virtual void FocusNativeView(gfx::NativeView native_view) OVERRIDE; | 132 virtual void FocusNativeView(gfx::NativeView native_view) OVERRIDE; |
127 virtual bool ConvertPointFromAncestor( | 133 virtual bool ConvertPointFromAncestor( |
128 const Widget* ancestor, gfx::Point* point) const OVERRIDE; | 134 const Widget* ancestor, gfx::Point* point) const OVERRIDE; |
129 | 135 |
130 virtual void OnMotionNotify(ui::WaylandEvent event) OVERRIDE; | 136 virtual void OnMotionNotify(WaylandEvent event) OVERRIDE; |
131 virtual void OnButtonNotify(ui::WaylandEvent event) OVERRIDE; | 137 virtual void OnButtonNotify(WaylandEvent event) OVERRIDE; |
132 virtual void OnKeyNotify(ui::WaylandEvent event) OVERRIDE; | 138 virtual void OnKeyNotify(WaylandEvent event) OVERRIDE; |
133 virtual void OnPointerFocus(ui::WaylandEvent event) OVERRIDE; | 139 virtual void OnPointerFocus(WaylandEvent event) OVERRIDE; |
134 virtual void OnKeyboardFocus(ui::WaylandEvent event) OVERRIDE; | 140 virtual void OnKeyboardFocus(WaylandEvent event) OVERRIDE; |
135 | 141 |
136 virtual void OnGeometryChange(ui::WaylandEvent event) OVERRIDE; | 142 virtual void OnGeometryChange(WaylandEvent event) OVERRIDE; |
137 | 143 |
138 private: | 144 private: |
139 typedef ScopedVector<ui::ViewProp> ViewProps; | 145 typedef ScopedVector<ui::ViewProp> ViewProps; |
140 | 146 |
141 // Overridden from ui::CompositorDelegate | 147 // Overridden from ui::CompositorDelegate |
142 virtual void ScheduleDraw(); | 148 virtual void ScheduleDraw(); |
143 | 149 |
144 // Overridden from NativeWidget | 150 // Overridden from NativeWidget |
145 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; | 151 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; |
146 | 152 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 // and the compositor will have these, so we don't need to worry about them. | 207 // and the compositor will have these, so we don't need to worry about them. |
202 scoped_refptr<gfx::GLSurface> surface_; | 208 scoped_refptr<gfx::GLSurface> surface_; |
203 scoped_refptr<gfx::GLContext> context_; | 209 scoped_refptr<gfx::GLContext> context_; |
204 | 210 |
205 DISALLOW_COPY_AND_ASSIGN(NativeWidgetWayland); | 211 DISALLOW_COPY_AND_ASSIGN(NativeWidgetWayland); |
206 }; | 212 }; |
207 | 213 |
208 } // namespace views | 214 } // namespace views |
209 | 215 |
210 #endif // VIEWS_WIDGET_NATIVE_WIDGET_WAYLAND_H_ | 216 #endif // VIEWS_WIDGET_NATIVE_WIDGET_WAYLAND_H_ |
OLD | NEW |