kodi
ShellSurfaceWlShell.h
1 /*
2  * Copyright (C) 2017-2018 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 
14 namespace KODI
15 {
16 namespace WINDOWING
17 {
18 namespace WAYLAND
19 {
20 
22 {
23 public:
35  CConnection& connection,
36  wayland::surface_t const& surface,
37  const std::string& title,
38  const std::string& class_);
39 
40  void Initialize() override;
41 
42  void SetFullScreen(wayland::output_t const& output, float refreshRate) override;
43  void SetWindowed() override;
44  void SetMaximized() override;
45  void UnsetMaximized() override;
46  void SetMinimized() override;
47  void SetWindowGeometry(CRectInt geometry) override;
48  void AckConfigure(std::uint32_t serial) override;
49 
50  void StartMove(const wayland::seat_t& seat, std::uint32_t serial) override;
51  void StartResize(const wayland::seat_t& seat, std::uint32_t serial, wayland::shell_surface_resize edge) override;
52  void ShowShellContextMenu(const wayland::seat_t& seat, std::uint32_t serial, CPointInt position) override;
53 
54 private:
55  IShellSurfaceHandler& m_handler;
56  wayland::shell_t m_shell;
57  wayland::shell_surface_t m_shellSurface;
58  StateBitset m_surfaceState;
59 };
60 
61 }
62 }
63 }
Connection to Wayland compositor.
Definition: Connection.h:25
CShellSurfaceWlShell(IShellSurfaceHandler &handler, CConnection &connection, wayland::surface_t const &surface, const std::string &title, const std::string &class_)
Construct wl_shell_surface for given surface.
Definition: ShellSurfaceWlShell.cpp:18
Definition: AudioDecoder.h:18
Abstraction for shell surfaces to support multiple protocols such as wl_shell (for compatibility) and...
Definition: ShellSurface.h:34
Definition: ShellSurfaceWlShell.h:21
void Initialize() override
Initialize shell surface.
Definition: ShellSurfaceWlShell.cpp:51