diff options
author | Yuqian Yang <crupest@crupest.life> | 2025-09-23 22:54:09 +0800 |
---|---|---|
committer | Yuqian Yang <crupest@crupest.life> | 2025-09-23 22:54:09 +0800 |
commit | d79c8842fac8ddea402e9dd411e55ea583f74f03 (patch) | |
tree | cbc611bb7908e4537ae949c64d6a00420af6ee0e /include/cru/platform/gui | |
parent | 9c7d93cdb85ccc89f0804b4f280eac099c4476c6 (diff) | |
download | cru-d79c8842fac8ddea402e9dd411e55ea583f74f03.tar.gz cru-d79c8842fac8ddea402e9dd411e55ea583f74f03.tar.bz2 cru-d79c8842fac8ddea402e9dd411e55ea583f74f03.zip |
Enable bootstrap of xcb.
Diffstat (limited to 'include/cru/platform/gui')
-rw-r--r-- | include/cru/platform/gui/xcb/Base.h | 4 | ||||
-rw-r--r-- | include/cru/platform/gui/xcb/UiApplication.h | 13 |
2 files changed, 3 insertions, 14 deletions
diff --git a/include/cru/platform/gui/xcb/Base.h b/include/cru/platform/gui/xcb/Base.h index f3bcfd01..ad571a40 100644 --- a/include/cru/platform/gui/xcb/Base.h +++ b/include/cru/platform/gui/xcb/Base.h @@ -7,13 +7,13 @@ namespace cru::platform::gui::xcb { class XcbResource : public Object, public virtual IPlatformResource { public: - static String kPlatformId; + static constexpr const char16_t* kPlatformId = u"XCB"; protected: XcbResource() = default; public: - String GetPlatformId() const final { return kPlatformId; } + String GetPlatformId() const final { return String(kPlatformId); } }; class XcbException : public PlatformException { diff --git a/include/cru/platform/gui/xcb/UiApplication.h b/include/cru/platform/gui/xcb/UiApplication.h index 80995179..1797a303 100644 --- a/include/cru/platform/gui/xcb/UiApplication.h +++ b/include/cru/platform/gui/xcb/UiApplication.h @@ -71,22 +71,11 @@ class XcbUiApplication : public XcbResource, public virtual IUiApplication { ICursorManager* GetCursorManager() override; - virtual IClipboard* GetClipboard() = 0; + IClipboard* GetClipboard() override; // If return nullptr, it means the menu is not supported. IMenu* GetApplicationMenu() override; - /** - * \todo Implement on Windows. - */ - virtual std::optional<String> ShowSaveDialog(SaveDialogOptions options); - - /** - * \todo Implement on Windows. - */ - virtual std::optional<std::vector<String>> ShowOpenDialog( - OpenDialogOptions options); - private: void HandleXEvents(); |