1/********************************************************************
2 KWin - the KDE window manager
3 This file is part of the KDE project.
4
5Copyright (c) 2011 Lionel Chauvin <megabigbug@yahoo.fr>
6Copyright (c) 2011,2012 Cédric Bellegarde <gnumdk@gmail.com>
7Copyright (C) 2013 Martin Gräßlin <mgraesslin@kde.org>
8
9This program is free software; you can redistribute it and/or modify
10it under the terms of the GNU General Public License as published by
11the Free Software Foundation; either version 2 of the License, or
12(at your option) any later version.
13
14This program is distributed in the hope that it will be useful,
15but WITHOUT ANY WARRANTY; without even the implied warranty of
16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17GNU General Public License for more details.
18
19You should have received a copy of the GNU General Public License
20along with this program. If not, see <http://www.gnu.org/licenses/>.
21*********************************************************************/
22#ifndef KWIN_APPLICATIONMENU_H
23#define KWIN_APPLICATIONMENU_H
24// KWin
25#include <kwinglobals.h>
26// Qt
27#include <QObject>
28// xcb
29#include <xcb/xcb.h>
30
31class QPoint;
32
33namespace KWin
34{
35
36class ApplicationMenu : public QObject
37{
38 Q_OBJECT
39
40public:
41 virtual ~ApplicationMenu();
42
43 bool hasMenu(xcb_window_t window);
44 void showApplicationMenu(const QPoint &pos, const xcb_window_t window);
45
46private Q_SLOTS:
47 void slotShowRequest(qulonglong wid);
48 void slotMenuAvailable(qulonglong wid);
49 void slotMenuHidden(qulonglong wid);
50 void slotClearMenus();
51
52private:
53 QList<xcb_window_t> m_windowsMenu;
54
55 KWIN_SINGLETON(ApplicationMenu)
56};
57
58}
59
60#endif // KWIN_APPLICATIONMENU_H
61