Added the following methods:
client.keepAbove client.keepBelow client.setKeepAbove client.setKeepBelow For more information on the abovementioned methods, please refer to scripting/apidocs.xml. These were added in a response to a feature suggestion from Eike Hein. Thanks a lot Eike :) svn path=/trunk/KDE/kdebase/workspace/; revision=1180319
This commit is contained in:
parent
6e50c0863d
commit
28527176d6
4 changed files with 132 additions and 22 deletions
|
@ -252,57 +252,82 @@
|
|||
|
||||
<method name="isShade">
|
||||
<return type="boolean"></return>
|
||||
<desc>Returns (true) of the client is shaded, (false) otherwise.</desc>
|
||||
<desc>Returns (true) if the client is shaded, (false) otherwise.</desc>
|
||||
</method>
|
||||
|
||||
<method name="isShadeable">
|
||||
<return type="boolean"></return>
|
||||
<desc>Returns (true) of the client is shadeable (can be shaded), (false) otherwise.</desc>
|
||||
<desc>Returns (true) if the client is shadeable (can be shaded), (false) otherwise.</desc>
|
||||
</method>
|
||||
|
||||
<method name="isMinimized">
|
||||
<return type="boolean"></return>
|
||||
<desc>Returns (true) of the client is minimized, (false) otherwise.</desc>
|
||||
<desc>Returns (true) if the client is minimized, (false) otherwise.</desc>
|
||||
</method>
|
||||
|
||||
<method name="isMinimizable">
|
||||
<return type="boolean"></return>
|
||||
<desc>Returns (true) of the client can be minimized, (false) otherwise.</desc>
|
||||
<desc>Returns (true) if the client can be minimized, (false) otherwise.</desc>
|
||||
</method>
|
||||
|
||||
<method name="isMaximizable">
|
||||
<return type="boolean"></return>
|
||||
<desc>Returns (true) of the client can be mazimized, (false) otherwise.</desc>
|
||||
<desc>Returns (true) if the client can be mazimized, (false) otherwise.</desc>
|
||||
</method>
|
||||
|
||||
<method name="isResizable">
|
||||
<return type="boolean"></return>
|
||||
<desc>Returns (true) of the client can be resized (changable size), (false) otherwise.</desc>
|
||||
<desc>Returns (true) if the client can be resized (changable size), (false) otherwise.</desc>
|
||||
</method>
|
||||
|
||||
<method name="isMovable">
|
||||
<return type="boolean"></return>
|
||||
<desc>Returns (true) of the client can be moved (non-fixed location), (false) otherwise.</desc>
|
||||
<desc>Returns (true) if the client can be moved (non-fixed location), (false) otherwise.</desc>
|
||||
</method>
|
||||
|
||||
<method name="isMovableAcrossScreens">
|
||||
<return type="boolean"></return>
|
||||
<desc>Returns (true) of the client can be moved across screens (only valid in a multiple monitor setup), (false) otherwise.</desc>
|
||||
<desc>Returns (true) if the client can be moved across screens (only valid in a multiple monitor setup), (false) otherwise.</desc>
|
||||
</method>
|
||||
|
||||
<method name="isCloseable">
|
||||
<return type="boolean"></return>
|
||||
<desc>Returns (true) of the client can be closed by user action (or any other action other than the system or the application itself), (false) otherwise.</desc>
|
||||
<desc>Returns (true) if the client can be closed by user action (or any other action other than the system or the application itself), (false) otherwise.</desc>
|
||||
</method>
|
||||
|
||||
<method name="isFullScreen">
|
||||
<return type="boolean"></return>
|
||||
<desc>Returns (true) of the client is in fullscreen mode, (false) otherwise.</desc>
|
||||
<desc>Returns (true) if the client is in fullscreen mode, (false) otherwise.</desc>
|
||||
</method>
|
||||
|
||||
<method name="isFullScreenable">
|
||||
<return type="boolean"></return>
|
||||
<desc>Returns (true) of the client can be set to fullscreen mode, (false) otherwise.</desc>
|
||||
<desc>Returns (true) if the client can be set to fullscreen mode, (false) otherwise.</desc>
|
||||
</method>
|
||||
|
||||
<method name="isNormal">
|
||||
<return type="boolean"></return>
|
||||
<desc>Returns (true) if the window is 'normal', (false) otherwise. A normal window is a window which has a border, can be moved by the user, can be closed, etc.</desc>
|
||||
</method>
|
||||
|
||||
<method name="keepAbove">
|
||||
<return type="boolean"></return>
|
||||
<desc>Returns (true) if 'Keep Above Others' has been set on the client, (false) otherwise.</desc>
|
||||
</method>
|
||||
|
||||
<method name="keepBelow">
|
||||
<return type="boolean"></return>
|
||||
<desc>Returns (true) if 'Keep Below Others' has been set on the client, (false) otherwise.</desc>
|
||||
</method>
|
||||
|
||||
<method name="setKeepAbove">
|
||||
<param name="keepabove">The 'Keep Above others' parameter to be applied to the client</param>
|
||||
<desc>Sets the 'Keep Above others' parameter value or unsets it according to keepabove.</desc>
|
||||
</method>
|
||||
|
||||
<method name="setKeepBelow">
|
||||
<param name="keepbelow">The 'Keep Below others' parameter to be applied to the client</param>
|
||||
<desc>Sets the 'Keep Below others' parameter value or unsets it according to keepbelow.</desc>
|
||||
</method>
|
||||
|
||||
<method name="clientGroup">
|
||||
|
|
|
@ -160,6 +160,8 @@ SWrapper::ClientResolution SWrapper::Client::newWrapper(KWin::Client* client, QS
|
|||
BOOLATTACHCLIENT(isMovable)
|
||||
BOOLATTACHCLIENT(isMovableAcrossScreens)
|
||||
BOOLATTACHCLIENT(isCloseable)
|
||||
BOOLATTACHCLIENT(keepAbove)
|
||||
BOOLATTACHCLIENT(keepBelow)
|
||||
|
||||
func = eng->newFunction(unminimize, 0);
|
||||
value.setProperty("unminimize", func, QScriptValue::Undeletable);
|
||||
|
@ -223,6 +225,40 @@ BOOLEXPORTCLIENT(isResizable)
|
|||
BOOLEXPORTCLIENT(isMovable)
|
||||
BOOLEXPORTCLIENT(isMovableAcrossScreens)
|
||||
BOOLEXPORTCLIENT(isCloseable)
|
||||
BOOLEXPORTCLIENT(keepAbove)
|
||||
BOOLEXPORTCLIENT(keepBelow)
|
||||
|
||||
QScriptValue SWrapper::Client::setKeepAbove(QScriptContext* ctx, QScriptEngine* eng)
|
||||
{
|
||||
KWin::Client* central = eng->fromScriptValue<KWin::Client*>(ctx->thisObject());
|
||||
QScriptValue setValue = ctx->argument(0);
|
||||
|
||||
if((central == 0) || (setValue.isUndefined()))
|
||||
{
|
||||
return eng->toScriptValue<bool>(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
central->setKeepAbove(eng->fromScriptValue<bool>(setValue));
|
||||
return eng->toScriptValue<bool>(1);
|
||||
}
|
||||
}
|
||||
|
||||
QScriptValue SWrapper::Client::setKeepBelow(QScriptContext* ctx, QScriptEngine* eng)
|
||||
{
|
||||
KWin::Client* central = eng->fromScriptValue<KWin::Client*>(ctx->thisObject());
|
||||
QScriptValue setValue = ctx->argument(0);
|
||||
|
||||
if((central == 0) || (setValue.isUndefined()))
|
||||
{
|
||||
return eng->toScriptValue<bool>(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
central->setKeepBelow(eng->fromScriptValue<bool>(setValue));
|
||||
return eng->toScriptValue<bool>(1);
|
||||
}
|
||||
}
|
||||
|
||||
QScriptValue SWrapper::Client::isNormal(QScriptContext* ctx, QScriptEngine* eng)
|
||||
{
|
||||
|
|
|
@ -164,6 +164,10 @@ class Client : public Toplevel
|
|||
static QScriptValue setMaximize(QScriptContext*, QScriptEngine*);
|
||||
static QScriptValue maximize(QScriptContext*, QScriptEngine*);
|
||||
static QScriptValue desktop(QScriptContext*, QScriptEngine*);
|
||||
static QScriptValue keepAbove(QScriptContext*, QScriptEngine*);
|
||||
static QScriptValue keepBelow(QScriptContext*, QScriptEngine*);
|
||||
static QScriptValue setKeepAbove(QScriptContext*, QScriptEngine*);
|
||||
static QScriptValue setKeepBelow(QScriptContext*, QScriptEngine*);
|
||||
|
||||
static QScriptValue isShade(QScriptContext*, QScriptEngine*);
|
||||
static QScriptValue isShadeable(QScriptContext*, QScriptEngine*);
|
||||
|
|
|
@ -391,77 +391,122 @@
|
|||
<ul>
|
||||
<li>client.isShade()</li>
|
||||
</ul>
|
||||
<p class="desc">Returns (true) of the client is shaded, (false) otherwise.</p>
|
||||
<p class="desc">Returns (true) if the client is shaded, (false) otherwise.</p>
|
||||
</div>
|
||||
<div class="method">
|
||||
<h4>client.isShadeable[ret: boolean] </h4>
|
||||
<ul>
|
||||
<li>client.isShadeable()</li>
|
||||
</ul>
|
||||
<p class="desc">Returns (true) of the client is shadeable (can be shaded), (false) otherwise.</p>
|
||||
<p class="desc">Returns (true) if the client is shadeable (can be shaded), (false) otherwise.</p>
|
||||
</div>
|
||||
<div class="method">
|
||||
<h4>client.isMinimized[ret: boolean] </h4>
|
||||
<ul>
|
||||
<li>client.isMinimized()</li>
|
||||
</ul>
|
||||
<p class="desc">Returns (true) of the client is minimized, (false) otherwise.</p>
|
||||
<p class="desc">Returns (true) if the client is minimized, (false) otherwise.</p>
|
||||
</div>
|
||||
<div class="method">
|
||||
<h4>client.isMinimizable[ret: boolean] </h4>
|
||||
<ul>
|
||||
<li>client.isMinimizable()</li>
|
||||
</ul>
|
||||
<p class="desc">Returns (true) of the client can be minimized, (false) otherwise.</p>
|
||||
<p class="desc">Returns (true) if the client can be minimized, (false) otherwise.</p>
|
||||
</div>
|
||||
<div class="method">
|
||||
<h4>client.isMaximizable[ret: boolean] </h4>
|
||||
<ul>
|
||||
<li>client.isMaximizable()</li>
|
||||
</ul>
|
||||
<p class="desc">Returns (true) of the client can be mazimized, (false) otherwise.</p>
|
||||
<p class="desc">Returns (true) if the client can be mazimized, (false) otherwise.</p>
|
||||
</div>
|
||||
<div class="method">
|
||||
<h4>client.isResizable[ret: boolean] </h4>
|
||||
<ul>
|
||||
<li>client.isResizable()</li>
|
||||
</ul>
|
||||
<p class="desc">Returns (true) of the client can be resized (changable size), (false) otherwise.</p>
|
||||
<p class="desc">Returns (true) if the client can be resized (changable size), (false) otherwise.</p>
|
||||
</div>
|
||||
<div class="method">
|
||||
<h4>client.isMovable[ret: boolean] </h4>
|
||||
<ul>
|
||||
<li>client.isMovable()</li>
|
||||
</ul>
|
||||
<p class="desc">Returns (true) of the client can be moved (non-fixed location), (false) otherwise.</p>
|
||||
<p class="desc">Returns (true) if the client can be moved (non-fixed location), (false) otherwise.</p>
|
||||
</div>
|
||||
<div class="method">
|
||||
<h4>client.isMovableAcrossScreens[ret: boolean] </h4>
|
||||
<ul>
|
||||
<li>client.isMovableAcrossScreens()</li>
|
||||
</ul>
|
||||
<p class="desc">Returns (true) of the client can be moved across screens (only valid in a multiple monitor setup), (false) otherwise.</p>
|
||||
<p class="desc">Returns (true) if the client can be moved across screens (only valid in a multiple monitor setup), (false) otherwise.</p>
|
||||
</div>
|
||||
<div class="method">
|
||||
<h4>client.isCloseable[ret: boolean] </h4>
|
||||
<ul>
|
||||
<li>client.isCloseable()</li>
|
||||
</ul>
|
||||
<p class="desc">Returns (true) of the client can be closed by user action (or any other action other than the system or the application itself), (false) otherwise.</p>
|
||||
<p class="desc">Returns (true) if the client can be closed by user action (or any other action other than the system or the application itself), (false) otherwise.</p>
|
||||
</div>
|
||||
<div class="method">
|
||||
<h4>client.isFullScreen[ret: boolean] </h4>
|
||||
<ul>
|
||||
<li>client.isFullScreen()</li>
|
||||
</ul>
|
||||
<p class="desc">Returns (true) of the client is in fullscreen mode, (false) otherwise.</p>
|
||||
<p class="desc">Returns (true) if the client is in fullscreen mode, (false) otherwise.</p>
|
||||
</div>
|
||||
<div class="method">
|
||||
<h4>client.isFullScreenable[ret: boolean] </h4>
|
||||
<ul>
|
||||
<li>client.isFullScreenable()</li>
|
||||
</ul>
|
||||
<p class="desc">Returns (true) of the client can be set to fullscreen mode, (false) otherwise.</p>
|
||||
<p class="desc">Returns (true) if the client can be set to fullscreen mode, (false) otherwise.</p>
|
||||
</div>
|
||||
<div class="method">
|
||||
<h4>client.isNormal[ret: boolean] </h4>
|
||||
<ul>
|
||||
<li>client.isNormal()</li>
|
||||
</ul>
|
||||
<p class="desc">Returns (true) if the window is 'normal', (false) otherwise. A normal window is a window which has a border, can be moved by the user, can be closed, etc.</p>
|
||||
</div>
|
||||
<div class="method">
|
||||
<h4>client.keepAbove[ret: boolean] </h4>
|
||||
<ul>
|
||||
<li>client.keepAbove()</li>
|
||||
</ul>
|
||||
<p class="desc">Returns (true) if 'Keep Above Others' has been set on the client, (false) otherwise.</p>
|
||||
</div>
|
||||
<div class="method">
|
||||
<h4>client.keepBelow[ret: boolean] </h4>
|
||||
<ul>
|
||||
<li>client.keepBelow()</li>
|
||||
</ul>
|
||||
<p class="desc">Returns (true) if 'Keep Below Others' has been set on the client, (false) otherwise.</p>
|
||||
</div>
|
||||
<div class="method">
|
||||
<h4>client.setKeepAbove</h4>
|
||||
<ul>
|
||||
<li>client.setKeepAbove(keepabove {})</li>
|
||||
</ul>
|
||||
<p class="desc">Sets the 'Keep Above others' parameter value or unsets it according to keepabove.</p>
|
||||
<p class="footdocs">setKeepAbove(keepabove {})<br />
|
||||
<ul>
|
||||
<li><strong>keepabove {}</strong>: The 'Keep Above others' parameter to be applied to the client</li>
|
||||
</ul>
|
||||
</p>
|
||||
</div>
|
||||
<div class="method">
|
||||
<h4>client.setKeepBelow</h4>
|
||||
<ul>
|
||||
<li>client.setKeepBelow(keepbelow {})</li>
|
||||
</ul>
|
||||
<p class="desc">Sets the 'Keep Below others' parameter value or unsets it according to keepbelow.</p>
|
||||
<p class="footdocs">setKeepBelow(keepbelow {})<br />
|
||||
<ul>
|
||||
<li><strong>keepbelow {}</strong>: The 'Keep Below others' parameter to be applied to the client</li>
|
||||
</ul>
|
||||
</p>
|
||||
</div>
|
||||
<div class="method">
|
||||
<h4>client.clientGroup[ret: clientgroup] </h4>
|
||||
|
|
Loading…
Reference in a new issue