PowerToys/Wox.Plugin/IPublicAPI.cs
Jeremy Wu cecb65cd40
Installed & portable mode: Enhance auto updates (#142)
* Add handling of portable mode when updating

Additionally: 
1. Changed getting version from internally rather than from RELEASES file
2. Added PortableDataPath as a constant so can be used  to determine if portable mode is used

* Fix incorrectly wired auto update event handler

* Fix Sys plugin missing Shutdown command icon

* Add check update command to Sys plugin

* Add message if current Wox version is latest

* Add default silent when auto checking updates in background

Silent when current is still the latest version

* Move UserData folder to new version location

* Changes per review

1. Move IsPortableMode to Constant
2. Merge if statement

* Per comment- change variables to be more descriptive

UpdateInfo and UpdateManager renamed

* Per comment- Add exception handling and message if failed.
2020-02-25 12:08:51 +02:00

130 lines
3.7 KiB
C#

using System;
using System.Collections.Generic;
namespace Wox.Plugin
{
/// <summary>
/// Public APIs that plugin can use
/// </summary>
public interface IPublicAPI
{
/// <summary>
/// Push result to query box
/// </summary>
/// <param name="query"></param>
/// <param name="plugin"></param>
/// <param name="results"></param>
[Obsolete("This method will be removed in Wox 1.3")]
void PushResults(Query query, PluginMetadata plugin, List<Result> results);
/// <summary>
/// Change Wox query
/// </summary>
/// <param name="query">query text</param>
/// <param name="requery">
/// 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
/// </param>
void ChangeQuery(string query, bool requery = false);
/// <summary>
/// Just change the query text, this won't raise search
/// </summary>
/// <param name="query"></param>
[Obsolete]
void ChangeQueryText(string query, bool selectAll = false);
/// <summary>
/// Close Wox
/// </summary>
[Obsolete]
void CloseApp();
/// <summary>
/// Restart Wox
/// </summary>
void RestarApp();
/// <summary>
/// Hide Wox
/// </summary>
[Obsolete]
void HideApp();
/// <summary>
/// Show Wox
/// </summary>
[Obsolete]
void ShowApp();
/// <summary>
/// Save all Wox settings
/// </summary>
void SaveAppAllSettings();
/// <summary>
/// Reloads any Plugins that have the
/// IReloadable implemented. It refeshes
/// Plugin's in memory data with new content
/// added by user.
/// </summary>
void ReloadAllPluginData();
/// <summary>
/// Check for new Wox update
/// </summary>
void CheckForNewUpdate();
/// <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>
void ShowMsg(string title, string subTitle = "", string iconPath = "", bool useMainWindowAsOwner = true);
/// <summary>
/// Open setting dialog
/// </summary>
void OpenSettingDialog();
/// <summary>
/// Show loading animation
/// </summary>
[Obsolete("automatically start")]
void StartLoadingBar();
/// <summary>
/// Stop loading animation
/// </summary>
[Obsolete("automatically stop")]
void StopLoadingBar();
/// <summary>
/// Install Wox plugin
/// </summary>
/// <param name="path">Plugin path (ends with .wox)</param>
void InstallPlugin(string path);
/// <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>
string GetTranslation(string key);
/// <summary>
/// Get all loaded plugins
/// </summary>
/// <returns></returns>
List<PluginPair> GetAllPlugins();
/// <summary>
/// Fired after global keyboard events
/// if you want to hook something like Ctrl+R, you should use this event
/// </summary>
event WoxGlobalKeyboardEventHandler GlobalKeyboardEvent;
}
}