GTK3Mouse.cs 2.1 KB

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