/ src / Ryujinx / Input / AvaloniaMouse.cs
AvaloniaMouse.cs
 1  using Ryujinx.Common.Configuration.Hid;
 2  using Ryujinx.Input;
 3  using System;
 4  using System.Drawing;
 5  using System.Numerics;
 6  
 7  namespace Ryujinx.Ava.Input
 8  {
 9      internal class AvaloniaMouse : IMouse
10      {
11          private AvaloniaMouseDriver _driver;
12  
13          public string Id => "0";
14          public string Name => "AvaloniaMouse";
15  
16          public bool IsConnected => true;
17          public GamepadFeaturesFlag Features => throw new NotImplementedException();
18          public bool[] Buttons => _driver.PressedButtons;
19  
20          public AvaloniaMouse(AvaloniaMouseDriver driver)
21          {
22              _driver = driver;
23          }
24  
25          public Size ClientSize => _driver.GetClientSize();
26  
27          public Vector2 GetPosition()
28          {
29              return _driver.CurrentPosition;
30          }
31  
32          public Vector2 GetScroll()
33          {
34              return _driver.Scroll;
35          }
36  
37          public GamepadStateSnapshot GetMappedStateSnapshot()
38          {
39              throw new NotImplementedException();
40          }
41  
42          public Vector3 GetMotionData(MotionInputId inputId)
43          {
44              throw new NotImplementedException();
45          }
46  
47          public GamepadStateSnapshot GetStateSnapshot()
48          {
49              throw new NotImplementedException();
50          }
51  
52          public (float, float) GetStick(StickInputId inputId)
53          {
54              throw new NotImplementedException();
55          }
56  
57          public bool IsButtonPressed(MouseButton button)
58          {
59              return _driver.IsButtonPressed(button);
60          }
61  
62          public bool IsPressed(GamepadButtonInputId inputId)
63          {
64              throw new NotImplementedException();
65          }
66  
67          public void Rumble(float lowFrequency, float highFrequency, uint durationMs)
68          {
69              throw new NotImplementedException();
70          }
71  
72          public void SetConfiguration(InputConfig configuration)
73          {
74              throw new NotImplementedException();
75          }
76  
77          public void SetTriggerThreshold(float triggerThreshold)
78          {
79              throw new NotImplementedException();
80          }
81  
82          public void Dispose()
83          {
84              _driver = null;
85          }
86      }
87  }