diff --git a/Dalamud/Configuration/Internal/PluginTestingOptIn.cs b/Dalamud/Configuration/Internal/PluginTestingOptIn.cs
index f40740cf2..30198d563 100644
--- a/Dalamud/Configuration/Internal/PluginTestingOptIn.cs
+++ b/Dalamud/Configuration/Internal/PluginTestingOptIn.cs
@@ -1,6 +1,9 @@
namespace Dalamud.Configuration.Internal;
-public record PluginTestingOptIn
+///
+/// Represents a plugin that has opted in to testing.
+///
+internal record PluginTestingOptIn
{
///
/// Initializes a new instance of the class.
diff --git a/Dalamud/Console/ConsoleEntry.cs b/Dalamud/Console/ConsoleEntry.cs
index 701a4e04b..93f250228 100644
--- a/Dalamud/Console/ConsoleEntry.cs
+++ b/Dalamud/Console/ConsoleEntry.cs
@@ -34,7 +34,7 @@ public interface IConsoleCommand : IConsoleEntry
///
/// Interface representing a variable in the console.
///
-/// The type of the variable
+/// The type of the variable.
public interface IConsoleVariable : IConsoleEntry
{
///
diff --git a/Dalamud/Console/ConsoleManagerPluginScoped.cs b/Dalamud/Console/ConsoleManagerPluginScoped.cs
index 3d11aca18..86949cc74 100644
--- a/Dalamud/Console/ConsoleManagerPluginScoped.cs
+++ b/Dalamud/Console/ConsoleManagerPluginScoped.cs
@@ -9,6 +9,8 @@ using Dalamud.Plugin.Services;
namespace Dalamud.Console;
+#pragma warning disable Dalamud001
+
///
/// Plugin-scoped version of the console service.
///
diff --git a/Dalamud/Dalamud.csproj b/Dalamud/Dalamud.csproj
index e8ec785b8..79d3229ab 100644
--- a/Dalamud/Dalamud.csproj
+++ b/Dalamud/Dalamud.csproj
@@ -81,7 +81,7 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/Dalamud/Game/Addon/Events/AddonEventEntry.cs b/Dalamud/Game/Addon/Events/AddonEventEntry.cs
index a7430acf0..bdba9886c 100644
--- a/Dalamud/Game/Addon/Events/AddonEventEntry.cs
+++ b/Dalamud/Game/Addon/Events/AddonEventEntry.cs
@@ -20,7 +20,7 @@ internal unsafe class AddonEventEntry
///
/// Gets the pointer to the addons AtkUnitBase.
///
- required public nint Addon { get; init; }
+ public required nint Addon { get; init; }
///
/// Gets the name of the addon this args referrers to.
@@ -30,27 +30,27 @@ internal unsafe class AddonEventEntry
///
/// Gets the pointer to the event source.
///
- required public nint Node { get; init; }
+ public required nint Node { get; init; }
///
/// Gets the handler that gets called when this event is triggered.
///
- required public IAddonEventManager.AddonEventHandler Handler { get; init; }
+ public required IAddonEventManager.AddonEventHandler Handler { get; init; }
///
/// Gets the unique id for this event.
///
- required public uint ParamKey { get; init; }
+ public required uint ParamKey { get; init; }
///
/// Gets the event type for this event.
///
- required public AddonEventType EventType { get; init; }
+ public required AddonEventType EventType { get; init; }
///
/// Gets the event handle for this event.
///
- required internal IAddonEventHandle Handle { get; init; }
+ internal required IAddonEventHandle Handle { get; init; }
///
/// Gets the formatted log string for this AddonEventEntry.
diff --git a/Dalamud/Game/Config/ConfigChangeEvent.cs b/Dalamud/Game/Config/ConfigChangeEvent.cs
index ca898b6b3..8c92e577f 100644
--- a/Dalamud/Game/Config/ConfigChangeEvent.cs
+++ b/Dalamud/Game/Config/ConfigChangeEvent.cs
@@ -1,5 +1,14 @@
namespace Dalamud.Game.Config;
+///
+/// Represents a change in the configuration.
+///
+/// The option tha twas changed.
public abstract record ConfigChangeEvent(Enum Option);
+///
+/// Represents a generic change in the configuration.
+///
+/// The option that was changed.
+/// The type of the option.
public record ConfigChangeEvent(T ConfigOption) : ConfigChangeEvent(ConfigOption) where T : Enum;
diff --git a/Dalamud/Game/Config/Properties.cs b/Dalamud/Game/Config/Properties.cs
index b43a44a47..4edb17d43 100644
--- a/Dalamud/Game/Config/Properties.cs
+++ b/Dalamud/Game/Config/Properties.cs
@@ -2,6 +2,24 @@
namespace Dalamud.Game.Config;
+///
+/// Represents a string configuration property.
+///
+/// The default value.
public record StringConfigProperties(SeString? Default);
+
+///
+/// Represents a uint configuration property.
+///
+/// The default value.
+/// The minimum value.
+/// The maximum value.
public record UIntConfigProperties(uint Default, uint Minimum, uint Maximum);
+
+///
+/// Represents a floating point configuration property.
+///
+/// The default value.
+/// The minimum value.
+/// The maximum value.
public record FloatConfigProperties(float Default, float Minimum, float Maximum);
diff --git a/Dalamud/Game/Gui/GameGui.cs b/Dalamud/Game/Gui/GameGui.cs
index bdc483655..d48700af7 100644
--- a/Dalamud/Game/Gui/GameGui.cs
+++ b/Dalamud/Game/Gui/GameGui.cs
@@ -12,6 +12,7 @@ using Dalamud.Utility;
using FFXIVClientStructs.FFXIV.Client.Graphics.Kernel;
using FFXIVClientStructs.FFXIV.Client.System.String;
using FFXIVClientStructs.FFXIV.Client.UI;
+using FFXIVClientStructs.FFXIV.Client.UI.Agent;
using FFXIVClientStructs.FFXIV.Common.Component.BGCollision;
using FFXIVClientStructs.FFXIV.Component.GUI;
using ImGuiNET;
@@ -330,7 +331,7 @@ internal sealed unsafe class GameGui : IInternalDisposableService, IGameGui
var index = 0;
while (true)
{
- var agent = agentModule->GetAgentByInternalID((uint)index++);
+ var agent = agentModule->GetAgentByInternalId((AgentId)index++);
if (agent == uiModule || agent == null)
break;
diff --git a/Dalamud/Game/Network/Structures/InfoProxy/CharacterData.cs b/Dalamud/Game/Network/Structures/InfoProxy/CharacterData.cs
index 0ca35d672..7d3a5d306 100644
--- a/Dalamud/Game/Network/Structures/InfoProxy/CharacterData.cs
+++ b/Dalamud/Game/Network/Structures/InfoProxy/CharacterData.cs
@@ -9,6 +9,57 @@ using Lumina.Excel.GeneratedSheets;
namespace Dalamud.Game.Network.Structures.InfoProxy;
+///
+/// Display group of a character. Used for friends.
+///
+public enum DisplayGroup : sbyte
+{
+ ///
+ /// All display groups.
+ ///
+ All = -1,
+
+ ///
+ /// No display group.
+ ///
+ None,
+
+ ///
+ /// Star display group.
+ ///
+ Star,
+
+ ///
+ /// Circle display group.
+ ///
+ Circle,
+
+ ///
+ /// Triangle display group.
+ ///
+ Triangle,
+
+ ///
+ /// Diamond display group.
+ ///
+ Diamond,
+
+ ///
+ /// Heart display group.
+ ///
+ Heart,
+
+ ///
+ /// Spade display group.
+ ///
+ Spade,
+
+ ///
+ /// Club display group.
+ ///
+ Club,
+}
+
///
/// Dalamud wrapper around a client structs .
///
@@ -144,54 +195,3 @@ public unsafe class CharacterData
///
internal InfoProxyCommonList.CharacterData* Struct => (InfoProxyCommonList.CharacterData*)this.Address;
}
-
-///
-/// Display group of a character. Used for friends.
-///
-public enum DisplayGroup : sbyte
-{
- ///
- /// All display groups.
- ///
- All = -1,
-
- ///
- /// No display group.
- ///
- None,
-
- ///
- /// Star display group.
- ///
- Star,
-
- ///
- /// Circle display group.
- ///
- Circle,
-
- ///
- /// Triangle display group.
- ///
- Triangle,
-
- ///
- /// Diamond display group.
- ///
- Diamond,
-
- ///
- /// Heart display group.
- ///
- Heart,
-
- ///
- /// Spade display group.
- ///
- Spade,
-
- ///
- /// Club display group.
- ///
- Club,
-}
diff --git a/Dalamud/Game/Text/SeStringHandling/Payloads/AutoTranslatePayload.cs b/Dalamud/Game/Text/SeStringHandling/Payloads/AutoTranslatePayload.cs
index 5c87ad43b..afc1cdc01 100644
--- a/Dalamud/Game/Text/SeStringHandling/Payloads/AutoTranslatePayload.cs
+++ b/Dalamud/Game/Text/SeStringHandling/Payloads/AutoTranslatePayload.cs
@@ -13,13 +13,7 @@ namespace Dalamud.Game.Text.SeStringHandling.Payloads;
///
public class AutoTranslatePayload : Payload, ITextProvider
{
- private string text;
-
- [JsonProperty("group")]
- public uint Group { get; private set; }
-
- [JsonProperty("key")]
- public uint Key { get; private set; }
+ private string? text;
///
/// Initializes a new instance of the class.
@@ -44,6 +38,18 @@ public class AutoTranslatePayload : Payload, ITextProvider
internal AutoTranslatePayload()
{
}
+
+ ///
+ /// Gets the autotranslate group.
+ ///
+ [JsonProperty("group")]
+ public uint Group { get; private set; }
+
+ ///
+ /// Gets the autotranslate key.
+ ///
+ [JsonProperty("key")]
+ public uint Key { get; private set; }
///
public override PayloadType Type => PayloadType.AutoTranslateText;
diff --git a/Dalamud/GlobalSuppressions.cs b/Dalamud/GlobalSuppressions.cs
index 1b869295b..8a9d31b12 100644
--- a/Dalamud/GlobalSuppressions.cs
+++ b/Dalamud/GlobalSuppressions.cs
@@ -19,6 +19,8 @@ using System.Diagnostics.CodeAnalysis;
[assembly: SuppressMessage("StyleCop.CSharp.ReadabilityRules", "SA1117:ParametersMustBeOnSameLineOrSeparateLines", Justification = "I don't care anymore")]
[assembly: SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1407:ArithmeticExpressionsMustDeclarePrecedence", Justification = "I don't care anymore")]
[assembly: SuppressMessage("StyleCop.CSharp.ReadabilityRules", "SA1116:SplitParametersMustStartOnLineAfterDeclaration", Justification = "Reviewed.")]
+[assembly: SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1402:FileMayOnlyContainASingleType", Justification = "This would be nice, but a big refactor")]
+[assembly: SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1649:FileNameMustMatchTypeName", Justification = "I don't like this one so much")]
// ImRAII stuff
[assembly: SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1600:ElementsMustBeDocumented", Justification = "Reviewed.", Scope = "namespaceanddescendants", Target = "Dalamud.Interface.Utility.Raii")]
diff --git a/Dalamud/Interface/ColorHelpers.cs b/Dalamud/Interface/ColorHelpers.cs
index 74561f9ef..f88dc7d4f 100644
--- a/Dalamud/Interface/ColorHelpers.cs
+++ b/Dalamud/Interface/ColorHelpers.cs
@@ -9,17 +9,6 @@ namespace Dalamud.Interface;
///
public static class ColorHelpers
{
- ///
- /// A struct representing a color using HSVA coordinates.
- ///
- /// The hue represented by this struct.
- /// The saturation represented by this struct.
- /// The value represented by this struct.
- /// The alpha represented by this struct.
- [SuppressMessage("StyleCop.CSharp.NamingRules", "SA1313:Parameter names should begin with lower-case letter",
- Justification = "I don't like it.")]
- public record struct HsvaColor(float H, float S, float V, float A);
-
///
/// Pack a vector4 color into a uint for use in ImGui APIs.
///
@@ -305,4 +294,15 @@ public static class ColorHelpers
_ => color / 255.0f,
};
+
+ ///
+ /// A struct representing a color using HSVA coordinates.
+ ///
+ /// The hue represented by this struct.
+ /// The saturation represented by this struct.
+ /// The value represented by this struct.
+ /// The alpha represented by this struct.
+ [SuppressMessage("StyleCop.CSharp.NamingRules", "SA1313:Parameter names should begin with lower-case letter",
+ Justification = "I don't like it.")]
+ public record struct HsvaColor(float H, float S, float V, float A);
}
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/NetworkMonitorWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/NetworkMonitorWidget.cs
index 41b0904df..69a440713 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/NetworkMonitorWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/NetworkMonitorWidget.cs
@@ -17,17 +17,6 @@ namespace Dalamud.Interface.Internal.Windows.Data.Widgets;
///
internal class NetworkMonitorWidget : IDataWindowWidget
{
-#pragma warning disable SA1313
- private readonly record struct NetworkPacketData(ushort OpCode, NetworkMessageDirection Direction, uint SourceActorId, uint TargetActorId)
-#pragma warning restore SA1313
- {
- public readonly IReadOnlyList Data = Array.Empty();
-
- public NetworkPacketData(NetworkMonitorWidget widget, ushort opCode, NetworkMessageDirection direction, uint sourceActorId, uint targetActorId, nint dataPtr)
- : this(opCode, direction, sourceActorId, targetActorId)
- => this.Data = MemoryHelper.Read(dataPtr, widget.GetSizeFromOpCode(opCode), false);
- }
-
private readonly ConcurrentQueue packets = new();
private bool trackNetwork;
@@ -214,4 +203,15 @@ internal class NetworkMonitorWidget : IDataWindowWidget
/// The filter should find opCodes by number (decimal and hex) and name, if existing.
private string OpCodeToString(ushort opCode)
=> $"{opCode}\0{opCode:X}";
+
+#pragma warning disable SA1313
+ private readonly record struct NetworkPacketData(ushort OpCode, NetworkMessageDirection Direction, uint SourceActorId, uint TargetActorId)
+#pragma warning restore SA1313
+ {
+ public readonly IReadOnlyList Data = Array.Empty();
+
+ public NetworkPacketData(NetworkMonitorWidget widget, ushort opCode, NetworkMessageDirection direction, uint sourceActorId, uint targetActorId, nint dataPtr)
+ : this(opCode, direction, sourceActorId, targetActorId)
+ => this.Data = MemoryHelper.Read(dataPtr, widget.GetSizeFromOpCode(opCode), false);
+ }
}
diff --git a/Dalamud/Interface/Utility/ImVectorWrapper.cs b/Dalamud/Interface/Utility/ImVectorWrapper.cs
index 5ba1aec2f..f350a6436 100644
--- a/Dalamud/Interface/Utility/ImVectorWrapper.cs
+++ b/Dalamud/Interface/Utility/ImVectorWrapper.cs
@@ -10,166 +10,6 @@ using JetBrains.Annotations;
namespace Dalamud.Interface.Utility;
-///
-/// Utility methods for .
-///
-public static class ImVectorWrapper
-{
- ///
- /// Creates a new instance of the struct, initialized with
- /// .
- /// You must call after use.
- ///
- /// The item type.
- /// The initial data.
- /// The destroyer function to call on item removal.
- /// The minimum capacity of the new vector.
- /// The new wrapped vector, that has to be disposed after use.
- public static ImVectorWrapper CreateFromEnumerable(
- IEnumerable sourceEnumerable,
- ImVectorWrapper.ImGuiNativeDestroyDelegate? destroyer = null,
- int minCapacity = 0)
- where T : unmanaged
- {
- var res = new ImVectorWrapper(0, destroyer);
- try
- {
- switch (sourceEnumerable)
- {
- case T[] c:
- res.SetCapacity(Math.Max(minCapacity, c.Length + 1));
- res.LengthUnsafe = c.Length;
- c.AsSpan().CopyTo(res.DataSpan);
- break;
- case ICollection c:
- res.SetCapacity(Math.Max(minCapacity, c.Count + 1));
- res.AddRange(sourceEnumerable);
- break;
- case ICollection c:
- res.SetCapacity(Math.Max(minCapacity, c.Count + 1));
- res.AddRange(sourceEnumerable);
- break;
- default:
- res.SetCapacity(minCapacity);
- res.AddRange(sourceEnumerable);
- res.EnsureCapacity(res.LengthUnsafe + 1);
- break;
- }
-
- // Null termination
- Debug.Assert(res.LengthUnsafe < res.CapacityUnsafe, "Capacity must be more than source length + 1");
- res.StorageSpan[res.LengthUnsafe] = default;
-
- return res;
- }
- catch
- {
- res.Dispose();
- throw;
- }
- }
-
- ///
- /// Creates a new instance of the struct, initialized with
- /// .
- /// You must call after use.
- ///
- /// The item type.
- /// The initial data.
- /// The destroyer function to call on item removal.
- /// The minimum capacity of the new vector.
- /// The new wrapped vector, that has to be disposed after use.
- public static ImVectorWrapper CreateFromSpan(
- ReadOnlySpan sourceSpan,
- ImVectorWrapper.ImGuiNativeDestroyDelegate? destroyer = null,
- int minCapacity = 0)
- where T : unmanaged
- {
- var res = new ImVectorWrapper(Math.Max(minCapacity, sourceSpan.Length + 1), destroyer);
- try
- {
- res.LengthUnsafe = sourceSpan.Length;
- sourceSpan.CopyTo(res.DataSpan);
-
- // Null termination
- Debug.Assert(res.LengthUnsafe < res.CapacityUnsafe, "Capacity must be more than source length + 1");
- res.StorageSpan[res.LengthUnsafe] = default;
- return res;
- }
- catch
- {
- res.Dispose();
- throw;
- }
- }
-
- ///
- /// Wraps into a .
- /// This does not need to be disposed.
- ///
- /// The owner object.
- /// The wrapped vector.
- public static unsafe ImVectorWrapper ConfigDataWrapped(this ImFontAtlasPtr obj) =>
- obj.NativePtr is null
- ? throw new NullReferenceException()
- : new(&obj.NativePtr->ConfigData, ImGuiNative.ImFontConfig_destroy);
-
- ///
- /// Wraps into a .
- /// This does not need to be disposed.
- ///
- /// The owner object.
- /// The wrapped vector.
- public static unsafe ImVectorWrapper FontsWrapped(this ImFontAtlasPtr obj) =>
- obj.NativePtr is null
- ? throw new NullReferenceException()
- : new(&obj.NativePtr->Fonts, x => ImGuiNative.ImFont_destroy(x->NativePtr));
-
- ///
- /// Wraps into a .
- /// This does not need to be disposed.
- ///
- /// The owner object.
- /// The wrapped vector.
- public static unsafe ImVectorWrapper TexturesWrapped(this ImFontAtlasPtr obj) =>
- obj.NativePtr is null
- ? throw new NullReferenceException()
- : new(&obj.NativePtr->Textures);
-
- ///
- /// Wraps into a .
- /// This does not need to be disposed.
- ///
- /// The owner object.
- /// The wrapped vector.
- public static unsafe ImVectorWrapper GlyphsWrapped(this ImFontPtr obj) =>
- obj.NativePtr is null
- ? throw new NullReferenceException()
- : new(&obj.NativePtr->Glyphs);
-
- ///
- /// Wraps into a .
- /// This does not need to be disposed.
- ///
- /// The owner object.
- /// The wrapped vector.
- public static unsafe ImVectorWrapper IndexedHotDataWrapped(this ImFontPtr obj)
- => obj.NativePtr is null
- ? throw new NullReferenceException()
- : new(&obj.NativePtr->IndexedHotData);
-
- ///
- /// Wraps into a .
- /// This does not need to be disposed.
- ///
- /// The owner object.
- /// The wrapped vector.
- public static unsafe ImVectorWrapper IndexLookupWrapped(this ImFontPtr obj) =>
- obj.NativePtr is null
- ? throw new NullReferenceException()
- : new(&obj.NativePtr->IndexLookup);
-}
-
///
/// Wrapper for ImVector.
///
@@ -744,3 +584,163 @@ public unsafe struct ImVectorWrapper : IList, IList, IReadOnlyList, IDi
private int EnsureIndex(int i) => i >= 0 && i < this.LengthUnsafe ? i : throw new IndexOutOfRangeException();
}
+
+///
+/// Utility methods for .
+///
+public static class ImVectorWrapper
+{
+ ///
+ /// Creates a new instance of the struct, initialized with
+ /// .
+ /// You must call after use.
+ ///
+ /// The item type.
+ /// The initial data.
+ /// The destroyer function to call on item removal.
+ /// The minimum capacity of the new vector.
+ /// The new wrapped vector, that has to be disposed after use.
+ public static ImVectorWrapper CreateFromEnumerable(
+ IEnumerable sourceEnumerable,
+ ImVectorWrapper.ImGuiNativeDestroyDelegate? destroyer = null,
+ int minCapacity = 0)
+ where T : unmanaged
+ {
+ var res = new ImVectorWrapper(0, destroyer);
+ try
+ {
+ switch (sourceEnumerable)
+ {
+ case T[] c:
+ res.SetCapacity(Math.Max(minCapacity, c.Length + 1));
+ res.LengthUnsafe = c.Length;
+ c.AsSpan().CopyTo(res.DataSpan);
+ break;
+ case ICollection c:
+ res.SetCapacity(Math.Max(minCapacity, c.Count + 1));
+ res.AddRange(sourceEnumerable);
+ break;
+ case ICollection c:
+ res.SetCapacity(Math.Max(minCapacity, c.Count + 1));
+ res.AddRange(sourceEnumerable);
+ break;
+ default:
+ res.SetCapacity(minCapacity);
+ res.AddRange(sourceEnumerable);
+ res.EnsureCapacity(res.LengthUnsafe + 1);
+ break;
+ }
+
+ // Null termination
+ Debug.Assert(res.LengthUnsafe < res.CapacityUnsafe, "Capacity must be more than source length + 1");
+ res.StorageSpan[res.LengthUnsafe] = default;
+
+ return res;
+ }
+ catch
+ {
+ res.Dispose();
+ throw;
+ }
+ }
+
+ ///
+ /// Creates a new instance of the struct, initialized with
+ /// .
+ /// You must call after use.
+ ///
+ /// The item type.
+ /// The initial data.
+ /// The destroyer function to call on item removal.
+ /// The minimum capacity of the new vector.
+ /// The new wrapped vector, that has to be disposed after use.
+ public static ImVectorWrapper CreateFromSpan(
+ ReadOnlySpan sourceSpan,
+ ImVectorWrapper.ImGuiNativeDestroyDelegate? destroyer = null,
+ int minCapacity = 0)
+ where T : unmanaged
+ {
+ var res = new ImVectorWrapper(Math.Max(minCapacity, sourceSpan.Length + 1), destroyer);
+ try
+ {
+ res.LengthUnsafe = sourceSpan.Length;
+ sourceSpan.CopyTo(res.DataSpan);
+
+ // Null termination
+ Debug.Assert(res.LengthUnsafe < res.CapacityUnsafe, "Capacity must be more than source length + 1");
+ res.StorageSpan[res.LengthUnsafe] = default;
+ return res;
+ }
+ catch
+ {
+ res.Dispose();
+ throw;
+ }
+ }
+
+ ///
+ /// Wraps into a .
+ /// This does not need to be disposed.
+ ///
+ /// The owner object.
+ /// The wrapped vector.
+ public static unsafe ImVectorWrapper ConfigDataWrapped(this ImFontAtlasPtr obj) =>
+ obj.NativePtr is null
+ ? throw new NullReferenceException()
+ : new(&obj.NativePtr->ConfigData, ImGuiNative.ImFontConfig_destroy);
+
+ ///
+ /// Wraps into a .
+ /// This does not need to be disposed.
+ ///
+ /// The owner object.
+ /// The wrapped vector.
+ public static unsafe ImVectorWrapper FontsWrapped(this ImFontAtlasPtr obj) =>
+ obj.NativePtr is null
+ ? throw new NullReferenceException()
+ : new(&obj.NativePtr->Fonts, x => ImGuiNative.ImFont_destroy(x->NativePtr));
+
+ ///
+ /// Wraps into a .
+ /// This does not need to be disposed.
+ ///
+ /// The owner object.
+ /// The wrapped vector.
+ public static unsafe ImVectorWrapper TexturesWrapped(this ImFontAtlasPtr obj) =>
+ obj.NativePtr is null
+ ? throw new NullReferenceException()
+ : new(&obj.NativePtr->Textures);
+
+ ///
+ /// Wraps into a .
+ /// This does not need to be disposed.
+ ///
+ /// The owner object.
+ /// The wrapped vector.
+ public static unsafe ImVectorWrapper GlyphsWrapped(this ImFontPtr obj) =>
+ obj.NativePtr is null
+ ? throw new NullReferenceException()
+ : new(&obj.NativePtr->Glyphs);
+
+ ///
+ /// Wraps into a .
+ /// This does not need to be disposed.
+ ///
+ /// The owner object.
+ /// The wrapped vector.
+ public static unsafe ImVectorWrapper IndexedHotDataWrapped(this ImFontPtr obj)
+ => obj.NativePtr is null
+ ? throw new NullReferenceException()
+ : new(&obj.NativePtr->IndexedHotData);
+
+ ///
+ /// Wraps into a .
+ /// This does not need to be disposed.
+ ///
+ /// The owner object.
+ /// The wrapped vector.
+ public static unsafe ImVectorWrapper IndexLookupWrapped(this ImFontPtr obj) =>
+ obj.NativePtr is null
+ ? throw new NullReferenceException()
+ : new(&obj.NativePtr->IndexLookup);
+}
diff --git a/Dalamud/Plugin/InstalledPluginState.cs b/Dalamud/Plugin/InstalledPluginState.cs
index 79b9de1ee..3cdd03956 100644
--- a/Dalamud/Plugin/InstalledPluginState.cs
+++ b/Dalamud/Plugin/InstalledPluginState.cs
@@ -2,5 +2,12 @@
namespace Dalamud.Plugin;
+///
+/// State of an installed plugin.
+///
+/// The name of the plugin.
+/// The internal name of the plugin.
+/// Whether or not the plugin is loaded.
+/// The version of the plugin.
[Api10ToDo("Refactor into an interface, add wrappers for OpenMainUI and OpenConfigUI")]
public record InstalledPluginState(string Name, string InternalName, bool IsLoaded, Version Version);
diff --git a/Dalamud/Plugin/Internal/Types/PluginPatchData.cs b/Dalamud/Plugin/Internal/Types/PluginPatchData.cs
deleted file mode 100644
index f713e4df0..000000000
--- a/Dalamud/Plugin/Internal/Types/PluginPatchData.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-using System.IO;
-
-namespace Dalamud.Plugin.Internal.Types;
-
-internal record PluginPatchData
-{
- ///
- /// Initializes a new instance of the class.
- ///
- /// DLL file being loaded.
- public PluginPatchData(FileSystemInfo dllFile)
- {
- this.Location = dllFile.FullName;
- this.CodeBase = new Uri(dllFile.FullName).AbsoluteUri;
- }
-
- ///
- /// Gets simulated Assembly.Location output.
- ///
- public string Location { get; }
-
- ///
- /// Gets simulated Assembly.CodeBase output.
- ///
- public string CodeBase { get; }
-}
diff --git a/Dalamud/Utility/FuzzyMatcher.cs b/Dalamud/Utility/FuzzyMatcher.cs
index 9ac71d8bb..03723da89 100644
--- a/Dalamud/Utility/FuzzyMatcher.cs
+++ b/Dalamud/Utility/FuzzyMatcher.cs
@@ -1,14 +1,20 @@
#define BORDER_MATCHING
-namespace Dalamud.Utility;
-
-using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
+namespace Dalamud.Utility;
+
#pragma warning disable SA1600
#pragma warning disable SA1602
+internal enum MatchMode
+{
+ Simple,
+ Fuzzy,
+ FuzzyParts,
+}
+
internal readonly ref struct FuzzyMatcher
{
private static readonly (int, int)[] EmptySegArray = Array.Empty<(int, int)>();
@@ -272,12 +278,5 @@ internal readonly ref struct FuzzyMatcher
}
}
-internal enum MatchMode
-{
- Simple,
- Fuzzy,
- FuzzyParts,
-}
-
#pragma warning restore SA1600
#pragma warning restore SA1602