mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-11 05:52:19 +02:00
structure change
This commit is contained in:
@@ -5,6 +5,6 @@ namespace WinAlfred.Plugin
|
||||
public interface IPlugin
|
||||
{
|
||||
List<Result> Query(Query query);
|
||||
void Init();
|
||||
void Init(PluginInitContext context);
|
||||
}
|
||||
}
|
||||
13
WinAlfred.Plugin/PluginInitContext.cs
Normal file
13
WinAlfred.Plugin/PluginInitContext.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace WinAlfred.Plugin
|
||||
{
|
||||
public class PluginInitContext
|
||||
{
|
||||
public List<PluginPair> Plugins { get; set; }
|
||||
public Action<string> ChangeQuery { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,15 @@ namespace WinAlfred.Plugin
|
||||
public string IcoPath { get; set; }
|
||||
public Action Action { get; set; }
|
||||
public int Score { get; set; }
|
||||
|
||||
//todo: this should be controlled by system, not visible to users
|
||||
/// <summary>
|
||||
/// Only resulsts that originQuery match with curren query will be displayed in the panel
|
||||
/// </summary>
|
||||
public Query OriginQuery { get; set; }
|
||||
/// <summary>
|
||||
/// context results connected with current reuslt, usually, it can use <- or -> navigate context results
|
||||
/// </summary>
|
||||
public List<Result> ContextResults { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
<Compile Include="AllowedLanguage.cs" />
|
||||
<Compile Include="IPlugin.cs" />
|
||||
<Compile Include="Plugin.cs" />
|
||||
<Compile Include="PluginInitContext.cs" />
|
||||
<Compile Include="PluginMetadata.cs" />
|
||||
<Compile Include="PluginType.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
|
||||
Reference in New Issue
Block a user