using System; using System.Collections.Generic; using System.Windows.Documents; 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,bool clearBeforeInsert = false); /// /// Execute command /// a replacement to RUN(win+r) function /// /// command that want to execute /// run as administrator /// bool ShellRun(string cmd, bool runAsAdministrator = false); /// /// 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); /// /// Close Wox /// void CloseApp(); /// /// 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(); /// /// 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 wox execute a query /// event AfterWoxQueryEventHandler AfterWoxQueryEvent; /// /// Fired before wox start to execute a query /// event AfterWoxQueryEventHandler BeforeWoxQueryEvent; } }