3#ifdef MAYAFLUX_PLATFORM_LINUX
24class MAYAFLUX_API DBusBackend final :
public SystemBackend {
26 DBusBackend() =
default;
27 ~DBusBackend()
override;
29 DBusBackend(
const DBusBackend&) =
delete;
30 DBusBackend& operator=(
const DBusBackend&) =
delete;
31 DBusBackend(DBusBackend&&) noexcept = default;
32 DBusBackend& operator=(DBusBackend&&) noexcept = default;
35 void shutdown() override;
36 [[nodiscard]]
bool is_initialized()
const override {
return m_initialized; }
39 FileDialogCallback callback,
40 std::vector<SystemFileFilter> filters,
41 std::filesystem::path start_dir)
override;
44 FileDialogCallback callback,
45 std::string suggested_name,
46 std::vector<SystemFileFilter> filters,
47 std::filesystem::path start_dir)
override;
50 DBusConnection* m_conn {
nullptr };
51 bool m_initialized {
false };
55 FileDialogCallback callback,
56 const std::vector<SystemFileFilter>& filters,
57 const std::filesystem::path& start_dir,
58 const std::string& suggested)
const;
void open_file(ChooserCallback callback, std::vector< ChooserFilter > filters, std::filesystem::path start_dir)
Present a native open-file dialog, delivering the result via callback.
void save_file(ChooserCallback callback, std::string suggested_name, std::vector< ChooserFilter > filters, std::filesystem::path start_dir)
Present a native save-file dialog, delivering the result via callback.