32a82141f0
It is possible that adding this build option broke the Scripting component. This is something that should not happen. Unfortunately by just ifdefing everything scripting related with scripting enabled we have build errors. These are caused by the fact that the scripting code includes e.g. client.h through "./../client.h". At one offending place I changed that to "client.h", but there is also a client.h in the scripting directory. The includes and naming of the scripting files clearly have to be fixed!
77 lines
2.7 KiB
C++
77 lines
2.7 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_S_CLIENTGROUP_H
|
|
#define KWIN_SCRIPTING_S_CLIENTGROUP_H
|
|
|
|
#include <QDebug>
|
|
#include <QScriptEngine>
|
|
#include "client.h"
|
|
#include "clientgroup.h"
|
|
|
|
namespace SWrapper
|
|
{
|
|
|
|
class ClientGroup : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
private:
|
|
KWin::ClientGroup* centralObject;
|
|
bool invalid;
|
|
|
|
public:
|
|
ClientGroup(KWin::ClientGroup*);
|
|
ClientGroup(KWin::Client*);
|
|
|
|
KWin::ClientGroup* getCentralObject();
|
|
|
|
/**
|
|
* A lot of functions for the KWin::ClientGroup* object.
|
|
* Mostly self-explanatory, works exactly like their C++
|
|
* analogues.
|
|
*/
|
|
static QScriptValue add(QScriptContext*, QScriptEngine*);
|
|
static QScriptValue remove(QScriptContext*, QScriptEngine*);
|
|
static QScriptValue clients(QScriptContext*, QScriptEngine*);
|
|
static QScriptValue setVisible(QScriptContext*, QScriptEngine*);
|
|
static QScriptValue contains(QScriptContext*, QScriptEngine*);
|
|
static QScriptValue indexOf(QScriptContext*, QScriptEngine*);
|
|
|
|
/** This is one weird function. It can be called like:
|
|
* move(client, client) OR move(client, index) OR move(index, client)
|
|
* move(index, index)
|
|
* NOTE: other than move(client, client), all other calls are mapped to
|
|
* move(index, index) using indexof(client)
|
|
*/
|
|
static QScriptValue move(QScriptContext*, QScriptEngine*);
|
|
static QScriptValue removeAll(QScriptContext*, QScriptEngine*);
|
|
static QScriptValue closeAll(QScriptContext*, QScriptEngine*);
|
|
static QScriptValue minSize(QScriptContext*, QScriptEngine*);
|
|
static QScriptValue maxSize(QScriptContext*, QScriptEngine*);
|
|
static QScriptValue visible(QScriptContext*, QScriptEngine*);
|
|
|
|
static QScriptValue construct(QScriptContext*, QScriptEngine*);
|
|
static QScriptValue generate(QScriptEngine*, SWrapper::ClientGroup*);
|
|
static QScriptValue publishClientGroupClass(QScriptEngine*);
|
|
};
|
|
|
|
}
|
|
#endif
|