From bc181683a0b23c6d66f4d996d7ebf5d34d08b8ff Mon Sep 17 00:00:00 2001 From: rainyl Date: Thu, 11 May 2023 22:57:10 +0800 Subject: [PATCH] Add plugin API: HideMainWindow(), IsMainWindowVisible() --- Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs | 11 +++++++++++ Flow.Launcher/PublicAPIInstance.cs | 4 ++++ 2 files changed, 15 insertions(+) diff --git a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs index 19b69b015..d0fdf136b 100644 --- a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs +++ b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs @@ -80,6 +80,17 @@ namespace Flow.Launcher.Plugin /// void ShowMainWindow(); + /// + /// Hide MainWindow + /// + void HideMainWindow(); + + /// + /// Representing whether the main window is visible + /// + /// + bool IsMainWindowVisible(); + /// /// Show message box /// diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs index 636699ad0..800115bfa 100644 --- a/Flow.Launcher/PublicAPIInstance.cs +++ b/Flow.Launcher/PublicAPIInstance.cs @@ -73,6 +73,10 @@ namespace Flow.Launcher public void ShowMainWindow() => _mainVM.Show(); + public void HideMainWindow() => _mainVM.Hide(); + + public bool IsMainWindowVisible() => _mainVM.MainWindowVisibilityStatus; + public void CheckForNewUpdate() => _settingsVM.UpdateApp(); public void SaveAppAllSettings()