From 5c48acad8922d9367bce917246a5de5d067e98ea Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 28 Feb 2025 11:26:14 +0800
Subject: [PATCH] Add loading api functions for all plugins
---
.../Plugin/JsonRPCV2Models/JsonRPCPublicAPI.cs | 10 ++++++++++
Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs | 10 ++++++++++
2 files changed, 20 insertions(+)
diff --git a/Flow.Launcher.Core/Plugin/JsonRPCV2Models/JsonRPCPublicAPI.cs b/Flow.Launcher.Core/Plugin/JsonRPCV2Models/JsonRPCPublicAPI.cs
index e0a0434a203..8df2ce9ed9e 100644
--- a/Flow.Launcher.Core/Plugin/JsonRPCV2Models/JsonRPCPublicAPI.cs
+++ b/Flow.Launcher.Core/Plugin/JsonRPCV2Models/JsonRPCPublicAPI.cs
@@ -175,5 +175,15 @@ public void BackToQueryResults()
{
_api.BackToQueryResults();
}
+
+ public void StartLoadingBar()
+ {
+ _api.StartLoadingBar();
+ }
+
+ public void StopLoadingBar()
+ {
+ _api.StopLoadingBar();
+ }
}
}
diff --git a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
index 07fc378c3c4..fd96c82c484 100644
--- a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
+++ b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
@@ -335,5 +335,15 @@ public interface IPublicAPI
/// When user closes the progress box manually by button or esc key, this action will be called.
/// A progress box interface.
public Task ShowProgressBoxAsync(string caption, Func, Task> reportProgressAsync, Action forceClosed = null);
+
+ ///
+ /// Start the loading bar in main window
+ ///
+ public void StartLoadingBar();
+
+ ///
+ /// Stop the loading bar in main window
+ ///
+ public void StopLoadingBar();
}
}