using System.Runtime.InteropServices; using NvAPIWrapper.Native.Helpers; namespace NvAPIWrapper.Native.Display.Structures { /// /// Contains info-frame property information /// [StructLayout(LayoutKind.Explicit, Pack = 8)] public struct InfoFrameProperty { [FieldOffset(0)] private readonly uint _Word; /// /// Creates an instance of . /// /// The info-frame operation mode /// A value indicating if this display (monitor) is blacklisted public InfoFrameProperty(InfoFramePropertyMode mode, InfoFrameBoolean isBlackListed) { _Word = 0u .SetBits(0, 4, (uint) mode) .SetBits(4, 2, (uint) isBlackListed); } /// /// Gets the info-frame operation mode /// public InfoFramePropertyMode Mode { get => (InfoFramePropertyMode) _Word.GetBits(0, 4); } /// /// Gets a value indicating if this display (monitor) is blacklisted /// public InfoFrameBoolean IsBlackListed { get => (InfoFrameBoolean) _Word.GetBits(4, 2); } /// /// Gets the info-frame version /// public byte Version { get => (byte) _Word.GetBits(16, 8); } /// /// Gets the info-frame length /// public byte Length { get => (byte) _Word.GetBits(24, 8); } } }