93e0265e4e
Once in a while, we receive complaints from other fellow KDE developers about the file organization of kwin. This change addresses some of those complaints by moving all of source code in a separate directory, src/, thus making the project structure more traditional. Things such as tests are kept in their own toplevel directories. This change may wreak havoc on merge requests that add new files to kwin, but if a patch modifies an already existing file, git should be smart enough to figure out that the file has been relocated. We may potentially split the src/ directory further to make navigating the source code easier, but hopefully this is good enough already.
47 lines
1.2 KiB
C++
47 lines
1.2 KiB
C++
/*
|
|
SPDX-FileCopyrightText: 2018 Marco Martin <mart@kde.org>
|
|
|
|
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
|
|
|
*/
|
|
|
|
#ifndef KWIN_TABLETMODEMANAGER_H
|
|
#define KWIN_TABLETMODEMANAGER_H
|
|
|
|
#include <QObject>
|
|
#include <kwinglobals.h>
|
|
|
|
namespace KWin {
|
|
|
|
class TabletModeManager : public QObject
|
|
{
|
|
Q_OBJECT
|
|
Q_CLASSINFO("D-Bus Interface", "org.kde.KWin.TabletModeManager")
|
|
//assuming such a switch is not pluggable for now
|
|
Q_PROPERTY(bool tabletModeAvailable READ isTabletModeAvailable NOTIFY tabletModeAvailableChanged)
|
|
Q_PROPERTY(bool tabletMode READ isTablet NOTIFY tabletModeChanged)
|
|
|
|
public:
|
|
~TabletModeManager() override = default;
|
|
|
|
void setTabletModeAvailable(bool detecting);
|
|
bool isTabletModeAvailable() const;
|
|
|
|
bool isTablet() const;
|
|
void setIsTablet(bool tablet);
|
|
|
|
Q_SIGNALS:
|
|
void tabletModeAvailableChanged(bool available);
|
|
void tabletModeChanged(bool tabletMode);
|
|
|
|
private:
|
|
void hasTabletModeInputChanged(bool set);
|
|
|
|
bool m_tabletModeAvailable = false;
|
|
bool m_isTabletMode = false;
|
|
bool m_detecting = false;
|
|
KWIN_SINGLETON_VARIABLE(TabletModeManager, s_manager)
|
|
};
|
|
}
|
|
|
|
#endif // KWIN_TABLETMODEMANAGER_H
|