using System; using System.Runtime.InteropServices; using NvAPIWrapper.Native.Attributes; using NvAPIWrapper.Native.General.Structures; using NvAPIWrapper.Native.Helpers; using NvAPIWrapper.Native.Interfaces; using NvAPIWrapper.Native.Interfaces.GPU; namespace NvAPIWrapper.Native.GPU.Structures { /// /// Represents a display identification and its attributes /// [StructLayout(LayoutKind.Sequential, Pack = 8)] [StructureVersion(3)] public struct DisplayIdsV2 : IInitializable, IDisplayIds, IEquatable { internal StructureVersion _Version; internal readonly MonitorConnectionType _ConnectionType; internal readonly uint _DisplayId; internal readonly uint _RawReserved; /// public uint DisplayId { get => _DisplayId; } /// public bool Equals(DisplayIdsV2 other) { return _DisplayId == other._DisplayId; } /// public override bool Equals(object obj) { if (ReferenceEquals(null, obj)) { return false; } return obj is DisplayIdsV2 v2 && Equals(v2); } /// public override int GetHashCode() { return (int) _DisplayId; } /// public MonitorConnectionType ConnectionType { get => _ConnectionType; } /// public bool IsDynamic { get => _RawReserved.GetBit(0); } /// public bool IsMultiStreamRootNode { get => _RawReserved.GetBit(1); } /// public bool IsActive { get => _RawReserved.GetBit(2); } /// public bool IsCluster { get => _RawReserved.GetBit(3); } /// public bool IsOSVisible { get => _RawReserved.GetBit(4); } /// public bool IsWFD { get => _RawReserved.GetBit(5); } /// public bool IsConnected { get => _RawReserved.GetBit(6); } /// public bool IsPhysicallyConnected { get => _RawReserved.GetBit(17); } } }