2aec750ebf
Every disorder causes every duration, which ensures the one that stays. reality is relative. natural is disorder. [R]obinhood[P]andey Merging scripting from ^/branches/work/kwin_scripting TO ^/trunk svn path=/trunk/KDE/kdebase/workspace/; revision=1177865
83 lines
2.5 KiB
C++
83 lines
2.5 KiB
C++
/********************************************************************
|
|
KWin - the KDE window manager
|
|
This file is part of the KDE project.
|
|
|
|
Copyright (C) 2010 Rohan Prabhu <rohan@rohanprabhu.com>
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*********************************************************************/
|
|
|
|
#ifndef __KWIN_SCRIPTING_WORKSPACEPROXY_H_
|
|
#define __KWIN_SCRIPTING_WORKSPACEPROXY_H_
|
|
|
|
#include <QObject>
|
|
#include <QScriptValue>
|
|
|
|
#include <QDebug>
|
|
|
|
#include "../workspace.h"
|
|
#include "../client.h"
|
|
|
|
#define PROXYPASS1(name, param) \
|
|
void SWrapper::WorkspaceProxy::sl_ ## name(param _param) { \
|
|
name(_param); \
|
|
}
|
|
|
|
#define PROXYPASS2(name, param1, param2) \
|
|
void SWrapper::WorkspaceProxy::sl_ ## name(param1 _param1, param2 _param2) { \
|
|
name(_param1, _param2); \
|
|
}
|
|
|
|
#define PROXYPASS3(name, param1, param2, param3) \
|
|
void SWrapper::WorkspaceProxy::sl_ ## name(param1 _param1, param2 _param2, param3 _param3) { \
|
|
name(_param1, _param2, _param3); \
|
|
}
|
|
|
|
typedef QPair<bool, bool> DualBool;
|
|
|
|
namespace SWrapper
|
|
{
|
|
/**
|
|
* KWin::WorkspaceProxy simply allows connections from multiple clients to
|
|
* multiple Workspace objects.
|
|
*/
|
|
class WorkspaceProxy : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
WorkspaceProxy();
|
|
static WorkspaceProxy* _instance;
|
|
static WorkspaceProxy* instance();
|
|
|
|
public slots:
|
|
void sl_clientManaging(KWin::Client*);
|
|
void sl_clientMinimized(KWin::Client*);
|
|
void sl_clientUnminimized(KWin::Client*);
|
|
void sl_clientMaximizeSet(KWin::Client*, QPair<bool, bool>);
|
|
void sl_killWindowCalled(KWin::Client*);
|
|
void sl_clientFullScreenSet(KWin::Client*, bool, bool);
|
|
|
|
signals:
|
|
void clientManaging(KWin::Client*);
|
|
void clientMinimized(KWin::Client*);
|
|
void clientUnminimized(KWin::Client*);
|
|
void clientMaximizeSet(KWin::Client*, QPair<bool, bool>);
|
|
void killWindowCalled(KWin::Client*);
|
|
void clientFullScreenSet(KWin::Client*, bool, bool);
|
|
};
|
|
|
|
};
|
|
|
|
#endif
|