1 module libwasm.bindings.AnimationEffect; 2 3 import libwasm.types; 4 5 import memutils.ct: tuple; 6 @safe: 7 nothrow: 8 9 struct AnimationEffect { 10 nothrow: 11 JsHandle handle; 12 alias handle this; 13 this(Handle h) { 14 this.handle = JsHandle(h); 15 } 16 auto getTiming()() { 17 return EffectTiming(Object_Getter__Handle(this.handle, "getTiming")); 18 } 19 auto getComputedTiming()() { 20 return ComputedEffectTiming(Object_Getter__Handle(this.handle, "getComputedTiming")); 21 } 22 void updateTiming()(scope ref OptionalEffectTiming timing) { 23 Object_Call_Handle__void(this.handle, "updateTiming", timing.handle); 24 } 25 void updateTiming()() { 26 Object_Call__void(this.handle, "updateTiming"); 27 } 28 } 29 struct ComputedEffectTiming { 30 nothrow: 31 libwasm.bindings.AnimationEffect.EffectTiming _parent; 32 alias _parent this; 33 this(Handle h) { 34 _parent = .EffectTiming(h); 35 } 36 static auto create() { 37 return ComputedEffectTiming(libwasm_add__object()); 38 } 39 void endTime()(double endTime) { 40 Object_Call_double__void(this._parent, "endTime", endTime); 41 } 42 double endTime()() { 43 return Object_Getter__double(this._parent, "endTime"); 44 } 45 void activeDuration()(double activeDuration) { 46 Object_Call_double__void(this._parent, "activeDuration", activeDuration); 47 } 48 double activeDuration()() { 49 return Object_Getter__double(this._parent, "activeDuration"); 50 } 51 void localTime(T0)(scope auto ref Optional!(T0) localTime) if (isTOrPointer!(T0, double)) { 52 Serialize_Object_VarArgCall!void(this._parent, "localTime", "Optional!(double)", tuple(!localTime.empty, localTime.front)); 53 } 54 Optional!(double) localTime()() { 55 return Object_Getter__OptionalDouble(this._parent, "localTime"); 56 } 57 void progress(T0)(scope auto ref Optional!(T0) progress) if (isTOrPointer!(T0, double)) { 58 Serialize_Object_VarArgCall!void(this._parent, "progress", "Optional!(double)", tuple(!progress.empty, progress.front)); 59 } 60 Optional!(double) progress()() { 61 return Object_Getter__OptionalDouble(this._parent, "progress"); 62 } 63 void currentIteration(T0)(scope auto ref Optional!(T0) currentIteration) if (isTOrPointer!(T0, double)) { 64 Serialize_Object_VarArgCall!void(this._parent, "currentIteration", "Optional!(double)", tuple(!currentIteration.empty, currentIteration.front)); 65 } 66 Optional!(double) currentIteration()() { 67 return Object_Getter__OptionalDouble(this._parent, "currentIteration"); 68 } 69 } 70 struct EffectTiming { 71 nothrow: 72 JsHandle handle; 73 alias handle this; 74 this(Handle h) { 75 this.handle = JsHandle(h); 76 } 77 static auto create() { 78 return EffectTiming(libwasm_add__object()); 79 } 80 void delay()(double delay) { 81 Object_Call_double__void(this.handle, "delay", delay); 82 } 83 double delay()() { 84 return Object_Getter__double(this.handle, "delay"); 85 } 86 void endDelay()(double endDelay) { 87 Object_Call_double__void(this.handle, "endDelay", endDelay); 88 } 89 double endDelay()() { 90 return Object_Getter__double(this.handle, "endDelay"); 91 } 92 void fill()(FillMode fill) { 93 Object_Call_int__void(this.handle, "fill", fill); 94 } 95 FillMode fill()() { 96 return Object_Getter__int(this.handle, "fill"); 97 } 98 void iterationStart()(double iterationStart) { 99 Object_Call_double__void(this.handle, "iterationStart", iterationStart); 100 } 101 double iterationStart()() { 102 return Object_Getter__double(this.handle, "iterationStart"); 103 } 104 void iterations()(double iterations) { 105 Object_Call_double__void(this.handle, "iterations", iterations); 106 } 107 double iterations()() { 108 return Object_Getter__double(this.handle, "iterations"); 109 } 110 void duration()(scope ref SumType!(double, string) duration) { 111 Serialize_Object_VarArgCall!void(this.handle, "duration", "SumType!(double,string)", tuple(libwasm.sumtype.match!(((double v) => 0),((string v) => 1))(duration),tuple(libwasm.sumtype.match!(((double v) => v),((string v) => double.init))(duration),libwasm.sumtype.match!(((double v) => string.init),((string v) => v))(duration)))); 112 } 113 auto duration()() { 114 return Object_Getter__Handle(this.handle, "duration"); 115 } 116 void direction()(PlaybackDirection direction) { 117 Object_Call_int__void(this.handle, "direction", direction); 118 } 119 PlaybackDirection direction()() { 120 return Object_Getter__int(this.handle, "direction"); 121 } 122 void easing()(string easing) { 123 Object_Call_string__void(this.handle, "easing", easing); 124 } 125 string easing()() { 126 return Object_Getter__string(this.handle, "easing"); 127 } 128 } 129 enum FillMode { 130 none, 131 forwards, 132 backwards, 133 both, 134 auto_ 135 } 136 struct OptionalEffectTiming { 137 nothrow: 138 JsHandle handle; 139 alias handle this; 140 this(Handle h) { 141 this.handle = JsHandle(h); 142 } 143 static auto create() { 144 return OptionalEffectTiming(libwasm_add__object()); 145 } 146 void delay()(double delay) { 147 Object_Call_double__void(this.handle, "delay", delay); 148 } 149 double delay()() { 150 return Object_Getter__double(this.handle, "delay"); 151 } 152 void endDelay()(double endDelay) { 153 Object_Call_double__void(this.handle, "endDelay", endDelay); 154 } 155 double endDelay()() { 156 return Object_Getter__double(this.handle, "endDelay"); 157 } 158 void fill()(FillMode fill) { 159 Object_Call_int__void(this.handle, "fill", fill); 160 } 161 FillMode fill()() { 162 return Object_Getter__int(this.handle, "fill"); 163 } 164 void iterationStart()(double iterationStart) { 165 Object_Call_double__void(this.handle, "iterationStart", iterationStart); 166 } 167 double iterationStart()() { 168 return Object_Getter__double(this.handle, "iterationStart"); 169 } 170 void iterations()(double iterations) { 171 Object_Call_double__void(this.handle, "iterations", iterations); 172 } 173 double iterations()() { 174 return Object_Getter__double(this.handle, "iterations"); 175 } 176 void duration()(scope ref SumType!(double, string) duration) { 177 Serialize_Object_VarArgCall!void(this.handle, "duration", "SumType!(double,string)", tuple(libwasm.sumtype.match!(((double v) => 0),((string v) => 1))(duration),tuple(libwasm.sumtype.match!(((double v) => v),((string v) => double.init))(duration),libwasm.sumtype.match!(((double v) => string.init),((string v) => v))(duration)))); 178 } 179 auto duration()() { 180 return Object_Getter__Handle(this.handle, "duration"); 181 } 182 void direction()(PlaybackDirection direction) { 183 Object_Call_int__void(this.handle, "direction", direction); 184 } 185 PlaybackDirection direction()() { 186 return Object_Getter__int(this.handle, "direction"); 187 } 188 void easing()(string easing) { 189 Object_Call_string__void(this.handle, "easing", easing); 190 } 191 string easing()() { 192 return Object_Getter__string(this.handle, "easing"); 193 } 194 } 195 enum PlaybackDirection { 196 normal, 197 reverse, 198 alternate, 199 alternate_reverse 200 } 201 202