summaryrefslogtreecommitdiff
path: root/src/core/frontend/emu_window.h
diff options
context:
space:
mode:
authorGravatar Feng Chen2021-12-18 13:57:14 +0800
committerGravatar GitHub2021-12-18 13:57:14 +0800
commite49184e6069a9d791d2df3c1958f5c4b1187e124 (patch)
treeb776caf722e0be0e680f67b0ad0842628162ef1c /src/core/frontend/emu_window.h
parentImplement convert legacy to generic (diff)
parentMerge pull request #7570 from ameerj/favorites-expanded (diff)
downloadyuzu-e49184e6069a9d791d2df3c1958f5c4b1187e124.tar.gz
yuzu-e49184e6069a9d791d2df3c1958f5c4b1187e124.tar.xz
yuzu-e49184e6069a9d791d2df3c1958f5c4b1187e124.zip
Merge branch 'yuzu-emu:master' into convert_legacy
Diffstat (limited to 'src/core/frontend/emu_window.h')
-rw-r--r--src/core/frontend/emu_window.h30
1 files changed, 5 insertions, 25 deletions
diff --git a/src/core/frontend/emu_window.h b/src/core/frontend/emu_window.h
index 8a86a1d27..e413a520a 100644
--- a/src/core/frontend/emu_window.h
+++ b/src/core/frontend/emu_window.h
@@ -113,28 +113,6 @@ public:
113 virtual bool IsShown() const = 0; 113 virtual bool IsShown() const = 0;
114 114
115 /** 115 /**
116 * Signal that a touch pressed event has occurred (e.g. mouse click pressed)
117 * @param framebuffer_x Framebuffer x-coordinate that was pressed
118 * @param framebuffer_y Framebuffer y-coordinate that was pressed
119 * @param id Touch event ID
120 */
121 void TouchPressed(u32 framebuffer_x, u32 framebuffer_y, size_t id);
122
123 /**
124 * Signal that a touch released event has occurred (e.g. mouse click released)
125 * @param id Touch event ID
126 */
127 void TouchReleased(size_t id);
128
129 /**
130 * Signal that a touch movement event has occurred (e.g. mouse was moved over the emu window)
131 * @param framebuffer_x Framebuffer x-coordinate
132 * @param framebuffer_y Framebuffer y-coordinate
133 * @param id Touch event ID
134 */
135 void TouchMoved(u32 framebuffer_x, u32 framebuffer_y, size_t id);
136
137 /**
138 * Returns currently active configuration. 116 * Returns currently active configuration.
139 * @note Accesses to the returned object need not be consistent because it may be modified in 117 * @note Accesses to the returned object need not be consistent because it may be modified in
140 * another thread 118 * another thread
@@ -212,6 +190,11 @@ protected:
212 client_area_height = size.second; 190 client_area_height = size.second;
213 } 191 }
214 192
193 /**
194 * Converts a screen postion into the equivalent touchscreen position.
195 */
196 std::pair<f32, f32> MapToTouchScreen(u32 framebuffer_x, u32 framebuffer_y) const;
197
215 WindowSystemInfo window_info; 198 WindowSystemInfo window_info;
216 199
217private: 200private:
@@ -237,9 +220,6 @@ private:
237 WindowConfig config; ///< Internal configuration (changes pending for being applied in 220 WindowConfig config; ///< Internal configuration (changes pending for being applied in
238 /// ProcessConfigurationChanges) 221 /// ProcessConfigurationChanges)
239 WindowConfig active_config; ///< Internal active configuration 222 WindowConfig active_config; ///< Internal active configuration
240
241 class TouchState;
242 std::shared_ptr<TouchState> touch_state;
243}; 223};
244 224
245} // namespace Core::Frontend 225} // namespace Core::Frontend