KWaylandServer

xdgactivation_v1_interface.h
1 /*
2  SPDX-FileCopyrightText: 2020 Aleix Pol Gonzalez <[email protected]>
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 <KWaylandServer/kwaylandserver_export.h>
10 
11 #include <QObject>
12 #include <QVector>
13 #include <functional>
14 #include <optional>
15 
16 struct wl_resource;
17 
18 namespace KWaylandServer
19 {
20 class Display;
21 class SurfaceInterface;
22 class SeatInterface;
23 class ClientConnection;
24 
25 class XdgActivationV1InterfacePrivate;
26 
27 class KWAYLANDSERVER_EXPORT XdgActivationV1Interface : public QObject
28 {
29  Q_OBJECT
30  Q_DISABLE_COPY(XdgActivationV1Interface)
31 public:
32  explicit XdgActivationV1Interface(Display *display, QObject *parent = nullptr);
33  ~XdgActivationV1Interface() override;
34 
35  using CreatorFunction = std::function<QString(ClientConnection *client, SurfaceInterface *surface, uint serial, SeatInterface *seat, const QString &appId)>;
36 
37  /// Provide the @p creator function that will be used to create a token given its parameters
38  void setActivationTokenCreator(const CreatorFunction &creator);
39 
40 Q_SIGNALS:
41  /// Notifies about the @p surface being activated using @p token.
42  void activateRequested(SurfaceInterface *surface, const QString &token);
43 
44 private:
45  friend class XdgActivationV1InterfacePrivate;
46  XdgActivationV1Interface(XdgActivationV1Interface *parent);
47  QScopedPointer<XdgActivationV1InterfacePrivate> d;
48 };
49 
50 }
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Oct 16 2021 23:10:15 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.