mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 11:16:51 +02:00
Refactoring Plugin.Feature
This commit is contained in:
37
Wox.Plugin/Feature.cs
Normal file
37
Wox.Plugin/Feature.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Wox.Plugin
|
||||
{
|
||||
public interface IFeatures { }
|
||||
|
||||
public interface IContextMenu : IFeatures
|
||||
{
|
||||
List<Result> LoadContextMenus(Result selectedResult);
|
||||
}
|
||||
|
||||
public interface IExclusiveQuery : IFeatures
|
||||
{
|
||||
bool IsExclusiveQuery(Query query);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represent plugin query will be executed in UI thread directly. Don't do long-running operation in Query method if you implement this interface
|
||||
/// <remarks>This will improve the performance of instant search like websearch or cmd plugin</remarks>
|
||||
/// </summary>
|
||||
public interface IInstantQuery : IFeatures
|
||||
{
|
||||
bool IsInstantQuery(string query);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represent plugins that support internationalization
|
||||
/// </summary>
|
||||
public interface IPluginI18n : IFeatures
|
||||
{
|
||||
string GetLanguagesFolder();
|
||||
|
||||
string GetTranslatedPluginTitle();
|
||||
|
||||
string GetTranslatedPluginDescription();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user