1 module libwasm.bindings.BaseKeyframeTypes; 2 3 import libwasm.types; 4 5 import memutils.ct: tuple; 6 @safe: 7 nothrow: 8 9 struct BaseComputedKeyframe { 10 nothrow: 11 libwasm.bindings.BaseKeyframeTypes.BaseKeyframe _parent; 12 alias _parent this; 13 this(Handle h) { 14 _parent = .BaseKeyframe(h); 15 } 16 static auto create() { 17 return BaseComputedKeyframe(libwasm_add__object()); 18 } 19 void computedOffset()(double computedOffset) { 20 Object_Call_double__void(this._parent, "computedOffset", computedOffset); 21 } 22 double computedOffset()() { 23 return Object_Getter__double(this._parent, "computedOffset"); 24 } 25 } 26 struct BaseKeyframe { 27 nothrow: 28 JsHandle handle; 29 alias handle this; 30 this(Handle h) { 31 this.handle = JsHandle(h); 32 } 33 static auto create() { 34 return BaseKeyframe(libwasm_add__object()); 35 } 36 void offset(T0)(scope auto ref Optional!(T0) offset) if (isTOrPointer!(T0, double)) { 37 Serialize_Object_VarArgCall!void(this.handle, "offset", "Optional!(double)", tuple(!offset.empty, offset.front)); 38 } 39 Optional!(double) offset()() { 40 return Object_Getter__OptionalDouble(this.handle, "offset"); 41 } 42 void easing()(string easing) { 43 Object_Call_string__void(this.handle, "easing", easing); 44 } 45 string easing()() { 46 return Object_Getter__string(this.handle, "easing"); 47 } 48 void composite()(CompositeOperationOrAuto composite) { 49 Object_Call_int__void(this.handle, "composite", composite); 50 } 51 CompositeOperationOrAuto composite()() { 52 return Object_Getter__int(this.handle, "composite"); 53 } 54 void simulateComputeValuesFailure()(bool simulateComputeValuesFailure) { 55 Object_Call_bool__void(this.handle, "simulateComputeValuesFailure", simulateComputeValuesFailure); 56 } 57 bool simulateComputeValuesFailure()() { 58 return Object_Getter__bool(this.handle, "simulateComputeValuesFailure"); 59 } 60 } 61 struct BasePropertyIndexedKeyframe { 62 nothrow: 63 JsHandle handle; 64 alias handle this; 65 this(Handle h) { 66 this.handle = JsHandle(h); 67 } 68 static auto create() { 69 return BasePropertyIndexedKeyframe(libwasm_add__object()); 70 } 71 void offset()(scope ref SumType!(Optional!(double), Sequence!(Optional!(double))) offset) { 72 Serialize_Object_VarArgCall!void(this.handle, "offset", "SumType!(Optional,Handle)", tuple(libwasm.sumtype.match!(((Optional v) => 0),((ref offset.Types[1] v) => 1))(offset),tuple(libwasm.sumtype.match!(((Optional v) => v),((ref offset.Types[1] v) => Optional.init))(offset),libwasm.sumtype.match!(((Optional v) => Handle.init),((ref offset.Types[1] v) => cast(Handle)v.handle))(offset)))); 73 } 74 auto offset()() { 75 return Object_Getter__Handle(this.handle, "offset"); 76 } 77 void easing()(scope ref SumType!(string, Sequence!(string)) easing) { 78 Serialize_Object_VarArgCall!void(this.handle, "easing", "SumType!(string,Handle)", tuple(libwasm.sumtype.match!(((string v) => 0),((ref easing.Types[1] v) => 1))(easing),tuple(libwasm.sumtype.match!(((string v) => v),((ref easing.Types[1] v) => string.init))(easing),libwasm.sumtype.match!(((string v) => Handle.init),((ref easing.Types[1] v) => cast(Handle)v.handle))(easing)))); 79 } 80 auto easing()() { 81 return Object_Getter__Handle(this.handle, "easing"); 82 } 83 void composite()(scope ref SumType!(CompositeOperationOrAuto, Sequence!(CompositeOperationOrAuto)) composite) { 84 Serialize_Object_VarArgCall!void(this.handle, "composite", "SumType!(int,Handle)", tuple(libwasm.sumtype.match!(((CompositeOperationOrAuto v) => 0),((ref composite.Types[1] v) => 1))(composite),tuple(libwasm.sumtype.match!(((CompositeOperationOrAuto v) => v),((ref composite.Types[1] v) => CompositeOperationOrAuto.init))(composite),libwasm.sumtype.match!(((CompositeOperationOrAuto v) => Handle.init),((ref composite.Types[1] v) => cast(Handle)v.handle))(composite)))); 85 } 86 auto composite()() { 87 return Object_Getter__Handle(this.handle, "composite"); 88 } 89 } 90 enum CompositeOperation { 91 replace, 92 add, 93 accumulate 94 } 95 enum CompositeOperationOrAuto { 96 replace, 97 add, 98 accumulate, 99 auto_ 100 } 101 102