Window resize operations moved to event callbacks

This commit is contained in:
Yousef Khadadeh 2026-04-07 20:21:41 +03:00
parent f5d757a9a5
commit 3ee17cfd2b
9 changed files with 57 additions and 30 deletions

View file

@ -282,6 +282,8 @@ struct InputManager {
void backend_touch_finger_down_update(const SDL_TouchFingerEvent& e);
void backend_touch_finger_up_update(const SDL_TouchFingerEvent& e);
void backend_touch_finger_motion_update(const SDL_TouchFingerEvent& e);
void backend_window_resize_update(const SDL_WindowEvent& e);
void backend_window_scale_update(const SDL_WindowEvent& e);
void set_clipboard_str(std::string_view s);
void set_clipboard_plain_and_richtext_pair(const std::pair<std::string, RichText::TextData>& plainAndRichtextPair);
@ -398,6 +400,15 @@ struct InputManager {
size_t fingerDownCount;
};
struct WindowResizeCallbackArgs {
Vector2i size;
float density;
};
struct WindowScaleCallbackArgs {
float scale;
};
MainProgram& main;
};