Squashed 'libraries/ZWidget/' changes from 924b8e0e78..b5ae8c8ab0 (#3357)

b5ae8c8ab0 Fix sdl2 initial paint
a06bc7f8b4 Wayland Backend: Use unaccelerated dx and dy for OnMouseMoveRawEvent()
f1789718d1 Wayland Backend: Implement clipboard support
11f3fe0e21 Fix a typo
2f4e3603e0 Add timers
bcecfa9ee2 Fix filling with wrong window background sometimes
6681d2c2d8 Fix timer linked list
4564f7ea88 OnXInputEvent calls callbacks, which potentially could create/destroy windows
92f99a1abf Improve timer stability
4ccb1a03f8 Fix Cursor Shape protocol related crashes - If the protocol is available, avoid handling buffers directly
fdefb2945d Add timers for X11 backend
25a2a2c846 WaylandDisplayBackend: New protocols and improvements - Add xdg_toplevel_icon and cursor_shape protocols support - Implement WaylandDisplayWindow::SetWindowIcon() based on the xdg_toplevel_icon protocol.
d817b79b98 Fix compile error
af5a87dba5 Add missing include statement
43996b7864 setIcon for x11
49ae157f31 Implement setIcon for Windows Fix spaces that should be tabs in the wayland backend
a564526bb7 WaylandDisplayBackend: Combine LShift and RShift into Shift
46031df314 CMakeLists: Remove the unnecessary additional SDL2 check in the example section
5363f5354e Implement open folder dialog Improve support for paths with spaces in them
bec2844e11 Fix the CI label for macOS
e2c6af9e5d Seems CI was set to use a macOS version from 1865
991ca3377a Enable macOS in CI
1f5c95edef include SDL2 directory to fix mac compilation

git-subtree-dir: libraries/ZWidget
git-subtree-split: b5ae8c8ab038789298a8df1384322f0e69e57e5c
This commit is contained in:
Marcus Minhorst 2025-09-19 22:49:56 -04:00 committed by GitHub
commit 65cfb976fa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
35 changed files with 3521 additions and 1667 deletions

View file

@ -40,8 +40,8 @@ public:
std::string GetWindowTitle() const;
void SetWindowTitle(const std::string& text);
// Icon GetWindowIcon() const;
// void SetWindowIcon(const Icon& icon);
std::vector<std::shared_ptr<Image>> GetWindowIcon() const;
void SetWindowIcon(const std::vector<std::shared_ptr<Image>>& images);
// Widget content box
Size GetSize() const;
@ -233,6 +233,7 @@ private:
Colorf WindowBackground = Colorf::fromRgba8(240, 240, 240);
std::string WindowTitle;
std::vector<std::shared_ptr<Image>> WindowIcon;
std::unique_ptr<DisplayWindow> DispWindow;
std::unique_ptr<Canvas> DispCanvas;
Widget* FocusWidget = nullptr;

View file

@ -26,6 +26,7 @@ class Widget;
class OpenFileDialog;
class SaveFileDialog;
class OpenFolderDialog;
class Image;
enum class StandardCursor
{
@ -163,6 +164,7 @@ public:
virtual ~DisplayWindow() = default;
virtual void SetWindowTitle(const std::string& text) = 0;
virtual void SetWindowIcon(const std::vector<std::shared_ptr<Image>>& images) = 0;
virtual void SetWindowFrame(const Rect& box) = 0;
virtual void SetClientFrame(const Rect& box) = 0;
virtual void Show() = 0;