KWin
Loading...
Searching...
No Matches
xdgactivation_v1.h
Go to the documentation of this file.
1/*
2 SPDX-FileCopyrightText: 2020 Aleix Pol Gonzalez <aleixpol@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5*/
6
7#pragma once
8
9#include "kwin_export.h"
10
11#include <QList>
12#include <QObject>
13#include <functional>
14#include <memory>
15#include <optional>
16
17struct wl_resource;
18
19namespace KWin
20{
21class Display;
22class SurfaceInterface;
23class SeatInterface;
24class ClientConnection;
25
26class XdgActivationV1InterfacePrivate;
27
28class KWIN_EXPORT XdgActivationV1Interface : public QObject
29{
30 Q_OBJECT
31 Q_DISABLE_COPY(XdgActivationV1Interface)
32public:
33 explicit XdgActivationV1Interface(Display *display, QObject *parent = nullptr);
35
36 using CreatorFunction = std::function<QString(ClientConnection *client, SurfaceInterface *surface, uint serial, SeatInterface *seat, const QString &appId)>;
37
39 void setActivationTokenCreator(const CreatorFunction &creator);
40
41Q_SIGNALS:
43 void activateRequested(SurfaceInterface *surface, const QString &token);
44
45private:
48 std::unique_ptr<XdgActivationV1InterfacePrivate> d;
49};
50
51}
Convenient Class which represents a wl_client.
Class holding the Wayland server display loop.
Definition display.h:34
Represents a Seat on the Wayland Display.
Definition seat.h:134
Resource representing a wl_surface.
Definition surface.h:80
std::function< QString(ClientConnection *client, SurfaceInterface *surface, uint serial, SeatInterface *seat, const QString &appId)> CreatorFunction
void activateRequested(SurfaceInterface *surface, const QString &token)
Notifies about the surface being activated using token.
struct _XDisplay Display