From e59a96b57c22f2c1b1feadbcde4ad4e635be2b61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 10 Apr 2012 20:41:57 +0200 Subject: [PATCH] Documentation for global JavaScript methods/properties The documentation is in an XML file which mimics the XML output of doxygen, which can be converted to MediaWiki syntax with the tools found in kde:scratch/graesslin/kwin-scripting-api-generator git repository. BUG: 297640 FIXED-IN: 4.9.0 --- scripting/documentation-global.xml | 54 ++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 scripting/documentation-global.xml diff --git a/scripting/documentation-global.xml b/scripting/documentation-global.xml new file mode 100644 index 0000000000..d2fdd0d92f --- /dev/null +++ b/scripting/documentation-global.xml @@ -0,0 +1,54 @@ + + + + + + + Global + Methods and properties added to the global JavaScript object. + + + KWin::Options + + + options + + Global property to all configuration values of KWin core. + + + KWin::Workspace + + + workspace + + Global property to the core wrapper of KWin. + + + + + Q_SCRIPTABLE void + void KWin::Scripting::print + (QVariant ... values) + print + + Prints all provided values to kDebug and as a D-Bus signal + + + Q_SCRIPTABLE QVariant + QVariant KWin::Scripting::readConfig + (QString key, QVariant defaultValue = QVariant()) + readConfig + + 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. + + + Q_SCRIPTABLE bool + bool KWin::Scripting::registerShortcut + (QString title, QString text, QString keySequence, QScriptValue callback) + registerShortcut + + 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. + + + +