2aec750ebf
Every disorder causes every duration, which ensures the one that stays. reality is relative. natural is disorder. [R]obinhood[P]andey Merging scripting from ^/branches/work/kwin_scripting TO ^/trunk svn path=/trunk/KDE/kdebase/workspace/; revision=1177865
211 lines
19 KiB
Text
211 lines
19 KiB
Text
# This is a list of all the events and methods that are currently
|
|
# supported methods and events. Please follow the format given
|
|
# below for adding new methods/events
|
|
#
|
|
# TYPE OBJECT NAME SIGNAL WRAPPERSLOT WRAPPERSIGNAL
|
|
# For properties:
|
|
# GO: GET only | SG: SET and GET functions defined
|
|
#
|
|
|
|
OBJECTS_DOC_LIST_START
|
|
|
|
Instantiable objects:
|
|
---------------------
|
|
|
|
(instantiable) ClientGroup : Create a group which corresponds to a ClientGroup and add/remove/introspect tabs of the group.
|
|
(instantiable) QTimer : A QTimer class for creating polling or one shot timers. Linked from plasma.
|
|
|
|
Others
|
|
------
|
|
|
|
(floating) client : Client objects which correspond to an actual KWin::Client.
|
|
(singleton) workspace : The main KWin::Workspace object.
|
|
(singleton) config : Configuration parameters for the running script.
|
|
(floating) toplevel : Inherited by client. Corresponds to a KWin::Toplevel or any of it's derived classes.
|
|
|
|
OBJECTS_DOC_LIST_END
|
|
|
|
PROPERTIES_DOC_LIST_START
|
|
|
|
Implemented properties:
|
|
--------------------
|
|
|
|
method workspace getAllClients NONE NONE NONE
|
|
event workspace currentDesktopChanged currentDesktopChanged sl_currentDesktopChanged currentDesktopChanged
|
|
event workspace desktopPresenceChanged desktopPresenceChanged sl_desktopPresenceChanged desktopPresenceChanged
|
|
method client caption NONE NONE NONE
|
|
event client clientMoved clientMoved sl_clientMoved clientMoved
|
|
method client close NONE NONe NONE
|
|
property workspace currentDesktop (GO) NONE NONE NONE
|
|
event workspace clientAdded clientAdded sl_clientAdded clientAdded
|
|
event workspace clientManaging DIRECT_FUNCTION_CALL sl_clientManaging clientManaging
|
|
event workspace clientMinimized DIRECT_FUNCTION_CALL sl_clientMinimized clientMinimized
|
|
event workspace clientMaximizeSet DIRECT_FUNCTION_CALL sl_clientMaximizeSet clientMaximizeSet
|
|
event workspace killWindowCalled DIRECT_FUNCTION_CALL sl_killWindowCalled killWindowCalled
|
|
event client minimized s_minimized DIRECT_CONNECTION minimized
|
|
event client maximizeSet maximizeSet sl_maximizeSet maximizeSet
|
|
method toplevel x NONE NONE NONE
|
|
method toplevel y NONE NONE NONE
|
|
method toplevel width NONE NONE NONE
|
|
method toplevel height NONE NONE NONE
|
|
method toplevel size NONE NONE NONE
|
|
metho toplevel pos NONE NONE NONE
|
|
event client activated s_activated DIRECT_CONNECTION gotFocus
|
|
event workspace clientActivated clientActivated sl_clientActivated clientActivated
|
|
method toplevel geometry NONE NONE NONE
|
|
method client move NONE NONE NONE
|
|
method client resize NONE NONE NONE
|
|
method client setGeometry NONE NONE NONE
|
|
method client getWindowInfo NONE NONE NONE
|
|
property windowinfo isValid (GO) NONE NONE NONE
|
|
property windowinfo visibleName (GO) NONE NONE NONE
|
|
property windowinfo isMinimized (GO) NONE NONE NONE
|
|
property windowinfo state (GO) NONE NONE NONE
|
|
method client isTransient NONE NONE NONE
|
|
method client transientFor NONE NONE NONE
|
|
method client activate NONE NONE NONE
|
|
method client setCaption NONE NONE NONE
|
|
method workspace dimensions NONE NONE NONE
|
|
method workspace desktopGridSize NONE NONE NONE
|
|
method client isFullScreen NONE NONE NONE
|
|
method client isFullScreenable NONE NONE NONE
|
|
method client setFullScreen NONE NONE NONE
|
|
event client fullScreenSet s_fullScreenSet DIRECT_CONNECTION fullScreenSet
|
|
event workspace clientFullScreenSet DIRECT_FUNCTION_CALL sl_clientFullScreenSet clientFullScreenSet
|
|
method toplevel opacity NONE NONE NONE
|
|
method toplevel hasAlpha NONE NONE NONE
|
|
method toplevel setOpacity NONE NONE NONE
|
|
method clientgroup clientgroup (ctor) NONE NONE NONE
|
|
method clientgroup add NONE NONE NONE
|
|
method workspace activeClient NONE NONE NONE
|
|
method workspace clientGroups NONE NONE NONE
|
|
method clientgroup remove NONE NONE NONE
|
|
method clientgroup clients NONE NONE NONE
|
|
method client unminimize NONE NONE NONE
|
|
method client restore NONE NONE NONE
|
|
event workspace clientUnminimized DIRECT_FUNCTION_CALL sl_clientUnminimized clientUnminimized
|
|
event workspace clientRestored DIRECT_FUNCTION_CALL sl_clientUnminimized clientRestored
|
|
event client unminimized s_unminimized sl_unminimized unminimized
|
|
event client restored s_unminimized sl_unminimized restored
|
|
method client clientGroup NONE NONE NONE
|
|
method clientgroup contains NONE NONE NONE
|
|
method clientgroup indexOf NONE NONE NONE
|
|
method clientgroup move NONE NONE NONE
|
|
method clientgroup removeAll NONE NONE NONE
|
|
method clientgroup closeAll NONE NONE NONE
|
|
method clientgroup minSize NONE NONE NONE
|
|
method clientgroup maxSize NONE NONE NONE
|
|
property windowinfo windowRole (GO) NONE NONE NONE
|
|
property windowinfo windowClassClass (GO) NONE NONE NONE
|
|
property windowinfo windowClassName (GO) NONE NONE NONE
|
|
property config loaded (GO) NONE NONE NONE
|
|
method config exists NONE NONE NONE
|
|
method config get NONE NONE NONE
|
|
method client desktop NONE NONE NONE
|
|
method client isShade NONE NONE NONE
|
|
method client isShadeable NONE NONE NONE
|
|
method client isMinimized NONE NONE NONE
|
|
method client isMinimizable NONE NONE NONE
|
|
method client isMaximizable NONE NONE NONE
|
|
method client isResizable NONE NONE NONE
|
|
method client isMovable NONE NONE NONE
|
|
method client isMovableAcrossScreens NONE NONE NONE
|
|
method client isCloseable NONE NONE NONE
|
|
PROPERTIES_DOC_LIST_END
|
|
|
|
PROPERTIES_DOC_DESC_START
|
|
|
|
# NOTES
|
|
# (m) workspace.getAllClients : Returns the client objects according to stacking order specified by an optional parameter which specifies the desktop nubmer to fetch the clients from. If no such parameter is provided, all clients are returned.
|
|
# (e) workspace.currentDesktopChanged : Occurs when the active desktop is changed. Parameters: prev_desktop
|
|
# (e) workspace.desktopPresenceChanged : Occurs when a client is switched from one desktop to another. Parameters: affected_client, prev_desktop
|
|
# (m) client.caption : Returns the caption of the client (or title in other terminologies)
|
|
# (e) client.clientMoved : Called when the client's geometry changed. Semantic error I know. Will be changed. TODO.
|
|
# (p) workspace.currentDesktop : Returns the current desktop of the workspace. Getter ONLY.
|
|
# (e) workspace.clientAdded : Called when a new client is added to the workspace. However, if there are clients already present when kwin is loaded, the C++ method. Workspace::clientAdded is called, but the script registered functions are not called. They are called ONLY for clients which are added after KWin has loaded. Maybe this will be fixed later, maybe not.
|
|
# (e) workspace.clientManaging: Called when a client is managed. Calls with one parameter, the client which is managed. NOTE: During this event, many of the client properties will not be available.
|
|
# (e) workspace.clientMinimize: Called when a client is minimized. Passes 1 parameter, the client which was minimized.
|
|
# (e) workspace.clientMaximizeSet: Called when the value of either of the two scalar dimensions of the client are set to the corresponding value of the workspace's dimensions or set to any other values FROM the corresponding values of the workspaces' dimensions. Passes 2 parameters, 1st being the client which is maximized and second specifying the vertically and horizontally hints.
|
|
# (m) client.close: Closes the given client. BTW: Just added client.close() within a function registered with workspace.clientAdded() to make a really annoying script ;)
|
|
# (e) workspace.killWindowCalled: Called whenever a kill window is requested [by default using the Ctrl+Esc sequence. Passes 1 param, the Client object of the Kill Window.
|
|
# (e) client.minimize: Called when the client is minimized. Called with no parameters.
|
|
# (e) client.maximizeSet: Similar to workspace.clientMaximizeSet other than for it's 1st parameter and called only when the event occurs on the specific client.
|
|
# (e) workspace.clientActivated: Called when any client gets focus. Called with one parameter: the client which was activated.
|
|
# (e) client.activated: Called when the object client gets activated.
|
|
#
|
|
# -- GEOMETRY PROPERTIES FOR TOPLEVEL --
|
|
# client inherits from toplevel i.e. toplevel properties are merged into the client scriptvalue before passing it to the
|
|
# scripting environment. Hence, all properties, methods and events of toplevel are available with the client object also
|
|
#
|
|
# (m) toplevel.x: Gives the x co-ordinate of the toplevel object.
|
|
# (m) toplevel.y: Gives the y co-ordinate of the toplevel object.
|
|
# (m) toplevel.width: Gives the width of the toplevel object.
|
|
# (m) toplevel.height: Givesn the height of the toplevel object.
|
|
# (m) toplevel.size: Returns the size in a QtScript object with properties of it's components. In JSON representation, the structure would be {w: <value>, h: <value>}.
|
|
# (m) toplevel.pos: Returns the posisition in a QtScript object with properties of it's components. In JSON representation, the structure would be {x: <value>, y: <value>}.
|
|
# (m) toplevel.geometry: Returns the complete geometry on a QtScript object with properties of it's components. In JSON representation, the structure would be [object] {x: <value>, y: <value>, w: <value>, h: <value>}
|
|
# (m) toplevel.move: Moves the client to the specified position.
|
|
# (m) toplevel.resize: Resized the client to the specified size.
|
|
# (m) toplevel.setGeometry: Set the geometry of the client to the specified size.
|
|
#
|
|
# -- For the three functions above --
|
|
#
|
|
# There are two methods to access each of these methods. One call can be made through using objects:
|
|
#
|
|
# client.move({x: <value>, y: <value>})
|
|
# client.resize({w: <value>, h: <value>})
|
|
# client.setGeometry({x: <value>, y: <value>, w: <value>, h: <value>})
|
|
#
|
|
# Or alternatively, using multiple parameters:
|
|
#
|
|
# client.move(x_value, y_value)
|
|
# client.resize(w_value, h_value)
|
|
# client.setGeometry(x_value, y_value, w_value, h_value)
|
|
#
|
|
# NOTE: For passing objects to these methods, the property names MUST match i.e. the move property expects properties
|
|
# 'x' and 'y' of the passed object.
|
|
#
|
|
# (m) client.isTransient : Returns (true) is 'client' is transient, (false) otherwise
|
|
# (m) client.transientFor : If the given client is transient, returns it's parent client, otherwise returns an undefin-
|
|
# ed scriptvalue.
|
|
# (m) client.activate : Attempt to focus the client, also send a parameter whether to force or not. However, focus stealing prevention still is activated and this may or may not actually focus the client.
|
|
# (m) client.setCaption : Set caption for the specified client.
|
|
# (m) workspace.dimensions : Returns the dimensions of the workspace. Accepts 1 string as a parameter which predates the the exact dimension to be returned. Default is "MaximizeMode"
|
|
# (m) workspace.desktopGridSize : Returns the size of the desktop in grid units.
|
|
# (m) client.isFullScreen : Returns true if the client is already in full screen mode.
|
|
# (m) client.isFullScreenable : Returns true if the client can be set in full screen mode.
|
|
# (m) client.setFullScreen : Set or clear full screen mode of the clientActivated
|
|
# (e) client.fullScreenSet : Occurs whenever the specified client is set to fullscreen.
|
|
# (e) workspace.clientFullScreenSet : Occurs whenever any client is set to fullscreen. Passes three params: client, set, user
|
|
# (m) toplevel.opacity : Returns a qsreal denoting the opacity of the cient.
|
|
# (m) toplevel.hasAlpha : Returns a boolean signifying whether the client has alpha compositing (porter-duff) enabled or not.
|
|
# (m) toplevel.setOpacity : Set the opacity of the client to a specified value. Accepts 1 qsreal parameter, the opacity value.
|
|
# (m) clientgroup.ClientGroup (ctor) : Constructor for a new ClientGroup object. Must pass a client object, otherwise returns an invalid scriptvalue.
|
|
# (m) clientgroup.add : Add a client to a client group. Expects 1 parameter.
|
|
# (m) workspace.activeClient : Returns the active client on the workspace i.e. the client which currently has focus.
|
|
# (m) workspace.clientGroups : Returns an array of clientGroups currently present in the workspace.
|
|
# (m) clientgroup.remove : Removes the client specified by the parameter which is either a client object or an index of the client in the clientlist.
|
|
# (m) clientgroup.clients : Returns an array of clients which are members of the clientgroup.
|
|
# (m) client.clientGroup : Returns the clientgroup a given client belongs to, or an undefined scriptvalue otherwise.
|
|
# (m) clientgroup.contains : Accepts a client parameter, and returns true the client is contained within the clientgroup
|
|
# (m) clientgroup.indexOf : Returns the index of the parameter 'client' within the clientgroup
|
|
# (m) clientgroup.move : 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)
|
|
# (m) clientgroup.removeAll : Removes all clients from a group and assigns them individual groups.
|
|
# (m) clientgroup.closeAll : Closes all the clients in a group.
|
|
# (m) clientgroup.minSize : Returns the minimum size cumulative of all the clients in the clientgroup.
|
|
# (m) clientgroup.maxSize : Returns the maximum size cumulative of all the clients in the clientgroup.
|
|
# (p) config.loaded : Returns true if a file corresponding to the script has been found and loaded.
|
|
# (m) config.get : Gets the value for the given configuration parameters. Various methods to use this are: get() returns all available values in a value-key pair. get(keys, simple) returns an array of value indexed by keys if simple is 0 or indexed by integers if simple is 1. get(keys) is equivalent of get(keys, 0). get(key1, key2 ... ) is equivalent of get(array(key1, key2 ... ), 0).
|
|
# (m) config.exists : Returns true if the provided key exists within the configuration or false otherwise.
|
|
# (m) client.desktop : Returns the desktop the client is on. Returns -1 if the client is on all desktops.
|
|
# (m) client.isShade : Returns true if the client is shaded, false otherwise.
|
|
# (m) client.isShadeable : Returns true if the client can be shaded, false otherwise.
|
|
# (m) client.isMinimized : Returns true if the client is minimized, false otherwise.
|
|
# (m) client.isMinimizable : Returns true if the client can be minimized, false otherwise.
|
|
# (m) client.isMaximizable : Returns true if the client can be maximized, false otherwise.
|
|
# (m) client.isResizable : Returns true if the client can be resized, false otherwise.
|
|
# (m) client.isMovable : Returns true if the client can be moved, false otherwise.
|
|
# (m) client.isMovableAcrossScreens : Returns true if the client can be moved across screens, false otherwise.
|
|
# (m) client.isCloseable : Returns true if the client can be closed, false otherwise.
|
|
|
|
PROPERTIES_DOC_DESC_END
|