vendor/github.com/go-rod/rod/lib/proto/animation.go
347 lines · 10651 bytes
1// This file is generated by "./lib/proto/generate"
2
3package proto
4
5/*
6
7Animation
8
9*/
10
11// AnimationAnimationType enum.
12type AnimationAnimationType string
13
14const (
15 // AnimationAnimationTypeCSSTransition enum const.
16 AnimationAnimationTypeCSSTransition AnimationAnimationType = "CSSTransition"
17
18 // AnimationAnimationTypeCSSAnimation enum const.
19 AnimationAnimationTypeCSSAnimation AnimationAnimationType = "CSSAnimation"
20
21 // AnimationAnimationTypeWebAnimation enum const.
22 AnimationAnimationTypeWebAnimation AnimationAnimationType = "WebAnimation"
23)
24
25// AnimationAnimation Animation instance.
26type AnimationAnimation struct {
27 // ID `Animation`'s id.
28 ID string `json:"id"`
29
30 // Name `Animation`'s name.
31 Name string `json:"name"`
32
33 // PausedState `Animation`'s internal paused state.
34 PausedState bool `json:"pausedState"`
35
36 // PlayState `Animation`'s play state.
37 PlayState string `json:"playState"`
38
39 // PlaybackRate `Animation`'s playback rate.
40 PlaybackRate float64 `json:"playbackRate"`
41
42 // StartTime `Animation`'s start time.
43 // Milliseconds for time based animations and
44 // percentage [0 - 100] for scroll driven animations
45 // (i.e. when viewOrScrollTimeline exists).
46 StartTime float64 `json:"startTime"`
47
48 // CurrentTime `Animation`'s current time.
49 CurrentTime float64 `json:"currentTime"`
50
51 // Type Animation type of `Animation`.
52 Type AnimationAnimationType `json:"type"`
53
54 // Source (optional) `Animation`'s source animation node.
55 Source *AnimationAnimationEffect `json:"source,omitempty"`
56
57 // CSSID (optional) A unique ID for `Animation` representing the sources that triggered this CSS
58 // animation/transition.
59 CSSID string `json:"cssId,omitempty"`
60
61 // ViewOrScrollTimeline (optional) View or scroll timeline
62 ViewOrScrollTimeline *AnimationViewOrScrollTimeline `json:"viewOrScrollTimeline,omitempty"`
63}
64
65// AnimationViewOrScrollTimeline Timeline instance.
66type AnimationViewOrScrollTimeline struct {
67 // SourceNodeID (optional) Scroll container node
68 SourceNodeID DOMBackendNodeID `json:"sourceNodeId,omitempty"`
69
70 // StartOffset (optional) Represents the starting scroll position of the timeline
71 // as a length offset in pixels from scroll origin.
72 StartOffset *float64 `json:"startOffset,omitempty"`
73
74 // EndOffset (optional) Represents the ending scroll position of the timeline
75 // as a length offset in pixels from scroll origin.
76 EndOffset *float64 `json:"endOffset,omitempty"`
77
78 // SubjectNodeID (optional) The element whose principal box's visibility in the
79 // scrollport defined the progress of the timeline.
80 // Does not exist for animations with ScrollTimeline
81 SubjectNodeID DOMBackendNodeID `json:"subjectNodeId,omitempty"`
82
83 // Axis Orientation of the scroll
84 Axis DOMScrollOrientation `json:"axis"`
85}
86
87// AnimationAnimationEffect AnimationEffect instance.
88type AnimationAnimationEffect struct {
89 // Delay `AnimationEffect`'s delay.
90 Delay float64 `json:"delay"`
91
92 // EndDelay `AnimationEffect`'s end delay.
93 EndDelay float64 `json:"endDelay"`
94
95 // IterationStart `AnimationEffect`'s iteration start.
96 IterationStart float64 `json:"iterationStart"`
97
98 // Iterations `AnimationEffect`'s iterations.
99 Iterations float64 `json:"iterations"`
100
101 // Duration `AnimationEffect`'s iteration duration.
102 // Milliseconds for time based animations and
103 // percentage [0 - 100] for scroll driven animations
104 // (i.e. when viewOrScrollTimeline exists).
105 Duration float64 `json:"duration"`
106
107 // Direction `AnimationEffect`'s playback direction.
108 Direction string `json:"direction"`
109
110 // Fill `AnimationEffect`'s fill mode.
111 Fill string `json:"fill"`
112
113 // BackendNodeID (optional) `AnimationEffect`'s target node.
114 BackendNodeID DOMBackendNodeID `json:"backendNodeId,omitempty"`
115
116 // KeyframesRule (optional) `AnimationEffect`'s keyframes.
117 KeyframesRule *AnimationKeyframesRule `json:"keyframesRule,omitempty"`
118
119 // Easing `AnimationEffect`'s timing function.
120 Easing string `json:"easing"`
121}
122
123// AnimationKeyframesRule Keyframes Rule.
124type AnimationKeyframesRule struct {
125 // Name (optional) CSS keyframed animation's name.
126 Name string `json:"name,omitempty"`
127
128 // Keyframes List of animation keyframes.
129 Keyframes []*AnimationKeyframeStyle `json:"keyframes"`
130}
131
132// AnimationKeyframeStyle Keyframe Style.
133type AnimationKeyframeStyle struct {
134 // Offset Keyframe's time offset.
135 Offset string `json:"offset"`
136
137 // Easing `AnimationEffect`'s timing function.
138 Easing string `json:"easing"`
139}
140
141// AnimationDisable Disables animation domain notifications.
142type AnimationDisable struct{}
143
144// ProtoReq name.
145func (m AnimationDisable) ProtoReq() string { return "Animation.disable" }
146
147// Call sends the request.
148func (m AnimationDisable) Call(c Client) error {
149 return call(m.ProtoReq(), m, nil, c)
150}
151
152// AnimationEnable Enables animation domain notifications.
153type AnimationEnable struct{}
154
155// ProtoReq name.
156func (m AnimationEnable) ProtoReq() string { return "Animation.enable" }
157
158// Call sends the request.
159func (m AnimationEnable) Call(c Client) error {
160 return call(m.ProtoReq(), m, nil, c)
161}
162
163// AnimationGetCurrentTime Returns the current time of the an animation.
164type AnimationGetCurrentTime struct {
165 // ID Id of animation.
166 ID string `json:"id"`
167}
168
169// ProtoReq name.
170func (m AnimationGetCurrentTime) ProtoReq() string { return "Animation.getCurrentTime" }
171
172// Call the request.
173func (m AnimationGetCurrentTime) Call(c Client) (*AnimationGetCurrentTimeResult, error) {
174 var res AnimationGetCurrentTimeResult
175 return &res, call(m.ProtoReq(), m, &res, c)
176}
177
178// AnimationGetCurrentTimeResult ...
179type AnimationGetCurrentTimeResult struct {
180 // CurrentTime Current time of the page.
181 CurrentTime float64 `json:"currentTime"`
182}
183
184// AnimationGetPlaybackRate Gets the playback rate of the document timeline.
185type AnimationGetPlaybackRate struct{}
186
187// ProtoReq name.
188func (m AnimationGetPlaybackRate) ProtoReq() string { return "Animation.getPlaybackRate" }
189
190// Call the request.
191func (m AnimationGetPlaybackRate) Call(c Client) (*AnimationGetPlaybackRateResult, error) {
192 var res AnimationGetPlaybackRateResult
193 return &res, call(m.ProtoReq(), m, &res, c)
194}
195
196// AnimationGetPlaybackRateResult ...
197type AnimationGetPlaybackRateResult struct {
198 // PlaybackRate Playback rate for animations on page.
199 PlaybackRate float64 `json:"playbackRate"`
200}
201
202// AnimationReleaseAnimations Releases a set of animations to no longer be manipulated.
203type AnimationReleaseAnimations struct {
204 // Animations List of animation ids to seek.
205 Animations []string `json:"animations"`
206}
207
208// ProtoReq name.
209func (m AnimationReleaseAnimations) ProtoReq() string { return "Animation.releaseAnimations" }
210
211// Call sends the request.
212func (m AnimationReleaseAnimations) Call(c Client) error {
213 return call(m.ProtoReq(), m, nil, c)
214}
215
216// AnimationResolveAnimation Gets the remote object of the Animation.
217type AnimationResolveAnimation struct {
218 // AnimationID Animation id.
219 AnimationID string `json:"animationId"`
220}
221
222// ProtoReq name.
223func (m AnimationResolveAnimation) ProtoReq() string { return "Animation.resolveAnimation" }
224
225// Call the request.
226func (m AnimationResolveAnimation) Call(c Client) (*AnimationResolveAnimationResult, error) {
227 var res AnimationResolveAnimationResult
228 return &res, call(m.ProtoReq(), m, &res, c)
229}
230
231// AnimationResolveAnimationResult ...
232type AnimationResolveAnimationResult struct {
233 // RemoteObject Corresponding remote object.
234 RemoteObject *RuntimeRemoteObject `json:"remoteObject"`
235}
236
237// AnimationSeekAnimations Seek a set of animations to a particular time within each animation.
238type AnimationSeekAnimations struct {
239 // Animations List of animation ids to seek.
240 Animations []string `json:"animations"`
241
242 // CurrentTime Set the current time of each animation.
243 CurrentTime float64 `json:"currentTime"`
244}
245
246// ProtoReq name.
247func (m AnimationSeekAnimations) ProtoReq() string { return "Animation.seekAnimations" }
248
249// Call sends the request.
250func (m AnimationSeekAnimations) Call(c Client) error {
251 return call(m.ProtoReq(), m, nil, c)
252}
253
254// AnimationSetPaused Sets the paused state of a set of animations.
255type AnimationSetPaused struct {
256 // Animations to set the pause state of.
257 Animations []string `json:"animations"`
258
259 // Paused state to set to.
260 Paused bool `json:"paused"`
261}
262
263// ProtoReq name.
264func (m AnimationSetPaused) ProtoReq() string { return "Animation.setPaused" }
265
266// Call sends the request.
267func (m AnimationSetPaused) Call(c Client) error {
268 return call(m.ProtoReq(), m, nil, c)
269}
270
271// AnimationSetPlaybackRate Sets the playback rate of the document timeline.
272type AnimationSetPlaybackRate struct {
273 // PlaybackRate Playback rate for animations on page
274 PlaybackRate float64 `json:"playbackRate"`
275}
276
277// ProtoReq name.
278func (m AnimationSetPlaybackRate) ProtoReq() string { return "Animation.setPlaybackRate" }
279
280// Call sends the request.
281func (m AnimationSetPlaybackRate) Call(c Client) error {
282 return call(m.ProtoReq(), m, nil, c)
283}
284
285// AnimationSetTiming Sets the timing of an animation node.
286type AnimationSetTiming struct {
287 // AnimationID Animation id.
288 AnimationID string `json:"animationId"`
289
290 // Duration of the animation.
291 Duration float64 `json:"duration"`
292
293 // Delay of the animation.
294 Delay float64 `json:"delay"`
295}
296
297// ProtoReq name.
298func (m AnimationSetTiming) ProtoReq() string { return "Animation.setTiming" }
299
300// Call sends the request.
301func (m AnimationSetTiming) Call(c Client) error {
302 return call(m.ProtoReq(), m, nil, c)
303}
304
305// AnimationAnimationCanceled Event for when an animation has been cancelled.
306type AnimationAnimationCanceled struct {
307 // ID Id of the animation that was cancelled.
308 ID string `json:"id"`
309}
310
311// ProtoEvent name.
312func (evt AnimationAnimationCanceled) ProtoEvent() string {
313 return "Animation.animationCanceled"
314}
315
316// AnimationAnimationCreated Event for each animation that has been created.
317type AnimationAnimationCreated struct {
318 // ID Id of the animation that was created.
319 ID string `json:"id"`
320}
321
322// ProtoEvent name.
323func (evt AnimationAnimationCreated) ProtoEvent() string {
324 return "Animation.animationCreated"
325}
326
327// AnimationAnimationStarted Event for animation that has been started.
328type AnimationAnimationStarted struct {
329 // Animation that was started.
330 Animation *AnimationAnimation `json:"animation"`
331}
332
333// ProtoEvent name.
334func (evt AnimationAnimationStarted) ProtoEvent() string {
335 return "Animation.animationStarted"
336}
337
338// AnimationAnimationUpdated Event for animation that has been updated.
339type AnimationAnimationUpdated struct {
340 // Animation that was updated.
341 Animation *AnimationAnimation `json:"animation"`
342}
343
344// ProtoEvent name.
345func (evt AnimationAnimationUpdated) ProtoEvent() string {
346 return "Animation.animationUpdated"
347}