GTK3Mouse.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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 GamepadStateSnapshot GetMappedStateSnapshot()
  25. {
  26. throw new NotImplementedException();
  27. }
  28. public Vector3 GetMotionData(MotionInputId inputId)
  29. {
  30. throw new NotImplementedException();
  31. }
  32. public GamepadStateSnapshot GetStateSnapshot()
  33. {
  34. throw new NotImplementedException();
  35. }
  36. public (float, float) GetStick(StickInputId inputId)
  37. {
  38. throw new NotImplementedException();
  39. }
  40. public bool IsButtonPressed(MouseButton button)
  41. {
  42. return _driver.IsButtonPressed(button);
  43. }
  44. public bool IsPressed(GamepadButtonInputId inputId)
  45. {
  46. throw new NotImplementedException();
  47. }
  48. public void Rumble(float lowFrequency, float highFrequency, uint durationMs)
  49. {
  50. throw new NotImplementedException();
  51. }
  52. public void SetConfiguration(InputConfig configuration)
  53. {
  54. throw new NotImplementedException();
  55. }
  56. public void SetTriggerThreshold(float triggerThreshold)
  57. {
  58. throw new NotImplementedException();
  59. }
  60. public void Dispose()
  61. {
  62. _driver = null;
  63. }
  64. }
  65. }