mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-14 20:54:16 +01:00
Use external library for API interface and IPC.
This commit is contained in:
parent
b3f048bfe6
commit
918d5db6a6
69 changed files with 4026 additions and 1873 deletions
42
tmp/Ipc/Configuration.cs
Normal file
42
tmp/Ipc/Configuration.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using Dalamud.Plugin;
|
||||
using Penumbra.Api.Helpers;
|
||||
|
||||
namespace Penumbra.Api;
|
||||
|
||||
public static partial class Ipc
|
||||
{
|
||||
public static class GetModDirectory
|
||||
{
|
||||
public const string Label = $"Penumbra.{nameof( GetModDirectory )}";
|
||||
|
||||
public static FuncProvider< string > Provider( DalamudPluginInterface pi, Func< string > func )
|
||||
=> new(pi, Label, func);
|
||||
|
||||
public static FuncSubscriber< string > Subscriber( DalamudPluginInterface pi )
|
||||
=> new(pi, Label);
|
||||
}
|
||||
|
||||
public static class GetConfiguration
|
||||
{
|
||||
public const string Label = $"Penumbra.{nameof( GetConfiguration )}";
|
||||
|
||||
public static FuncProvider< string > Provider( DalamudPluginInterface pi, Func< string > func )
|
||||
=> new(pi, Label, func);
|
||||
|
||||
public static FuncSubscriber< string > Subscriber( DalamudPluginInterface pi )
|
||||
=> new(pi, Label);
|
||||
}
|
||||
|
||||
public static class ModDirectoryChanged
|
||||
{
|
||||
public const string Label = $"Penumbra.{nameof( ModDirectoryChanged )}";
|
||||
|
||||
public static EventProvider< string, bool > Provider( DalamudPluginInterface pi,
|
||||
Action< Action< string, bool > > sub, Action< Action< string, bool > > unsub )
|
||||
=> new(pi, Label, ( sub, unsub ));
|
||||
|
||||
public static EventSubscriber< string, bool > Subscriber( DalamudPluginInterface pi, params Action< string, bool >[] actions )
|
||||
=> new(pi, Label, actions);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue