KWayland

slide.h
1 /*
2  SPDX-FileCopyrightText: 2015 Marco Martin <[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_SLIDE_H
7 #define KWAYLAND_CLIENT_SLIDE_H
8 
9 #include <QObject>
10 
11 #include <KWayland/Client/kwaylandclient_export.h>
12 
13 struct org_kde_kwin_slide_manager;
14 struct org_kde_kwin_slide;
15 
16 namespace KWayland
17 {
18 namespace Client
19 {
20 
21 class EventQueue;
22 class Slide;
23 class Surface;
24 
55 class KWAYLANDCLIENT_EXPORT SlideManager : public QObject
56 {
57  Q_OBJECT
58 public:
65  explicit SlideManager(QObject *parent = nullptr);
66  virtual ~SlideManager();
67 
73  void setup(org_kde_kwin_slide_manager *slidemanager);
77  bool isValid() const;
83  void release();
98  void destroy();
99 
103  void setEventQueue(EventQueue *queue);
107  EventQueue *eventQueue();
108 
109  Slide *createSlide(Surface *surface, QObject *parent = nullptr);
110 
111  void removeSlide(Surface *surface);
112 
113  operator org_kde_kwin_slide_manager*();
114  operator org_kde_kwin_slide_manager*() const;
115 
116 Q_SIGNALS:
123  void removed();
124 
125 private:
126  class Private;
128 };
129 
133 class KWAYLANDCLIENT_EXPORT Slide : public QObject
134 {
135  Q_OBJECT
136 public:
137  enum Location {
138  Left = 0,
139  Top,
141  Bottom
142  };
143 
144  virtual ~Slide();
145 
151  void setup(org_kde_kwin_slide *slide);
152 
156  bool isValid() const;
157 
163  void release();
164 
181  void destroy();
182 
183  void commit();
184 
188  void setLocation(Slide::Location location);
189 
194  void setOffset(qint32 offset);
195 
196  operator org_kde_kwin_slide*();
197  operator org_kde_kwin_slide*() const;
198 
199 private:
200  friend class SlideManager;
201  explicit Slide(QObject *parent = nullptr);
202  class Private;
204 };
205 
206 
207 }
208 }
209 
210 #endif
Left
Wrapper class for wl_event_queue interface.
Definition: event_queue.h:55
Wrapper for the wl_surface interface.
Definition: surface.h:44
Slide from the top edge of the screen.
Definition: slide.h:139
Slide from the bottom edge of the screen.
Definition: slide.h:140
Wrapper for the org_kde_kwin_slide_manager interface.
Definition: slide.h:55
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Aug 5 2020 22:48:21 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.