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 object QEasingCurve Provides access to enums defined in QEasingCurve Q_SCRIPTABLE QList<quint64> QList<quint64> KWin::ScriptedEffect::animate (settings) animate Schedules one or many animations for one window. The animations are defined through the settings object providing a more declarative way to specify the animations than the animate call on the effect object. The settings object supports the following attributes: <syntaxhighlight lang="javascript"> { window: EffectWindow, /* the window to animate, required */ duration: int, /* duration in msec, required */ curve: QEasingCurve.Type, /* global easing curve, optional */ type: Effect.Attribute, /* for first animation, optional */ from: FPx2, /* for first animation, optional */ to: FPx2, /* for first animation, optional */ delay: int, /* for first animation, optional */ animations: [ /* additional animations, optional */ { curve: QEasingCurve.Type, /* overrides global */ type: Effect.Attribute, from: FPx2, to: FPx2, delay: int } ] } </syntaxhighlight> At least one animation or attribute setter (see below) needs to be specified either with the top-level properties or in the animations list. Q_SCRIPTABLE QList<quint64> QList<quint64> KWin::ScriptedEffect::set (settings) set Like animate, just that the manipulation does not implicitly end with the animation. You have to explicitly cancel it. Until then, the manipulated attribute will remain at animation target value. Q_SCRIPTABLE bool bool KWin::ScriptedEffect::cancel (QList<quint64>) cancel Cancel one or more present animations caused and returned by KWin::ScriptedEffect::animate or KWin::ScriptedEffect::set. For convenience you can pass a single quint64 as well. 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