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_S_CLIENTGROUP_H
22
#define KWIN_SCRIPTING_S_CLIENTGROUP_H
25
#include <QScriptEngine>
26
#include "./../client.h"
27
#include "./../clientgroup.h"
32
class ClientGroup : public QObject
37
KWin::ClientGroup* centralObject;
41
ClientGroup(KWin::ClientGroup*);
42
ClientGroup(KWin::Client*);
44
KWin::ClientGroup* getCentralObject();
47
* A lot of functions for the KWin::ClientGroup* object.
48
* Mostly self-explanatory, works exactly like their C++
51
static QScriptValue add(QScriptContext*, QScriptEngine*);
52
static QScriptValue remove(QScriptContext*, QScriptEngine*);
53
static QScriptValue clients(QScriptContext*, QScriptEngine*);
54
static QScriptValue setVisible(QScriptContext*, QScriptEngine*);
55
static QScriptValue contains(QScriptContext*, QScriptEngine*);
56
static QScriptValue indexOf(QScriptContext*, QScriptEngine*);
58
/** This is one weird function. It can be called like:
59
* move(client, client) OR move(client, index) OR move(index, client)
61
* NOTE: other than move(client, client), all other calls are mapped to
62
* move(index, index) using indexof(client)
64
static QScriptValue move(QScriptContext*, QScriptEngine*);
65
static QScriptValue removeAll(QScriptContext*, QScriptEngine*);
66
static QScriptValue closeAll(QScriptContext*, QScriptEngine*);
67
static QScriptValue minSize(QScriptContext*, QScriptEngine*);
68
static QScriptValue maxSize(QScriptContext*, QScriptEngine*);
69
static QScriptValue visible(QScriptContext*, QScriptEngine*);
71
static QScriptValue construct(QScriptContext*, QScriptEngine*);
72
static QScriptValue generate(QScriptEngine*, SWrapper::ClientGroup*);
73
static QScriptValue publishClientGroupClass(QScriptEngine*);