Warning, /plasma/kwin/src/scripting/documentation-effect-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 effect methods. In doxygen XML format as this can be converted to MediaWiki --> 0004 <!-- Use script and XSLT from kde:scratch/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::EffectsHandler</type> 0012 <definition></definition> 0013 <argsstring></argsstring> 0014 <name>effects</name> 0015 <read></read> 0016 <detaileddescription>Global property to the core wrapper of KWin Effects</detaileddescription> 0017 </memberdef> 0018 <memberdef kind="property" writable="no"> 0019 <type>KWin::ScriptedEffect</type> 0020 <definition></definition> 0021 <argsstring></argsstring> 0022 <name>effect</name> 0023 <read></read> 0024 <detaileddescription>Global property to the actual Effect</detaileddescription> 0025 </memberdef> 0026 <memberdef kind="property" writable="no"> 0027 <type>object</type> 0028 <definition></definition> 0029 <argsstring></argsstring> 0030 <name>Effect</name> 0031 <read></read> 0032 <detaileddescription>Provides access to enums defined in KWin::AnimationEffect and KWin::ScriptedEffect</detaileddescription> 0033 </memberdef> 0034 <memberdef kind="property" writable="no"> 0035 <type>object</type> 0036 <definition></definition> 0037 <argsstring></argsstring> 0038 <name>KWin</name> 0039 <read></read> 0040 <detaileddescription>Provides access to enums defined in KWin::WorkspaceWrapper</detaileddescription> 0041 </memberdef> 0042 <memberdef kind="property" writable="no"> 0043 <type>object</type> 0044 <definition></definition> 0045 <argsstring></argsstring> 0046 <name>QEasingCurve</name> 0047 <read></read> 0048 <detaileddescription>Provides access to enums defined in QEasingCurve</detaileddescription> 0049 </memberdef> 0050 </sectiondef> 0051 <sectiondef kind="public-func"> 0052 <memberdef kind="function"> 0053 <type>Q_SCRIPTABLE QList<quint64></type> 0054 <definition>QList<quint64> KWin::ScriptedEffect::animate</definition> 0055 <argsstring>(settings)</argsstring> 0056 <name>animate</name> 0057 <read></read> 0058 <detaileddescription> 0059 Schedules one or many animations for one window. The animations are defined through the settings object providing 0060 a more declarative way to specify the animations than the animate call on the effect object. The settings object 0061 supports the following attributes: 0062 <syntaxhighlight lang="javascript"> 0063 { 0064 window: EffectWindow, /* the window to animate, required */ 0065 duration: int, /* duration in msec, required */ 0066 curve: QEasingCurve.Type, /* global easing curve, optional */ 0067 type: Effect.Attribute, /* for first animation, optional */ 0068 from: FPx2, /* for first animation, optional */ 0069 to: FPx2, /* for first animation, optional */ 0070 delay: int, /* for first animation, optional */ 0071 shader: int, /* for first animation, optional */ 0072 animations: [ /* additional animations, optional */ 0073 { 0074 curve: QEasingCurve.Type, /* overrides global */ 0075 type: Effect.Attribute, 0076 from: FPx2, 0077 to: FPx2, 0078 delay: int, 0079 shader: int 0080 } 0081 ] 0082 } 0083 </syntaxhighlight> 0084 At least one animation or attribute setter (see below) needs to be specified either with the top-level properties or in the animations list. 0085 </detaileddescription> 0086 </memberdef> 0087 <memberdef kind="function"> 0088 <type>Q_SCRIPTABLE QList<quint64></type> 0089 <definition>QList<quint64> KWin::ScriptedEffect::set</definition> 0090 <argsstring>(settings)</argsstring> 0091 <name>set</name> 0092 <read></read> 0093 <detaileddescription> 0094 Like animate, just that the manipulation does not implicitly end with the animation. You have to explicitly cancel it. 0095 Until then, the manipulated attribute will remain at animation target value. 0096 </detaileddescription> 0097 </memberdef> 0098 <memberdef kind="function"> 0099 <type>Q_SCRIPTABLE bool</type> 0100 <definition>bool KWin::ScriptedEffect::cancel</definition> 0101 <argsstring>(QList<quint64>)</argsstring> 0102 <name>cancel</name> 0103 <read></read> 0104 <detaileddescription> 0105 Cancel one or more present animations caused and returned by KWin::ScriptedEffect::animate or KWin::ScriptedEffect::set. 0106 For convenience you can pass a single quint64 as well. 0107 </detaileddescription> 0108 </memberdef> 0109 <memberdef kind="function"> 0110 <type>Q_SCRIPTABLE void</type> 0111 <definition>void KWin::ScriptedEffect::print</definition> 0112 <argsstring>(QVariant ... values)</argsstring> 0113 <name>print</name> 0114 <read></read> 0115 <detaileddescription>Prints all provided values to kDebug and as a D-Bus signal</detaileddescription> 0116 </memberdef> 0117 <memberdef kind="function"> 0118 <type>Q_SCRIPTABLE int</type> 0119 <definition>int KWin::ScriptedEffect::animationTime</definition> 0120 <argsstring>(int duration)</argsstring> 0121 <name>animationTime</name> 0122 <read></read> 0123 <detaileddescription>Adjusts the passed in duration to the global animation time facator.</detaileddescription> 0124 </memberdef> 0125 <memberdef kind="function"> 0126 <type>Q_SCRIPTABLE int</type> 0127 <definition>int KWin::ScriptedEffect::displayWidth</definition> 0128 <argsstring>()</argsstring> 0129 <name>displayWidth</name> 0130 <read></read> 0131 <detaileddescription>Width of the complete display (all screens).</detaileddescription> 0132 </memberdef> 0133 <memberdef kind="function"> 0134 <type>Q_SCRIPTABLE int</type> 0135 <definition>int KWin::ScriptedEffect::displayHeight</definition> 0136 <argsstring>()</argsstring> 0137 <name>displayHeight</name> 0138 <read></read> 0139 <detaileddescription>Height of the complete display (all screens).</detaileddescription> 0140 </memberdef> 0141 <memberdef kind="function"> 0142 <type>Q_SCRIPTABLE bool</type> 0143 <definition>bool KWin::ScriptedEffect::registerScreenEdge</definition> 0144 <argsstring>(ElectricBorder border, QScriptValue callback)</argsstring> 0145 <name>registerScreenEdge</name> 0146 <read></read> 0147 <detaileddescription>Registers the callback for the screen edge. When the mouse gets pushed against the given edge the callback will be invoked.</detaileddescription> 0148 </memberdef> 0149 <memberdef kind="function"> 0150 <type>Q_SCRIPTABLE bool</type> 0151 <definition>bool KWin::ScriptedEffect::registerShortcut</definition> 0152 <argsstring>(QString title, QString text, QString keySequence, QScriptValue callback)</argsstring> 0153 <name>registerShortcut</name> 0154 <read></read> 0155 <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> 0156 </memberdef> 0157 <memberdef kind="function"> 0158 <type>Q_SCRIPTABLE uint</type> 0159 <definition>uint KWin::ScriptedEffect::addFragmentShader</definition> 0160 <argsstring>(ShaderTrait traits, QString fragmentShaderFile)</argsstring> 0161 <name>addFragmentShader</name> 0162 <read></read> 0163 <detaileddescription>Creates a shader and returns an identifier which can be used in animate or set. The shader sources must be provided in the shaders sub-directory of the contents package directory. The fragment shader needs to have the file extension frag. Each shader should be provided in a GLSL 1.10 and GLSL 1.40 variant. The 1.40 variant needs to have a suffix _core. E.g. there should be a shader myCustomShader.frag and myCustomShader_core.frag. The vertex shader is generated from the ShaderTrait. The ShaderTrait enum can be used as flags in this method.</detaileddescription> 0164 </memberdef> 0165 <memberdef kind="function"> 0166 <type>Q_SCRIPTABLE uint</type> 0167 <definition>void KWin::ScriptedEffect::setUniform</definition> 0168 <argsstring>(uint shaderId, QString name, QJSValue value)</argsstring> 0169 <name>setUniform</name> 0170 <read></read> 0171 <detaileddescription>Updates the uniform value of the uniform identified by @p name for the shader identified by @p shaderId. The @p value can be a floating point numeric value (integer uniform values are not supported), an array with either 2, 3 or 4 numeric values, a string to identify a color or a variant value to identify a color as returned by readConfig. This method can be used to update the state of the shader when the configuration of the effect changed.</detaileddescription> 0172 </memberdef> 0173 </sectiondef> 0174 </compounddef> 0175 <compounddef> 0176 <compoundname>KWin::FPx2</compoundname> 0177 <briefdescription>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.</briefdescription> 0178 <sectiondef kind="property"> 0179 <memberdef kind="property" writable="yes"> 0180 <type>qreal</type> 0181 <definition></definition> 0182 <argsstring></argsstring> 0183 <name>value1</name> 0184 <read></read> 0185 <detaileddescription></detaileddescription> 0186 </memberdef> 0187 <memberdef kind="property" writable="yes"> 0188 <type>qreal</type> 0189 <definition></definition> 0190 <argsstring></argsstring> 0191 <name>value2</name> 0192 <read></read> 0193 <detaileddescription></detaileddescription> 0194 </memberdef> 0195 </sectiondef> 0196 </compounddef> 0197 </doxygen>