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.
64 lines
1.6 KiB
C++
64 lines
1.6 KiB
C++
/*
|
|
KWin - the KDE window manager
|
|
This file is part of the KDE project.
|
|
|
|
SPDX-FileCopyrightText: 2011 Lionel Chauvin <megabigbug@yahoo.fr>
|
|
SPDX-FileCopyrightText: 2011, 2012 Cédric Bellegarde <gnumdk@gmail.com>
|
|
SPDX-FileCopyrightText: 2013 Martin Gräßlin <mgraesslin@kde.org>
|
|
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
|
*/
|
|
#ifndef KWIN_APPMENU_H
|
|
#define KWIN_APPMENU_H
|
|
// KWin
|
|
#include <kwinglobals.h>
|
|
// Qt
|
|
#include <QObject>
|
|
// xcb
|
|
#include <xcb/xcb.h>
|
|
|
|
class QPoint;
|
|
class OrgKdeKappmenuInterface;
|
|
class QDBusObjectPath;
|
|
class QDBusServiceWatcher;
|
|
|
|
namespace KWin
|
|
{
|
|
|
|
class AbstractClient;
|
|
|
|
class ApplicationMenu : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
~ApplicationMenu() override;
|
|
|
|
void showApplicationMenu(const QPoint &pos, AbstractClient *c, int actionId);
|
|
|
|
bool applicationMenuEnabled() const;
|
|
|
|
void setViewEnabled(bool enabled);
|
|
|
|
signals:
|
|
void applicationMenuEnabledChanged(bool enabled);
|
|
|
|
private Q_SLOTS:
|
|
void slotShowRequest(const QString &serviceName, const QDBusObjectPath &menuObjectPath, int actionId);
|
|
void slotMenuShown(const QString &serviceName, const QDBusObjectPath &menuObjectPath);
|
|
void slotMenuHidden(const QString &serviceName, const QDBusObjectPath &menuObjectPath);
|
|
|
|
private:
|
|
OrgKdeKappmenuInterface *m_appmenuInterface;
|
|
QDBusServiceWatcher *m_kappMenuWatcher;
|
|
|
|
AbstractClient *findAbstractClientWithApplicationMenu(const QString &serviceName, const QDBusObjectPath &menuObjectPath);
|
|
|
|
bool m_applicationMenuEnabled = false;
|
|
|
|
KWIN_SINGLETON(ApplicationMenu)
|
|
};
|
|
|
|
}
|
|
|
|
#endif // KWIN_APPMENU_H
|