diff options
| author | 2015-03-08 03:13:26 -0400 | |
|---|---|---|
| committer | 2015-03-10 18:05:17 -0400 | |
| commit | 543232436fae8d1d0f9fdd94baf0ca88d4eea067 (patch) | |
| tree | 8104a34a4d34fe42a3054967677b13667670a540 /src/common/emu_window.h | |
| parent | HID: Added functions to emulate the touchpad. (diff) | |
| download | yuzu-543232436fae8d1d0f9fdd94baf0ca88d4eea067.tar.gz yuzu-543232436fae8d1d0f9fdd94baf0ca88d4eea067.tar.xz yuzu-543232436fae8d1d0f9fdd94baf0ca88d4eea067.zip | |
EmuWindow: Added infrastructure code to enable touchpad support.
Diffstat (limited to 'src/common/emu_window.h')
| -rw-r--r-- | src/common/emu_window.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/common/emu_window.h b/src/common/emu_window.h index f6099fdb6..df81e9e0f 100644 --- a/src/common/emu_window.h +++ b/src/common/emu_window.h | |||
| @@ -77,6 +77,33 @@ public: | |||
| 77 | static void KeyReleased(KeyMap::HostDeviceKey key); | 77 | static void KeyReleased(KeyMap::HostDeviceKey key); |
| 78 | 78 | ||
| 79 | /** | 79 | /** |
| 80 | * Signal that a touch pressed event has occurred (e.g. mouse click pressed) | ||
| 81 | * @param layout FramebufferLayout object describing the framebuffer size and screen positions | ||
| 82 | * @param framebuffer_x Framebuffer x-coordinate that was pressed | ||
| 83 | * @param framebuffer_y Framebuffer y-coordinate that was pressed | ||
| 84 | */ | ||
| 85 | static void TouchPressed(const FramebufferLayout& layout, unsigned framebuffer_x, | ||
| 86 | unsigned framebuffer_y); | ||
| 87 | |||
| 88 | /** | ||
| 89 | * Signal that a touch released event has occurred (e.g. mouse click released) | ||
| 90 | * @param layout FramebufferLayout object describing the framebuffer size and screen positions | ||
| 91 | * @param framebuffer_x Framebuffer x-coordinate that was released | ||
| 92 | * @param framebuffer_y Framebuffer y-coordinate that was released | ||
| 93 | */ | ||
| 94 | static void TouchReleased(const FramebufferLayout& layout, unsigned framebuffer_x, | ||
| 95 | unsigned framebuffer_y); | ||
| 96 | |||
| 97 | /** | ||
| 98 | * Signal that a touch movement event has occurred (e.g. mouse was moved over the emu window) | ||
| 99 | * @param layout FramebufferLayout object describing the framebuffer size and screen positions | ||
| 100 | * @param framebuffer_x Framebuffer x-coordinate | ||
| 101 | * @param framebuffer_y Framebuffer y-coordinate | ||
| 102 | */ | ||
| 103 | static void TouchMoved(const FramebufferLayout& layout, unsigned framebuffer_x, | ||
| 104 | unsigned framebuffer_y); | ||
| 105 | |||
| 106 | /** | ||
| 80 | * Returns currently active configuration. | 107 | * Returns currently active configuration. |
| 81 | * @note Accesses to the returned object need not be consistent because it may be modified in another thread | 108 | * @note Accesses to the returned object need not be consistent because it may be modified in another thread |
| 82 | */ | 109 | */ |
| @@ -168,4 +195,6 @@ private: | |||
| 168 | 195 | ||
| 169 | WindowConfig config; ///< Internal configuration (changes pending for being applied in ProcessConfigurationChanges) | 196 | WindowConfig config; ///< Internal configuration (changes pending for being applied in ProcessConfigurationChanges) |
| 170 | WindowConfig active_config; ///< Internal active configuration | 197 | WindowConfig active_config; ///< Internal active configuration |
| 198 | |||
| 199 | static bool touch_pressed; ///< True if touchpad area is currently pressed, otherwise false | ||
| 171 | }; | 200 | }; |