File indexing completed on 2024-05-12 05:32:28
0001 /* 0002 SPDX-FileCopyrightText: 2015 Marco Martin <notmart@gmail.com> 0003 0004 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 #pragma once 0007 0008 #include "kwin_export.h" 0009 0010 #include <QObject> 0011 #include <memory> 0012 0013 struct wl_resource; 0014 0015 namespace KWin 0016 { 0017 class Display; 0018 class SlideManagerInterfacePrivate; 0019 class SlideInterfacePrivate; 0020 0021 class KWIN_EXPORT SlideManagerInterface : public QObject 0022 { 0023 Q_OBJECT 0024 0025 public: 0026 explicit SlideManagerInterface(Display *display, QObject *parent = nullptr); 0027 ~SlideManagerInterface() override; 0028 0029 void remove(); 0030 0031 private: 0032 std::unique_ptr<SlideManagerInterfacePrivate> d; 0033 }; 0034 0035 class KWIN_EXPORT SlideInterface : public QObject 0036 { 0037 Q_OBJECT 0038 public: 0039 enum Location { 0040 Left = 0, /**< Slide from the left edge of the screen */ 0041 Top = 1, /**< Slide from the top edge of the screen */ 0042 Right = 2, /**< Slide from the bottom edge of the screen */ 0043 Bottom = 3, /**< Slide from the bottom edge of the screen */ 0044 }; 0045 0046 ~SlideInterface() override; 0047 0048 /** 0049 * @returns the location the window will be slided from 0050 */ 0051 Location location() const; 0052 0053 /** 0054 * @returns the offset from the screen edge the window will 0055 * be slided from 0056 */ 0057 qint32 offset() const; 0058 0059 private: 0060 explicit SlideInterface(wl_resource *resource); 0061 friend class SlideManagerInterfacePrivate; 0062 0063 std::unique_ptr<SlideInterfacePrivate> d; 0064 }; 0065 }