// ReSharper disable MemberCanBePrivate.Global // ReSharper disable UnusedAutoPropertyAccessor.Global using System; using System.Runtime.InteropServices; using CUE.NET.Enums; using CUE.NET.Native; namespace CUE.NET.Wrapper { public class CorsairDeviceInfo { #region Properties & Fields /// /// Device type. /// public CorsairDeviceType Type { get; private set; } //TODO DarthAffe 17.09.2015: This could be an Enum /// /// Device model (like “K95RGB”). /// public string Model { get; private set; } /// /// Physical layout of the keyboard or mouse. /// public CorsairPhysicalLayout PhysicalLayout { get; private set; } //TODO DarthAffe 17.09.2015: Would device-specific infos be useful? /// /// Logical layout of the keyboard as set in CUE settings. /// public CorsairLogicalLayout LogicalLayout { get; private set; } /// /// Mask that describes device capabilities, formed as logical "or" of CorsairDeviceCaps enum values /// public int CapsMask { get; private set; } #endregion #region Constructors public CorsairDeviceInfo(_CorsairDeviceInfo nativeInfo) { this.Type = nativeInfo.type; this.Model = nativeInfo.model == IntPtr.Zero ? null : Marshal.PtrToStringAuto(nativeInfo.model); this.PhysicalLayout = nativeInfo.physicalLayout; this.LogicalLayout = nativeInfo.logicalLayout; this.CapsMask = nativeInfo.capsMask; } #endregion } }