2020-03-15 15:19:28 +00:00
|
|
|
/*
|
|
|
|
SPDX-FileCopyrightText: 2015 Marco Martin <notmart@gmail.com>
|
2015-09-09 11:04:11 +00:00
|
|
|
|
2020-03-15 15:19:28 +00:00
|
|
|
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
|
|
|
*/
|
2021-03-10 16:08:30 +00:00
|
|
|
#pragma once
|
2015-09-09 11:04:11 +00:00
|
|
|
|
2020-12-01 11:03:48 +00:00
|
|
|
#include <QObject>
|
2015-09-09 11:04:11 +00:00
|
|
|
|
2020-04-29 14:56:38 +00:00
|
|
|
#include <KWaylandServer/kwaylandserver_export.h>
|
2015-09-09 11:04:11 +00:00
|
|
|
|
2020-12-01 11:03:48 +00:00
|
|
|
struct wl_resource;
|
|
|
|
|
2020-04-29 14:56:38 +00:00
|
|
|
namespace KWaylandServer
|
2015-09-09 11:04:11 +00:00
|
|
|
{
|
|
|
|
class Display;
|
2020-12-01 11:03:48 +00:00
|
|
|
class SlideManagerInterfacePrivate;
|
|
|
|
class SlideInterfacePrivate;
|
2015-09-09 11:04:11 +00:00
|
|
|
|
2020-12-01 11:03:48 +00:00
|
|
|
class KWAYLANDSERVER_EXPORT SlideManagerInterface : public QObject
|
2015-09-09 11:04:11 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
2020-12-09 20:13:19 +00:00
|
|
|
|
2015-09-09 11:04:11 +00:00
|
|
|
public:
|
2020-12-09 20:13:19 +00:00
|
|
|
explicit SlideManagerInterface(Display *display, QObject *parent = nullptr);
|
2020-12-01 11:03:48 +00:00
|
|
|
~SlideManagerInterface() override;
|
2015-09-09 11:04:11 +00:00
|
|
|
|
2021-05-02 14:46:13 +00:00
|
|
|
void remove();
|
|
|
|
|
2015-09-09 11:04:11 +00:00
|
|
|
private:
|
2020-12-01 11:03:48 +00:00
|
|
|
QScopedPointer<SlideManagerInterfacePrivate> d;
|
2015-09-09 11:04:11 +00:00
|
|
|
};
|
|
|
|
|
2020-12-01 11:03:48 +00:00
|
|
|
class KWAYLANDSERVER_EXPORT SlideInterface : public QObject
|
2015-09-09 11:04:11 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
enum Location {
|
2017-05-26 01:10:43 +00:00
|
|
|
Left = 0, /**< Slide from the left edge of the screen */
|
2020-12-01 11:03:48 +00:00
|
|
|
Top = 1, /**< Slide from the top edge of the screen */
|
|
|
|
Right = 2, /**< Slide from the bottom edge of the screen */
|
2021-04-29 09:45:00 +00:00
|
|
|
Bottom = 3, /**< Slide from the bottom edge of the screen */
|
2015-09-09 11:04:11 +00:00
|
|
|
};
|
|
|
|
|
2020-12-01 11:03:48 +00:00
|
|
|
~SlideInterface() override;
|
2015-09-09 11:04:11 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @returns the location the window will be slided from
|
|
|
|
*/
|
|
|
|
Location location() const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @returns the offset from the screen edge the window will
|
|
|
|
* be slided from
|
|
|
|
*/
|
|
|
|
qint32 offset() const;
|
|
|
|
|
|
|
|
private:
|
2021-10-31 10:37:41 +00:00
|
|
|
explicit SlideInterface(wl_resource *resource);
|
2020-12-01 11:03:48 +00:00
|
|
|
friend class SlideManagerInterfacePrivate;
|
2015-09-09 11:04:11 +00:00
|
|
|
|
2020-12-01 11:03:48 +00:00
|
|
|
QScopedPointer<SlideInterfacePrivate> d;
|
2015-09-09 11:04:11 +00:00
|
|
|
};
|
|
|
|
}
|