MythTV master
mythwaylandextras.h
Go to the documentation of this file.
1#ifndef MYTHWAYLANDEXTRAS_H
2#define MYTHWAYLANDEXTRAS_H
3
4// Qt
5#include <QRect>
6
7// Std
8#include <map>
9
10class QWidget;
11struct wl_interface;
12struct wl_display;
13struct wl_registry;
14struct wl_compositor;
15struct wl_surface;
16
17using MythWaylandRegistry = std::map<const wl_interface*,void*>;
18
20{
21 public:
22 static void AnnounceGlobal(void* Opaque, struct wl_registry* Reg, uint32_t Name,
23 const char * Interface, uint32_t Version);
24 static const struct wl_registry_listener kRegistryListener;
25};
26
28{
29 public:
30 static bool IsAvailable();
31 explicit MythWaylandDevice(QWidget* Widget);
32 bool SetOpaqueRegion(QRect Region) const;
33
34 wl_display* m_display { nullptr };
35 wl_compositor* m_compositor { nullptr };
36 wl_surface* m_surface { nullptr };
37};
38
39#endif
A simple wrapper to retrieve the major Wayland objects from the Qt Wayland native interface.
bool SetOpaqueRegion(QRect Region) const
Provide a rendering optimisation hint to the compositor.
wl_display * m_display
static bool IsAvailable()
Check whether we can connect to a Wayland server.
wl_compositor * m_compositor
wl_surface * m_surface
MythWaylandDevice(QWidget *Widget)
std::map< const wl_interface *, void * > MythWaylandRegistry
static void AnnounceGlobal(void *Opaque, struct wl_registry *Reg, uint32_t Name, const char *Interface, uint32_t Version)
MythTV implementation of the Wayland registry callback.
static const struct wl_registry_listener kRegistryListener