Debian Codegraph @

xbmc/windowing/wayland/ShellSurfaceWebOSShell.h

raw
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
22 class CShellSurfaceWebOSShell : public IShellSurface
23 {
24 public:
25 /**
26 * Construct wl_shell_surface for given surface
27 *
28 * \parma handler shell surface handler
29 * \param connection connection global
30 * \param surface surface to make shell surface for
31 * \param title title of the surfae
32 * \param className class of the surface, which should match the name of the
33 * .desktop file of the application
34 */
35 CShellSurfaceWebOSShell(IShellSurfaceHandler& handler,
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