2014-09-02 07:34:31 +00:00
|
|
|
/********************************************************************
|
2014-09-17 13:57:56 +00:00
|
|
|
Copyright 2014 Martin Gräßlin <mgraesslin@kde.org>
|
2014-09-02 07:34:31 +00:00
|
|
|
|
2014-09-17 13:57:56 +00:00
|
|
|
This library is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU Lesser General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2.1 of the License, or (at your option) version 3, or any
|
|
|
|
later version accepted by the membership of KDE e.V. (or its
|
|
|
|
successor approved by the membership of KDE e.V.), which shall
|
|
|
|
act as a proxy defined in Section 6 of version 3 of the license.
|
2014-09-02 07:34:31 +00:00
|
|
|
|
2014-09-17 13:57:56 +00:00
|
|
|
This library is distributed in the hope that it will be useful,
|
2014-09-02 07:34:31 +00:00
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2014-09-17 13:57:56 +00:00
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
Lesser General Public License for more details.
|
2014-09-02 07:34:31 +00:00
|
|
|
|
2014-09-17 13:57:56 +00:00
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
|
|
License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
2014-09-02 07:34:31 +00:00
|
|
|
*********************************************************************/
|
2014-09-17 14:20:56 +00:00
|
|
|
#ifndef WAYLAND_SERVER_SEAT_INTERFACE_H
|
|
|
|
#define WAYLAND_SERVER_SEAT_INTERFACE_H
|
2014-09-02 07:34:31 +00:00
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <QPoint>
|
|
|
|
|
2014-10-14 11:43:24 +00:00
|
|
|
#include <KWayland/Server/kwaylandserver_export.h>
|
2014-11-13 14:07:31 +00:00
|
|
|
#include "global.h"
|
2014-09-17 13:10:43 +00:00
|
|
|
|
2014-09-18 15:14:50 +00:00
|
|
|
struct wl_client;
|
|
|
|
struct wl_resource;
|
|
|
|
|
2014-09-17 14:10:38 +00:00
|
|
|
namespace KWayland
|
2014-09-02 07:34:31 +00:00
|
|
|
{
|
2014-09-17 14:10:38 +00:00
|
|
|
namespace Server
|
2014-09-02 07:34:31 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
class Display;
|
|
|
|
class KeyboardInterface;
|
|
|
|
class PointerInterface;
|
|
|
|
class SurfaceInterface;
|
|
|
|
|
2014-11-13 14:07:31 +00:00
|
|
|
class KWAYLANDSERVER_EXPORT SeatInterface : public Global
|
2014-09-02 07:34:31 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
|
|
|
|
Q_PROPERTY(bool pointer READ hasPointer WRITE setHasPointer NOTIFY hasPointerChanged)
|
|
|
|
Q_PROPERTY(bool keyboard READ hasKeyboard WRITE setHasKeyboard NOTIFY hasKeyboardChanged)
|
|
|
|
Q_PROPERTY(bool tourch READ hasTouch WRITE setHasTouch NOTIFY hasTouchChanged)
|
|
|
|
public:
|
|
|
|
virtual ~SeatInterface();
|
|
|
|
|
2014-09-18 14:35:28 +00:00
|
|
|
QString name() const;
|
|
|
|
bool hasPointer() const;
|
|
|
|
bool hasKeyboard() const;
|
|
|
|
bool hasTouch() const;
|
|
|
|
PointerInterface *pointer();
|
|
|
|
KeyboardInterface *keyboard();
|
2014-09-02 07:34:31 +00:00
|
|
|
|
|
|
|
void setName(const QString &name);
|
|
|
|
void setHasPointer(bool has);
|
|
|
|
void setHasKeyboard(bool has);
|
|
|
|
void setHasTouch(bool has);
|
|
|
|
|
2014-11-05 14:29:18 +00:00
|
|
|
static SeatInterface *get(wl_resource *native);
|
|
|
|
|
2014-09-02 07:34:31 +00:00
|
|
|
Q_SIGNALS:
|
|
|
|
void nameChanged(const QString&);
|
|
|
|
void hasPointerChanged(bool);
|
|
|
|
void hasKeyboardChanged(bool);
|
|
|
|
void hasTouchChanged(bool);
|
|
|
|
|
|
|
|
private:
|
|
|
|
friend class Display;
|
|
|
|
explicit SeatInterface(Display *display, QObject *parent);
|
|
|
|
|
2014-09-18 14:35:28 +00:00
|
|
|
class Private;
|
2014-11-13 14:07:31 +00:00
|
|
|
Private *d_func() const;
|
2014-09-02 07:34:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|