Mgraesslin (Talk | contribs) |
Mgraesslin (Talk | contribs) |
||
| (One intermediate revision by one user not shown) | |||
| Line 5: | Line 5: | ||
* ''KWin::Options'' '''options''': Global property to all configuration values of KWin core. | * ''KWin::Options'' '''options''': Global property to all configuration values of KWin core. | ||
* ''KWin::Workspace'' '''workspace''': Global property to the core wrapper of KWin. | * ''KWin::Workspace'' '''workspace''': Global property to the core wrapper of KWin. | ||
| + | * ''object'' '''KWin''': Provides access to enums defined in KWin::WorkspaceWrapper | ||
=== Functions === | === Functions === | ||
| Line 18: | Line 19: | ||
* ''bool'' '''assertNotNull(QVariant value, QString message = QString())''': Aborts the execution of the script if value is null. If message is provided an error is thrown with the given message, if not provided an error with default message is thrown. | * ''bool'' '''assertNotNull(QVariant value, QString message = QString())''': Aborts the execution of the script if value is null. If message is provided an error is thrown with the given message, if not provided an error with default message is thrown. | ||
* '''callDBus(QString service, QString path, QString interface, QString method, QVariant arg..., QScriptValue callback = QScriptValue())''': Call a D-Bus method at (service, path, interface and method). A variable number of arguments can be added to the method call. The D-Bus call is always performed in an async way invoking the callback provided as the last (optional) argument. The reply values of the D-Bus method call are passed to the callback. | * '''callDBus(QString service, QString path, QString interface, QString method, QVariant arg..., QScriptValue callback = QScriptValue())''': Call a D-Bus method at (service, path, interface and method). A variable number of arguments can be added to the method call. The D-Bus call is always performed in an async way invoking the callback provided as the last (optional) argument. The reply values of the D-Bus method call are passed to the callback. | ||
| − | * '''QScriptValue callback''': Registers the passed in callback to be invoked whenever the User actions menu (Alt+F3 or right click on window decoration) is about to be shown. The callback is invoked with a reference to the Client for which the menu is shown. The callback can return either a single menu entry to be added to the menu or an own sub menu with multiple entries. The object for a menu entry should be {title: "My Menu entry", checkable: true, checked: false, triggered: function (action) { // callback with triggered QAction}}, for a menu it should be {title: "My menu", items: [{...}, {...}, ...] /*list with entries as described*/} | + | * '''registerUserActionsMenu(QScriptValue callback)''': Registers the passed in callback to be invoked whenever the User actions menu (Alt+F3 or right click on window decoration) is about to be shown. The callback is invoked with a reference to the Client for which the menu is shown. The callback can return either a single menu entry to be added to the menu or an own sub menu with multiple entries. The object for a menu entry should be {title: "My Menu entry", checkable: true, checked: false, triggered: function (action) { // callback with triggered QAction}}, for a menu it should be {title: "My menu", items: [{...}, {...}, ...] /*list with entries as described*/} |
Contents |
Methods and properties added to the global JavaScript object.
Inherits: KDecorationOptions
Inherits: KDecorationDefines
The Client class encapsulates a window decoration frame. Inherits: KWin::Toplevel