From 550ac7d2b0350214977de1e1eb831bc2047ca7d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Sun, 28 Oct 2012 10:06:00 +0100 Subject: [PATCH] Documentation for global methods and properties of scripted effects Using Doxygen xml structure which can be converted to MediaWiki using the xslt from git repo scratch/graesslin/kwin-scripting-api-generator.git --- scripting/documentation-effect-global.xml | 116 ++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 scripting/documentation-effect-global.xml diff --git a/scripting/documentation-effect-global.xml b/scripting/documentation-effect-global.xml new file mode 100644 index 0000000000..983827fa5f --- /dev/null +++ b/scripting/documentation-effect-global.xml @@ -0,0 +1,116 @@ + + + + + + + Global + Methods and properties added to the global JavaScript object. + + + KWin::EffectsHandler + + + effects + + Global property to the core wrapper of KWin Effects + + + KWin::ScriptedEffect + + + effect + + Global property to the actual Effect + + + object + + + Effect + + Provides access to enums defined in KWin::AnimationEffect and KWin::ScriptedEffect + + + object + + + KWin + + Provides access to enums defined in KWin::WorkspaceWrapper + + + + + Q_SCRIPTABLE void + void KWin::ScriptedEffect::print + (QVariant ... values) + print + + Prints all provided values to kDebug and as a D-Bus signal + + + Q_SCRIPTABLE int + int KWin::ScriptedEffect::animationTime + (int duration) + animationTime + + Adjusts the passed in duration to the global animation time facator. + + + Q_SCRIPTABLE int + int KWin::ScriptedEffect::displayWidth + () + displayWidth + + Width of the complete display (all screens). + + + Q_SCRIPTABLE int + int KWin::ScriptedEffect::displayHeight + () + displayHeight + + Height of the complete display (all screens). + + + Q_SCRIPTABLE bool + bool KWin::ScriptedEffect::registerScreenEdge + (ElectricBorder border, QScriptValue callback) + registerScreenEdge + + Registers the callback for the screen edge. When the mouse gets pushed against the given edge the callback will be invoked. + + + Q_SCRIPTABLE bool + bool KWin::ScriptedEffect::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. + + + + + KWin::FPx2 + This class is used to describe the animation end points, that is from which FPx2 values to which FPx2 values an animation goes. This class contains two properties to describe two animation components individually (e.g. width and height). But it's also possible to just have one value (e.g. opacity). In this case the definition of an FPx2 can be replaced by a single value. + + + qreal + + + value1 + + + + + qreal + + + value2 + + + + + +