Hardware/Nvidia/NVAPI.cs
changeset 165 813d8bc3192f
parent 140 04a5155c9c1a
child 167 b7cc9d09aefe
     1.1 --- a/Hardware/Nvidia/NVAPI.cs	Thu Aug 05 19:28:50 2010 +0000
     1.2 +++ b/Hardware/Nvidia/NVAPI.cs	Sun Aug 08 13:57:26 2010 +0000
     1.3 @@ -42,7 +42,7 @@
     1.4  
     1.5  namespace OpenHardwareMonitor.Hardware.Nvidia {
     1.6  
     1.7 -  public enum NvStatus {
     1.8 +  internal enum NvStatus {
     1.9      OK = 0,
    1.10      ERROR = -1,
    1.11      LIBRARY_NOT_FOUND = -2,
    1.12 @@ -94,9 +94,9 @@
    1.13      INVALID_CALL = -134,
    1.14      D3D10_1_LIBRARY_NOT_FOUND = -135,
    1.15      FUNCTION_NOT_FOUND = -136
    1.16 -  }  
    1.17 +  }
    1.18  
    1.19 -  public enum NvThermalController {
    1.20 +  internal enum NvThermalController {
    1.21      NONE = 0,
    1.22      GPU_INTERNAL,  
    1.23      ADM1032,
    1.24 @@ -110,9 +110,9 @@
    1.25      VBIOSEVT,  
    1.26      OS,    
    1.27      UNKNOWN = -1,
    1.28 -  } 
    1.29 +  }
    1.30  
    1.31 -  public enum NvThermalTarget {
    1.32 +  internal enum NvThermalTarget {
    1.33      NONE = 0,
    1.34      GPU = 1,
    1.35      MEMORY = 2,
    1.36 @@ -123,7 +123,7 @@
    1.37    };
    1.38  
    1.39    [StructLayout(LayoutKind.Sequential, Pack = 8)]
    1.40 -  public struct NvSensor {
    1.41 +  internal struct NvSensor {
    1.42      public NvThermalController Controller;
    1.43      public uint DefaultMinTemp;
    1.44      public uint DefaultMaxTemp;
    1.45 @@ -132,7 +132,7 @@
    1.46    }
    1.47  
    1.48    [StructLayout(LayoutKind.Sequential, Pack = 8)]
    1.49 -  public struct NvGPUThermalSettings {
    1.50 +  internal struct NvGPUThermalSettings {
    1.51      public uint Version;
    1.52      public uint Count;
    1.53      [MarshalAs(UnmanagedType.ByValArray, 
    1.54 @@ -141,30 +141,30 @@
    1.55    }
    1.56  
    1.57    [StructLayout(LayoutKind.Sequential)]
    1.58 -  public struct NvDisplayHandle {
    1.59 +  internal struct NvDisplayHandle {
    1.60      private IntPtr ptr;
    1.61    }
    1.62  
    1.63    [StructLayout(LayoutKind.Sequential)]
    1.64 -  public struct NvPhysicalGpuHandle {
    1.65 +  internal struct NvPhysicalGpuHandle {
    1.66      private IntPtr ptr;
    1.67    }
    1.68  
    1.69    [StructLayout(LayoutKind.Sequential, Pack = 8)]
    1.70 -  public struct NvClocks {
    1.71 +  internal struct NvClocks {
    1.72      public uint Version;
    1.73      [MarshalAs(UnmanagedType.ByValArray, SizeConst = NVAPI.MAX_CLOCKS_PER_GPU)]
    1.74      public uint[] Clock;
    1.75    }
    1.76  
    1.77    [StructLayout(LayoutKind.Sequential, Pack = 8)]
    1.78 -  public struct NvPState {
    1.79 +  internal struct NvPState {
    1.80      public bool Present;
    1.81      public int Percentage;
    1.82    }
    1.83  
    1.84    [StructLayout(LayoutKind.Sequential, Pack = 8)]
    1.85 -  public struct NvPStates {
    1.86 +  internal struct NvPStates {
    1.87      public uint Version;
    1.88      public uint Flags;
    1.89      [MarshalAs(UnmanagedType.ByValArray, SizeConst = NVAPI.MAX_PSTATES_PER_GPU)]
    1.90 @@ -172,14 +172,14 @@
    1.91    }
    1.92  
    1.93    [StructLayout(LayoutKind.Sequential, Pack = 8)]
    1.94 -  public struct NvUsages {
    1.95 +  internal struct NvUsages {
    1.96      public uint Version;
    1.97      [MarshalAs(UnmanagedType.ByValArray, SizeConst = NVAPI.MAX_USAGES_PER_GPU)]
    1.98      public uint[] Usage;
    1.99    }
   1.100  
   1.101    [StructLayout(LayoutKind.Sequential, Pack = 8)]
   1.102 -  public struct NvCooler {
   1.103 +  internal struct NvCooler {
   1.104      public int Type;
   1.105      public int Controller;
   1.106      public int DefaultMin;
   1.107 @@ -195,7 +195,7 @@
   1.108    }
   1.109  
   1.110    [StructLayout(LayoutKind.Sequential, Pack = 8)]
   1.111 -  public struct NvGPUCoolerSettings {
   1.112 +  internal struct NvGPUCoolerSettings {
   1.113      public uint Version;
   1.114      public uint Count;
   1.115      [MarshalAs(UnmanagedType.ByValArray, SizeConst = NVAPI.MAX_COOLER_PER_GPU)]
   1.116 @@ -203,7 +203,7 @@
   1.117    }
   1.118  
   1.119    [StructLayout(LayoutKind.Sequential, Pack = 8)]
   1.120 -  public struct NvMemoryInfo {
   1.121 +  internal struct NvMemoryInfo {
   1.122      public uint Version;
   1.123      [MarshalAs(UnmanagedType.ByValArray, SizeConst = 
   1.124        NVAPI.MAX_MEMORY_VALUES_PER_GPU)]
   1.125 @@ -211,7 +211,7 @@
   1.126    }
   1.127  
   1.128    [StructLayout(LayoutKind.Sequential, Pack = 8)]
   1.129 -  public struct NvDisplayDriverVersion {
   1.130 +  internal struct NvDisplayDriverVersion {
   1.131      public uint Version;
   1.132      public uint DriverVersion;
   1.133      public uint BldChangeListNum;
   1.134 @@ -219,9 +219,9 @@
   1.135      public string BuildBranch;
   1.136      [MarshalAs(UnmanagedType.ByValTStr, SizeConst = NVAPI.SHORT_STRING_MAX)]
   1.137      public string Adapter;
   1.138 -  } 
   1.139 +  }
   1.140  
   1.141 -  public class NVAPI {
   1.142 +  internal class NVAPI {
   1.143  
   1.144      public const int MAX_PHYSICAL_GPUS = 64;
   1.145      public const int SHORT_STRING_MAX = 64;