KWayland

appmenu.h
1 /*
2  SPDX-FileCopyrightText: 2017 David Edmundson <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5 */
6 #ifndef KWAYLAND_CLIENT_APPMENU_H
7 #define KWAYLAND_CLIENT_APPMENU_H
8 
9 #include <QObject>
10 
11 #include <KWayland/Client/kwaylandclient_export.h>
12 
13 struct org_kde_kwin_appmenu_manager;
14 struct org_kde_kwin_appmenu;
15 
16 namespace KWayland
17 {
18 namespace Client
19 {
20 
21 class EventQueue;
22 class Surface;
23 class AppMenu;
24 
49 class KWAYLANDCLIENT_EXPORT AppMenuManager : public QObject
50 {
51  Q_OBJECT
52 public:
59  explicit AppMenuManager(QObject *parent = nullptr);
60  virtual ~AppMenuManager();
61 
67  void setup(org_kde_kwin_appmenu_manager *appmenumanager);
71  bool isValid() const;
77  void release();
94  void destroy();
95 
99  void setEventQueue(EventQueue *queue);
103  EventQueue *eventQueue();
104 
105  AppMenu *create(Surface *surface, QObject *parent = nullptr);
106 
107  operator org_kde_kwin_appmenu_manager*();
108  operator org_kde_kwin_appmenu_manager*() const;
109 
110 Q_SIGNALS:
117  void removed();
118 
119 private:
120  class Private;
122 };
123 
128 class KWAYLANDCLIENT_EXPORT AppMenu : public QObject
129 {
130  Q_OBJECT
131 public:
132  virtual ~AppMenu();
133 
139  void setup(org_kde_kwin_appmenu *appmenu);
143  bool isValid() const;
149  void release();
166  void destroy();
167 
172  void setAddress(const QString & serviceName, const QString & objectPath);
173 
174  operator org_kde_kwin_appmenu*();
175  operator org_kde_kwin_appmenu*() const;
176 
177 private:
178  friend class AppMenuManager;
179  explicit AppMenu(QObject *parent = nullptr);
180  class Private;
182 };
183 
184 
185 }
186 }
187 
188 #endif
Wrapper class for wl_event_queue interface.
Definition: event_queue.h:55
Wrapper for the wl_surface interface.
Definition: surface.h:44
Wrapper for the org_kde_kwin_appmenu_manager interface.
Definition: appmenu.h:49
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Aug 13 2020 22:50:19 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.