2016-01-06 14:45:08 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
2015-11-03 03:27:46 +08:00
|
|
|
|
|
|
|
|
|
namespace Wox.Plugin
|
|
|
|
|
{
|
|
|
|
|
public interface IFeatures { }
|
|
|
|
|
|
|
|
|
|
public interface IContextMenu : IFeatures
|
|
|
|
|
{
|
|
|
|
|
List<Result> LoadContextMenus(Result selectedResult);
|
|
|
|
|
}
|
|
|
|
|
|
2015-11-05 06:49:40 +08:00
|
|
|
|
[Obsolete("If a plugin has a action keyword, then it is exclusive. This interface will be remove in v1.3.0")]
|
2015-11-03 03:27:46 +08:00
|
|
|
|
public interface IExclusiveQuery : IFeatures
|
|
|
|
|
{
|
2015-11-05 06:49:40 +08:00
|
|
|
|
[Obsolete("If a plugin has a action keyword, then it is exclusive. This method will be remove in v1.3.0")]
|
2015-11-03 03:27:46 +08:00
|
|
|
|
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>
|
2016-05-03 07:04:04 +08:00
|
|
|
|
[Obsolete("Wox is fast enough now, executed on ui thread is no longer needed")]
|
2015-11-03 03:27:46 +08:00
|
|
|
|
public interface IInstantQuery : IFeatures
|
|
|
|
|
{
|
|
|
|
|
bool IsInstantQuery(string query);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Represent plugins that support internationalization
|
|
|
|
|
/// </summary>
|
|
|
|
|
public interface IPluginI18n : IFeatures
|
|
|
|
|
{
|
|
|
|
|
string GetTranslatedPluginTitle();
|
|
|
|
|
|
|
|
|
|
string GetTranslatedPluginDescription();
|
|
|
|
|
}
|
2015-11-09 11:20:02 +08:00
|
|
|
|
|
2016-05-05 23:08:44 +08:00
|
|
|
|
public interface IMultipleActionKeywords : IFeatures
|
2015-11-09 11:20:02 +08:00
|
|
|
|
{
|
|
|
|
|
event ActionKeywordsChangedEventHandler ActionKeywordsChanged;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class ActionKeywordsChangedEventArgs : EventArgs
|
|
|
|
|
{
|
|
|
|
|
public string OldActionKeyword { get; set; }
|
|
|
|
|
public string NewActionKeyword { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public delegate void ActionKeywordsChangedEventHandler(IMultipleActionKeywords sender, ActionKeywordsChangedEventArgs e);
|
2016-05-05 23:08:44 +08:00
|
|
|
|
|
|
|
|
|
public interface IResultUpdated : IFeatures
|
|
|
|
|
{
|
|
|
|
|
event ResultUpdatedEventHandler ResultsUpdated;
|
|
|
|
|
}
|
|
|
|
|
|
2016-05-06 03:26:19 +08:00
|
|
|
|
public delegate void ResultUpdatedEventHandler(IResultUpdated sender, ResultUpdatedEventArgs e);
|
2016-05-05 23:08:44 +08:00
|
|
|
|
|
2016-05-06 03:26:19 +08:00
|
|
|
|
public class ResultUpdatedEventArgs : EventArgs
|
2016-05-05 23:08:44 +08:00
|
|
|
|
{
|
|
|
|
|
public List<Result> Results;
|
|
|
|
|
public Query Query;
|
|
|
|
|
}
|
2015-11-03 03:27:46 +08:00
|
|
|
|
}
|