kodi
ShellSurfaceWebOSShell.h
1 /*
2  * Copyright (C) 2017-2023 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include "Connection.h"
12 #include "ShellSurface.h"
13 #include "wayland-webos-protocols.hpp"
14 
15 namespace KODI
16 {
17 namespace WINDOWING
18 {
19 namespace WAYLAND
20 {
21 
23 {
24 public:
36  CConnection& connection,
37  wayland::surface_t const& surface,
38  const std::string& title,
39  const std::string& className);
40 
41  void Initialize() override{};
42 
43  void SetFullScreen(wayland::output_t const& output, float refreshRate) override;
44  void SetWindowed() override;
45  void SetMaximized() override;
46  void UnsetMaximized() override;
47  void SetMinimized() override;
48  void SetWindowGeometry(CRectInt geometry) override{};
49  void AckConfigure(std::uint32_t serial) override{};
50 
51  void StartMove(const wayland::seat_t& seat, std::uint32_t serial) override;
52  void StartResize(const wayland::seat_t& seat,
53  std::uint32_t serial,
54  wayland::shell_surface_resize edge) override;
55  void ShowShellContextMenu(const wayland::seat_t& seat,
56  std::uint32_t serial,
57  CPointInt position) override{};
58 
59 private:
60  IShellSurfaceHandler& m_handler;
61  wayland::shell_t m_shell;
62  wayland::shell_surface_t m_shellSurface;
63  StateBitset m_surfaceState;
64  wayland::webos_shell_t m_webos_shell;
65  wayland::webos_shell_surface_t m_webos_shellSurface;
66  CSizeInt m_windowSize;
67 };
68 
69 } // namespace WAYLAND
70 } // namespace WINDOWING
71 } // namespace KODI
Definition: ShellSurfaceWebOSShell.h:22
CShellSurfaceWebOSShell(IShellSurfaceHandler &handler, CConnection &connection, wayland::surface_t const &surface, const std::string &title, const std::string &className)
Construct wl_shell_surface for given surface.
Definition: ShellSurfaceWebOSShell.cpp:21
Connection to Wayland compositor.
Definition: Connection.h:25
Definition: AudioDecoder.h:18
Abstraction for shell surfaces to support multiple protocols such as wl_shell (for compatibility) and...
Definition: ShellSurface.h:34
void Initialize() override
Initialize shell surface.
Definition: ShellSurfaceWebOSShell.h:41