2010-09-21 14:31:40 +00:00
|
|
|
/********************************************************************
|
|
|
|
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/>.
|
|
|
|
*********************************************************************/
|
|
|
|
|
2011-01-01 09:37:08 +00:00
|
|
|
#ifndef KWIN_SCRIPTING_WORKSPACEPROXY_H
|
|
|
|
#define KWIN_SCRIPTING_WORKSPACEPROXY_H
|
2010-09-21 14:31:40 +00:00
|
|
|
|
|
|
|
#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);
|
2010-10-29 19:06:54 +00:00
|
|
|
void sl_clientSetKeepAbove(KWin::Client*, bool);
|
2010-09-21 14:31:40 +00:00
|
|
|
|
|
|
|
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);
|
2010-10-29 19:06:54 +00:00
|
|
|
void clientSetKeepAbove(KWin::Client*, bool);
|
2010-09-21 14:31:40 +00:00
|
|
|
};
|
|
|
|
|
2010-12-12 18:22:09 +00:00
|
|
|
}
|
2010-09-21 14:31:40 +00:00
|
|
|
|
|
|
|
#endif
|