OLD | NEW |
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_WINDOW_H_ | 5 #ifndef UI_OZONE_PLATFORM_WAYLAND_WAYLAND_WINDOW_H_ |
6 #define UI_OZONE_PLATFORM_WAYLAND_WAYLAND_WINDOW_H_ | 6 #define UI_OZONE_PLATFORM_WAYLAND_WAYLAND_WINDOW_H_ |
7 | 7 |
8 #include "ui/events/platform/platform_event_dispatcher.h" | 8 #include "ui/events/platform/platform_event_dispatcher.h" |
9 #include "ui/gfx/geometry/rect.h" | 9 #include "ui/gfx/geometry/rect.h" |
10 #include "ui/gfx/native_widget_types.h" | 10 #include "ui/gfx/native_widget_types.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 | 29 |
30 wl_surface* surface() { return surface_.get(); } | 30 wl_surface* surface() { return surface_.get(); } |
31 | 31 |
32 // Apply the bounds specified in the most recent configure event. This should | 32 // Apply the bounds specified in the most recent configure event. This should |
33 // be called after processing all pending events in the wayland connection. | 33 // be called after processing all pending events in the wayland connection. |
34 void ApplyPendingBounds(); | 34 void ApplyPendingBounds(); |
35 | 35 |
36 // Set whether this window has pointer focus and should dispatch mouse events. | 36 // Set whether this window has pointer focus and should dispatch mouse events. |
37 void set_pointer_focus(bool focus) { has_pointer_focus_ = focus; } | 37 void set_pointer_focus(bool focus) { has_pointer_focus_ = focus; } |
38 | 38 |
| 39 // Set whether this window has keyboard focus and should dispatch key events. |
| 40 void set_keyboard_focus(bool focus) { has_keyboard_focus_ = focus; } |
| 41 |
39 // PlatformWindow | 42 // PlatformWindow |
40 void Show() override; | 43 void Show() override; |
41 void Hide() override; | 44 void Hide() override; |
42 void Close() override; | 45 void Close() override; |
43 void SetBounds(const gfx::Rect& bounds) override; | 46 void SetBounds(const gfx::Rect& bounds) override; |
44 gfx::Rect GetBounds() override; | 47 gfx::Rect GetBounds() override; |
45 void SetTitle(const base::string16& title) override; | 48 void SetTitle(const base::string16& title) override; |
46 void SetCapture() override; | 49 void SetCapture() override; |
47 void ReleaseCapture() override; | 50 void ReleaseCapture() override; |
48 void ToggleFullscreen() override; | 51 void ToggleFullscreen() override; |
(...skipping 22 matching lines...) Expand all Loading... |
71 PlatformWindowDelegate* delegate_; | 74 PlatformWindowDelegate* delegate_; |
72 WaylandConnection* connection_; | 75 WaylandConnection* connection_; |
73 | 76 |
74 wl::Object<wl_surface> surface_; | 77 wl::Object<wl_surface> surface_; |
75 wl::Object<xdg_surface> xdg_surface_; | 78 wl::Object<xdg_surface> xdg_surface_; |
76 | 79 |
77 gfx::Rect bounds_; | 80 gfx::Rect bounds_; |
78 gfx::Rect pending_bounds_; | 81 gfx::Rect pending_bounds_; |
79 uint32_t pending_configure_serial_; | 82 uint32_t pending_configure_serial_; |
80 bool has_pointer_focus_ = false; | 83 bool has_pointer_focus_ = false; |
| 84 bool has_keyboard_focus_ = false; |
81 | 85 |
82 DISALLOW_COPY_AND_ASSIGN(WaylandWindow); | 86 DISALLOW_COPY_AND_ASSIGN(WaylandWindow); |
83 }; | 87 }; |
84 | 88 |
85 } // namespace ui | 89 } // namespace ui |
86 | 90 |
87 #endif // UI_OZONE_PLATFORM_WAYLAND_WAYLAND_WINDOW_H_ | 91 #endif // UI_OZONE_PLATFORM_WAYLAND_WAYLAND_WINDOW_H_ |
OLD | NEW |