using System.Collections.Generic; namespace Wox.Plugin { /// /// Public APIs that plugin can use /// public interface IPublicAPI { /// /// Push result to query box /// /// /// /// void PushResults(Query query, PluginMetadata plugin, List results); /// /// Show context menu with giving results /// /// void ShowContextMenu(PluginMetadata plugin, List results); /// /// Change Wox query /// /// query text /// /// force requery By default, Wox will not fire query if your query is same with existing one. /// Set this to true to force Wox requerying /// void ChangeQuery(string query, bool requery = false); /// /// Just change the query text, this won't raise search /// /// void ChangeQueryText(string query, bool selectAll = false); /// /// Close Wox /// void CloseApp(); /// /// Restart Wox /// void RestarApp(); /// /// Hide Wox /// void HideApp(); /// /// Show Wox /// void ShowApp(); /// /// Show message box /// /// Message title /// Message subtitle /// Message icon path (relative path to your plugin folder) void ShowMsg(string title, string subTitle = "", string iconPath = ""); /// /// Open setting dialog /// void OpenSettingDialog(string tabName = "general"); /// /// Show loading animation /// void StartLoadingBar(); /// /// Stop loading animation /// void StopLoadingBar(); /// /// Install Wox plugin /// /// Plugin path (ends with .wox) void InstallPlugin(string path); /// /// Reload all plugins /// void ReloadPlugins(); /// /// 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 Back key down in the Wox query box /// event WoxKeyDownEventHandler BackKeyDownEvent; /// /// Fired after global keyboard events /// if you want to hook something like Ctrl+R, you should use this event /// event WoxGlobalKeyboardEventHandler GlobalKeyboardEvent; /// /// Fired after drop to result item of current plugin /// /// todo: ResultItem -> Result event ResultItemDropEventHandler ResultItemDropEvent; } }