Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef UI_OZONE_PLATFORM_WAYLAND_WAYLAND_WINDOW_H_ | |
| 6 #define UI_OZONE_PLATFORM_WAYLAND_WAYLAND_WINDOW_H_ | |
| 7 | |
| 8 #include "ui/gfx/geometry/rect.h" | |
| 9 #include "ui/gfx/native_widget_types.h" | |
| 10 #include "ui/ozone/platform/wayland/wayland_object.h" | |
| 11 #include "ui/platform_window/platform_window.h" | |
| 12 | |
| 13 namespace ui { | |
| 14 | |
| 15 class WaylandDisplay; | |
| 16 | |
| 17 class WaylandWindow : public PlatformWindow { | |
| 18 public: | |
| 19 WaylandWindow(PlatformWindowDelegate* delegate, | |
| 20 WaylandDisplay* display, | |
| 21 const gfx::Rect& bounds); | |
| 22 ~WaylandWindow() override; | |
| 23 | |
| 24 bool Initialize(); | |
| 25 | |
| 26 wl_surface* GetSurface(); | |
| 27 gfx::AcceleratedWidget GetWidget(); | |
| 28 | |
| 29 void ApplyPendingBounds(); | |
|
spang
2016/01/25 18:57:58
It would be nice to comment these.
Michael Forney
2016/01/26 02:25:26
Done.
| |
| 30 void SetKeyboardFocus(bool focus); | |
| 31 void SetPointerFocus(bool focus); | |
| 32 | |
| 33 // PlatformWindow | |
| 34 void Show() override; | |
| 35 void Hide() override; | |
| 36 void Close() override; | |
| 37 void SetBounds(const gfx::Rect& bounds) override; | |
| 38 gfx::Rect GetBounds() override; | |
| 39 void SetTitle(const base::string16& title) override; | |
| 40 void SetCapture() override; | |
| 41 void ReleaseCapture() override; | |
| 42 void ToggleFullscreen() override; | |
| 43 void Maximize() override; | |
| 44 void Minimize() override; | |
| 45 void Restore() override; | |
| 46 void SetCursor(PlatformCursor cursor) override; | |
| 47 void MoveCursorTo(const gfx::Point& location) override; | |
| 48 void ConfineCursorToBounds(const gfx::Rect& bounds) override; | |
| 49 PlatformImeController* GetPlatformImeController() override; | |
| 50 | |
| 51 // xdg_surface_listener | |
| 52 static void Configure(void* data, | |
| 53 xdg_surface* obj, | |
| 54 int32_t width, | |
| 55 int32_t height, | |
| 56 wl_array* states, | |
| 57 uint32_t serial); | |
| 58 static void Close(void* data, xdg_surface* obj); | |
| 59 | |
| 60 private: | |
| 61 PlatformWindowDelegate* delegate_; | |
| 62 WaylandDisplay* display_; | |
| 63 | |
| 64 wl::Object<wl_surface> surface_; | |
| 65 wl::Object<xdg_surface> xdg_surface_; | |
|
spang
2016/01/25 18:57:58
What's the difference between these two things?
Michael Forney
2016/01/25 19:16:45
The wl_surface is a generic surface object that is
| |
| 66 | |
| 67 gfx::Rect bounds_, pending_bounds_; | |
|
spang
2016/01/25 18:57:57
Just one declaration per line.
Michael Forney
2016/01/26 02:25:26
Done.
| |
| 68 uint32_t pending_configure_serial_; | |
| 69 | |
| 70 DISALLOW_COPY_AND_ASSIGN(WaylandWindow); | |
| 71 }; | |
| 72 | |
| 73 } // namespace ui | |
| 74 | |
| 75 #endif // UI_OZONE_PLATFORM_WAYLAND_WAYLAND_WINDOW_H_ | |
| OLD | NEW |