using System; using System.Collections.Generic; namespace Flow.Launcher.Plugin { /// /// Public APIs that plugin can use /// public interface IPublicAPI { /// /// Push result to query box /// /// /// /// [Obsolete("This method will be removed in Flow Launcher 1.3")] void PushResults(Query query, PluginMetadata plugin, List results); /// /// 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); /// /// Just change the query text, this won't raise search /// /// [Obsolete] void ChangeQueryText(string query, bool selectAll = false); /// /// Close Flow Launcher /// [Obsolete] void CloseApp(); /// /// Restart Flow Launcher /// void RestartApp(); /// /// Restart Flow Launcher /// [Obsolete("Use RestartApp instead. This method will be removed in Flow Launcher 1.3")] void RestarApp(); /// /// Hide Flow Launcher /// [Obsolete] void HideApp(); /// /// Show Flow Launcher /// [Obsolete] void ShowApp(); /// /// 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. /// void 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(); /// /// Show loading animation /// [Obsolete("automatically start")] void StartLoadingBar(); /// /// Stop loading animation /// [Obsolete("automatically stop")] void StopLoadingBar(); /// /// Install Flow Launcher plugin /// /// Plugin path (ends with .flowlauncher) void InstallPlugin(string path); /// /// 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; } }