/
Mouse.cs
59 lines (46 loc) · 1.82 KB
/
Mouse.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using PuppeteerSharp.Cdp.Messaging;
using PuppeteerSharp.Helpers;
/*
The implementation of transactions is not the same as in the original Puppeteer
due to the differences in the threading model.
*/
namespace PuppeteerSharp.Input
{
/// <inheritdoc/>
public abstract class Mouse : IMouse
{
/// <inheritdoc/>
public abstract Task MoveAsync(decimal x, decimal y, MoveOptions options = null);
/// <inheritdoc/>
public abstract Task ClickAsync(decimal x, decimal y, ClickOptions options = null);
/// <inheritdoc/>
public abstract Task DownAsync(ClickOptions options = null);
/// <inheritdoc/>
public abstract Task UpAsync(ClickOptions options = null);
/// <inheritdoc/>
public abstract Task WheelAsync(decimal deltaX, decimal deltaY);
/// <inheritdoc/>
public abstract Task<DragData> DragAsync(decimal startX, decimal startY, decimal endX, decimal endY);
/// <inheritdoc/>
public abstract Task DragEnterAsync(decimal x, decimal y, DragData data);
/// <inheritdoc/>
public abstract Task DragOverAsync(decimal x, decimal y, DragData data);
/// <inheritdoc/>
public abstract Task DropAsync(decimal x, decimal y, DragData data);
/// <inheritdoc/>
public abstract Task DragAndDropAsync(decimal startX, decimal startY, decimal endX, decimal endY, int delay = 0);
/// <inheritdoc/>
public abstract Task ResetAsync();
/// <inheritdoc/>
public void Dispose()
{
Dispose(disposing: true);
GC.SuppressFinalize(this);
}
/// <inheritdoc cref="IDisposable.Dispose"/>
protected abstract void Dispose(bool disposing);
}
}