2016-03-28 00:09:40 +00:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
2014-07-05 15:10:34 +00:00
|
|
|
|
|
2020-04-21 09:12:17 +00:00
|
|
|
|
namespace Flow.Launcher.Plugin
|
2014-07-05 15:10:34 +00:00
|
|
|
|
{
|
2015-01-19 11:14:02 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Public APIs that plugin can use
|
|
|
|
|
|
/// </summary>
|
2014-07-05 15:10:34 +00:00
|
|
|
|
public interface IPublicAPI
|
|
|
|
|
|
{
|
2014-12-26 14:51:04 +00:00
|
|
|
|
/// <summary>
|
2015-01-19 11:14:02 +00:00
|
|
|
|
/// Push result to query box
|
2014-12-26 14:51:04 +00:00
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="query"></param>
|
|
|
|
|
|
/// <param name="plugin"></param>
|
|
|
|
|
|
/// <param name="results"></param>
|
2020-04-22 10:26:09 +00:00
|
|
|
|
[Obsolete("This method will be removed in Flow Launcher 1.3")]
|
2015-02-04 15:16:41 +00:00
|
|
|
|
void PushResults(Query query, PluginMetadata plugin, List<Result> results);
|
|
|
|
|
|
|
2015-01-19 11:14:02 +00:00
|
|
|
|
/// <summary>
|
2020-04-21 09:12:17 +00:00
|
|
|
|
/// Change Flow.Launcher query
|
2015-01-19 11:14:02 +00:00
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="query">query text</param>
|
|
|
|
|
|
/// <param name="requery">
|
2020-04-22 10:26:09 +00:00
|
|
|
|
/// 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
|
2015-01-19 11:14:02 +00:00
|
|
|
|
/// </param>
|
2014-07-05 15:10:34 +00:00
|
|
|
|
void ChangeQuery(string query, bool requery = false);
|
|
|
|
|
|
|
2015-02-07 08:53:33 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Just change the query text, this won't raise search
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="query"></param>
|
2016-05-25 00:00:10 +00:00
|
|
|
|
[Obsolete]
|
2015-02-09 11:16:13 +00:00
|
|
|
|
void ChangeQueryText(string query, bool selectAll = false);
|
2015-02-07 08:53:33 +00:00
|
|
|
|
|
2015-01-19 11:14:02 +00:00
|
|
|
|
/// <summary>
|
2020-04-22 10:26:09 +00:00
|
|
|
|
/// Close Flow Launcher
|
2015-01-19 11:14:02 +00:00
|
|
|
|
/// </summary>
|
2016-05-25 00:00:10 +00:00
|
|
|
|
[Obsolete]
|
2014-07-05 15:10:34 +00:00
|
|
|
|
void CloseApp();
|
|
|
|
|
|
|
2015-11-26 02:04:44 +00:00
|
|
|
|
/// <summary>
|
2020-04-22 10:26:09 +00:00
|
|
|
|
/// Restart Flow Launcher
|
2015-11-26 02:04:44 +00:00
|
|
|
|
/// </summary>
|
|
|
|
|
|
void RestarApp();
|
|
|
|
|
|
|
2015-01-19 11:14:02 +00:00
|
|
|
|
/// <summary>
|
2020-04-22 10:26:09 +00:00
|
|
|
|
/// Hide Flow Launcher
|
2015-01-19 11:14:02 +00:00
|
|
|
|
/// </summary>
|
2016-05-25 00:00:10 +00:00
|
|
|
|
[Obsolete]
|
2014-07-05 15:10:34 +00:00
|
|
|
|
void HideApp();
|
|
|
|
|
|
|
2015-01-19 11:14:02 +00:00
|
|
|
|
/// <summary>
|
2020-04-22 10:26:09 +00:00
|
|
|
|
/// Show Flow Launcher
|
2015-01-19 11:14:02 +00:00
|
|
|
|
/// </summary>
|
2016-05-25 00:00:10 +00:00
|
|
|
|
[Obsolete]
|
2014-07-05 15:10:34 +00:00
|
|
|
|
void ShowApp();
|
|
|
|
|
|
|
2019-08-22 11:37:36 +00:00
|
|
|
|
/// <summary>
|
2020-04-22 10:26:09 +00:00
|
|
|
|
/// Save all Flow Launcher settings
|
2019-08-22 11:37:36 +00:00
|
|
|
|
/// </summary>
|
|
|
|
|
|
void SaveAppAllSettings();
|
|
|
|
|
|
|
2019-10-06 02:44:38 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Reloads any Plugins that have the
|
|
|
|
|
|
/// IReloadable implemented. It refeshes
|
|
|
|
|
|
/// Plugin's in memory data with new content
|
|
|
|
|
|
/// added by user.
|
|
|
|
|
|
/// </summary>
|
2019-10-06 02:47:52 +00:00
|
|
|
|
void ReloadAllPluginData();
|
2019-10-06 02:44:38 +00:00
|
|
|
|
|
2020-02-25 10:08:51 +00:00
|
|
|
|
/// <summary>
|
2020-04-22 10:26:09 +00:00
|
|
|
|
/// Check for new Flow Launcher update
|
2020-02-25 10:08:51 +00:00
|
|
|
|
/// </summary>
|
|
|
|
|
|
void CheckForNewUpdate();
|
|
|
|
|
|
|
2015-01-19 11:14:02 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Show message box
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="title">Message title</param>
|
|
|
|
|
|
/// <param name="subTitle">Message subtitle</param>
|
|
|
|
|
|
/// <param name="iconPath">Message icon path (relative path to your plugin folder)</param>
|
2020-03-31 11:00:09 +00:00
|
|
|
|
void ShowMsg(string title, string subTitle = "", string iconPath = "");
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Show message box
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="title">Message title</param>
|
|
|
|
|
|
/// <param name="subTitle">Message subtitle</param>
|
|
|
|
|
|
/// <param name="iconPath">Message icon path (relative path to your plugin folder)</param>
|
|
|
|
|
|
/// <param name="useMainWindowAsOwner">when true will use main windows as the owner</param>
|
|
|
|
|
|
void ShowMsg(string title, string subTitle, string iconPath, bool useMainWindowAsOwner = true);
|
2014-07-05 15:10:34 +00:00
|
|
|
|
|
2015-01-19 11:14:02 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Open setting dialog
|
|
|
|
|
|
/// </summary>
|
2016-05-22 18:16:39 +00:00
|
|
|
|
void OpenSettingDialog();
|
2015-02-04 15:16:41 +00:00
|
|
|
|
|
2015-01-19 11:14:02 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Show loading animation
|
|
|
|
|
|
/// </summary>
|
2016-05-25 00:00:10 +00:00
|
|
|
|
[Obsolete("automatically start")]
|
2014-07-05 15:10:34 +00:00
|
|
|
|
void StartLoadingBar();
|
|
|
|
|
|
|
2015-01-19 11:14:02 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Stop loading animation
|
|
|
|
|
|
/// </summary>
|
2016-05-25 00:00:10 +00:00
|
|
|
|
[Obsolete("automatically stop")]
|
2014-07-05 15:10:34 +00:00
|
|
|
|
void StopLoadingBar();
|
|
|
|
|
|
|
2015-01-19 11:14:02 +00:00
|
|
|
|
/// <summary>
|
2020-04-22 10:26:09 +00:00
|
|
|
|
/// Install Flow Launcher plugin
|
2015-01-19 11:14:02 +00:00
|
|
|
|
/// </summary>
|
2020-04-21 12:54:41 +00:00
|
|
|
|
/// <param name="path">Plugin path (ends with .flowlauncher)</param>
|
2014-07-05 15:10:34 +00:00
|
|
|
|
void InstallPlugin(string path);
|
|
|
|
|
|
|
2015-01-19 11:14:02 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Get translation of current language
|
|
|
|
|
|
/// You need to implement IPluginI18n if you want to support multiple languages for your plugin
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="key"></param>
|
|
|
|
|
|
/// <returns></returns>
|
2015-01-06 15:24:11 +00:00
|
|
|
|
string GetTranslation(string key);
|
|
|
|
|
|
|
2015-01-19 11:14:02 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Get all loaded plugins
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
2014-07-05 15:10:34 +00:00
|
|
|
|
List<PluginPair> GetAllPlugins();
|
2014-07-19 02:12:11 +00:00
|
|
|
|
|
2015-01-19 11:14:02 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Fired after global keyboard events
|
|
|
|
|
|
/// if you want to hook something like Ctrl+R, you should use this event
|
|
|
|
|
|
/// </summary>
|
2020-04-21 12:16:10 +00:00
|
|
|
|
event FlowLauncherGlobalKeyboardEventHandler GlobalKeyboardEvent;
|
2014-07-05 15:10:34 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|