#ifndef DESKTOP_MULTI_WINDOW_WINDOWS_MULTI_WINDOW_MANAGER_H_ #define DESKTOP_MULTI_WINDOW_WINDOWS_MULTI_WINDOW_MANAGER_H_ #include #include #include #include #include #include #include #include "flutter_window.h" class MultiWindowManager : public std::enable_shared_from_this { public: static MultiWindowManager* Instance(); MultiWindowManager(); virtual ~MultiWindowManager(); std::string Create(FlValue* args); void AttachMainWindow(GtkWidget* main_flutter_window, FlPluginRegistrar* registrar); FlutterWindow* GetWindow(const std::string& window_id); FlValue* GetAllWindows(); std::vector GetAllWindowIds(); void RemoveWindow(const std::string& window_id); private: void ObserveWindowClose(const std::string& window_id, GtkWindow* window); void NotifyWindowsChanged(); std::map> windows_; }; #endif // DESKTOP_MULTI_WINDOW_WINDOWS_MULTI_WINDOW_MANAGER_H_