12#include <qwayland-server-keyboard-shortcuts-inhibit-unstable-v1.h>
16static const int s_version = 1;
27 wl_resource *resource);
30 QPointer<KeyboardShortcutsInhibitManagerV1Interface>
m_manager;
48 struct ::wl_resource *surface_resource,
49 struct ::wl_resource *seat_resource)
override;
67 wl_resource *resource)
68 : zwp_keyboard_shortcuts_inhibitor_v1(resource)
79 wl_resource_destroy(resource->handle);
91KeyboardShortcutsInhibitorV1Interface::KeyboardShortcutsInhibitorV1Interface(
SurfaceInterface *surface,
94 wl_resource *resource)
104 if (d->m_active == active) {
107 d->m_active = active;
132 : zwp_keyboard_shortcuts_inhibit_manager_v1(*display, s_version)
140 wl_resource *surface_resource,
141 wl_resource *seat_resource)
146 wl_resource_post_error(resource->handle, error::error_already_inhibited,
"the shortcuts are already inhibited for this surface and seat");
150 wl_resource *inhibitorResource = wl_resource_create(resource->client(), &zwp_keyboard_shortcuts_inhibitor_v1_interface, resource->version(),
id);
154 inhibitor->setActive(
true);
164 wl_resource_destroy(resource->handle);
182 return d->findInhibitor(surface, seat);
187 d->removeInhibitor(surface, seat);
192#include "moc_keyboard_shortcuts_inhibit_v1.cpp"
Class holding the Wayland server display loop.
KeyboardShortcutsInhibitorV1Interface * findInhibitor(SurfaceInterface *surface, SeatInterface *seat) const
~KeyboardShortcutsInhibitManagerV1Interface() override
void inhibitorCreated(KeyboardShortcutsInhibitorV1Interface *inhibitor)
KeyboardShortcutsInhibitManagerV1Interface(Display *d, QObject *parent=nullptr)
void zwp_keyboard_shortcuts_inhibit_manager_v1_inhibit_shortcuts(Resource *resource, uint32_t id, struct ::wl_resource *surface_resource, struct ::wl_resource *seat_resource) override
KeyboardShortcutsInhibitManagerV1InterfacePrivate(Display *display, KeyboardShortcutsInhibitManagerV1Interface *q)
QHash< QPair< SurfaceInterface *, SeatInterface * >, KeyboardShortcutsInhibitorV1Interface * > m_inhibitors
void zwp_keyboard_shortcuts_inhibit_manager_v1_destroy(Resource *resource) override
KeyboardShortcutsInhibitorV1Interface * findInhibitor(SurfaceInterface *surface, SeatInterface *seat) const
KeyboardShortcutsInhibitManagerV1Interface * q
void removeInhibitor(SurfaceInterface *const surface, SeatInterface *const seat)
void setActive(bool active)
SeatInterface * seat() const
~KeyboardShortcutsInhibitorV1Interface() override
SurfaceInterface * surface() const
void zwp_keyboard_shortcuts_inhibitor_v1_destroy(Resource *resource) override
KeyboardShortcutsInhibitorV1InterfacePrivate(SurfaceInterface *surface, SeatInterface *seat, KeyboardShortcutsInhibitManagerV1Interface *manager, KeyboardShortcutsInhibitorV1Interface *q, wl_resource *resource)
SurfaceInterface *const m_surface
void zwp_keyboard_shortcuts_inhibitor_v1_destroy_resource(Resource *resource) override
KeyboardShortcutsInhibitorV1Interface * q
SeatInterface *const m_seat
QPointer< KeyboardShortcutsInhibitManagerV1Interface > m_manager
Represents a Seat on the Wayland Display.
static SeatInterface * get(wl_resource *native)
Resource representing a wl_surface.
static SurfaceInterface * get(wl_resource *native)