<pclass="desc">Emitted when the user switches from a virtual desktop to another.</p>
<ul>
<li><strong>old_desk {integer}</strong>: The number of the virtual desktop the user switched from.</li>
</ul>
</div>
<divclass="event">
<h4>workspace.desktopPresenceChanged</h4>
<pclass="desc">Emitted whenever a client is moved across virtual desktops. The client's previous desktop is available through the old_desk parameter, whereas the current desktop can be fetched using moved_client.desktop</p>
<ul>
<li><strong>moved_client {client}</strong>: The client which was moved from desktop old_desk to the new one</li>
<li><strong>old_desk {integer}</strong>: The previous desktop on which the client was present</li>
</ul>
</div>
<divclass="event">
<h4>workspace.clientAdded</h4>
<pclass="desc">Emitted whenever a new client is added to the workspace. This generally occurs when a new window is opened which includes dialog boxes, windows etc. However, it is NOT emitted for unmanaged clients like the Alt+Tab switcher.</p>
<ul>
<li><strong>added_client {client}</strong>: The client which was added.</li>
</ul>
</div>
<divclass="event">
<h4>workspace.clientManaging</h4>
<pclass="desc">Emitted whenever a client is being managed by the KWin subsystem. The difference between workspace.clientManaging and workspace.clientAdded is that clientManaging is emitted BEFORE clientAdded. Also, if KWin is restarted with a list of clients C, then the clientManaging event will be emitted for every client in C, but clientAdded will not.</p>
<ul>
<li><strong>managing_client {client}</strong>: The client which is being managed.</li>
</ul>
</div>
<divclass="event">
<h4>workspace.clientMinimized</h4>
<pclass="desc">Emitted whenever a client is minimized.</p>
<ul>
<li><strong>minimized_client {client}</strong>: The client which was minimized.</li>
</ul>
</div>
<divclass="event">
<h4>workspace.clientMaximizeSet</h4>
<pclass="desc">Emitted whenever a client is maximized in a particular orientation. The orientation i.e. the rectangular direction in which the client was specified to occupy the entire available space is specified by the two parameters horizontally and vertically. If both are true, the client was maximized fully i.e. asked to occupy the entire workspace are available.</p>
<ul>
<li><strong>maximized_client {client}</strong>: The client which was maximized (in a certain orientation).</li>
<li><strong>horizontally {boolean}</strong>: (true) if the client was maximized horizontally, (false) otherwise.</li>
<li><strong>vertically {boolean}</strong>: (true) if the client was maximized vertically, (false) otherwise.</li>
</ul>
</div>
<divclass="event">
<h4>workspace.killWindowCalled</h4>
<pclass="desc">Emitted whenever the user requests a Kill Window [generally using the Ctrl+Esc combination]. The parameter killwindow_client is not completely safe and may return kill windows out of order of invocation. This is just a fancy function, avoid using. Instead, use workspace.clientAdded and filter for incoming Kill Windows.</p>
<ul>
<li><strong>killwindow_client {client}</strong>: The client handle to the kill window that was called.</li>
</ul>
</div>
<divclass="event">
<h4>workspace.clientActivated</h4>
<pclass="desc">Emitted whenever a client is given focus or 'activated'.</p>
<ul>
<li><strong>activated_client {client}</strong>: The client which was activated (or received focus).</li>
</ul>
</div>
<divclass="event">
<h4>workspace.clientFullScreenSet</h4>
<pclass="desc">Emitted whenever a client is set to full screen or unset. The fss_set parameter can be used to determine whether the client was set or unset.</p>
<ul>
<li><strong>fss_set {boolean}</strong>: (true) if the client was switched to full screen mode, (false) if it was switched from full screen mode.</li>
<li><strong>fss_client {client}</strong>: The client which was set/unset to fullscreen.</li>
</ul>
</div>
<divclass="event">
<h4>workspace.clientUnminimized</h4>
<pclass="desc">Emitted whenever a client is Unminimized (or restored).</p>
<ul>
<li><strong>unm_client {client}</strong>: The client which was unminimzed.</li>
<pclass="desc">Gets all clients on the virtual desktop desktop_no. If no desktop number is specified then it fetches all the clients. To specifically isolate clients which are on 'All desktops', set the desktop_no parameter to -1.</p>
<li><strong>desktop_no {integer}</strong>: The desktop number belonging to which the clients are to be fetched.</li>
</ul>
</p>
</div>
<divclass="method">
<h4>workspace.dimensions[ret: qsize] </h4>
<ul>
<li>workspace.dimensions()</li>
</ul>
<pclass="desc">Returns the dimensions of the workspace in pixels.</p>
</div>
<divclass="method">
<h4>workspace.desktopGridSize[ret: qsize] </h4>
<ul>
<li>workspace.desktopGridSize()</li>
</ul>
<pclass="desc">Returns the desktop size in grid units. In essence, it returns the order of a rectangular matrix, where each element is a virtual desktop and the rows and columns specify the number of virtual desktops and the way of arrangement.</p>
</div>
<divclass="method">
<h4>workspace.activeClient[ret: client] </h4>
<ul>
<li>workspace.activeClient()</li>
</ul>
<pclass="desc">Returns the client which currently has focus.</p>
<pclass="desc">Returns the current desktop number of the workspace.</p>
</div>
</div>
</div>
<divid="class_toplevel"class="classes">
<h2>toplevel<sup>[<em>floating</em>]</sup></h2>
<divid="method_toplevel"class="methods">
<h3>Methods</h3>
<divclass="method">
<h4>toplevel.x[ret: integer] </h4>
<ul>
<li>toplevel.x()</li>
</ul>
<pclass="desc">Returns the x co-ordinate of the toplevel client (or the client).</p>
</div>
<divclass="method">
<h4>toplevel.y[ret: integer] </h4>
<ul>
<li>toplevel.y()</li>
</ul>
<pclass="desc">Returns the y co-ordinate of the toplevel client (or the client).</p>
</div>
<divclass="method">
<h4>toplevel.width[ret: integer] </h4>
<ul>
<li>toplevel.width()</li>
</ul>
<pclass="desc">Returns the width of the toplevel client (or the client).</p>
</div>
<divclass="method">
<h4>toplevel.height[ret: integer] </h4>
<ul>
<li>toplevel.height()</li>
</ul>
<pclass="desc">Returns the height of the toplevel client (or the client).</p>
</div>
<divclass="method">
<h4>toplevel.size[ret: qsize] </h4>
<ul>
<li>toplevel.size()</li>
</ul>
<pclass="desc">Returns the size of the toplevel client (or the client).</p>
</div>
<divclass="method">
<h4>toplevel.pos[ret: qpoint] </h4>
<ul>
<li>toplevel.pos()</li>
</ul>
<pclass="desc">Returns the position of the toplevel client (or the client).</p>
</div>
<divclass="method">
<h4>toplevel.opacity[ret: decimal] </h4>
<ul>
<li>toplevel.opacity()</li>
</ul>
<pclass="desc">Returns the opacity (or 1 - transperency) of the toplevel client (or the client).</p>
</div>
<divclass="method">
<h4>toplevel.hasAlpha[ret: bool] </h4>
<ul>
<li>toplevel.hasAlpha()</li>
</ul>
<pclass="desc">Returns (true) if the client can be made translucent i.e. opacity can be set to values other than 0 or 1, (false) otherwise. NOTE: If compositing is OFF, then clients may still show that translucency is possible, but translucency is not possible without compositing being ON.</p>
</div>
<divclass="method">
<h4>toplevel.setOpacity</h4>
<ul>
<li>toplevel.setOpacity(opacity_v {decimal})</li>
</ul>
<pclass="desc">Sets the opacity of the client to opacity_v or sets transperency to (1 - opacity_v). NOTE: If compositing is OFF, this function has no effect for any values between 0 and 1 (exclusive).</p>
<li><strong>opacity_v {decimal}</strong>: The opacity to be set (on a scale of 0-1).</li>
</ul>
</p>
</div>
</div>
</div>
<divid="class_client"class="classes">
<h2>client<sup>[<em>floating</em>]</sup></h2>
<divid="events_client"class="events">
<h3>Events</h3>
<divclass="event">
<h4>client.clientMoved</h4>
<pclass="desc">Emitted whenever the client is moved or it's geometry changed. This includes when a client is resized.</p>
</div>
<divclass="event">
<h4>client.minimized</h4>
<pclass="desc">Emitted whenever a client is minimized. Equivalent to workspace.clientMinimized, but for a specific client. Use wherever possible instead of workspace.clientMinimzed to improve performance.</p>
</div>
<divclass="event">
<h4>client.maximizeSet</h4>
<pclass="desc">Emitted when the client is maximized in a particular orientation. The orientation i.e. the rectangular direction in which the client was specified to occupy the entire available space is specified by the two parameters horizontally and vertically. If both are true, the client was maximized fully i.e. asked to occupy the entire workspace are available. Equivalent to workspace.clientMaximizeSet, but for a specific client. Use wherever possible instead of workspace.clientMaximizeSet to improve performance.</p>
<ul>
<li><strong>horizontally {boolean}</strong>: (true) if the client was maximized horizontally, (false) otherwise.</li>
<li><strong>vertically {boolean}</strong>: (true) if the client was maximized vertically, (false) otherwise.</li>
</ul>
</div>
<divclass="event">
<h4>client.activated</h4>
<pclass="desc">Emitted whenever the client is activated (or gets focus). Equivalent to workspace.clientActivated but for a specific client. Use wherever possible instead of workspace.clientActivated to improve performance.</p>
</div>
<divclass="event">
<h4>client.unminimized</h4>
<pclass="desc">Emitted whenever the given client is unminimized. Equivalent of workspace.clientUnminimzed but for a specific client. Use wherever possible instead of workspace.clientUnminimized to improve performance.</p>
</div>
<divclass="event">
<h4>client.fullScreenSet</h4>
<pclass="desc">Emitted whenever the client's fullscreen mode is toggled. fss_set specifies whether the client was set to or from fullscreen mode.</p>
<ul>
<li><strong>fss_set {boolean}</strong>: (true) if the client was set to full screen mode, (false) if the client was set from full screen mode.</li>
</ul>
</div>
</div>
<divid="method_client"class="methods">
<h3>Methods</h3>
<divclass="method">
<h4>client.caption[ret: string] </h4>
<ul>
<li>client.caption()</li>
</ul>
<pclass="desc">Returns the caption of the caption (or the title) of the window.</p>
</div>
<divclass="method">
<h4>client.close</h4>
<ul>
<li>client.close()</li>
</ul>
<pclass="desc">Closes the given client using killClient.</p>
<li><strong>location {qpoint}</strong>: The (x, y) point to where the top left corner of the client must be moved to keeping the current height and width same.</li>
<li><strong>emitjs {boolean}</strong>: EmitJS value (defaults to true).</li>
</ul>
</p>
<pclass="footdocs">move(x {integer}, x {integer}, emitjs {boolean})<br/>
<ul>
<li><strong>x {integer}</strong>: The x co-ordinate value of the point to where the top left corner of the client must be moved to keeping the current height and width same.</li>
<li><strong>x {integer}</strong>: The y co-ordinate value of the point to where the top left corner of the client must be moved to keeping the current height and width same.</li>
<li><strong>emitjs {boolean}</strong>: EmitJS value (defaults to true).</li>
<li><strong>geometry {qrect}</strong>: The new geometry which is to be set for the client.</li>
<li><strong>emitJS {boolean}</strong>: EmitJS value (defaults to true).</li>
</ul>
</p>
<pclass="footdocs">setGeometry(x {integer}, y {integer}, w {integer}, h {integer})<br/>
<ul>
<li><strong>x {integer}</strong>: The x co-ordinate of the new geometry.</li>
<li><strong>y {integer}</strong>: The y co-ordinate of the new geometry.</li>
<li><strong>w {integer}</strong>: The width of the new geometry.</li>
<li><strong>h {integer}</strong>: The height of the new geometry.</li>
</ul>
</p>
</div>
<divclass="method">
<h4>client.getWindowInfo[ret: windowinfo] </h4>
<ul>
<li>client.getWindowInfo()</li>
</ul>
<pclass="desc">Returns a windowinfo object which can be used to get further information about the client. Wherever possible, directly use the client properties than calling for a windowinfo object. NOTE: The windowinfo object is a 'snapshot' object and hence the data provided by it is not modified when the properties of the client are changed.</p>
</div>
<divclass="method">
<h4>client.isTransient[ret: boolean] </h4>
<ul>
<li>client.isTransient()</li>
</ul>
<pclass="desc">Returns (true) is 'client' is transient, (false) otherwise.</p>
</div>
<divclass="method">
<h4>client.isTransientFor[ret: client] </h4>
<ul>
<li>client.isTransientFor()</li>
</ul>
<pclass="desc">If the given client is transient, returns it's parent client, otherwise returns an undefined scriptvalue.</p>
</div>
<divclass="method">
<h4>client.activate</h4>
<ul>
<li>client.activate()</li>
</ul>
<pclass="desc"><strong>Attempt</strong> to activate (focus) the client. By attempt, it means that focus stealing prevention still is activated and the rules for activation are in place. Hence, the client actually may nor may not be activated.</p>
<li><strong>caption_string {string}</strong>: The caption to be set for the specified.</li>
</ul>
</p>
</div>
<divclass="method">
<h4>client.unminimize</h4>
<ul>
<li>client.unminimize()</li>
</ul>
<pclass="desc">Unminimizes (or restores) the given client.</p>
</div>
<divclass="method">
<h4>client.setFullScreen</h4>
<ul>
<li>client.setFullScreen( {fss_set})</li>
</ul>
<pclass="desc">Sets the client to or from full screen mode.</p>
<pclass="footdocs">setFullScreen( {fss_set})<br/>
<ul>
<li><strong> {fss_set}</strong>: If (true), then the client is set to full screen or else, it is unset from fullscreen mode. If no parameter is provided, it toggles the full screen state.</li>
<pclass="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>
<pclass="desc">Returns (true) if the client can be set to fullscreen mode, (false) otherwise.</p>
</div>
<divclass="method">
<h4>client.isNormal[ret: boolean] </h4>
<ul>
<li>client.isNormal()</li>
</ul>
<pclass="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>
<divclass="method">
<h4>client.keepAbove[ret: boolean] </h4>
<ul>
<li>client.keepAbove()</li>
</ul>
<pclass="desc">Returns (true) if 'Keep Above Others' has been set on the client, (false) otherwise.</p>
</div>
<divclass="method">
<h4>client.keepBelow[ret: boolean] </h4>
<ul>
<li>client.keepBelow()</li>
</ul>
<pclass="desc">Returns (true) if 'Keep Below Others' has been set on the client, (false) otherwise.</p>
<pclass="desc">Creates a new clientgroup object. A clientgroup in essence refers to a group of tabbed clients and an object refers to a specific group of such tabbed clients. It returns a clientgroup object which can be then manipulated using the various accessor functions.</p>
<li><strong>seed_client {client}</strong>: The client to be added to the newly formed clientgroup. This is a mandatory argument for the creation of a new clientgroup object.</li>
<li><strong>new_client {client}</strong>: A client object to be added to the clientgroup.</li>
<li><strong>beforeClient {integer}</strong>: An index as to where the client is to be added to the clientgroup. It is an optional argument and if not specified, it will be added at the last position in the clientgroup.</li>
<li><strong>becomeVisible {boolean}</strong>: If (true), makes the added client visible.</li>
<pclass="desc">Searches for needle_client in the clientgroup and returns the position at which it exists. If needle_client is not found, then it returns -1.</p>
<pclass="desc">Move a client within the group. Accepts move(client, client), move(index, index), move(index, client), move(client, index). All calls except move(client, client) are eventually mapped to move(index, index) using indexOf(client)</p>
<pclass="desc">Returns (true) if client is minimized. Redundant with client.isMinimized. For client, the subclass property is called, not the toplevel one.</p>
<pclass="desc">If called without parameters, returns an associative array in the format ["key" : "value"] of all available key value pairs. If only a single key is requested for (passing 1 string parameter), then the corresponding value is returned and NOT an array. If multiple keys are provided as multiple arguments, an associative array is returned. If multiple keys (or a single) key is provided as an Array, then an associative array is present (if showNonAssoc is false or it is not specified), otherwise returns an integer indexed array.</p>
<li><strong>keyArray {Array(string)}</strong>: An array of keys to search the corresponding values for.</li>
<li><strong>showNonAssoc {boolean}</strong>: If (true) causes the function to return an integer-indexed array, otherwise returns an associative array in the form ["key" : "value"]. This parameter is optional, defaults to false</li>