Scripting API moved to techbase
http://techbase.kde.org/Development/Tutorials/KWin/Scripting/API So no need any more for the API doc generator nobody knew about.
This commit is contained in:
parent
929f0fb643
commit
e320435eaa
4 changed files with 0 additions and 1321 deletions
|
@ -1,516 +0,0 @@
|
|||
<root>
|
||||
<class name="workspace" type="singleton">
|
||||
<event name="currentDesktopChanged" signal="currentDesktopChanged" wslot="sl_currentDesktopChanged" wsignal="currentDesktopChaned">
|
||||
<param name="old_desk" type="integer">The number of the virtual desktop the user switched from.</param>
|
||||
<desc>Emitted when the user switches from a virtual desktop to another.</desc>
|
||||
</event>
|
||||
|
||||
<event name="clientSetKeepAbove" siganl="clientSetKeepAbove" wslot="sl_clientSetKeepAbove" wsignal="clientSetKeepAbove">
|
||||
<param name="setabove_client" type="client">The Client whose 'Keep Above' property was set or cleared.</param>
|
||||
<param name="set" type="boolean">Specifies if the property was set or cleared</param>
|
||||
<desc>Emitted whenever a client's 'Keep Above' property is changed. setabove_client holds the client object of the client whose property was modified and the parameter 'set' is '1' if the 'Keep Above' was set, or '0' otherwise.</desc>
|
||||
</event>
|
||||
|
||||
<method name="getAllClients">
|
||||
<return type="Array(client)"></return>
|
||||
<param name="desktop_no" type="integer">The desktop number belonging to which the clients are to be fetched.</param>
|
||||
<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.</desc>
|
||||
</method>
|
||||
|
||||
<event name="desktopPresenceChanged" signal="desktopPresenceChanged" wslot="sl_desktopPresenceChanged" wsignal="desktopPresenceChanged">
|
||||
<param name="moved_client" type="client">The client which was moved from desktop old_desk to the new one</param>
|
||||
<param name="old_desk" type="integer">The previous desktop on which the client was present</param>
|
||||
<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</desc>
|
||||
</event>
|
||||
|
||||
<property name="currentDesktop" type="GO">
|
||||
<return type="integer"></return>
|
||||
<desc>Returns the current desktop number of the workspace.</desc>
|
||||
</property>
|
||||
|
||||
<event name="clientAdded" signal="clientAdded" wslot="sl_clientAdded" wsignal="clientAdded">
|
||||
<param name="added_client" type="client">The client which was added.</param>
|
||||
<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.</desc>
|
||||
</event>
|
||||
|
||||
<event name="clientManaging" signal="DIRECT_FUNCTION_CALL" wslot="sl_clientManaging" wsignal="clientManaging">
|
||||
<param name="managing_client" type="client">The client which is being managed.</param>
|
||||
<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.</desc>
|
||||
</event>
|
||||
|
||||
<event name="clientMinimized" signal="DIRECT_FUNCTION_CALL" wslot="sl_clientMinimized" wsignal="clientMinimized">
|
||||
<param name="minimized_client" type="client">The client which was minimized.</param>
|
||||
<desc>Emitted whenever a client is minimized.</desc>
|
||||
</event>
|
||||
|
||||
<event name="clientMaximizeSet" signal="DIRECT_FUNCTION_CALL" wslot="sl_clientMaximizeSet" wsignal="clientMaximizeSet">
|
||||
<param name="maximized_client" type="client">The client which was maximized (in a certain orientation).</param>
|
||||
<param name="horizontally" type="boolean">(true) if the client was maximized horizontally, (false) otherwise.</param>
|
||||
<param name="vertically" type="boolean">(true) if the client was maximized vertically, (false) otherwise.</param>
|
||||
<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.</desc>
|
||||
</event>
|
||||
|
||||
<event name="killWindowCalled" signal="DIRECT_FUNCTION_CALL" wslot="sl_killWindowCalled" wsignal="killWindowCalled">
|
||||
<param name="killwindow_client" type="client">The client handle to the kill window that was called.</param>
|
||||
<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.</desc>
|
||||
</event>
|
||||
|
||||
<event name="clientActivated" signal="clientActivated" wslot="sl_clientActivated" wsignal="clientActivated">
|
||||
<param name="activated_client" type="client">The client which was activated (or received focus).</param>
|
||||
<desc>Emitted whenever a client is given focus or 'activated'.</desc>
|
||||
</event>
|
||||
|
||||
<method name="dimensions">
|
||||
<return type="qsize"></return>
|
||||
<desc>Returns the dimensions of the workspace in pixels.</desc>
|
||||
</method>
|
||||
|
||||
<method name="desktopGridSize">
|
||||
<return type="qsize"></return>
|
||||
<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.</desc>
|
||||
</method>
|
||||
|
||||
<event name="clientFullScreenSet" signal="DIRECT_FUNCTION_CALL" wslot="sl_clientFullScreenSet" wsignal="clientFullScreenSet">
|
||||
<param name="fss_set" type="boolean">(true) if the client was switched to full screen mode, (false) if it was switched from full screen mode.</param>
|
||||
<param name="fss_client" type="client">The client which was set/unset to fullscreen.</param>
|
||||
<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.</desc>
|
||||
</event>
|
||||
|
||||
<method name="activeClient">
|
||||
<return type="client"></return>
|
||||
<desc>Returns the client which currently has focus.</desc>
|
||||
</method>
|
||||
|
||||
<method name="clientGroups">
|
||||
<return type="Array(clientgroup)"></return>
|
||||
<desc>Returns an array of all the ClientGroups from the current workspace.</desc>
|
||||
</method>
|
||||
|
||||
<event name="clientUnminimized" signal="DIRECT_FUNCTION_CALL" wslot="sl_clientUnminimized" wsignal="clientUnminimized">
|
||||
<param name="unm_client" type="client">The client which was unminimzed.</param>
|
||||
<desc>Emitted whenever a client is Unminimized (or restored).</desc>
|
||||
</event>
|
||||
|
||||
<alias name="clientRestored" of="clientUnminimized"></alias>
|
||||
</class>
|
||||
|
||||
<class name="toplevel" type="floating">
|
||||
<method name="x">
|
||||
<return type="integer"></return>
|
||||
<desc>Returns the x co-ordinate of the toplevel client (or the client).</desc>
|
||||
</method>
|
||||
|
||||
<method name="y">
|
||||
<return type="integer"></return>
|
||||
<desc>Returns the y co-ordinate of the toplevel client (or the client).</desc>
|
||||
</method>
|
||||
|
||||
<method name="width">
|
||||
<return type="integer"></return>
|
||||
<desc>Returns the width of the toplevel client (or the client).</desc>
|
||||
</method>
|
||||
|
||||
<method name="height">
|
||||
<return type="integer"></return>
|
||||
<desc>Returns the height of the toplevel client (or the client).</desc>
|
||||
</method>
|
||||
|
||||
<method name="size">
|
||||
<return type="qsize"></return>
|
||||
<desc>Returns the size of the toplevel client (or the client).</desc>
|
||||
</method>
|
||||
|
||||
<method name="pos">
|
||||
<return type="qpoint"></return>
|
||||
<desc>Returns the position of the toplevel client (or the client).</desc>
|
||||
</method>
|
||||
|
||||
<method name="opacity">
|
||||
<return type="decimal"></return>
|
||||
<desc>Returns the opacity (or 1 - transperency) of the toplevel client (or the client).</desc>
|
||||
</method>
|
||||
|
||||
<method name="hasAlpha">
|
||||
<return type="bool"></return>
|
||||
<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.</desc>
|
||||
</method>
|
||||
|
||||
<method name="setOpacity">
|
||||
<param name="opacity_v" type="decimal">The opacity to be set (on a scale of 0-1).</param>
|
||||
<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).</desc>
|
||||
</method>
|
||||
</class>
|
||||
|
||||
<class name="client" type="floating" superclass="toplevel">
|
||||
<method name="caption">
|
||||
<return type="string"></return>
|
||||
<desc>Returns the caption of the caption (or the title) of the window.</desc>
|
||||
</method>
|
||||
|
||||
<event name="clientMoved" signal="clientMoved" wslot="sl_clientMoved" wsignal="clientMoved">
|
||||
<desc>Emitted whenever the client is moved or it's geometry changed. This includes when a client is resized.</desc>
|
||||
</event>
|
||||
|
||||
<event name="onSetKeepAbove" signal="s_setKeepAbove" wslot="DIRECT_CONNECTION" wsignal="onSetKeepAbove">
|
||||
<param name="set" type="boolean">Specifies whether the 'Keep Above' property was set or cleared.</param>
|
||||
<desc>Emitted whenever the client's 'Keep Above' property is set or cleared. 'set' is 1 if the client was set to 'Keep Above', 0 otherwise. Equivalent to workspace.clientSetKeepAbove, but for a specific client. Use wherever possible instead of workspace.clientSetKeepAbove to improve performance.</desc>
|
||||
</event>
|
||||
|
||||
<method name="close">
|
||||
<desc>Closes the given client using killClient.</desc>
|
||||
</method>
|
||||
|
||||
<event name="minimized" signal="s_minimized" wslot="DIRECT_CONNECTION" wsignal="minimized">
|
||||
<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.</desc>
|
||||
</event>
|
||||
|
||||
<event name="maximizeSet" signal="maximizeSet" wslot="sl_maximizeSet" wsignal="maximizeSet">
|
||||
<param name="horizontally" type="boolean">(true) if the client was maximized horizontally, (false) otherwise.</param>
|
||||
<param name="vertically" type="boolean">(true) if the client was maximized vertically, (false) otherwise.</param>
|
||||
<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.</desc>
|
||||
</event>
|
||||
|
||||
<event name="activated" signal="s_activated" wslot="DIRECT_CONNECTION" wsignal="gotFocus">
|
||||
<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.</desc>
|
||||
</event>
|
||||
|
||||
<method name="move" vparamstyle="true">
|
||||
<paramset>
|
||||
<param name="location" type="qpoint">The (x, y) point to where the top left corner of the client must be moved to keeping the current height and width same.</param>
|
||||
<param name="emitjs" type="boolean">EmitJS value (defaults to true).</param>
|
||||
</paramset>
|
||||
|
||||
<paramset>
|
||||
<param name="x" type="integer">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.</param>
|
||||
<param name="x" type="integer">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.</param>
|
||||
<param name="emitjs" type="boolean">EmitJS value (defaults to true).</param>
|
||||
</paramset>
|
||||
|
||||
<desc>Moves the client to the specified location keeping the height and width of the client same.</desc>
|
||||
</method>
|
||||
|
||||
<method name="resize" vparamstyle="true">
|
||||
<paramset>
|
||||
<param name="size" type="qsize">The size to which the client is to be resized.</param>
|
||||
<param name="emitJS" type="boolean">EmitJS value (defaults to true).</param>
|
||||
</paramset>
|
||||
|
||||
<paramset>
|
||||
<param name="w" type="integer">New width for the client.</param>
|
||||
<param name="h" type="integer">New height for the client.</param>
|
||||
<param name="emitJS" type="boolean">EmitJS value (defaults to true).</param>
|
||||
</paramset>
|
||||
|
||||
<desc>Resizes the client to the specified size without changing its position.</desc>
|
||||
</method>
|
||||
|
||||
<method name="setGeometry" vparamstyle="true">
|
||||
<paramset>
|
||||
<param name="geometry" type="qrect">The new geometry which is to be set for the client.</param>
|
||||
<param name="emitJS" type="boolean">EmitJS value (defaults to true).</param>
|
||||
</paramset>
|
||||
|
||||
<paramset>
|
||||
<param name="x" type="integer">The x co-ordinate of the new geometry.</param>
|
||||
<param name="y" type="integer">The y co-ordinate of the new geometry.</param>
|
||||
<param name="w" type="integer">The width of the new geometry.</param>
|
||||
<param name="h" type="integer">The height of the new geometry.</param>
|
||||
</paramset>
|
||||
|
||||
<desc>Sets the geometry of the client i.e. sets is size and location according to the provided parameters.</desc>
|
||||
</method>
|
||||
|
||||
<method name="getWindowInfo">
|
||||
<return type="windowinfo"></return>
|
||||
<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.</desc>
|
||||
</method>
|
||||
|
||||
<method name="isTransient">
|
||||
<return type="boolean"></return>
|
||||
<desc>Returns (true) is 'client' is transient, (false) otherwise.</desc>
|
||||
</method>
|
||||
|
||||
<method name="isTransientFor">
|
||||
<return type="client"></return>
|
||||
<desc>If the given client is transient, returns it's parent client, otherwise returns an undefined scriptvalue.</desc>
|
||||
</method>
|
||||
|
||||
<method name="activate">
|
||||
<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.</desc>
|
||||
</method>
|
||||
|
||||
<method name="setCaption">
|
||||
<param name="caption_string" type="string">The caption to be set for the specified.</param>
|
||||
<desc>Sets the caption for the specified client to caption_string.</desc>
|
||||
</method>
|
||||
|
||||
<method name="unminimize">
|
||||
<desc>Unminimizes (or restores) the given client.</desc>
|
||||
</method>
|
||||
|
||||
<alias name="restore" of="unminimize"></alias>
|
||||
|
||||
<event name="unminimized" signal="unminimized" wslot="DIRECT_CONNECTION" wsignal="unminimized">
|
||||
<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.</desc>
|
||||
</event>
|
||||
|
||||
<alias name="restored" of="unminimized"></alias>
|
||||
|
||||
<method name="setFullScreen">
|
||||
<param type="fss_set">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.</param>
|
||||
<desc>Sets the client to or from full screen mode.</desc>
|
||||
</method>
|
||||
|
||||
<method name="isShade">
|
||||
<return type="boolean"></return>
|
||||
<desc>Returns (true) if the client is shaded, (false) otherwise.</desc>
|
||||
</method>
|
||||
|
||||
<method name="isShadeable">
|
||||
<return type="boolean"></return>
|
||||
<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) if the client is minimized, (false) otherwise.</desc>
|
||||
</method>
|
||||
|
||||
<method name="isMinimizable">
|
||||
<return type="boolean"></return>
|
||||
<desc>Returns (true) if the client can be minimized, (false) otherwise.</desc>
|
||||
</method>
|
||||
|
||||
<method name="isMaximizable">
|
||||
<return type="boolean"></return>
|
||||
<desc>Returns (true) if the client can be mazimized, (false) otherwise.</desc>
|
||||
</method>
|
||||
|
||||
<method name="isResizable">
|
||||
<return type="boolean"></return>
|
||||
<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) if the client can be moved (non-fixed location), (false) otherwise.</desc>
|
||||
</method>
|
||||
|
||||
<method name="isMovableAcrossScreens">
|
||||
<return type="boolean"></return>
|
||||
<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) 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) if the client is in fullscreen mode, (false) otherwise.</desc>
|
||||
</method>
|
||||
|
||||
<method name="isFullScreenable">
|
||||
<return type="boolean"></return>
|
||||
<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" type="boolean">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" type="boolean">
|
||||
<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">
|
||||
<return type="clientgroup"></return>
|
||||
<desc>Returns the client group the client belongs to. If it belongs to no client, it returns an undefined script value.</desc>
|
||||
</method>
|
||||
|
||||
<event name="fullScreenSet" signal="s_fullScreenSet" wslot="DIRECT_CONNECTION" wsignal="fullScreenSet">
|
||||
<param name="fss_set" type="boolean">(true) if the client was set to full screen mode, (false) if the client was set from full screen mode.</param>
|
||||
<desc>Emitted whenever the client's fullscreen mode is toggled. fss_set specifies whether the client was set to or from fullscreen mode.</desc>
|
||||
</event>
|
||||
|
||||
<method name="desktop">
|
||||
<return type="integer"></return>
|
||||
<desc>Returns the desktop number that the client is on. If it is on all desktops, it returns -1.</desc>
|
||||
</method>
|
||||
</class>
|
||||
|
||||
<class name="clientgroup" type="instantiable">
|
||||
<method name="ClientGroup" constructor="true">
|
||||
<param name="seed_client" type="client">The client to be added to the newly formed clientgroup. This is a mandatory argument for the creation of a new clientgroup object.</param>
|
||||
<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.</desc>
|
||||
</method>
|
||||
|
||||
<method name="add">
|
||||
<param name="new_client" type="client">A client object to be added to the clientgroup.</param>
|
||||
<param name="beforeClient" type="integer">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.</param>
|
||||
<param name="becomeVisible" type="boolean">If (true), makes the added client visible.</param>
|
||||
|
||||
<desc>Adds new_client to the clientgroup at the index specified by beforeClient and if becomeVisible is true, makes it visible.</desc>
|
||||
</method>
|
||||
|
||||
<method name="remove" vparamstyle="true">
|
||||
<paramset>
|
||||
<param name="index" type="integer">The client index which is to be removed.</param>
|
||||
<param name="set_geom" type="qrect">The geometry to be set after removeal. This parameter is optional.</param>
|
||||
</paramset>
|
||||
|
||||
<paramset>
|
||||
<param name="rem_client" type="client">The client which is to be removed.</param>
|
||||
<param name="set_geom" type="qrect">The geometry to be set after removal.</param>
|
||||
</paramset>
|
||||
|
||||
<desc>Removes the client from the clientgroup and then sets it's geometry according to set_geom. This parameter is optional.</desc>
|
||||
</method>
|
||||
|
||||
<method name="clients">
|
||||
<return type="Array(client)"></return>
|
||||
<desc>Returns an array of all the member clients of the clientgroup.</desc>
|
||||
</method>
|
||||
|
||||
<method name="contains">
|
||||
<return type="boolean"></return>
|
||||
<param name="needle_client" type="client">The client to be searched for</param>
|
||||
<desc>Returns (true) if needle_client is a member of the clientgroup, (false) otherwise.</desc>
|
||||
</method>
|
||||
|
||||
<method name="indexOf">
|
||||
<return type="integer"></return>
|
||||
<param name="needle_client" type="client">The client whose index is to be found</param>
|
||||
<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.</desc>
|
||||
</method>
|
||||
|
||||
<method name="move" vparamstyle="true">
|
||||
<paramset>
|
||||
<param name="index_a" type="integer">The index of the client to be moved.</param>
|
||||
<param name="index_b" type="integer">The index of the position to move the client to.</param>
|
||||
</paramset>
|
||||
|
||||
<paramset>
|
||||
<param name="move_client" type="integer">The client to be moved.</param>
|
||||
<param name="index" type="integer">The index of the position to move the client to.</param>
|
||||
</paramset>
|
||||
|
||||
<paramset>
|
||||
<param name="move_client" type="integer">The client to be moved.</param>
|
||||
<param name="before_client" type="integer">The client before which the client is to moved.</param>
|
||||
</paramset>
|
||||
|
||||
<paramset>
|
||||
<param name="index_a" type="integer">The index of the client to be moved.</param>
|
||||
<param name="before_client" type="integer">The client before which the client is to moved.</param>
|
||||
</paramset>
|
||||
|
||||
<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)</desc>
|
||||
</method>
|
||||
|
||||
<method name="removeAll">
|
||||
<desc>Removes all the clients from the clientgroup i.e. completely disassembles the clientgroup into its proponents.</desc>
|
||||
</method>
|
||||
|
||||
<method name="closeAll">
|
||||
<desc>Closes all the clients presents in the clientgroup.</desc>
|
||||
</method>
|
||||
|
||||
<method name="minSize">
|
||||
<return type="qsize"></return>
|
||||
<desc>Returns the minimum size acceptable for the clientgroup computed from the minimum sizes of all its present members.</desc>
|
||||
</method>
|
||||
|
||||
<method name="maxSize">
|
||||
<return type="qsize"></return>
|
||||
<desc>Returns the maximum size acceptable for the clientgroup computed from the minimum sizes of all its present members.</desc>
|
||||
</method>
|
||||
</class>
|
||||
|
||||
<class name="windowinfo" type="floating">
|
||||
<property name="isValid" type="GO">
|
||||
<return type="boolean"></return>
|
||||
<desc>Returns (true) if the client is valid, (false) otherwise.</desc>
|
||||
</property>
|
||||
|
||||
<property name="visibleName" type="GO">
|
||||
<return type="string"></return>
|
||||
<desc>Returns the visible name of the client.</desc>
|
||||
</property>
|
||||
|
||||
<property name="isMinimized" type="GO">
|
||||
<return type="boolean"></return>
|
||||
<desc>Returns (true) if client is minimized. Redundant with client.isMinimized. For client, the subclass property is called, not the toplevel one.</desc>
|
||||
</property>
|
||||
|
||||
<property name="state" type="GO">
|
||||
<return type="integer"></return>
|
||||
<desc>Returns an integeral state for the client. Prefer other methods like isShaded, isFullScreenSet etc. over this.</desc>
|
||||
</property>
|
||||
|
||||
<property name="windowRole" type="GO">
|
||||
<return type="string"></return>
|
||||
<desc>Returns the window role of the toplevel client.</desc>
|
||||
</property>
|
||||
|
||||
<property name="windowClassClass" type="GO">
|
||||
<return type="string"></return>
|
||||
<desc>Returns the windowclass class of the client.</desc>
|
||||
</property>
|
||||
|
||||
<property name="windowClassName" type="GO">
|
||||
<return type="string"></return>
|
||||
<desc>Returns the windowclass name of the client.</desc>
|
||||
</property>
|
||||
</class>
|
||||
|
||||
<class name="config" type="singleton">
|
||||
<property name="loaded" type="GO">
|
||||
<return type="boolean"></return>
|
||||
<desc>Returns (true) if a configuration file was found and loaded, (false) otherwise.</desc>
|
||||
</property>
|
||||
|
||||
<method name="exists">
|
||||
<param name="config_key" type="string">The configuration key to be seeked.</param>
|
||||
<desc>Searches for config_key in the configuration array and returns (true) if a corresponding value exists, (false) otherwise.</desc>
|
||||
</method>
|
||||
|
||||
<method name="get" vparamstyle="true">
|
||||
<paramset>
|
||||
</paramset>
|
||||
|
||||
<paramset>
|
||||
<param name="key1, key2 ... keyN" type="string">A list of keys to search the values for.</param>
|
||||
</paramset>
|
||||
|
||||
<paramset>
|
||||
<param name="key" type="string">The key to search the value for.</param>
|
||||
</paramset>
|
||||
|
||||
<paramset>
|
||||
<param name="keyArray" type="Array(string)">An array of keys to search the corresponding values for.</param>
|
||||
<param name="showNonAssoc" type="boolean">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</param>
|
||||
</paramset>
|
||||
|
||||
<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.</desc>
|
||||
</method>
|
||||
</class>
|
||||
</root>
|
|
@ -1,111 +0,0 @@
|
|||
html, body, div, span, applet, object, iframe,
|
||||
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||
a, abbr, acronym, address, big, cite, code,
|
||||
del, dfn, em, font, img, ins, kbd, q, s, samp,
|
||||
small, strike, strong, sub, tt, var,
|
||||
b, u, i, center,
|
||||
dl, dt, dd, ol, ul, li,
|
||||
fieldset, form, label, legend,
|
||||
table, caption, tbody, tfoot, thead, tr, th, td {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
outline: 0;
|
||||
font-size: 100%;
|
||||
vertical-align: baseline;
|
||||
background: transparent;
|
||||
}
|
||||
body {
|
||||
line-height: 1;
|
||||
font-size: 9pt;
|
||||
width: 60%;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
ol, ul {
|
||||
list-style: none;
|
||||
}
|
||||
blockquote, q {
|
||||
quotes: none;
|
||||
}
|
||||
blockquote:before, blockquote:after,
|
||||
q:before, q:after {
|
||||
content: '';
|
||||
content: none;
|
||||
}
|
||||
|
||||
/* remember to define focus styles! */
|
||||
:focus {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
/* remember to highlight inserts somehow! */
|
||||
ins {
|
||||
text-decoration: none;
|
||||
}
|
||||
del {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
/* tables still need 'cellspacing="0"' in the markup */
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 15pt;
|
||||
margin-bottom: 12pt;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 12pt;
|
||||
margin-bottom: 12pt;
|
||||
border-bottom: 1px solid #000000;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 10pt;
|
||||
margin-bottom: 4pt;
|
||||
}
|
||||
|
||||
.classes {
|
||||
border: 1px dotted #000000;
|
||||
padding-left: 5pt;
|
||||
padding-right: 5pt;
|
||||
margin-bottom: 10pt;
|
||||
}
|
||||
|
||||
.events, .methods, .props {
|
||||
border: 1px dashed #000000;
|
||||
padding: 7pt;
|
||||
margin-bottom: 5pt;
|
||||
}
|
||||
|
||||
.event, .method, .prop {
|
||||
margin-bottom: 15pt;
|
||||
background: #F0F0F0;
|
||||
border: 1px dotted #C8C8C8;
|
||||
padding: 4pt;
|
||||
}
|
||||
|
||||
.event > p, .method > p, .prop > p {
|
||||
margin-left: 12pt;
|
||||
margin-bottom: 5pt;
|
||||
}
|
||||
|
||||
.desc {
|
||||
border: 1px dotted #A7A7A7;
|
||||
padding: 3pt;
|
||||
border-right: 5px solid #A7A7A7;
|
||||
}
|
||||
|
||||
.method > ul, .event > ul, .prop > ul {
|
||||
margin-bottom: 8pt;
|
||||
}
|
||||
|
||||
.event > ul, .method > ul, .prop > ul {
|
||||
margin-left: 24pt;
|
||||
}
|
|
@ -1,368 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml/" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<title>KWinScripting :: APIDoX</title>
|
||||
<link rel="stylesheet" href="apistyle.css" type="text/css" media="screen"/>
|
||||
</head>
|
||||
<body>
|
||||
<div style="width: 100%; height: 100px; border-right: 10px solid #323232; background: #8A0349; margin-bottom: 10pt;">
|
||||
<h1 style="color: #FFFFFF; padding-left: 10px; padding-top: 40px; font-size: 25px; font-family: Helvetica;">KWinScripting API DoX</h1>
|
||||
</div>
|
||||
<div id="root">
|
||||
<div xmlns="" id="class_workspace" class="classes"><h2>workspace<sup>[<em>singleton</em>]</sup></h2><div id="events_workspace" class="events"><h3>Events</h3><div class="event"><h4>workspace.currentDesktopChaned</h4><p class="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><div class="event"><h4>workspace.clientSetKeepAbove</h4><p class="desc">Emitted whenever a client's 'Keep Above' property is changed. setabove_client holds the client object of the client whose property was modified and the parameter 'set' is '1' if the 'Keep Above' was set, or '0' otherwise.</p><ul><li><strong>setabove_client {client}</strong>: The Client whose 'Keep Above' property was set or cleared.</li><li><strong>set {boolean}</strong>: Specifies if the property was set or cleared</li></ul></div><div class="event"><h4>workspace.desktopPresenceChanged</h4><p class="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><div class="event"><h4>workspace.clientAdded</h4><p class="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><div class="event"><h4>workspace.clientManaging</h4><p class="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><div class="event"><h4>workspace.clientMinimized</h4><p class="desc">Emitted whenever a client is minimized.</p><ul><li><strong>minimized_client {client}</strong>: The client which was minimized.</li></ul></div><div class="event"><h4>workspace.clientMaximizeSet</h4><p class="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><div class="event"><h4>workspace.killWindowCalled</h4><p class="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><div class="event"><h4>workspace.clientActivated</h4><p class="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><div class="event"><h4>workspace.clientFullScreenSet</h4><p class="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><div class="event"><h4>workspace.clientUnminimized</h4><p class="desc">Emitted whenever a client is Unminimized (or restored).</p><ul><li><strong>unm_client {client}</strong>: The client which was unminimzed.</li></ul></div></div><div id="methods_workspace" class="methods"><h3>Methods</h3><div class="method"><h4>workspace.getAllClients
|
||||
[ret: Array(client)]
|
||||
</h4><ul><li>workspace.getAllClients(
|
||||
desktop_no {integer}
|
||||
)
|
||||
</li></ul><p class="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><ul><li><strong>desktop_no {integer}</strong>: The desktop number belonging to which the clients are to be fetched.</li></ul></div><div class="method"><h4>workspace.dimensions
|
||||
[ret: qsize]
|
||||
</h4><ul><li>workspace.dimensions(
|
||||
|
||||
)
|
||||
</li></ul><p class="desc">Returns the dimensions of the workspace in pixels.</p><ul/></div><div class="method"><h4>workspace.desktopGridSize
|
||||
[ret: qsize]
|
||||
</h4><ul><li>workspace.desktopGridSize(
|
||||
|
||||
)
|
||||
</li></ul><p class="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><ul/></div><div class="method"><h4>workspace.activeClient
|
||||
[ret: client]
|
||||
</h4><ul><li>workspace.activeClient(
|
||||
|
||||
)
|
||||
</li></ul><p class="desc">Returns the client which currently has focus.</p><ul/></div><div class="method"><h4>workspace.clientGroups
|
||||
[ret: Array(clientgroup)]
|
||||
</h4><ul><li>workspace.clientGroups(
|
||||
|
||||
)
|
||||
</li></ul><p class="desc">Returns an array of all the ClientGroups from the current workspace.</p><ul/></div></div><div id="props_workspace" class="props"><h3>Properties</h3><div class="prop"><h4>workspace.currentDesktop
|
||||
[ret: integer]
|
||||
<sup>[GO]</sup></h4><p class="desc">Returns the current desktop number of the workspace.</p></div></div></div>
|
||||
|
||||
<div xmlns="" id="class_toplevel" class="classes"><h2>toplevel<sup>[<em>floating</em>]</sup></h2><div id="events_toplevel" class="events"><h3>Events</h3></div><div id="methods_toplevel" class="methods"><h3>Methods</h3><div class="method"><h4>toplevel.x
|
||||
[ret: integer]
|
||||
</h4><ul><li>toplevel.x(
|
||||
|
||||
)
|
||||
</li></ul><p class="desc">Returns the x co-ordinate of the toplevel client (or the client).</p><ul/></div><div class="method"><h4>toplevel.y
|
||||
[ret: integer]
|
||||
</h4><ul><li>toplevel.y(
|
||||
|
||||
)
|
||||
</li></ul><p class="desc">Returns the y co-ordinate of the toplevel client (or the client).</p><ul/></div><div class="method"><h4>toplevel.width
|
||||
[ret: integer]
|
||||
</h4><ul><li>toplevel.width(
|
||||
|
||||
)
|
||||
</li></ul><p class="desc">Returns the width of the toplevel client (or the client).</p><ul/></div><div class="method"><h4>toplevel.height
|
||||
[ret: integer]
|
||||
</h4><ul><li>toplevel.height(
|
||||
|
||||
)
|
||||
</li></ul><p class="desc">Returns the height of the toplevel client (or the client).</p><ul/></div><div class="method"><h4>toplevel.size
|
||||
[ret: qsize]
|
||||
</h4><ul><li>toplevel.size(
|
||||
|
||||
)
|
||||
</li></ul><p class="desc">Returns the size of the toplevel client (or the client).</p><ul/></div><div class="method"><h4>toplevel.pos
|
||||
[ret: qpoint]
|
||||
</h4><ul><li>toplevel.pos(
|
||||
|
||||
)
|
||||
</li></ul><p class="desc">Returns the position of the toplevel client (or the client).</p><ul/></div><div class="method"><h4>toplevel.opacity
|
||||
[ret: decimal]
|
||||
</h4><ul><li>toplevel.opacity(
|
||||
|
||||
)
|
||||
</li></ul><p class="desc">Returns the opacity (or 1 - transperency) of the toplevel client (or the client).</p><ul/></div><div class="method"><h4>toplevel.hasAlpha
|
||||
[ret: bool]
|
||||
</h4><ul><li>toplevel.hasAlpha(
|
||||
|
||||
)
|
||||
</li></ul><p class="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><ul/></div><div class="method"><h4>toplevel.setOpacity</h4><ul><li>toplevel.setOpacity(
|
||||
opacity_v {decimal}
|
||||
)
|
||||
</li></ul><p class="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><ul><li><strong>opacity_v {decimal}</strong>: The opacity to be set (on a scale of 0-1).</li></ul></div></div><div id="props_toplevel" class="props"><h3>Properties</h3></div></div>
|
||||
|
||||
<div xmlns="" id="class_client" class="classes"><h2>client<sup>[<em>floating</em>]</sup></h2><div id="events_client" class="events"><h3>Events</h3><div class="event"><h4>client.clientMoved</h4><p class="desc">Emitted whenever the client is moved or it's geometry changed. This includes when a client is resized.</p><ul/></div><div class="event"><h4>client.onSetKeepAbove</h4><p class="desc">Emitted whenever the client's 'Keep Above' property is set or cleared. 'set' is 1 if the client was set to 'Keep Above', 0 otherwise. Equivalent to workspace.clientSetKeepAbove, but for a specific client. Use wherever possible instead of workspace.clientSetKeepAbove to improve performance.</p><ul><li><strong>set {boolean}</strong>: Specifies whether the 'Keep Above' property was set or cleared.</li></ul></div><div class="event"><h4>client.minimized</h4><p class="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><ul/></div><div class="event"><h4>client.maximizeSet</h4><p class="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><div class="event"><h4>client.gotFocus</h4><p class="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><ul/></div><div class="event"><h4>client.unminimized</h4><p class="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><ul/></div><div class="event"><h4>client.fullScreenSet</h4><p class="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><div id="methods_client" class="methods"><h3>Methods</h3><div class="method"><h4>client.caption
|
||||
[ret: string]
|
||||
</h4><ul><li>client.caption(
|
||||
|
||||
)
|
||||
</li></ul><p class="desc">Returns the caption of the caption (or the title) of the window.</p><ul/></div><div class="method"><h4>client.close</h4><ul><li>client.close(
|
||||
|
||||
)
|
||||
</li></ul><p class="desc">Closes the given client using killClient.</p><ul/></div><div class="method"><h4>client.move<sup>[variabl parameter styles]</sup></h4><ul><li>client.move(
|
||||
location {qpoint}, emitjs {boolean}
|
||||
)
|
||||
</li><li>client.move(
|
||||
x {integer}, x {integer}, emitjs {boolean}
|
||||
)
|
||||
</li></ul><p class="desc">Moves the client to the specified location keeping the height and width of the client same.</p><p class="footdocs">move(
|
||||
location {qpoint}, emitjs {boolean}
|
||||
)
|
||||
<ul><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><p class="footdocs">move(
|
||||
x {integer}, x {integer}, emitjs {boolean}
|
||||
)
|
||||
<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></ul></p></div><div class="method"><h4>client.resize<sup>[variabl parameter styles]</sup></h4><ul><li>client.resize(
|
||||
size {qsize}, emitJS {boolean}
|
||||
)
|
||||
</li><li>client.resize(
|
||||
w {integer}, h {integer}, emitJS {boolean}
|
||||
)
|
||||
</li></ul><p class="desc">Resizes the client to the specified size without changing its position.</p><p class="footdocs">resize(
|
||||
size {qsize}, emitJS {boolean}
|
||||
)
|
||||
<ul><li><strong>size {qsize}</strong>: The size to which the client is to be resized.</li><li><strong>emitJS {boolean}</strong>: EmitJS value (defaults to true).</li></ul></p><p class="footdocs">resize(
|
||||
w {integer}, h {integer}, emitJS {boolean}
|
||||
)
|
||||
<ul><li><strong>w {integer}</strong>: New width for the client.</li><li><strong>h {integer}</strong>: New height for the client.</li><li><strong>emitJS {boolean}</strong>: EmitJS value (defaults to true).</li></ul></p></div><div class="method"><h4>client.setGeometry<sup>[variabl parameter styles]</sup></h4><ul><li>client.setGeometry(
|
||||
geometry {qrect}, emitJS {boolean}
|
||||
)
|
||||
</li><li>client.setGeometry(
|
||||
x {integer}, y {integer}, w {integer}, h {integer}
|
||||
)
|
||||
</li></ul><p class="desc">Sets the geometry of the client i.e. sets is size and location according to the provided parameters.</p><p class="footdocs">setGeometry(
|
||||
geometry {qrect}, emitJS {boolean}
|
||||
)
|
||||
<ul><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><p class="footdocs">setGeometry(
|
||||
x {integer}, y {integer}, w {integer}, h {integer}
|
||||
)
|
||||
<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><div class="method"><h4>client.getWindowInfo
|
||||
[ret: windowinfo]
|
||||
</h4><ul><li>client.getWindowInfo(
|
||||
|
||||
)
|
||||
</li></ul><p class="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><ul/></div><div class="method"><h4>client.isTransient
|
||||
[ret: boolean]
|
||||
</h4><ul><li>client.isTransient(
|
||||
|
||||
)
|
||||
</li></ul><p class="desc">Returns (true) is 'client' is transient, (false) otherwise.</p><ul/></div><div class="method"><h4>client.isTransientFor
|
||||
[ret: client]
|
||||
</h4><ul><li>client.isTransientFor(
|
||||
|
||||
)
|
||||
</li></ul><p class="desc">If the given client is transient, returns it's parent client, otherwise returns an undefined scriptvalue.</p><ul/></div><div class="method"><h4>client.activate</h4><ul><li>client.activate(
|
||||
|
||||
)
|
||||
</li></ul><p class="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><ul/></div><div class="method"><h4>client.setCaption</h4><ul><li>client.setCaption(
|
||||
caption_string {string}
|
||||
)
|
||||
</li></ul><p class="desc">Sets the caption for the specified client to caption_string.</p><ul><li><strong>caption_string {string}</strong>: The caption to be set for the specified.</li></ul></div><div class="method"><h4>client.unminimize</h4><ul><li>client.unminimize(
|
||||
|
||||
)
|
||||
</li></ul><p class="desc">Unminimizes (or restores) the given client.</p><ul/></div><div class="method"><h4>client.setFullScreen</h4><ul><li>client.setFullScreen(
|
||||
{fss_set}
|
||||
)
|
||||
</li></ul><p class="desc">Sets the client to or from full screen mode.</p><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></ul></div><div class="method"><h4>client.isShade
|
||||
[ret: boolean]
|
||||
</h4><ul><li>client.isShade(
|
||||
|
||||
)
|
||||
</li></ul><p class="desc">Returns (true) if the client is shaded, (false) otherwise.</p><ul/></div><div class="method"><h4>client.isShadeable
|
||||
[ret: boolean]
|
||||
</h4><ul><li>client.isShadeable(
|
||||
|
||||
)
|
||||
</li></ul><p class="desc">Returns (true) if the client is shadeable (can be shaded), (false) otherwise.</p><ul/></div><div class="method"><h4>client.isMinimized
|
||||
[ret: boolean]
|
||||
</h4><ul><li>client.isMinimized(
|
||||
|
||||
)
|
||||
</li></ul><p class="desc">Returns (true) if the client is minimized, (false) otherwise.</p><ul/></div><div class="method"><h4>client.isMinimizable
|
||||
[ret: boolean]
|
||||
</h4><ul><li>client.isMinimizable(
|
||||
|
||||
)
|
||||
</li></ul><p class="desc">Returns (true) if the client can be minimized, (false) otherwise.</p><ul/></div><div class="method"><h4>client.isMaximizable
|
||||
[ret: boolean]
|
||||
</h4><ul><li>client.isMaximizable(
|
||||
|
||||
)
|
||||
</li></ul><p class="desc">Returns (true) if the client can be mazimized, (false) otherwise.</p><ul/></div><div class="method"><h4>client.isResizable
|
||||
[ret: boolean]
|
||||
</h4><ul><li>client.isResizable(
|
||||
|
||||
)
|
||||
</li></ul><p class="desc">Returns (true) if the client can be resized (changable size), (false) otherwise.</p><ul/></div><div class="method"><h4>client.isMovable
|
||||
[ret: boolean]
|
||||
</h4><ul><li>client.isMovable(
|
||||
|
||||
)
|
||||
</li></ul><p class="desc">Returns (true) if the client can be moved (non-fixed location), (false) otherwise.</p><ul/></div><div class="method"><h4>client.isMovableAcrossScreens
|
||||
[ret: boolean]
|
||||
</h4><ul><li>client.isMovableAcrossScreens(
|
||||
|
||||
)
|
||||
</li></ul><p class="desc">Returns (true) if the client can be moved across screens (only valid in a multiple monitor setup), (false) otherwise.</p><ul/></div><div class="method"><h4>client.isCloseable
|
||||
[ret: boolean]
|
||||
</h4><ul><li>client.isCloseable(
|
||||
|
||||
)
|
||||
</li></ul><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><ul/></div><div class="method"><h4>client.isFullScreen
|
||||
[ret: boolean]
|
||||
</h4><ul><li>client.isFullScreen(
|
||||
|
||||
)
|
||||
</li></ul><p class="desc">Returns (true) if the client is in fullscreen mode, (false) otherwise.</p><ul/></div><div class="method"><h4>client.isFullScreenable
|
||||
[ret: boolean]
|
||||
</h4><ul><li>client.isFullScreenable(
|
||||
|
||||
)
|
||||
</li></ul><p class="desc">Returns (true) if the client can be set to fullscreen mode, (false) otherwise.</p><ul/></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><ul/></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><ul/></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><ul/></div><div class="method"><h4>client.setKeepAbove</h4><ul><li>client.setKeepAbove(
|
||||
keepabove {boolean}
|
||||
)
|
||||
</li></ul><p class="desc">Sets the 'Keep Above others' parameter value or unsets it according to keepabove.</p><ul><li><strong>keepabove {boolean}</strong>: The 'Keep Above others' parameter to be applied to the client</li></ul></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><ul><li><strong>keepbelow {}</strong>: The 'Keep Below others' parameter to be applied to the client</li></ul></div><div class="method"><h4>client.clientGroup
|
||||
[ret: clientgroup]
|
||||
</h4><ul><li>client.clientGroup(
|
||||
|
||||
)
|
||||
</li></ul><p class="desc">Returns the client group the client belongs to. If it belongs to no client, it returns an undefined script value.</p><ul/></div><div class="method"><h4>client.desktop
|
||||
[ret: integer]
|
||||
</h4><ul><li>client.desktop(
|
||||
|
||||
)
|
||||
</li></ul><p class="desc">Returns the desktop number that the client is on. If it is on all desktops, it returns -1.</p><ul/></div></div><div id="props_client" class="props"><h3>Properties</h3></div></div>
|
||||
|
||||
<div xmlns="" id="class_clientgroup" class="classes"><h2>clientgroup<sup>[<em>instantiable</em>]</sup></h2><div id="events_clientgroup" class="events"><h3>Events</h3></div><div id="methods_clientgroup" class="methods"><h3>Methods</h3><div class="method"><h4>clientgroup.ClientGroup</h4><ul><li>clientgroup.ClientGroup(
|
||||
seed_client {client}
|
||||
)
|
||||
</li></ul><p class="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><ul><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></ul></div><div class="method"><h4>clientgroup.add</h4><ul><li>clientgroup.add(
|
||||
new_client {client}, beforeClient {integer}, becomeVisible {boolean}
|
||||
)
|
||||
</li></ul><p class="desc">Adds new_client to the clientgroup at the index specified by beforeClient and if becomeVisible is true, makes it visible.</p><ul><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></ul></div><div class="method"><h4>clientgroup.remove<sup>[variabl parameter styles]</sup></h4><ul><li>clientgroup.remove(
|
||||
index {integer}, set_geom {qrect}
|
||||
)
|
||||
</li><li>clientgroup.remove(
|
||||
rem_client {client}, set_geom {qrect}
|
||||
)
|
||||
</li></ul><p class="desc">Removes the client from the clientgroup and then sets it's geometry according to set_geom. This parameter is optional.</p><p class="footdocs">remove(
|
||||
index {integer}, set_geom {qrect}
|
||||
)
|
||||
<ul><li><strong>index {integer}</strong>: The client index which is to be removed.</li><li><strong>set_geom {qrect}</strong>: The geometry to be set after removeal. This parameter is optional.</li></ul></p><p class="footdocs">remove(
|
||||
rem_client {client}, set_geom {qrect}
|
||||
)
|
||||
<ul><li><strong>rem_client {client}</strong>: The client which is to be removed.</li><li><strong>set_geom {qrect}</strong>: The geometry to be set after removal.</li></ul></p></div><div class="method"><h4>clientgroup.clients
|
||||
[ret: Array(client)]
|
||||
</h4><ul><li>clientgroup.clients(
|
||||
|
||||
)
|
||||
</li></ul><p class="desc">Returns an array of all the member clients of the clientgroup.</p><ul/></div><div class="method"><h4>clientgroup.contains
|
||||
[ret: boolean]
|
||||
</h4><ul><li>clientgroup.contains(
|
||||
needle_client {client}
|
||||
)
|
||||
</li></ul><p class="desc">Returns (true) if needle_client is a member of the clientgroup, (false) otherwise.</p><ul><li><strong>needle_client {client}</strong>: The client to be searched for</li></ul></div><div class="method"><h4>clientgroup.indexOf
|
||||
[ret: integer]
|
||||
</h4><ul><li>clientgroup.indexOf(
|
||||
needle_client {client}
|
||||
)
|
||||
</li></ul><p class="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><ul><li><strong>needle_client {client}</strong>: The client whose index is to be found</li></ul></div><div class="method"><h4>clientgroup.move<sup>[variabl parameter styles]</sup></h4><ul><li>clientgroup.move(
|
||||
index_a {integer}, index_b {integer}
|
||||
)
|
||||
</li><li>clientgroup.move(
|
||||
move_client {integer}, index {integer}
|
||||
)
|
||||
</li><li>clientgroup.move(
|
||||
move_client {integer}, before_client {integer}
|
||||
)
|
||||
</li><li>clientgroup.move(
|
||||
index_a {integer}, before_client {integer}
|
||||
)
|
||||
</li></ul><p class="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><p class="footdocs">move(
|
||||
index_a {integer}, index_b {integer}
|
||||
)
|
||||
<ul><li><strong>index_a {integer}</strong>: The index of the client to be moved.</li><li><strong>index_b {integer}</strong>: The index of the position to move the client to.</li></ul></p><p class="footdocs">move(
|
||||
move_client {integer}, index {integer}
|
||||
)
|
||||
<ul><li><strong>move_client {integer}</strong>: The client to be moved.</li><li><strong>index {integer}</strong>: The index of the position to move the client to.</li></ul></p><p class="footdocs">move(
|
||||
move_client {integer}, before_client {integer}
|
||||
)
|
||||
<ul><li><strong>move_client {integer}</strong>: The client to be moved.</li><li><strong>before_client {integer}</strong>: The client before which the client is to moved.</li></ul></p><p class="footdocs">move(
|
||||
index_a {integer}, before_client {integer}
|
||||
)
|
||||
<ul><li><strong>index_a {integer}</strong>: The index of the client to be moved.</li><li><strong>before_client {integer}</strong>: The client before which the client is to moved.</li></ul></p></div><div class="method"><h4>clientgroup.removeAll</h4><ul><li>clientgroup.removeAll(
|
||||
|
||||
)
|
||||
</li></ul><p class="desc">Removes all the clients from the clientgroup i.e. completely disassembles the clientgroup into its proponents.</p><ul/></div><div class="method"><h4>clientgroup.closeAll</h4><ul><li>clientgroup.closeAll(
|
||||
|
||||
)
|
||||
</li></ul><p class="desc">Closes all the clients presents in the clientgroup.</p><ul/></div><div class="method"><h4>clientgroup.minSize
|
||||
[ret: qsize]
|
||||
</h4><ul><li>clientgroup.minSize(
|
||||
|
||||
)
|
||||
</li></ul><p class="desc">Returns the minimum size acceptable for the clientgroup computed from the minimum sizes of all its present members.</p><ul/></div><div class="method"><h4>clientgroup.maxSize
|
||||
[ret: qsize]
|
||||
</h4><ul><li>clientgroup.maxSize(
|
||||
|
||||
)
|
||||
</li></ul><p class="desc">Returns the maximum size acceptable for the clientgroup computed from the minimum sizes of all its present members.</p><ul/></div></div><div id="props_clientgroup" class="props"><h3>Properties</h3></div></div>
|
||||
|
||||
<div xmlns="" id="class_windowinfo" class="classes"><h2>windowinfo<sup>[<em>floating</em>]</sup></h2><div id="events_windowinfo" class="events"><h3>Events</h3></div><div id="methods_windowinfo" class="methods"><h3>Methods</h3></div><div id="props_windowinfo" class="props"><h3>Properties</h3><div class="prop"><h4>windowinfo.isValid
|
||||
[ret: boolean]
|
||||
<sup>[GO]</sup></h4><p class="desc">Returns (true) if the client is valid, (false) otherwise.</p></div><div class="prop"><h4>windowinfo.visibleName
|
||||
[ret: string]
|
||||
<sup>[GO]</sup></h4><p class="desc">Returns the visible name of the client.</p></div><div class="prop"><h4>windowinfo.isMinimized
|
||||
[ret: boolean]
|
||||
<sup>[GO]</sup></h4><p class="desc">Returns (true) if client is minimized. Redundant with client.isMinimized. For client, the subclass property is called, not the toplevel one.</p></div><div class="prop"><h4>windowinfo.state
|
||||
[ret: integer]
|
||||
<sup>[GO]</sup></h4><p class="desc">Returns an integeral state for the client. Prefer other methods like isShaded, isFullScreenSet etc. over this.</p></div><div class="prop"><h4>windowinfo.windowRole
|
||||
[ret: string]
|
||||
<sup>[GO]</sup></h4><p class="desc">Returns the window role of the toplevel client.</p></div><div class="prop"><h4>windowinfo.windowClassClass
|
||||
[ret: string]
|
||||
<sup>[GO]</sup></h4><p class="desc">Returns the windowclass class of the client.</p></div><div class="prop"><h4>windowinfo.windowClassName
|
||||
[ret: string]
|
||||
<sup>[GO]</sup></h4><p class="desc">Returns the windowclass name of the client.</p></div></div></div>
|
||||
|
||||
<div xmlns="" id="class_config" class="classes"><h2>config<sup>[<em>singleton</em>]</sup></h2><div id="events_config" class="events"><h3>Events</h3></div><div id="methods_config" class="methods"><h3>Methods</h3><div class="method"><h4>config.exists</h4><ul><li>config.exists(
|
||||
config_key {string}
|
||||
)
|
||||
</li></ul><p class="desc">Searches for config_key in the configuration array and returns (true) if a corresponding value exists, (false) otherwise.</p><ul><li><strong>config_key {string}</strong>: The configuration key to be seeked.</li></ul></div><div class="method"><h4>config.get<sup>[variabl parameter styles]</sup></h4><ul><li>config.get(
|
||||
|
||||
)
|
||||
</li><li>config.get(
|
||||
key1, key2 ... keyN {string}
|
||||
)
|
||||
</li><li>config.get(
|
||||
key {string}
|
||||
)
|
||||
</li><li>config.get(
|
||||
keyArray {Array(string)}, showNonAssoc {boolean}
|
||||
)
|
||||
</li></ul><p class="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><p class="footdocs">get(
|
||||
|
||||
)
|
||||
<ul/></p><p class="footdocs">get(
|
||||
key1, key2 ... keyN {string}
|
||||
)
|
||||
<ul><li><strong>key1, key2 ... keyN {string}</strong>: A list of keys to search the values for.</li></ul></p><p class="footdocs">get(
|
||||
key {string}
|
||||
)
|
||||
<ul><li><strong>key {string}</strong>: The key to search the value for.</li></ul></p><p class="footdocs">get(
|
||||
keyArray {Array(string)}, showNonAssoc {boolean}
|
||||
)
|
||||
<ul><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></ul></p></div></div><div id="props_config" class="props"><h3>Properties</h3><div class="prop"><h4>config.loaded
|
||||
[ret: boolean]
|
||||
<sup>[GO]</sup></h4><p class="desc">Returns (true) if a configuration file was found and loaded, (false) otherwise.</p></div></div></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,326 +0,0 @@
|
|||
#include <QtCore/QCoreApplication>
|
||||
#include <QFile>
|
||||
#include <QDomDocument>
|
||||
#include <QDebug>
|
||||
#include <QVector>
|
||||
#include <QTime>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
struct Property {
|
||||
QString retType;
|
||||
QString name;
|
||||
QString type;
|
||||
QString desc;
|
||||
};
|
||||
|
||||
struct Param {
|
||||
QString name;
|
||||
QString type;
|
||||
QString desc;
|
||||
};
|
||||
|
||||
typedef QVector<Param> ParamList;
|
||||
typedef QVector<ParamList> ParamSetList;
|
||||
|
||||
struct Event {
|
||||
ParamList params;
|
||||
QString wslot;
|
||||
QString wsignal;
|
||||
QString signal;
|
||||
QString desc;
|
||||
QString name;
|
||||
};
|
||||
|
||||
struct Method {
|
||||
ParamSetList params;
|
||||
bool vparamstyle;
|
||||
bool ctor;
|
||||
QString name;
|
||||
QString retType;
|
||||
QString desc;
|
||||
};
|
||||
|
||||
struct Class {
|
||||
QString type;
|
||||
QString name;
|
||||
QVector<Property> props;
|
||||
QVector<Method> methods;
|
||||
QVector<Event> events;
|
||||
};
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QTime t;
|
||||
t.start();
|
||||
|
||||
Q_UNUSED(argc)
|
||||
Q_UNUSED(argv)
|
||||
|
||||
QDomDocument doc;
|
||||
QFile loc(*(argv + 1));
|
||||
QDomElement root;
|
||||
QVector<Class> classList;
|
||||
|
||||
loc.open(QIODevice::ReadOnly);
|
||||
|
||||
doc.setContent(&loc);
|
||||
root = doc.documentElement();
|
||||
|
||||
QDomNodeList classes = root.elementsByTagName("class");
|
||||
|
||||
for (unsigned int i = 0; i < classes.length(); i++) {
|
||||
Class temp;
|
||||
QDomElement classEle = classes.at(i).toElement();
|
||||
temp.name = classEle.attribute("name");
|
||||
temp.type = classEle.attribute("type");
|
||||
|
||||
QDomNodeList events = classEle.elementsByTagName("event");
|
||||
|
||||
for (unsigned int j = 0; j < events.length(); j++) {
|
||||
Event eTemp;
|
||||
QDomElement event = events.at(j).toElement();
|
||||
eTemp.name = event.attribute("name");
|
||||
ParamList params;
|
||||
|
||||
QDomNodeList prms = event.elementsByTagName("param");
|
||||
|
||||
for (unsigned int k = 0; k < prms.length(); k++) {
|
||||
Param pTemp;
|
||||
QDomElement param = prms.at(k).toElement();
|
||||
pTemp.name = param.attribute("name");
|
||||
pTemp.type = param.attribute("type");
|
||||
pTemp.desc = param.text();
|
||||
params.push_back(pTemp);
|
||||
}
|
||||
|
||||
eTemp.params = params;
|
||||
eTemp.wsignal = event.attribute("wsignal", "");
|
||||
eTemp.wslot = event.attribute("wslot", "");
|
||||
eTemp.signal = event.attribute("signal", "");
|
||||
eTemp.desc = event.elementsByTagName("desc").at(0).toElement().text();
|
||||
temp.events.push_back(eTemp);
|
||||
}
|
||||
|
||||
QDomNodeList methods = classEle.elementsByTagName("method");
|
||||
|
||||
for (unsigned int j = 0; j < methods.length(); j++) {
|
||||
Method mTemp;
|
||||
QDomElement method = methods.at(j).toElement();
|
||||
mTemp.name = method.attribute("name");
|
||||
mTemp.ctor = false;
|
||||
ParamSetList paramsl;
|
||||
|
||||
mTemp.vparamstyle = (method.attribute("vparamstyle", "") == "true");
|
||||
mTemp.ctor = (method.attribute("constructor", "") == "true") ? (true) : (false);
|
||||
|
||||
if (!mTemp.vparamstyle) {
|
||||
QDomNodeList prms = method.elementsByTagName("param");
|
||||
ParamList params;
|
||||
|
||||
for (unsigned int k = 0; k < prms.length(); k++) {
|
||||
Param pTemp;
|
||||
QDomElement param = prms.at(k).toElement();
|
||||
pTemp.name = param.attribute("name");
|
||||
pTemp.type = param.attribute("type");
|
||||
pTemp.desc = param.text();
|
||||
params.push_back(pTemp);
|
||||
}
|
||||
|
||||
paramsl.push_back(params);
|
||||
} else {
|
||||
QDomNodeList pRms = method.elementsByTagName("paramset");
|
||||
|
||||
for (unsigned int k = 0; k < pRms.length(); k++) {
|
||||
QDomNodeList prms = pRms.at(k).toElement().elementsByTagName("param");
|
||||
ParamList params;
|
||||
|
||||
for (unsigned int f = 0; f < prms.length(); f++) {
|
||||
Param pTemp;
|
||||
QDomElement param = prms.at(f).toElement();
|
||||
pTemp.name = param.attribute("name");
|
||||
pTemp.type = param.attribute("type");
|
||||
pTemp.desc = param.text();
|
||||
params.push_back(pTemp);
|
||||
}
|
||||
|
||||
paramsl.push_back(params);
|
||||
}
|
||||
}
|
||||
|
||||
mTemp.params = paramsl;
|
||||
mTemp.retType = method.elementsByTagName("return").at(0).toElement().attribute("type", "");
|
||||
mTemp.desc = method.elementsByTagName("desc").at(0).toElement().text();
|
||||
temp.methods.push_back(mTemp);
|
||||
}
|
||||
|
||||
QDomNodeList props = classEle.elementsByTagName("property");
|
||||
|
||||
for (unsigned int j = 0; j < props.length(); j++) {
|
||||
Property prTemp;
|
||||
QDomElement prop = props.at(j).toElement();
|
||||
prTemp.name = prop.attribute("name");
|
||||
prTemp.desc = prop.elementsByTagName("desc").at(0).toElement().text();
|
||||
prTemp.retType = prop.elementsByTagName("return").at(0).toElement().attribute("type", "");
|
||||
prTemp.type = prop.attribute("type");
|
||||
|
||||
temp.props.push_back(prTemp);
|
||||
}
|
||||
|
||||
classList.push_back(temp);
|
||||
}
|
||||
|
||||
/* OUTPUT MANUAL */
|
||||
|
||||
std::cout << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">" << std::endl
|
||||
<< "<html xmlns=\"http://www.w3.org/1999/xhtml/\" lang=\"en\" xml:lang=\"en\">" << std::endl
|
||||
<< " <head>" << std::endl
|
||||
<< " <title>KWinScripting :: APIDoX</title>" << std::endl
|
||||
<< " <link rel=\"stylesheet\" href=\"apistyle.css\" type=\"text/css\" media=\"screen\" />" << std::endl
|
||||
<< " </head>" << std::endl
|
||||
<< std::endl
|
||||
<< " <body>" << std::endl
|
||||
<< " <div id=\"root\">" << std::endl;
|
||||
|
||||
for (int i = 0; i < classList.size(); i++) {
|
||||
Class here = classList.at(i);
|
||||
std::cout << " <div id=\"class_" << here.name.toStdString() << "\" class=\"classes\">" << std::endl
|
||||
<< " <h2>" << here.name.toStdString() << "<sup>[<em>" << here.type.toStdString() << "</em>]</sup></h2>" << std::endl;
|
||||
|
||||
if (here.events.size() != 0) {
|
||||
std::cout << " <div id=\"events_" << here.name.toStdString() << "\" class=\"events\">" << std::endl
|
||||
<< " <h3>Events</h3>" << std::endl;
|
||||
|
||||
for (int j = 0; j < here.events.size(); j++) {
|
||||
std::cout << " <div class=\"event\">" << std::endl
|
||||
<< " <h4>" << here.name.toStdString() << "." << here.events.at(j).name.toStdString() << "</h4>" << std::endl
|
||||
<< " <p class=\"desc\">" << here.events.at(j).desc.toStdString() << "</p>" << std::endl;
|
||||
|
||||
|
||||
ParamList p = here.events.at(j).params;
|
||||
|
||||
if (p.size() > 0) {
|
||||
std::cout << " <ul>" << std::endl;
|
||||
|
||||
for (int k = 0; k < p.size(); k++) {
|
||||
std::cout << " <li><strong>" << p.at(k).name.toStdString() << " {" << p.at(k).type.toStdString() << "}</strong>: " << p.at(k).desc.toStdString() << "</li>" << std::endl;
|
||||
}
|
||||
|
||||
std::cout << " </ul>" << std::endl;
|
||||
}
|
||||
|
||||
std::cout << " </div>" << std::endl;
|
||||
}
|
||||
|
||||
std::cout << " </div>" << std::endl;
|
||||
}
|
||||
|
||||
if (here.methods.size() != 0) {
|
||||
std::cout << " <div id=\"method_" << here.name.toStdString() << "\" class=\"methods\">" << std::endl
|
||||
<< " <h3>Methods</h3>" << std::endl;
|
||||
|
||||
for (int j = 0; j < here.methods.size(); j++) {
|
||||
std::cout << " <div class=\"method\">" << std::endl
|
||||
<< " <h4>" << here.name.toStdString() << "." << here.methods.at(j).name.toStdString();
|
||||
|
||||
if (here.methods.at(j).retType != "") {
|
||||
std::cout << "[ret: " << here.methods.at(j).retType.toStdString() << "] ";
|
||||
}
|
||||
|
||||
if (here.methods.at(j).ctor) {
|
||||
std::cout << "<sup>[constructor]</sup>";
|
||||
}
|
||||
|
||||
if (here.methods.at(j).vparamstyle) {
|
||||
std::cout << "<sup>[variable parameter styles]</sup>";
|
||||
}
|
||||
|
||||
std::cout << "</h4>" << std::endl;
|
||||
|
||||
ParamSetList pslist = here.methods.at(j).params;
|
||||
|
||||
std::cout << " <ul>" << std::endl;
|
||||
|
||||
if (pslist.size() == 0) {
|
||||
std::cout << " <li>" << here.name.toStdString() << "." << here.methods.at(j).name.toStdString() << "()</li>" << std::endl;
|
||||
} else {
|
||||
for (int m = 0; m < pslist.size(); m++) {
|
||||
ParamList plist = pslist.at(m);
|
||||
std::cout << " <li>" << here.name.toStdString() << "." << here.methods.at(j).name.toStdString() << "(";
|
||||
|
||||
for (int f = 0; f < plist.size(); f++) {
|
||||
std::cout << plist.at(f).name.toStdString() << " {" << plist.at(f).type.toStdString() << "}";
|
||||
|
||||
if (f != plist.size() - 1) {
|
||||
std::cout << ", ";
|
||||
}
|
||||
}
|
||||
|
||||
std::cout << ")</li>" << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
std::cout << " </ul>" << std::endl;
|
||||
std::cout << " <p class=\"desc\">" << here.methods.at(j).desc.toStdString() << "</p>" << std::endl;
|
||||
|
||||
if (pslist.size() != 0) {
|
||||
for (int m = 0; m < pslist.size(); m++) {
|
||||
ParamList plist = pslist.at(m);
|
||||
|
||||
if (plist.size() == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
std::cout << " <p class=\"footdocs\">" << here.methods.at(j).name.toStdString() << "(";
|
||||
|
||||
for (int f = 0; f < plist.size(); f++) {
|
||||
std::cout << plist.at(f).name.toStdString() << " {" << plist.at(f).type.toStdString() << "}";
|
||||
|
||||
if (f != plist.size() - 1) {
|
||||
std::cout << ", ";
|
||||
}
|
||||
}
|
||||
|
||||
std::cout << ")<br />" << std::endl;
|
||||
std::cout << " <ul>" << std::endl;
|
||||
|
||||
for (int f = 0; f < plist.size(); f++) {
|
||||
std::cout << " <li><strong>" << plist.at(f).name.toStdString() << " {" << plist.at(f).type.toStdString() << "}</strong>: " << plist.at(f).desc.toStdString() << "</li>" << std::endl;
|
||||
}
|
||||
|
||||
std::cout << " </ul>" << std::endl;
|
||||
std::cout << " </p>" << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
std::cout << " </div>" << std::endl;
|
||||
}
|
||||
|
||||
std::cout << " </div>" << std::endl;
|
||||
}
|
||||
|
||||
if (here.props.size() != 0) {
|
||||
std::cout << " <div id=\"props_" << here.name.toStdString() << "\" class=\"props\">" << std::endl
|
||||
<< " <h3>Properties</h3>" << std::endl;
|
||||
|
||||
for (int j = 0; j < here.props.size(); j++) {
|
||||
std::cout << " <div class=\"prop\">" << std::endl
|
||||
<< " <h4>" << here.name.toStdString() << "." << here.props.at(j).name.toStdString() << " [ret: " << here.props.at(j).retType.toStdString()
|
||||
<< "] <sup>[" << here.props.at(j).type.toStdString() << "]</sup></h4>" << std::endl
|
||||
<< " <p class=\"desc\">" << here.props.at(j).desc.toStdString() << "</p>" << std::endl;
|
||||
|
||||
std::cout << " </div>" << std::endl;
|
||||
}
|
||||
|
||||
std::cout << " </div>" << std::endl;
|
||||
}
|
||||
|
||||
std::cout << " </div>" << std::endl;
|
||||
}
|
||||
|
||||
std::cout << " </div>" << std::endl
|
||||
<< " </body>" << std::endl
|
||||
<< "</html>";
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in a new issue