2018-05-13 19:49:26 +00:00
|
|
|
|
namespace PKHeX.Core
|
|
|
|
|
{
|
2019-07-14 22:06:45 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Plugin interface used by an editor to notify third-party code providers.
|
|
|
|
|
/// </summary>
|
2018-05-13 19:49:26 +00:00
|
|
|
|
public interface IPlugin
|
|
|
|
|
{
|
2018-05-15 00:30:56 +00:00
|
|
|
|
/// <summary>
|
2018-06-30 22:02:17 +00:00
|
|
|
|
/// Plugin Name.
|
2018-05-15 00:30:56 +00:00
|
|
|
|
/// </summary>
|
2018-05-13 19:49:26 +00:00
|
|
|
|
string Name { get; }
|
2018-05-15 00:30:56 +00:00
|
|
|
|
|
2018-06-30 22:02:17 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Plugin Loading Priority (lowest is initialized first).
|
|
|
|
|
/// </summary>
|
|
|
|
|
int Priority { get; }
|
|
|
|
|
|
2018-05-15 00:30:56 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Entrypoint for the parent to initialize the plugin with provided arguments.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="args">Arguments containing objects useful for initializing the plugin.</param>
|
2018-05-13 19:49:26 +00:00
|
|
|
|
void Initialize(params object[] args);
|
2018-05-15 00:30:56 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Notifies the plugin that a save file was just loaded.
|
|
|
|
|
/// </summary>
|
2018-05-13 19:49:26 +00:00
|
|
|
|
void NotifySaveLoaded();
|
2018-05-15 00:30:56 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Attempts to load a file using the plugin.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="filePath">Path to file to be loaded.</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
bool TryLoadFile(string filePath);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Retrieves the <see cref="ISaveFileProvider"/> object which can provide a <see cref="SaveFile"/>.
|
|
|
|
|
/// </summary>
|
2018-05-13 19:49:26 +00:00
|
|
|
|
ISaveFileProvider SaveFileEditor { get; }
|
|
|
|
|
}
|
|
|
|
|
}
|