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