IChatGui Add Readonly RegisteredLinkHandlers (#1487)

This commit is contained in:
MidoriKami 2023-10-15 03:19:14 -07:00 committed by GitHub
parent 822e26ef93
commit 0f349bb3dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 1 deletions

View file

@ -79,6 +79,9 @@ internal sealed class ChatGui : IDisposable, IServiceType, IChatGui
/// <inheritdoc/>
public byte LastLinkedItemFlags { get; private set; }
/// <inheritdoc/>
public IReadOnlyDictionary<(string PluginName, uint CommandId), Action<uint, SeString>> RegisteredLinkHandlers => this.dalamudLinkHandlers;
/// <summary>
/// Dispose of managed and unmanaged resources.
/// </summary>
@ -453,6 +456,9 @@ internal class ChatGuiPluginScoped : IDisposable, IServiceType, IChatGui
/// <inheritdoc/>
public byte LastLinkedItemFlags => this.chatGuiService.LastLinkedItemFlags;
/// <inheritdoc/>
public IReadOnlyDictionary<(string PluginName, uint CommandId), Action<uint, SeString>> RegisteredLinkHandlers => this.chatGuiService.RegisteredLinkHandlers;
/// <inheritdoc/>
public void Dispose()
{

View file

@ -1,4 +1,6 @@
using Dalamud.Game.Gui;
using System.Collections.Generic;
using Dalamud.Game.Gui;
using Dalamud.Game.Text;
using Dalamud.Game.Text.SeStringHandling;
@ -76,6 +78,11 @@ public interface IChatGui
/// Gets the flags of the last linked item.
/// </summary>
public byte LastLinkedItemFlags { get; }
/// <summary>
/// Gets the dictionary of Dalamud Link Handlers.
/// </summary>
public IReadOnlyDictionary<(string PluginName, uint CommandId), Action<uint, SeString>> RegisteredLinkHandlers { get; }
/// <summary>
/// Queue a chat message. Dalamud will send queued messages on the next framework event.