aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Ava/Input/AvaloniaMouse.cs
blob: 3a9c91c0d293c0651424c4bacd8c21f05642daab (plain) (blame)
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
using Ryujinx.Common.Configuration.Hid;
using Ryujinx.Input;
using System;
using System.Drawing;
using System.Numerics;

namespace Ryujinx.Ava.Input
{
    internal class AvaloniaMouse : IMouse
    {
        private AvaloniaMouseDriver _driver;

        public string Id   => "0";
        public string Name => "AvaloniaMouse";

        public bool                IsConnected => true;
        public GamepadFeaturesFlag Features    => throw new NotImplementedException();
        public bool[]              Buttons     => _driver.PressedButtons;

        public AvaloniaMouse(AvaloniaMouseDriver driver)
        {
            _driver = driver;
        }

        public Size ClientSize => _driver.GetClientSize();

        public Vector2 GetPosition()
        {
            return _driver.CurrentPosition;
        }

        public Vector2 GetScroll()
        {
            return _driver.Scroll;
        }

        public GamepadStateSnapshot GetMappedStateSnapshot()
        {
            throw new NotImplementedException();
        }

        public Vector3 GetMotionData(MotionInputId inputId)
        {
            throw new NotImplementedException();
        }

        public GamepadStateSnapshot GetStateSnapshot()
        {
            throw new NotImplementedException();
        }

        public (float, float) GetStick(StickInputId inputId)
        {
            throw new NotImplementedException();
        }

        public bool IsButtonPressed(MouseButton button)
        {
            return _driver.IsButtonPressed(button);
        }

        public bool IsPressed(GamepadButtonInputId inputId)
        {
            throw new NotImplementedException();
        }

        public void Rumble(float lowFrequency, float highFrequency, uint durationMs)
        {
            throw new NotImplementedException();
        }

        public void SetConfiguration(InputConfig configuration)
        {
            throw new NotImplementedException();
        }

        public void SetTriggerThreshold(float triggerThreshold)
        {
            throw new NotImplementedException();
        }

        public void Dispose()
        {
            _driver = null;
        }
    }
}