1
/********************************************************************
2
KWin - the KDE window manager
3
This file is part of the KDE project.
5
Copyright (C) 2010 Rohan Prabhu <rohan@rohanprabhu.com>
7
This program is free software; you can redistribute it and/or modify
8
it under the terms of the GNU General Public License as published by
9
the Free Software Foundation; either version 2 of the License, or
10
(at your option) any later version.
12
This program is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
GNU General Public License for more details.
17
You should have received a copy of the GNU General Public License
18
along with this program. If not, see <http://www.gnu.org/licenses/>.
19
*********************************************************************/
21
#ifndef KWIN_SCRIPTING_WORKSPACEPROXY_H
22
#define KWIN_SCRIPTING_WORKSPACEPROXY_H
25
#include <QScriptValue>
29
#include "../workspace.h"
30
#include "../client.h"
32
#define PROXYPASS1(name, param) \
33
void SWrapper::WorkspaceProxy::sl_ ## name(param _param) { \
37
#define PROXYPASS2(name, param1, param2) \
38
void SWrapper::WorkspaceProxy::sl_ ## name(param1 _param1, param2 _param2) { \
39
name(_param1, _param2); \
42
#define PROXYPASS3(name, param1, param2, param3) \
43
void SWrapper::WorkspaceProxy::sl_ ## name(param1 _param1, param2 _param2, param3 _param3) { \
44
name(_param1, _param2, _param3); \
47
typedef QPair<bool, bool> DualBool;
52
* KWin::WorkspaceProxy simply allows connections from multiple clients to
53
* multiple Workspace objects.
55
class WorkspaceProxy : public QObject
61
static WorkspaceProxy* _instance;
62
static WorkspaceProxy* instance();
65
void sl_clientManaging(KWin::Client*);
66
void sl_clientMinimized(KWin::Client*);
67
void sl_clientUnminimized(KWin::Client*);
68
void sl_clientMaximizeSet(KWin::Client*, QPair<bool, bool>);
69
void sl_killWindowCalled(KWin::Client*);
70
void sl_clientFullScreenSet(KWin::Client*, bool, bool);
71
void sl_clientSetKeepAbove(KWin::Client*, bool);
74
void clientManaging(KWin::Client*);
75
void clientMinimized(KWin::Client*);
76
void clientUnminimized(KWin::Client*);
77
void clientMaximizeSet(KWin::Client*, QPair<bool, bool>);
78
void killWindowCalled(KWin::Client*);
79
void clientFullScreenSet(KWin::Client*, bool, bool);
80
void clientSetKeepAbove(KWin::Client*, bool);