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