summaryrefslogtreecommitdiff
path: root/src/core/frontend/emu_window.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/frontend/emu_window.h')
-rw-r--r--src/core/frontend/emu_window.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/core/frontend/emu_window.h b/src/core/frontend/emu_window.h
index 2436c6580..076148698 100644
--- a/src/core/frontend/emu_window.h
+++ b/src/core/frontend/emu_window.h
@@ -82,7 +82,7 @@ public:
82 bool fullscreen = false; 82 bool fullscreen = false;
83 int res_width = 0; 83 int res_width = 0;
84 int res_height = 0; 84 int res_height = 0;
85 std::pair<unsigned, unsigned> min_client_area_size; 85 std::pair<u32, u32> min_client_area_size;
86 }; 86 };
87 87
88 /// Data describing host window system information 88 /// Data describing host window system information
@@ -119,13 +119,13 @@ public:
119 * @param framebuffer_y Framebuffer y-coordinate that was pressed 119 * @param framebuffer_y Framebuffer y-coordinate that was pressed
120 * @param id Touch event ID 120 * @param id Touch event ID
121 */ 121 */
122 void TouchPressed(unsigned framebuffer_x, unsigned framebuffer_y, std::size_t id); 122 void TouchPressed(u32 framebuffer_x, u32 framebuffer_y, size_t id);
123 123
124 /** 124 /**
125 * Signal that a touch released event has occurred (e.g. mouse click released) 125 * Signal that a touch released event has occurred (e.g. mouse click released)
126 * @param id Touch event ID 126 * @param id Touch event ID
127 */ 127 */
128 void TouchReleased(std::size_t id); 128 void TouchReleased(size_t id);
129 129
130 /** 130 /**
131 * Signal that a touch movement event has occurred (e.g. mouse was moved over the emu window) 131 * Signal that a touch movement event has occurred (e.g. mouse was moved over the emu window)
@@ -133,7 +133,7 @@ public:
133 * @param framebuffer_y Framebuffer y-coordinate 133 * @param framebuffer_y Framebuffer y-coordinate
134 * @param id Touch event ID 134 * @param id Touch event ID
135 */ 135 */
136 void TouchMoved(unsigned framebuffer_x, unsigned framebuffer_y, std::size_t id); 136 void TouchMoved(u32 framebuffer_x, u32 framebuffer_y, size_t id);
137 137
138 /** 138 /**
139 * Returns currently active configuration. 139 * Returns currently active configuration.
@@ -173,7 +173,7 @@ public:
173 * Convenience method to update the current frame layout 173 * Convenience method to update the current frame layout
174 * Read from the current settings to determine which layout to use. 174 * Read from the current settings to determine which layout to use.
175 */ 175 */
176 void UpdateCurrentFramebufferLayout(unsigned width, unsigned height); 176 void UpdateCurrentFramebufferLayout(u32 width, u32 height);
177 177
178protected: 178protected:
179 explicit EmuWindow(); 179 explicit EmuWindow();
@@ -208,7 +208,7 @@ protected:
208 * Update internal client area size with the given parameter. 208 * Update internal client area size with the given parameter.
209 * @note EmuWindow implementations will usually use this in window resize event handlers. 209 * @note EmuWindow implementations will usually use this in window resize event handlers.
210 */ 210 */
211 void NotifyClientAreaSizeChanged(const std::pair<unsigned, unsigned>& size) { 211 void NotifyClientAreaSizeChanged(std::pair<u32, u32> size) {
212 client_area_width = size.first; 212 client_area_width = size.first;
213 client_area_height = size.second; 213 client_area_height = size.second;
214 } 214 }
@@ -221,14 +221,19 @@ private:
221 * For the request to be honored, EmuWindow implementations will usually reimplement this 221 * For the request to be honored, EmuWindow implementations will usually reimplement this
222 * function. 222 * function.
223 */ 223 */
224 virtual void OnMinimalClientAreaChangeRequest(std::pair<unsigned, unsigned>) { 224 virtual void OnMinimalClientAreaChangeRequest(std::pair<u32, u32>) {
225 // By default, ignore this request and do nothing. 225 // By default, ignore this request and do nothing.
226 } 226 }
227 227
228 /**
229 * Clip the provided coordinates to be inside the touchscreen area.
230 */
231 std::pair<u32, u32> ClipToTouchScreen(u32 new_x, u32 new_y) const;
232
228 Layout::FramebufferLayout framebuffer_layout; ///< Current framebuffer layout 233 Layout::FramebufferLayout framebuffer_layout; ///< Current framebuffer layout
229 234
230 unsigned client_area_width; ///< Current client width, should be set by window impl. 235 u32 client_area_width; ///< Current client width, should be set by window impl.
231 unsigned client_area_height; ///< Current client height, should be set by window impl. 236 u32 client_area_height; ///< Current client height, should be set by window impl.
232 237
233 WindowConfig config; ///< Internal configuration (changes pending for being applied in 238 WindowConfig config; ///< Internal configuration (changes pending for being applied in
234 /// ProcessConfigurationChanges) 239 /// ProcessConfigurationChanges)
@@ -236,11 +241,6 @@ private:
236 241
237 class TouchState; 242 class TouchState;
238 std::shared_ptr<TouchState> touch_state; 243 std::shared_ptr<TouchState> touch_state;
239
240 /**
241 * Clip the provided coordinates to be inside the touchscreen area.
242 */
243 std::tuple<unsigned, unsigned> ClipToTouchScreen(unsigned new_x, unsigned new_y) const;
244}; 244};
245 245
246} // namespace Core::Frontend 246} // namespace Core::Frontend