using System; using System.Collections.Generic; using System.Threading.Tasks; namespace Flow.Launcher.Plugin { /// /// Public APIs that plugin can use /// public interface IPublicAPI { /// /// Change Flow.Launcher query /// /// query text /// /// force requery By default, Flow Launcher will not fire query if your query is same with existing one. /// Set this to true to force Flow Launcher requerying /// void ChangeQuery(string query, bool requery = false); /// /// Restart Flow Launcher /// void RestartApp(); /// /// Save all Flow Launcher settings /// void SaveAppAllSettings(); /// /// Reloads any Plugins that have the /// IReloadable implemented. It refeshes /// Plugin's in memory data with new content /// added by user. /// Task ReloadAllPluginData(); /// /// Check for new Flow Launcher update /// void CheckForNewUpdate(); /// /// Show message box /// /// Message title /// Message subtitle /// Message icon path (relative path to your plugin folder) void ShowMsg(string title, string subTitle = "", string iconPath = ""); /// /// Show message box /// /// Message title /// Message subtitle /// Message icon path (relative path to your plugin folder) /// when true will use main windows as the owner void ShowMsg(string title, string subTitle, string iconPath, bool useMainWindowAsOwner = true); /// /// Open setting dialog /// void OpenSettingDialog(); /// /// Get translation of current language /// You need to implement IPluginI18n if you want to support multiple languages for your plugin /// /// /// string GetTranslation(string key); /// /// Get all loaded plugins /// /// List GetAllPlugins(); /// /// Fired after global keyboard events /// if you want to hook something like Ctrl+R, you should use this event /// event FlowLauncherGlobalKeyboardEventHandler GlobalKeyboardEvent; } }