mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-19 14:27:45 +01:00
Add address resolver
This commit is contained in:
parent
355ad64eb9
commit
7f4352dc43
3 changed files with 81 additions and 49 deletions
|
|
@ -17,7 +17,7 @@ public interface IAddonLifecycle : IDalamudService
|
|||
/// <param name="type">The event type that triggered the message.</param>
|
||||
/// <param name="args">Information about what addon triggered the message.</param>
|
||||
public delegate void AddonEventDelegate(AddonEvent type, AddonArgs args);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Register a listener that will trigger on the specified event and any of the specified addons.
|
||||
/// </summary>
|
||||
|
|
@ -25,7 +25,7 @@ public interface IAddonLifecycle : IDalamudService
|
|||
/// <param name="addonNames">Addon names that will trigger the handler to be invoked.</param>
|
||||
/// <param name="handler">The handler to invoke.</param>
|
||||
void RegisterListener(AddonEvent eventType, IEnumerable<string> addonNames, AddonEventDelegate handler);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Register a listener that will trigger on the specified event only for the specified addon.
|
||||
/// </summary>
|
||||
|
|
@ -33,14 +33,14 @@ public interface IAddonLifecycle : IDalamudService
|
|||
/// <param name="addonName">The addon name that will trigger the handler to be invoked.</param>
|
||||
/// <param name="handler">The handler to invoke.</param>
|
||||
void RegisterListener(AddonEvent eventType, string addonName, AddonEventDelegate handler);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Register a listener that will trigger on the specified event for any addon.
|
||||
/// </summary>
|
||||
/// <param name="eventType">Event type to trigger on.</param>
|
||||
/// <param name="handler">The handler to invoke.</param>
|
||||
void RegisterListener(AddonEvent eventType, AddonEventDelegate handler);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Unregister listener from specified event type and specified addon names.
|
||||
/// </summary>
|
||||
|
|
@ -51,7 +51,7 @@ public interface IAddonLifecycle : IDalamudService
|
|||
/// <param name="addonNames">Addon names to deregister.</param>
|
||||
/// <param name="handler">Optional specific handler to remove.</param>
|
||||
void UnregisterListener(AddonEvent eventType, IEnumerable<string> addonNames, [Optional] AddonEventDelegate handler);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Unregister all listeners for the specified event type and addon name.
|
||||
/// </summary>
|
||||
|
|
@ -62,7 +62,7 @@ public interface IAddonLifecycle : IDalamudService
|
|||
/// <param name="addonName">Addon name to deregister.</param>
|
||||
/// <param name="handler">Optional specific handler to remove.</param>
|
||||
void UnregisterListener(AddonEvent eventType, string addonName, [Optional] AddonEventDelegate handler);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Unregister an event type handler.<br/>This will only remove a handler that is added via <see cref="RegisterListener(AddonEvent, AddonEventDelegate)"/>.
|
||||
/// </summary>
|
||||
|
|
@ -72,10 +72,17 @@ public interface IAddonLifecycle : IDalamudService
|
|||
/// <param name="eventType">Event type to deregister.</param>
|
||||
/// <param name="handler">Optional specific handler to remove.</param>
|
||||
void UnregisterListener(AddonEvent eventType, [Optional] AddonEventDelegate handler);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Unregister all events that use the specified handlers.
|
||||
/// </summary>
|
||||
/// <param name="handlers">Handlers to remove.</param>
|
||||
void UnregisterListener(params AddonEventDelegate[] handlers);
|
||||
|
||||
/// <summary>
|
||||
/// Resolves an addons virtual table address back to the original unmodified table address.
|
||||
/// </summary>
|
||||
/// <param name="virtualTableAddress">The address of a modified addons virtual table.</param>
|
||||
/// <returns>The address of the addons original virtual table.</returns>
|
||||
nint GetOriginalVirtualTable(nint virtualTableAddress);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue