Skip to content

Commit d623e3d

Browse files
authored
Merge pull request #563 from taooceros/IFeatureExpand
Move IAsyncReloadable.cs, IReloadable.cs, ISavable.cs to IFeatures
2 parents 55e985f + 7a318fe commit d623e3d

File tree

14 files changed

+74
-52
lines changed

14 files changed

+74
-52
lines changed

Flow.Launcher.Plugin/Feature.cs

Lines changed: 0 additions & 36 deletions
This file was deleted.

Flow.Launcher.Plugin/Features.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Collections.Specialized;
4+
using System.Threading;
5+
6+
namespace Flow.Launcher.Plugin
7+
{
8+
/// <summary>
9+
/// Base Interface for Flow's special plugin feature interface
10+
/// </summary>
11+
public interface IFeatures
12+
{
13+
}
14+
}

Flow.Launcher.Plugin/Interfaces/IAsyncReloadable.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ namespace Flow.Launcher.Plugin
1313
/// The command that allows user to manual reload is exposed via Plugin.Sys, and
1414
/// it will call the plugins that have implemented this interface.
1515
/// </summary>
16-
public interface IAsyncReloadable
16+
public interface IAsyncReloadable : IFeatures
1717
{
1818
Task ReloadDataAsync();
1919
}
20-
}
20+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
using System.Collections.Generic;
2+
3+
namespace Flow.Launcher.Plugin
4+
{
5+
public interface IContextMenu : IFeatures
6+
{
7+
List<Result> LoadContextMenus(Result selectedResult);
8+
}
9+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
namespace Flow.Launcher.Plugin
2+
{
3+
/// <summary>
4+
/// Represent plugins that support internationalization
5+
/// </summary>
6+
public interface IPluginI18n : IFeatures
7+
{
8+
string GetTranslatedPluginTitle();
9+
10+
string GetTranslatedPluginDescription();
11+
}
12+
}

Flow.Launcher.Plugin/Interfaces/IReloadable.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
/// If requiring reloading data asynchronously, please use the IAsyncReloadable interface
1616
/// </para>
1717
/// </summary>
18-
public interface IReloadable
18+
public interface IReloadable : IFeatures
1919
{
2020
void ReloadData();
2121
}
22-
}
22+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Threading;
4+
5+
namespace Flow.Launcher.Plugin
6+
{
7+
public interface IResultUpdated : IFeatures
8+
{
9+
event ResultUpdatedEventHandler ResultsUpdated;
10+
}
11+
12+
public delegate void ResultUpdatedEventHandler(IResultUpdated sender, ResultUpdatedEventArgs e);
13+
14+
public class ResultUpdatedEventArgs : EventArgs
15+
{
16+
public List<Result> Results;
17+
public Query Query;
18+
public CancellationToken Token { get; init; }
19+
}
20+
}

0 commit comments

Comments
 (0)