Warning, /plasma/kwin/src/scripting/documentation-global.xml is written in an unsupported language. File is not indexed.
0001 <?xml version='1.0' encoding='UTF-8' standalone='no'?> 0002 <doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.7.6.1"> 0003 <!-- Documentation for global KWin scripting methods. In doxygen XML format as this can be converted to MediaWiki --> 0004 <!-- Use script and XSLT from https://invent.kde.org/graesslin/kwin-scripting-api-generator to generate the documentation --> 0005 <!-- This xml is not meant to be doxygen complient --> 0006 <compounddef> 0007 <compoundname>Global</compoundname> 0008 <briefdescription>Methods and properties added to the global JavaScript object.</briefdescription> 0009 <sectiondef kind="property"> 0010 <memberdef kind="property" writable="no"> 0011 <type>KWin::Options</type> 0012 <definition></definition> 0013 <argsstring></argsstring> 0014 <name>options</name> 0015 <read></read> 0016 <detaileddescription>Global property to all configuration values of KWin core.</detaileddescription> 0017 </memberdef> 0018 <memberdef kind="property" writable="no"> 0019 <type>KWin::Workspace</type> 0020 <definition></definition> 0021 <argsstring></argsstring> 0022 <name>workspace</name> 0023 <read></read> 0024 <detaileddescription>Global property to the core wrapper of KWin.</detaileddescription> 0025 </memberdef> 0026 <memberdef kind="property" writable="no"> 0027 <type>object</type> 0028 <definition></definition> 0029 <argsstring></argsstring> 0030 <name>KWin</name> 0031 <read></read> 0032 <detaileddescription>Provides access to enums defined in KWin::WorkspaceWrapper</detaileddescription> 0033 </memberdef> 0034 </sectiondef> 0035 <sectiondef kind="public-func"> 0036 <memberdef kind="function"> 0037 <type>Q_SCRIPTABLE void</type> 0038 <definition>void KWin::Scripting::print</definition> 0039 <argsstring>(QVariant ... values)</argsstring> 0040 <name>print</name> 0041 <read></read> 0042 <detaileddescription>Prints all provided values to kDebug and as a D-Bus signal</detaileddescription> 0043 </memberdef> 0044 <memberdef kind="function"> 0045 <type>Q_SCRIPTABLE QVariant</type> 0046 <definition>QVariant KWin::Scripting::readConfig</definition> 0047 <argsstring>(QString key, QVariant defaultValue = QVariant())</argsstring> 0048 <name>readConfig</name> 0049 <read></read> 0050 <detaileddescription>Reads the config value for key in the Script's configuration with the optional default value. If not providing a default value and no value stored in the configuration an undefined value is returned.</detaileddescription> 0051 </memberdef> 0052 <memberdef kind="function"> 0053 <type>Q_SCRIPTABLE bool</type> 0054 <definition>bool KWin::Scripting::registerScreenEdge</definition> 0055 <argsstring>(ElectricBorder border, QScriptValue callback)</argsstring> 0056 <name>registerScreenEdge</name> 0057 <read></read> 0058 <detaileddescription>Registers the callback for the screen edge. When the mouse gets pushed against the given edge the callback will be invoked. 0059 Scripts can also add "X-KWin-Border-Activate" to their metadata file to have the effect listed in the screen edges KCM. This will write an entry BorderConfig= in the script configuration object with a list of ScreenEdges the user has selected. 0060 </detaileddescription> 0061 </memberdef> 0062 <memberdef kind="function"> 0063 <type>Q_SCRIPTABLE bool</type> 0064 <definition>bool KWin::Scripting::unregisterScreenEdge</definition> 0065 <argsstring>(ElectricBorder border)</argsstring> 0066 <name>unregisterScreenEdge</name> 0067 <read></read> 0068 <detaileddescription>Unregisters the callback for the screen edge. This will disconnect all callbacks from this script to that edge.</detaileddescription> 0069 </memberdef> 0070 <memberdef kind="function"> 0071 <type>Q_SCRIPTABLE bool</type> 0072 <definition>bool KWin::Scripting::registerShortcut</definition> 0073 <argsstring>(QString title, QString text, QString keySequence, QScriptValue callback)</argsstring> 0074 <name>registerShortcut</name> 0075 <read></read> 0076 <detaileddescription>Registers keySequence as a global shortcut. When the shortcut is invoked the callback will be called. Title and text are used to name the shortcut and make it available to the global shortcut configuration module.</detaileddescription> 0077 </memberdef> 0078 <memberdef kind="function"> 0079 <type>Q_SCRIPTABLE bool</type> 0080 <definition>bool KWin::Scripting::assert</definition> 0081 <argsstring>(bool value, QString message = QString())</argsstring> 0082 <name>assert</name> 0083 <read></read> 0084 <detaileddescription>Aborts the execution of the script if value does not evaluate to true. If message is provided an error is thrown with the given message, if not provided an error with default message is thrown.</detaileddescription> 0085 </memberdef> 0086 <memberdef kind="function"> 0087 <type>Q_SCRIPTABLE bool</type> 0088 <definition>bool KWin::Scripting::assertTrue</definition> 0089 <argsstring>(bool value, QString message = QString())</argsstring> 0090 <name>assertTrue</name> 0091 <read></read> 0092 <detaileddescription>Aborts the execution of the script if value does not evaluate to true. If message is provided an error is thrown with the given message, if not provided an error with default message is thrown.</detaileddescription> 0093 </memberdef> 0094 <memberdef kind="function"> 0095 <type>Q_SCRIPTABLE bool</type> 0096 <definition>bool KWin::Scripting::assertFalse</definition> 0097 <argsstring>(bool value, QString message = QString())</argsstring> 0098 <name>assertFalse</name> 0099 <read></read> 0100 <detaileddescription>Aborts the execution of the script if value does not evaluate to false. If message is provided an error is thrown with the given message, if not provided an error with default message is thrown.</detaileddescription> 0101 </memberdef> 0102 <memberdef kind="function"> 0103 <type>Q_SCRIPTABLE bool</type> 0104 <definition>bool KWin::Scripting::assertEquals</definition> 0105 <argsstring>(QVariant expected, QVariant actual, QString message = QString())</argsstring> 0106 <name>assertEquals</name> 0107 <read></read> 0108 <detaileddescription>Aborts the execution of the script if the actual value is not equal to the expected value. If message is provided an error is thrown with the given message, if not provided an error with default message is thrown.</detaileddescription> 0109 </memberdef> 0110 <memberdef kind="function"> 0111 <type>Q_SCRIPTABLE bool</type> 0112 <definition>bool KWin::Scripting::assertNull</definition> 0113 <argsstring>(QVariant value, QString message = QString())</argsstring> 0114 <name>assertNull</name> 0115 <read></read> 0116 <detaileddescription>Aborts the execution of the script if value is not null. If message is provided an error is thrown with the given message, if not provided an error with default message is thrown.</detaileddescription> 0117 </memberdef> 0118 <memberdef kind="function"> 0119 <type>Q_SCRIPTABLE bool</type> 0120 <definition>bool KWin::Scripting::assertNotNull</definition> 0121 <argsstring>(QVariant value, QString message = QString())</argsstring> 0122 <name>assertNotNull</name> 0123 <read></read> 0124 <detaileddescription>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.</detaileddescription> 0125 </memberdef> 0126 <memberdef kind="function"> 0127 <type>Q_SCRIPTABLE void</type> 0128 <definition>void KWin::Scripting::callDBus</definition> 0129 <argsstring>(QString service, QString path, QString interface, QString method, QVariant arg..., QScriptValue callback = QScriptValue())</argsstring> 0130 <name>callDBus</name> 0131 <read></read> 0132 <detaileddescription>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.</detaileddescription> 0133 </memberdef> 0134 <memberdef kind="function"> 0135 <type>Q_SCRIPTABLE void</type> 0136 <definition>void KWin::Scripting::registerUserActionsMenu</definition> 0137 <argsstring>(QScriptValue callback)</argsstring> 0138 <name>registerUserActionsMenu</name> 0139 <read></read> 0140 <detaileddescription>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*/}</detaileddescription> 0141 </memberdef> 0142 </sectiondef> 0143 </compounddef> 0144 </doxygen>