using System.Runtime.InteropServices;
using NvAPIWrapper.Native.Attributes;
using NvAPIWrapper.Native.General.Structures;
using NvAPIWrapper.Native.Helpers;
using NvAPIWrapper.Native.Interfaces;
namespace NvAPIWrapper.Native.DRS.Structures
{
///
/// Represents a NVIDIA driver settings profile
///
[StructLayout(LayoutKind.Sequential, Pack = 8)]
[StructureVersion(1)]
public struct DRSProfileV1 : IInitializable
{
internal StructureVersion _Version;
internal UnicodeString _ProfileName;
internal DRSGPUSupport _GPUSupport;
internal uint _IsPredefined;
internal uint _NumberOfApplications;
internal uint _NumberOfSettings;
///
/// Creates a new instance of with the passed name and GPU series support list.
///
/// The name of the profile.
/// An instance of containing the list of supported GPU series.
public DRSProfileV1(string name, DRSGPUSupport gpuSupport)
{
this = typeof(DRSProfileV1).Instantiate();
_ProfileName = new UnicodeString(name);
_GPUSupport = gpuSupport;
}
///
/// Gets the name of the profile
///
public string Name
{
get => _ProfileName.Value;
}
///
/// Gets or sets the GPU series support list
///
public DRSGPUSupport GPUSupport
{
get => _GPUSupport;
set => _GPUSupport = value;
}
///
/// Gets a boolean value indicating if this profile is predefined
///
public bool IsPredefined
{
get => _IsPredefined > 0;
}
///
/// Gets the number of applications registered under this profile
///
public int NumberOfApplications
{
get => (int) _NumberOfApplications;
}
///
/// Gets the number of setting registered under this profile
///
public int NumberOfSettings
{
get => (int) _NumberOfSettings;
}
}
}