Use external library for API interface and IPC.

This commit is contained in:
Ottermandias 2022-10-08 02:02:33 +02:00
parent b3f048bfe6
commit 918d5db6a6
69 changed files with 4026 additions and 1873 deletions

76
tmp/Ipc/Collection.cs Normal file
View file

@ -0,0 +1,76 @@
using System;
using System.Collections.Generic;
using Dalamud.Plugin;
using Penumbra.Api.Helpers;
namespace Penumbra.Api;
public static partial class Ipc
{
public static class GetCollections
{
public const string Label = $"Penumbra.{nameof( GetCollections )}";
public static FuncProvider< IList< string > > Provider( DalamudPluginInterface pi, Func< IList< string > > func )
=> new(pi, Label, func);
public static FuncSubscriber< IList< string > > Subscriber( DalamudPluginInterface pi )
=> new(pi, Label);
}
public static class GetCurrentCollectionName
{
public const string Label = $"Penumbra.{nameof( GetCurrentCollectionName )}";
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 GetDefaultCollectionName
{
public const string Label = $"Penumbra.{nameof( GetDefaultCollectionName )}";
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 GetInterfaceCollectionName
{
public const string Label = $"Penumbra.{nameof( GetInterfaceCollectionName )}";
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 GetCharacterCollectionName
{
public const string Label = $"Penumbra.{nameof( GetCharacterCollectionName )}";
public static FuncProvider< string, (string, bool) > Provider( DalamudPluginInterface pi, Func< string, (string, bool) > func )
=> new(pi, Label, func);
public static FuncSubscriber< string, (string, bool) > Subscriber( DalamudPluginInterface pi )
=> new(pi, Label);
}
public static class GetChangedItems
{
public const string Label = $"Penumbra.{nameof( GetChangedItems )}";
public static FuncProvider< string, IReadOnlyDictionary< string, object? > > Provider( DalamudPluginInterface pi,
Func< string, IReadOnlyDictionary< string, object? > > func )
=> new(pi, Label, func);
public static FuncSubscriber< string, IReadOnlyDictionary< string, object? > > Subscriber( DalamudPluginInterface pi )
=> new(pi, Label);
}
}

42
tmp/Ipc/Configuration.cs Normal file
View 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);
}
}

63
tmp/Ipc/GameState.cs Normal file
View file

@ -0,0 +1,63 @@
using System;
using Dalamud.Plugin;
using Penumbra.Api.Helpers;
namespace Penumbra.Api;
public static partial class Ipc
{
public static class GetDrawObjectInfo
{
public const string Label = $"Penumbra.{nameof( GetDrawObjectInfo )}";
public static FuncProvider< nint, (nint, string) > Provider( DalamudPluginInterface pi, Func< nint, (nint, string) > func )
=> new(pi, Label, func);
public static FuncSubscriber< nint, (nint, string) > Subscriber( DalamudPluginInterface pi )
=> new(pi, Label);
}
public static class GetCutsceneParentIndex
{
public const string Label = $"Penumbra.{nameof( GetCutsceneParentIndex )}";
public static FuncProvider< int, int > Provider( DalamudPluginInterface pi, Func< int, int > func )
=> new(pi, Label, func);
public static FuncSubscriber< int, int > Subscriber( DalamudPluginInterface pi )
=> new(pi, Label);
}
public static class CreatingCharacterBase
{
public const string Label = $"Penumbra.{nameof( CreatingCharacterBase )}";
public static EventProvider< nint, string, nint, nint, nint > Provider( DalamudPluginInterface pi, Action add, Action del )
=> new(pi, Label, add, del);
public static EventSubscriber< nint, string, nint, nint, nint > Subscriber( DalamudPluginInterface pi, params Action< nint, string, nint, nint, nint >[] actions )
=> new(pi, Label, actions);
}
public static class CreatedCharacterBase
{
public const string Label = $"Penumbra.{nameof( CreatedCharacterBase )}";
public static EventProvider< nint, string, nint > Provider( DalamudPluginInterface pi, Action add, Action del )
=> new(pi, Label, add, del);
public static EventSubscriber< nint, string, nint > Subscriber( DalamudPluginInterface pi, params Action< nint, string, nint >[] actions )
=> new(pi, Label, actions);
}
public static class GameObjectResourcePathResolved
{
public const string Label = $"Penumbra.{nameof( GameObjectResourcePathResolved )}";
public static EventProvider< nint, string, string > Provider( DalamudPluginInterface pi, Action add, Action del )
=> new(pi, Label, add, del);
public static EventSubscriber< nint, string, string > Subscriber( DalamudPluginInterface pi, params Action< nint, string, string >[] actions )
=> new(pi, Label, actions);
}
}

30
tmp/Ipc/Meta.cs Normal file
View file

@ -0,0 +1,30 @@
using System;
using Dalamud.Plugin;
using Penumbra.Api.Helpers;
namespace Penumbra.Api;
public static partial class Ipc
{
public static class GetPlayerMetaManipulations
{
public const string Label = $"Penumbra.{nameof( GetPlayerMetaManipulations )}";
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 GetMetaManipulations
{
public const string Label = $"Penumbra.{nameof( GetMetaManipulations )}";
public static FuncProvider< string, string > Provider( DalamudPluginInterface pi, Func< string, string > func )
=> new(pi, Label, func);
public static FuncSubscriber< string, string > Subscriber( DalamudPluginInterface pi )
=> new(pi, Label);
}
}

116
tmp/Ipc/ModSettings.cs Normal file
View file

@ -0,0 +1,116 @@
using System;
using System.Collections.Generic;
using Dalamud.Plugin;
using Penumbra.Api.Enums;
using Penumbra.Api.Helpers;
namespace Penumbra.Api;
using CurrentSettings = ValueTuple< PenumbraApiEc, (bool, int, IDictionary< string, IList< string > >, bool)? >;
public static partial class Ipc
{
public static class GetAvailableModSettings
{
public const string Label = $"Penumbra.{nameof( GetAvailableModSettings )}";
public static FuncProvider< string, string, IDictionary< string, (IList< string >, GroupType) >? > Provider(
DalamudPluginInterface pi, Func< string, string, IDictionary< string, (IList< string >, GroupType) >? > func )
=> new(pi, Label, func);
public static FuncSubscriber< string, string, IDictionary< string, (IList< string >, GroupType) >? > Subscriber(
DalamudPluginInterface pi )
=> new(pi, Label);
}
public static class GetCurrentModSettings
{
public const string Label = $"Penumbra.{nameof( GetCurrentModSettings )}";
public static FuncProvider< string, string, string, bool, CurrentSettings > Provider( DalamudPluginInterface pi,
Func< string, string, string, bool, CurrentSettings > func )
=> new(pi, Label, func);
public static FuncSubscriber< string, string, string, bool, CurrentSettings > Subscriber(
DalamudPluginInterface pi )
=> new(pi, Label);
}
public static class TryInheritMod
{
public const string Label = $"Penumbra.{nameof( TryInheritMod )}";
public static FuncProvider< string, string, string, bool, PenumbraApiEc > Provider( DalamudPluginInterface pi,
Func< string, string, string, bool, PenumbraApiEc > func )
=> new(pi, Label, func);
public static FuncSubscriber< string, string, string, bool, PenumbraApiEc > Subscriber(
DalamudPluginInterface pi )
=> new(pi, Label);
}
public static class TrySetMod
{
public const string Label = $"Penumbra.{nameof( TrySetMod )}";
public static FuncProvider< string, string, string, bool, PenumbraApiEc > Provider( DalamudPluginInterface pi,
Func< string, string, string, bool, PenumbraApiEc > func )
=> new(pi, Label, func);
public static FuncSubscriber< string, string, string, bool, PenumbraApiEc > Subscriber(
DalamudPluginInterface pi )
=> new(pi, Label);
}
public static class TrySetModPriority
{
public const string Label = $"Penumbra.{nameof( TrySetModPriority )}";
public static FuncProvider< string, string, string, int, PenumbraApiEc > Provider( DalamudPluginInterface pi,
Func< string, string, string, int, PenumbraApiEc > func )
=> new(pi, Label, func);
public static FuncSubscriber< string, string, string, int, PenumbraApiEc > Subscriber(
DalamudPluginInterface pi )
=> new(pi, Label);
}
public static class TrySetModSetting
{
public const string Label = $"Penumbra.{nameof( TrySetModSetting )}";
public static FuncProvider< string, string, string, string, string, PenumbraApiEc > Provider( DalamudPluginInterface pi,
Func< string, string, string, string, string, PenumbraApiEc > func )
=> new(pi, Label, func);
public static FuncSubscriber< string, string, string, string, string, PenumbraApiEc > Subscriber(
DalamudPluginInterface pi )
=> new(pi, Label);
}
public static class TrySetModSettings
{
public const string Label = $"Penumbra.{nameof( TrySetModSettings )}";
public static FuncProvider< string, string, string, string, IReadOnlyList< string >, PenumbraApiEc > Provider(
DalamudPluginInterface pi,
Func< string, string, string, string, IReadOnlyList< string >, PenumbraApiEc > func )
=> new(pi, Label, func);
public static FuncSubscriber< string, string, string, string, IReadOnlyList< string >, PenumbraApiEc > Subscriber(
DalamudPluginInterface pi )
=> new(pi, Label);
}
public static class ModSettingChanged
{
public const string Label = $"Penumbra.{nameof( ModSettingChanged )}";
public static EventProvider< ModSettingChange, string, string, bool > Provider( DalamudPluginInterface pi, Action add, Action del )
=> new(pi, Label, add, del);
public static EventSubscriber< ModSettingChange, string, string, bool > Subscriber( DalamudPluginInterface pi,
params Action< ModSettingChange, string, string, bool >[] actions )
=> new(pi, Label, actions);
}
}

81
tmp/Ipc/Mods.cs Normal file
View file

@ -0,0 +1,81 @@
using System;
using System.Collections.Generic;
using Dalamud.Plugin;
using Penumbra.Api.Enums;
using Penumbra.Api.Helpers;
namespace Penumbra.Api;
public static partial class Ipc
{
public static class GetMods
{
public const string Label = $"Penumbra.{nameof( GetMods )}";
public static FuncProvider< IList< (string, string) > > Provider( DalamudPluginInterface pi, Func< IList< (string, string) > > func )
=> new(pi, Label, func);
public static FuncSubscriber< IList< (string, string) > > Subscriber( DalamudPluginInterface pi )
=> new(pi, Label);
}
public static class ReloadMod
{
public const string Label = $"Penumbra.{nameof( ReloadMod )}";
public static FuncProvider< string, string, PenumbraApiEc > Provider( DalamudPluginInterface pi,
Func< string, string, PenumbraApiEc > func )
=> new(pi, Label, func);
public static FuncSubscriber< string, string, PenumbraApiEc > Subscriber( DalamudPluginInterface pi )
=> new(pi, Label);
}
public static class AddMod
{
public const string Label = $"Penumbra.{nameof( AddMod )}";
public static FuncProvider< string, PenumbraApiEc > Provider( DalamudPluginInterface pi,
Func< string, PenumbraApiEc > func )
=> new(pi, Label, func);
public static FuncSubscriber< string, PenumbraApiEc > Subscriber( DalamudPluginInterface pi )
=> new(pi, Label);
}
public static class DeleteMod
{
public const string Label = $"Penumbra.{nameof( DeleteMod )}";
public static FuncProvider< string, string, PenumbraApiEc > Provider( DalamudPluginInterface pi,
Func< string, string, PenumbraApiEc > func )
=> new(pi, Label, func);
public static FuncSubscriber< string, string, PenumbraApiEc > Subscriber( DalamudPluginInterface pi )
=> new(pi, Label);
}
public static class GetModPath
{
public const string Label = $"Penumbra.{nameof( GetModPath )}";
public static FuncProvider< string, string, (PenumbraApiEc, string, bool) > Provider( DalamudPluginInterface pi,
Func< string, string, (PenumbraApiEc, string, bool) > func )
=> new(pi, Label, func);
public static FuncSubscriber< string, string, (PenumbraApiEc, string, bool) > Subscriber( DalamudPluginInterface pi )
=> new(pi, Label);
}
public static class SetModPath
{
public const string Label = $"Penumbra.{nameof( SetModPath )}";
public static FuncProvider< string, string, string, PenumbraApiEc > Provider( DalamudPluginInterface pi,
Func< string, string, string, PenumbraApiEc > func )
=> new(pi, Label, func);
public static FuncSubscriber< string, string, string, PenumbraApiEc > Subscriber( DalamudPluginInterface pi )
=> new(pi, Label);
}
}

68
tmp/Ipc/PluginState.cs Normal file
View file

@ -0,0 +1,68 @@
using System;
using Dalamud.Plugin;
using Penumbra.Api.Helpers;
namespace Penumbra.Api;
public static partial class Ipc
{
public static class Initialized
{
public const string Label = $"Penumbra.{nameof( Initialized )}";
public static EventProvider Provider( DalamudPluginInterface pi )
=> new(pi, Label);
public static EventSubscriber Subscriber( DalamudPluginInterface pi, params Action[] actions )
{
var ret = new EventSubscriber( pi, Label );
foreach( var action in actions )
{
ret.Event += action;
}
return ret;
}
}
public static class Disposed
{
public const string Label = $"Penumbra.{nameof( Disposed )}";
public static EventProvider Provider( DalamudPluginInterface pi )
=> new(pi, Label);
public static EventSubscriber Subscriber( DalamudPluginInterface pi, params Action[] actions )
{
var ret = new EventSubscriber( pi, Label );
foreach( var action in actions )
{
ret.Event += action;
}
return ret;
}
}
public static class ApiVersion
{
public const string Label = $"Penumbra.{nameof( ApiVersion )}";
public static FuncProvider< int > Provider( DalamudPluginInterface pi, Func< int > func )
=> new(pi, Label, func);
public static FuncSubscriber< int > Subscriber( DalamudPluginInterface pi )
=> new(pi, Label);
}
public static class ApiVersions
{
public const string Label = $"Penumbra.{nameof( ApiVersions )}";
public static FuncProvider< (int Breaking, int Features) > Provider( DalamudPluginInterface pi, Func< (int, int) > func )
=> new(pi, Label, func);
public static FuncSubscriber< (int Breaking, int Features) > Subscriber( DalamudPluginInterface pi )
=> new(pi, Label);
}
}

65
tmp/Ipc/Redraw.cs Normal file
View file

@ -0,0 +1,65 @@
using System;
using Dalamud.Game.ClientState.Objects.Types;
using Dalamud.Plugin;
using Penumbra.Api.Enums;
using Penumbra.Api.Helpers;
namespace Penumbra.Api;
public static partial class Ipc
{
public static class RedrawAll
{
public const string Label = $"Penumbra.{nameof( RedrawAll )}";
public static ActionProvider< RedrawType > Provider( DalamudPluginInterface pi, Action< RedrawType > action )
=> new(pi, Label, action);
public static ActionSubscriber< RedrawType > Subscriber( DalamudPluginInterface pi )
=> new(pi, Label);
}
public static class RedrawObject
{
public const string Label = $"Penumbra.{nameof( RedrawObject )}";
public static ActionProvider< GameObject, RedrawType > Provider( DalamudPluginInterface pi, Action< GameObject, RedrawType > action )
=> new(pi, Label, action);
public static ActionSubscriber< GameObject, RedrawType > Subscriber( DalamudPluginInterface pi )
=> new(pi, Label);
}
public static class RedrawObjectByIndex
{
public const string Label = $"Penumbra.{nameof( RedrawObjectByIndex )}";
public static ActionProvider< int, RedrawType > Provider( DalamudPluginInterface pi, Action< int, RedrawType > action )
=> new(pi, Label, action);
public static ActionSubscriber< int, RedrawType > Subscriber( DalamudPluginInterface pi )
=> new(pi, Label);
}
public static class RedrawObjectByName
{
public const string Label = $"Penumbra.{nameof( RedrawObjectByName )}";
public static ActionProvider< string, RedrawType > Provider( DalamudPluginInterface pi, Action< string, RedrawType > action )
=> new(pi, Label, action);
public static ActionSubscriber< string, RedrawType > Subscriber( DalamudPluginInterface pi )
=> new(pi, Label);
}
public static class GameObjectRedrawn
{
public const string Label = $"Penumbra.{nameof( GameObjectRedrawn )}";
public static EventProvider< nint, int > Provider( DalamudPluginInterface pi, Action add, Action del )
=> new(pi, Label, add, del);
public static EventSubscriber< nint, int > Subscriber( DalamudPluginInterface pi, params Action< nint, int >[] actions )
=> new(pi, Label, actions);
}
}

74
tmp/Ipc/Resolve.cs Normal file
View file

@ -0,0 +1,74 @@
using System;
using Dalamud.Plugin;
using Penumbra.Api.Helpers;
namespace Penumbra.Api;
public static partial class Ipc
{
public static class ResolveDefaultPath
{
public const string Label = $"Penumbra.{nameof( ResolveDefaultPath )}";
public static FuncProvider< string, string > Provider( DalamudPluginInterface pi, Func< string, string > func )
=> new(pi, Label, func);
public static FuncSubscriber< string, string > Subscriber( DalamudPluginInterface pi )
=> new(pi, Label);
}
public static class ResolveInterfacePath
{
public const string Label = $"Penumbra.{nameof( ResolveInterfacePath )}";
public static FuncProvider< string, string > Provider( DalamudPluginInterface pi, Func< string, string > func )
=> new(pi, Label, func);
public static FuncSubscriber< string, string > Subscriber( DalamudPluginInterface pi )
=> new(pi, Label);
}
public static class ResolvePlayerPath
{
public const string Label = $"Penumbra.{nameof( ResolvePlayerPath )}";
public static FuncProvider< string, string > Provider( DalamudPluginInterface pi, Func< string, string > func )
=> new(pi, Label, func);
public static FuncSubscriber< string, string > Subscriber( DalamudPluginInterface pi )
=> new(pi, Label);
}
public static class ResolveCharacterPath
{
public const string Label = $"Penumbra.{nameof( ResolveCharacterPath )}";
public static FuncProvider< string, string, string > Provider( DalamudPluginInterface pi, Func< string, string, string > func )
=> new(pi, Label, func);
public static FuncSubscriber< string, string, string > Subscriber( DalamudPluginInterface pi )
=> new(pi, Label);
}
public static class ReverseResolvePath
{
public const string Label = $"Penumbra.{nameof( ReverseResolvePath )}";
public static FuncProvider< string, string, string[] > Provider( DalamudPluginInterface pi, Func< string, string, string[] > func )
=> new(pi, Label, func);
public static FuncSubscriber< string, string, string[] > Subscriber( DalamudPluginInterface pi )
=> new(pi, Label);
}
public static class ReverseResolvePlayerPath
{
public const string Label = $"Penumbra.{nameof( ReverseResolvePlayerPath )}";
public static FuncProvider< string, string[] > Provider( DalamudPluginInterface pi, Func< string, string[] > func )
=> new(pi, Label, func);
public static FuncSubscriber< string, string[] > Subscriber( DalamudPluginInterface pi )
=> new(pi, Label);
}
}

83
tmp/Ipc/Temporary.cs Normal file
View file

@ -0,0 +1,83 @@
using System;
using System.Collections.Generic;
using Dalamud.Plugin;
using Penumbra.Api.Enums;
using Penumbra.Api.Helpers;
namespace Penumbra.Api;
public static partial class Ipc
{
public static class CreateTemporaryCollection
{
public const string Label = $"Penumbra.{nameof( CreateTemporaryCollection )}";
public static FuncProvider< string, string, bool, (PenumbraApiEc, string) > Provider( DalamudPluginInterface pi,
Func< string, string, bool, (PenumbraApiEc, string) > func )
=> new(pi, Label, func);
public static FuncSubscriber< string, string, bool, (PenumbraApiEc, string) > Subscriber( DalamudPluginInterface pi )
=> new(pi, Label);
}
public static class RemoveTemporaryCollection
{
public const string Label = $"Penumbra.{nameof( RemoveTemporaryCollection )}";
public static FuncProvider< string, PenumbraApiEc > Provider( DalamudPluginInterface pi,
Func< string, PenumbraApiEc > func )
=> new(pi, Label, func);
public static FuncSubscriber< string, PenumbraApiEc > Subscriber( DalamudPluginInterface pi )
=> new(pi, Label);
}
public static class AddTemporaryModAll
{
public const string Label = $"Penumbra.{nameof( AddTemporaryModAll )}";
public static FuncProvider< string, Dictionary< string, string >, string, int, PenumbraApiEc > Provider(
DalamudPluginInterface pi, Func< string, Dictionary< string, string >, string, int, PenumbraApiEc > func )
=> new(pi, Label, func);
public static FuncSubscriber< string, Dictionary< string, string >, string, int, PenumbraApiEc > Subscriber( DalamudPluginInterface pi )
=> new(pi, Label);
}
public static class AddTemporaryMod
{
public const string Label = $"Penumbra.{nameof( AddTemporaryMod )}";
public static FuncProvider< string, string, Dictionary< string, string >, string, int, PenumbraApiEc > Provider(
DalamudPluginInterface pi, Func< string, string, Dictionary< string, string >, string, int, PenumbraApiEc > func )
=> new(pi, Label, func);
public static FuncSubscriber< string, string, Dictionary< string, string >, string, int, PenumbraApiEc > Subscriber(
DalamudPluginInterface pi )
=> new(pi, Label);
}
public static class RemoveTemporaryModAll
{
public const string Label = $"Penumbra.{nameof( RemoveTemporaryModAll )}";
public static FuncProvider< string, int, PenumbraApiEc > Provider(
DalamudPluginInterface pi, Func< string, int, PenumbraApiEc > func )
=> new(pi, Label, func);
public static FuncSubscriber< string, int, PenumbraApiEc > Subscriber( DalamudPluginInterface pi )
=> new(pi, Label);
}
public static class RemoveTemporaryMod
{
public const string Label = $"Penumbra.{nameof( RemoveTemporaryMod )}";
public static FuncProvider< string, string, int, PenumbraApiEc > Provider(
DalamudPluginInterface pi, Func< string, string, int, PenumbraApiEc > func )
=> new(pi, Label, func);
public static FuncSubscriber< string, string, int, PenumbraApiEc > Subscriber( DalamudPluginInterface pi )
=> new(pi, Label);
}
}

55
tmp/Ipc/Ui.cs Normal file
View file

@ -0,0 +1,55 @@
using System;
using Dalamud.Plugin;
using Penumbra.Api.Enums;
using Penumbra.Api.Helpers;
namespace Penumbra.Api;
public static partial class Ipc
{
public static class PreSettingsDraw
{
public const string Label = $"Penumbra.{nameof( PreSettingsDraw )}";
public static EventProvider< string > Provider( DalamudPluginInterface pi, Action< Action< string > > sub,
Action< Action< string > > unsub )
=> new(pi, Label, ( sub, unsub ));
public static EventSubscriber< string > Subscriber( DalamudPluginInterface pi, params Action< string >[] actions )
=> new(pi, Label, actions);
}
public static class PostSettingsDraw
{
public const string Label = $"Penumbra.{nameof( PostSettingsDraw )}";
public static EventProvider< string > Provider( DalamudPluginInterface pi, Action< Action< string > > sub,
Action< Action< string > > unsub )
=> new(pi, Label, ( sub, unsub ));
public static EventSubscriber< string > Subscriber( DalamudPluginInterface pi, params Action< string >[] actions )
=> new(pi, Label, actions);
}
public static class ChangedItemTooltip
{
public const string Label = $"Penumbra.{nameof( ChangedItemTooltip )}";
public static EventProvider< ChangedItemType, uint > Provider( DalamudPluginInterface pi, Action add, Action del )
=> new(pi, Label, add, del);
public static EventSubscriber< ChangedItemType, uint > Subscriber( DalamudPluginInterface pi, params Action< ChangedItemType, uint >[] actions )
=> new(pi, Label, actions);
}
public static class ChangedItemClick
{
public const string Label = $"Penumbra.{nameof( ChangedItemClick )}";
public static EventProvider< MouseButton, ChangedItemType, uint > Provider( DalamudPluginInterface pi, Action add, Action del )
=> new(pi, Label, add, del);
public static EventSubscriber< MouseButton, ChangedItemType, uint > Subscriber( DalamudPluginInterface pi, params Action< MouseButton, ChangedItemType, uint >[] actions )
=> new(pi, Label, actions);
}
}