1 module libwasm.bindings.KeyframeEffect;
2 
3 import libwasm.types;
4 
5 import memutils.ct: tuple;
6 import libwasm.bindings.AnimationEffect;
7 import libwasm.bindings.BaseKeyframeTypes;
8 import libwasm.bindings.CSSPseudoElement;
9 import libwasm.bindings.Element;
10 
11 @safe:
12 nothrow:
13 
14 struct AnimationPropertyDetails {
15   nothrow:
16   JsHandle handle;
17   alias handle this;
18   this(Handle h) {
19     this.handle = JsHandle(h);
20   }
21   static auto create() {
22     return AnimationPropertyDetails(libwasm_add__object());
23   }
24   void property()(string property) {
25     Object_Call_string__void(this.handle, "property", property);
26   }
27   string property()() {
28     return Object_Getter__string(this.handle, "property");
29   }
30   void runningOnCompositor()(bool runningOnCompositor) {
31     Object_Call_bool__void(this.handle, "runningOnCompositor", runningOnCompositor);
32   }
33   bool runningOnCompositor()() {
34     return Object_Getter__bool(this.handle, "runningOnCompositor");
35   }
36   void warning()(string warning) {
37     Object_Call_string__void(this.handle, "warning", warning);
38   }
39   string warning()() {
40     return Object_Getter__string(this.handle, "warning");
41   }
42   void values()(scope ref Sequence!(AnimationPropertyValueDetails) values) {
43     Object_Call_Handle__void(this.handle, "values", values.handle);
44   }
45   auto values()() {
46     return Sequence!(AnimationPropertyValueDetails)(Object_Getter__Handle(this.handle, "values"));
47   }
48 }
49 struct AnimationPropertyValueDetails {
50   nothrow:
51   JsHandle handle;
52   alias handle this;
53   this(Handle h) {
54     this.handle = JsHandle(h);
55   }
56   static auto create() {
57     return AnimationPropertyValueDetails(libwasm_add__object());
58   }
59   void offset()(double offset) {
60     Object_Call_double__void(this.handle, "offset", offset);
61   }
62   double offset()() {
63     return Object_Getter__double(this.handle, "offset");
64   }
65   void value()(string value) {
66     Object_Call_string__void(this.handle, "value", value);
67   }
68   string value()() {
69     return Object_Getter__string(this.handle, "value");
70   }
71   void easing()(string easing) {
72     Object_Call_string__void(this.handle, "easing", easing);
73   }
74   string easing()() {
75     return Object_Getter__string(this.handle, "easing");
76   }
77   void composite()(CompositeOperation composite) {
78     Object_Call_int__void(this.handle, "composite", composite);
79   }
80   CompositeOperation composite()() {
81     return Object_Getter__int(this.handle, "composite");
82   }
83 }
84 enum IterationCompositeOperation {
85   replace,
86   accumulate
87 }
88 struct KeyframeEffect {
89   nothrow:
90   libwasm.bindings.AnimationEffect.AnimationEffect _parent;
91   alias _parent this;
92   this(Handle h) {
93     _parent = .AnimationEffect(h);
94   }
95   void target(T0)(scope auto ref Optional!(T0) target) if (isTOrPointer!(T0, SumType!(Element, CSSPseudoElement))) {
96     Serialize_Object_VarArgCall!void(this._parent, "target", "Optional!SumType!(Handle,Handle)", tuple(!target.empty, libwasm.sumtype.match!(((ref target.Types[0] v) => 0),((ref target.Types[1] v) => 1))(target),tuple(libwasm.sumtype.match!(((ref target.Types[0] v) => cast(Handle)v.handle),((ref target.Types[1] v) => Handle.init))(target),libwasm.sumtype.match!(((ref target.Types[0] v) => Handle.init),((ref target.Types[1] v) => cast(Handle)v.handle))(target))));
97   }
98   auto target()() {
99     return KeyframeEffect_target_Get(this._parent);
100   }
101   void iterationComposite()(IterationCompositeOperation iterationComposite) {
102     Object_Call_int__void(this._parent, "iterationComposite", iterationComposite);
103   }
104   IterationCompositeOperation iterationComposite()() {
105     return Object_Getter__int(this._parent, "iterationComposite");
106   }
107   void composite()(CompositeOperation composite) {
108     Object_Call_int__void(this._parent, "composite", composite);
109   }
110   CompositeOperation composite()() {
111     return Object_Getter__int(this._parent, "composite");
112   }
113   auto getKeyframes()() {
114     return Sequence!(JsObject)(Object_Getter__Handle(this._parent, "getKeyframes"));
115   }
116   void setKeyframes(T0)(scope auto ref Optional!(T0) keyframes) if (isTOrPointer!(T0, JsObject)) {
117     Serialize_Object_VarArgCall!void(this._parent, "setKeyframes", "Optional!Handle", tuple(!keyframes.empty, cast(Handle)keyframes.front.handle));
118   }
119   auto getProperties()() {
120     return Sequence!(AnimationPropertyDetails)(Object_Getter__Handle(this._parent, "getProperties"));
121   }
122 }
123 struct KeyframeEffectOptions {
124   nothrow:
125   libwasm.bindings.AnimationEffect.EffectTiming _parent;
126   alias _parent this;
127   this(Handle h) {
128     _parent = .EffectTiming(h);
129   }
130   static auto create() {
131     return KeyframeEffectOptions(libwasm_add__object());
132   }
133   void iterationComposite()(IterationCompositeOperation iterationComposite) {
134     Object_Call_int__void(this._parent, "iterationComposite", iterationComposite);
135   }
136   IterationCompositeOperation iterationComposite()() {
137     return Object_Getter__int(this._parent, "iterationComposite");
138   }
139   void composite()(CompositeOperation composite) {
140     Object_Call_int__void(this._parent, "composite", composite);
141   }
142   CompositeOperation composite()() {
143     return Object_Getter__int(this._parent, "composite");
144   }
145 }
146 
147 
148 extern (C) Optional!(SumType!(Element, CSSPseudoElement)) KeyframeEffect_target_Get(Handle);