├── .gitignore ├── ColorControl.UI ├── Blazor.cs ├── ColorControl.UI.csproj ├── Components │ ├── App.razor │ ├── Layout │ │ ├── MainLayout.razor │ │ ├── MainLayout.razor.css │ │ ├── NavMenu.razor │ │ ├── NavMenu.razor.css │ │ ├── TopMenu.razor │ │ └── TopMenu.razor.css │ ├── Pages │ │ ├── AMD │ │ │ ├── AmdPresetPage.razor │ │ │ ├── AmdSettings.razor │ │ │ └── AmdSummary.razor │ │ ├── ColorProfile │ │ │ ├── ColorProfilePage.razor │ │ │ └── ColorProfileSummary.razor │ │ ├── Error.razor │ │ ├── Game │ │ │ ├── GamePresetPage.razor │ │ │ ├── GameSettings.razor │ │ │ └── GameSummary.razor │ │ ├── Generic │ │ │ ├── ConfirmModal.razor │ │ │ ├── FieldDefs.razor │ │ │ ├── FieldsModal.razor │ │ │ ├── FlagsInput.razor │ │ │ ├── NotificationsComponent.razor │ │ │ ├── NullableRangeInput.razor │ │ │ ├── RangeInput.razor │ │ │ ├── ShortcutInput.razor │ │ │ ├── StartProgramInput.razor │ │ │ ├── StepsInput.razor │ │ │ └── TriggerInput.razor │ │ ├── Home.razor │ │ ├── Info.razor │ │ ├── LG │ │ │ ├── LgDevicePage.razor │ │ │ ├── LgExecuteActionModal.razor │ │ │ ├── LgPresetPage.razor │ │ │ ├── LgSettings.razor │ │ │ └── LgSummary.razor │ │ ├── Logging.razor │ │ ├── Nvidia │ │ │ ├── NvidiaDithering.razor │ │ │ ├── NvidiaDriverSettings.razor │ │ │ ├── NvidiaGpuSettings.razor │ │ │ ├── NvidiaInfo.razor │ │ │ ├── NvidiaPreset.razor │ │ │ ├── NvidiaSettings.razor │ │ │ └── NvidiaSummary.razor │ │ ├── Options.razor │ │ ├── RemoteControl │ │ │ ├── GenericRcButtonPage.razor │ │ │ └── GenericRcPage.razor │ │ └── Samsung │ │ │ ├── SamsungDevicePage.razor │ │ │ ├── SamsungPresetPage.razor │ │ │ ├── SamsungServiceMenu.razor │ │ │ ├── SamsungSettings.razor │ │ │ └── SamsungSummary.razor │ ├── Routes.razor │ └── _Imports.razor ├── Constants.cs ├── Extensions │ ├── GeneralExtensions.cs │ └── PresetExtensions.cs ├── NotificationDto.cs ├── Program.cs ├── Properties │ └── launchSettings.json ├── Services │ ├── JSHelper.cs │ ├── NotificationService.cs │ └── RpcUiClientService.cs ├── State │ └── AppState.cs ├── appsettings.Development.json ├── appsettings.json └── wwwroot │ ├── app.css │ ├── favicon.png │ ├── helper.js │ └── remotes │ ├── LG_FactorySVC.jpg │ ├── LG_MR20GA.jpg │ ├── LG_MR23GN.jpg │ ├── Samsung_AA81-00243A.jpg │ └── Samsung_BN59-01315B.jpg ├── ColorControl.sln ├── ColorControl ├── .upgrade-assistant ├── AnalysisReport.sarif ├── ColorControl.csproj ├── CommandLineHandler.cs ├── Forms │ ├── InfoPanel.Designer.cs │ ├── InfoPanel.cs │ ├── InfoPanel.resx │ ├── OptionsPanel.Designer.cs │ ├── OptionsPanel.cs │ └── OptionsPanel.resx ├── IModulePanel.cs ├── LgPresets.json ├── LgTv │ └── LgTvConnectionCws.cs ├── MainForm.Designer.cs ├── MainForm.cs ├── MainForm.resx ├── MainWorker.cs ├── Program.cs ├── Properties │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── app.manifest │ └── launchSettings.json ├── Resources │ ├── LG_register.json │ ├── LG_remote.jpg │ ├── LgRemotes.json │ ├── RC_coords.txt │ ├── SamsungRemotes.json │ └── pngbarn.ico ├── Services │ ├── AMD │ │ ├── AmdDisplayInfo.cs │ │ ├── AmdPanel.Designer.cs │ │ ├── AmdPanel.cs │ │ ├── AmdPanel.resx │ │ └── AmdService.cs │ ├── Common │ │ ├── ColorProfileService.cs │ │ ├── ElevationService.cs │ │ ├── GraphicsService.cs │ │ ├── IServiceBase.cs │ │ ├── LoggingService.cs │ │ ├── NotifyIconManager.cs │ │ ├── OptionsService.cs │ │ ├── QuickAccessForm.Designer.cs │ │ ├── QuickAccessForm.cs │ │ ├── QuickAccessForm.resx │ │ ├── ServiceBase.cs │ │ ├── ServiceFormUtils.cs │ │ ├── ServiceManager.cs │ │ └── UpdateManager.cs │ ├── GameLauncher │ │ ├── GamePanel.Designer.cs │ │ ├── GamePanel.cs │ │ ├── GamePanel.resx │ │ └── GameService.cs │ ├── LG │ │ ├── LgDevice.cs │ │ ├── LgGameBar.Designer.cs │ │ ├── LgGameBar.cs │ │ ├── LgGameBar.resx │ │ ├── LgPanel.Designer.cs │ │ ├── LgPanel.cs │ │ ├── LgPanel.resx │ │ ├── LgService.cs │ │ ├── LgServiceConfig.cs │ │ ├── RemoteControlForm.Designer.cs │ │ ├── RemoteControlForm.cs │ │ ├── RemoteControlForm.resx │ │ ├── RemoteControlPanel.Designer.cs │ │ ├── RemoteControlPanel.cs │ │ └── RemoteControlPanel.resx │ ├── NVIDIA │ │ ├── ColorDataConverter.cs │ │ ├── Kernel32.cs │ │ ├── NvDisplayInfo.cs │ │ ├── NvDitherPanel.Designer.cs │ │ ├── NvDitherPanel.cs │ │ ├── NvDitherPanel.resx │ │ ├── NvGpuInfo.cs │ │ ├── NvInfoPanel.Designer.cs │ │ ├── NvInfoPanel.cs │ │ ├── NvInfoPanel.resx │ │ ├── NvPanel.Designer.cs │ │ ├── NvPanel.cs │ │ ├── NvPanel.resx │ │ ├── NvService.cs │ │ └── NvidiaML.cs │ └── Samsung │ │ ├── ISamsungService.cs │ │ ├── RawRequestMessage.cs │ │ ├── RequestMessage.cs │ │ ├── SamTvConnection.cs │ │ ├── SamsungApp.cs │ │ ├── SamsungDevice.cs │ │ ├── SamsungPanel.Designer.cs │ │ ├── SamsungPanel.cs │ │ ├── SamsungPanel.resx │ │ ├── SamsungService.cs │ │ └── SamsungServiceConfig.cs ├── Svc │ └── ColorControlBackgroundService.cs ├── XForms │ ├── BrowserWindow.xaml │ ├── BrowserWindow.xaml.cs │ ├── ColorProfileViewModel.cs │ ├── ColorProfileWindow.xaml │ ├── ColorProfileWindow.xaml.cs │ ├── LogWindow.xaml │ └── LogWindow.xaml.cs └── lgtv │ ├── App.cs │ ├── Channel.cs │ ├── ClientKeyStore.cs │ ├── ExternalInput.cs │ ├── LgApp.cs │ ├── LgTvApi.cs │ ├── LgWebOsMouseService.cs │ ├── README.md │ ├── RawRequestMessage.cs │ └── RequestMessage.cs ├── LICENSE-NOVIDEO.txt ├── LICENSE-THIRD-PARTY.txt ├── LICENSE.txt ├── LittleCms ├── CmsContext.cs ├── CmsDefinition.cs ├── CmsError.cs ├── CmsExtension.cs ├── CmsGlobal.cs ├── CmsNative.cs ├── CmsObject.cs ├── CmsPixelFormat.cs ├── CmsTransform.cs ├── Data │ ├── BlittableDataTagSignature.cs │ ├── ChromaticAdaptationTagSignature.cs │ ├── ISafeTagSignature.cs │ ├── IccDataTagSignature.cs │ ├── MLU.cs │ ├── MluTagSignature.cs │ ├── RgbToneCurve.cs │ ├── SafeTagSignature.cs │ ├── TagNotFoundException.cs │ ├── ToneCurve.cs │ ├── ToneCurveTagSignature.cs │ └── VideoCardGammaTableTagSignature.cs ├── IccProfile.cs ├── LittleCms.csproj └── lcms2.dll ├── MHC2Gen ├── CmsFunctions.cs ├── DisplayEnums.cs ├── Extension.cs ├── GenerateProfileCommand.cs ├── IccContext.cs ├── MHC2Gen.csproj ├── MHC2Wrapper.cs ├── Primaries.cs └── ST2084.cs ├── NLogViewer ├── ActionCommand.cs ├── Extensions │ └── DependencyObjectExtensions.cs ├── Helper │ ├── AutoSizedGridView.cs │ ├── ListViewLayoutManager │ │ ├── ConverterGridViewColumn.cs │ │ ├── FixedColumn.cs │ │ ├── ImageGridViewColumn.cs │ │ ├── LayoutColumn.cs │ │ ├── ListViewLayoutManager.cs │ │ ├── ProportionalColumn.cs │ │ └── RangeColumn.cs │ └── PredicateBuilder.cs ├── Images │ ├── Glyphs │ │ ├── SortDownArrow.png │ │ └── SortUpArrow.png │ └── Small │ │ ├── Add.png │ │ ├── Clear.png │ │ ├── Clock.png │ │ ├── Context.png │ │ ├── Debug.png │ │ ├── DebugSource.png │ │ ├── Error.png │ │ ├── Exception.png │ │ ├── Exit.png │ │ ├── Export.png │ │ ├── Fatal.png │ │ ├── Info.png │ │ ├── Layout.png │ │ ├── MonoLightning.png │ │ ├── Network.png │ │ ├── Open.png │ │ ├── Pause.png │ │ ├── Save.png │ │ ├── ScrollDown.png │ │ ├── Settings.png │ │ ├── Thread.png │ │ ├── Trace.png │ │ ├── Unknown.png │ │ └── Warning.png ├── NLogViewer.csproj ├── NLogViewer.xaml ├── NLogViewer.xaml.cs ├── Resolver │ ├── ILogEventInfoResolver.cs │ ├── IdResolver.cs │ ├── LoggerNameResolver.cs │ ├── MessageResolver.cs │ └── TimeStampResolver.cs ├── ScrollingHelper.cs ├── Targets │ └── CacheTarget.cs ├── XamlMultiValueConverter │ └── ILogEventResolverToStringConverter.cs └── nuget.config ├── Nspector ├── Common │ ├── Cache │ │ ├── CachedSettingValue.cs │ │ └── CachedSettings.cs │ ├── CustomSettings │ │ ├── CustomSetting.cs │ │ ├── CustomSettingNames.cs │ │ └── CustomSettingValue.cs │ ├── DrsDecrypterService.cs │ ├── DrsImportService.cs │ ├── DrsScannerService.cs │ ├── DrsServiceLocator.cs │ ├── DrsSessionScope.cs │ ├── DrsSettingsMetaService.cs │ ├── DrsSettingsService.cs │ ├── DrsSettingsServiceBase.cs │ ├── DrsUtil.cs │ ├── Helper │ │ ├── AdminHelper.cs │ │ ├── DropDownMenuScrollWheelHandler.cs │ │ ├── InputBox.cs │ │ ├── ListSort.cs │ │ ├── ListViewGroupSorter.cs │ │ ├── NoBorderRenderer.cs │ │ ├── ShortcutResolver.cs │ │ ├── SteamAppResolver.cs │ │ ├── TempFile.cs │ │ ├── UserSettings.cs │ │ └── XMLHelper.cs │ ├── Import │ │ ├── ImportExportUitl.cs │ │ ├── Profile.cs │ │ ├── ProfileSetting.cs │ │ ├── Profiles.cs │ │ └── SettingValueType.cs │ ├── Meta │ │ ├── ConstantSettingMetaService.cs │ │ ├── CustomSettingMetaService.cs │ │ ├── DriverSettingMetaService.cs │ │ ├── ISettingMetaService.cs │ │ ├── MetaServiceItem.cs │ │ ├── ScannedSettingMetaService.cs │ │ ├── SettingMeta.cs │ │ ├── SettingMetaSource.cs │ │ └── SettingValue.cs │ ├── NvapiException.cs │ ├── SettingItem.cs │ └── SettingViewMode.cs ├── Images │ ├── 0_gear2.png │ ├── 1_gear2_2.png │ ├── 4_gear_nv2.png │ ├── 6_gear_inherit.png │ ├── PortableDeviceStatus_3_16-011.png │ ├── apply.png │ ├── export1.png │ ├── filter_user.png │ ├── find_set2.png │ ├── home_sm.png │ ├── ieframe_1_18212.png │ ├── ieframe_1_31073-002.png │ ├── import1.png │ ├── n1-016.png │ ├── nv_btn.png │ ├── shield.png │ ├── shield16.ico │ ├── text_binary.png │ ├── transparent16.png │ ├── window_application_add.png │ └── window_application_delete.png ├── ListViewEx.cs ├── Native │ ├── NVAPI │ │ ├── NvApiDriverSettings.cs │ │ ├── NvApiDriverSettings.h │ │ ├── NvApiDriverSettings.tt │ │ └── NvapiDrsWrapper.cs │ ├── NativeArrayHelper.cs │ └── WINAPI │ │ ├── DragAcceptNativeHelper.cs │ │ ├── MessageHelper.cs │ │ ├── SafeNativeMethods.cs │ │ ├── ShellLink.cs │ │ └── TaskBarList3.cs ├── Nspector.csproj ├── Properties │ ├── Resources.Designer.cs │ └── Resources.resx ├── app.manifest ├── frmBitEditor.Designer.cs ├── frmBitEditor.cs ├── frmBitEditor.resx ├── frmDrvSettings.Designer.cs ├── frmDrvSettings.cs ├── frmDrvSettings.resx ├── frmExportProfiles.Designer.cs ├── frmExportProfiles.cs ├── frmExportProfiles.resx ├── n1.ico ├── nspector │ ├── CustomSettingNames.xml │ └── Reference.xml └── nvidiaProfileInspector.csproj ├── NvAPIWrapper ├── Display │ ├── ColorData.cs │ ├── CustomResolution.cs │ ├── DVCInformation.cs │ ├── Display.cs │ ├── DisplayDevice.cs │ ├── FloatTexture.cs │ ├── HDRColorData.cs │ ├── HUEInformation.cs │ ├── IntensityTexture.cs │ ├── IntensityTexturePixel.cs │ ├── PathInfo.cs │ ├── PathTargetInfo.cs │ ├── ScanOutInformation.cs │ ├── UnAttachedDisplay.cs │ └── XYUVRQVortex.cs ├── GPU │ ├── AGPInformation.cs │ ├── ECCMemoryInformation.cs │ ├── GPUArchitectInformation.cs │ ├── GPUBusInformation.cs │ ├── GPUCooler.cs │ ├── GPUCoolerInformation.cs │ ├── GPUMemoryInformation.cs │ ├── GPUOutput.cs │ ├── GPUPerformanceControl.cs │ ├── GPUPerformanceState.cs │ ├── GPUPerformanceStateClock.cs │ ├── GPUPerformanceStateValueRange.cs │ ├── GPUPerformanceStateVoltage.cs │ ├── GPUPerformanceStatesInfo.cs │ ├── GPUPowerLimitInfo.cs │ ├── GPUPowerLimitPolicy.cs │ ├── GPUPowerTopologyInformation.cs │ ├── GPUPowerTopologyStatus.cs │ ├── GPUThermalInformation.cs │ ├── GPUThermalLimitInfo.cs │ ├── GPUThermalLimitPolicy.cs │ ├── GPUThermalSensor.cs │ ├── GPUUsageDomainStatus.cs │ ├── GPUUsageInformation.cs │ ├── LogicalGPU.cs │ ├── PCIIdentifiers.cs │ ├── PCIeInformation.cs │ ├── PhysicalGPU.cs │ └── VideoBIOS.cs ├── Icon.png ├── NVIDIA.cs ├── Native │ ├── Attributes │ │ ├── AcceptsAttribute.cs │ │ ├── FunctionIdAttribute.cs │ │ └── StructureVersionAttribute.cs │ ├── Constants │ │ ├── Display.cs │ │ └── General.cs │ ├── Delegates │ │ ├── Display.cs │ │ ├── GPU.cs │ │ ├── General.cs │ │ └── Stereo.cs │ ├── Display │ │ ├── ColorDataColorimetry.cs │ │ ├── ColorDataCommand.cs │ │ ├── ColorDataDepth.cs │ │ ├── ColorDataDesktopDepth.cs │ │ ├── ColorDataDynamicRange.cs │ │ ├── ColorDataFormat.cs │ │ ├── ColorDataHDRCommand.cs │ │ ├── ColorDataHDRMode.cs │ │ ├── ColorDataSelectionPolicy.cs │ │ ├── ColorFormat.cs │ │ ├── DisplayConfigFlags.cs │ │ ├── DisplayPortColorDepth.cs │ │ ├── DisplayPortColorFormat.cs │ │ ├── InfoFrameAudioChannelAllocation.cs │ │ ├── InfoFrameAudioChannelCount.cs │ │ ├── InfoFrameAudioCodec.cs │ │ ├── InfoFrameAudioExtendedCodec.cs │ │ ├── InfoFrameAudioLFEPlaybackLevel.cs │ │ ├── InfoFrameAudioLevelShift.cs │ │ ├── InfoFrameAudioSampleRate.cs │ │ ├── InfoFrameAudioSampleSize.cs │ │ ├── InfoFrameBoolean.cs │ │ ├── InfoFrameCommand.cs │ │ ├── InfoFrameDataType.cs │ │ ├── InfoFramePropertyMode.cs │ │ ├── InfoFrameVideoAspectRatioActivePortion.cs │ │ ├── InfoFrameVideoAspectRatioCodedFrame.cs │ │ ├── InfoFrameVideoBarData.cs │ │ ├── InfoFrameVideoColorFormat.cs │ │ ├── InfoFrameVideoColorimetry.cs │ │ ├── InfoFrameVideoContentType.cs │ │ ├── InfoFrameVideoExtendedColorimetry.cs │ │ ├── InfoFrameVideoITC.cs │ │ ├── InfoFrameVideoNonUniformPictureScaling.cs │ │ ├── InfoFrameVideoPixelRepetition.cs │ │ ├── InfoFrameVideoRGBQuantization.cs │ │ ├── InfoFrameVideoScanInfo.cs │ │ ├── InfoFrameVideoYCCQuantization.cs │ │ ├── MonitorCapabilitiesConnectorType.cs │ │ ├── MonitorCapabilitiesType.cs │ │ ├── Rotate.cs │ │ ├── Scaling.cs │ │ ├── ScanOutCompositionParameter.cs │ │ ├── ScanOutCompositionParameterValue.cs │ │ ├── SpanningOrientation.cs │ │ ├── StaticMetadataDescriptorId.cs │ │ ├── Structures │ │ │ ├── ColorDataColorCoordinate.cs │ │ │ ├── ColorDataV1.cs │ │ │ ├── ColorDataV2.cs │ │ │ ├── ColorDataV3.cs │ │ │ ├── ColorDataV4.cs │ │ │ ├── ColorDataV5.cs │ │ │ ├── CustomDisplay.cs │ │ │ ├── DisplayColorData.cs │ │ │ ├── DisplayHandle.cs │ │ │ ├── HDMISupportInfoV1.cs │ │ │ ├── HDMISupportInfoV2.cs │ │ │ ├── HDRCapabilitiesV1.cs │ │ │ ├── HDRColorDataV1.cs │ │ │ ├── HDRColorDataV2.cs │ │ │ ├── InfoFrameAudio.cs │ │ │ ├── InfoFrameData.cs │ │ │ ├── InfoFrameProperty.cs │ │ │ ├── InfoFrameVideo.cs │ │ │ ├── LUID.cs │ │ │ ├── MasteringDisplayColorData.cs │ │ │ ├── MonitorCapabilities.cs │ │ │ ├── MonitorColorData.cs │ │ │ ├── MonitorVCDBCapabilities.cs │ │ │ ├── MonitorVSDBCapabilities.cs │ │ │ ├── PathAdvancedTargetInfo.cs │ │ │ ├── PathInfoV1.cs │ │ │ ├── PathInfoV2.cs │ │ │ ├── PathTargetInfoV1.cs │ │ │ ├── PathTargetInfoV2.cs │ │ │ ├── Position.cs │ │ │ ├── PrivateDisplayDVCInfo.cs │ │ │ ├── PrivateDisplayDVCInfoEx.cs │ │ │ ├── PrivateDisplayHUEInfo.cs │ │ │ ├── Resolution.cs │ │ │ ├── ScanOutInformationV1.cs │ │ │ ├── ScanOutIntensityStateV1.cs │ │ │ ├── ScanOutIntensityV1.cs │ │ │ ├── ScanOutIntensityV2.cs │ │ │ ├── ScanOutWarpingStateV1.cs │ │ │ ├── ScanOutWarpingV1.cs │ │ │ ├── SourceModeInfo.cs │ │ │ ├── Timing.cs │ │ │ ├── TimingExtra.cs │ │ │ ├── TimingInput.cs │ │ │ ├── UnAttachedDisplayHandle.cs │ │ │ └── ViewPortF.cs │ │ ├── TVFormat.cs │ │ ├── TargetViewMode.cs │ │ ├── TimingHorizontalSyncPolarity.cs │ │ ├── TimingOverride.cs │ │ ├── TimingScanMode.cs │ │ ├── TimingVerticalSyncPolarity.cs │ │ └── WarpingVerticeFormat.cs │ ├── DisplayApi.cs │ ├── Exceptions │ │ ├── NVIDIAApiException.cs │ │ └── NVIDIANotSupportedException.cs │ ├── GPU │ │ ├── ClockLockMode.cs │ │ ├── ClockType.cs │ │ ├── ConnectedIdsFlag.cs │ │ ├── ConnectorType.cs │ │ ├── CoolerControlMode.cs │ │ ├── CoolerController.cs │ │ ├── CoolerPolicy.cs │ │ ├── CoolerTarget.cs │ │ ├── CoolerType.cs │ │ ├── ECCConfiguration.cs │ │ ├── FanCoolersControlMode.cs │ │ ├── GPUBusType.cs │ │ ├── GPUFoundry.cs │ │ ├── GPUMemoryMaker.cs │ │ ├── GPUMemoryType.cs │ │ ├── GPUType.cs │ │ ├── GetPerformanceStatesInfoFlags.cs │ │ ├── I2CSpeed.cs │ │ ├── IlluminationAttribute.cs │ │ ├── IlluminationDeviceType.cs │ │ ├── IlluminationPiecewiseLinearCycleType.cs │ │ ├── IlluminationZoneControlMode.cs │ │ ├── IlluminationZoneControlValuesType.cs │ │ ├── IlluminationZoneLocation.cs │ │ ├── IlluminationZoneType.cs │ │ ├── MonitorConnectionType.cs │ │ ├── OutputId.cs │ │ ├── OutputType.cs │ │ ├── PCIeGeneration.cs │ │ ├── PerformanceDecreaseReason.cs │ │ ├── PerformanceLimit.cs │ │ ├── PerformanceStateId.cs │ │ ├── PerformanceStates20ClockType.cs │ │ ├── PerformanceVoltageDomain.cs │ │ ├── PowerTopologyDomain.cs │ │ ├── PublicClockDomain.cs │ │ ├── Structures │ │ │ ├── BoardInfo.cs │ │ │ ├── ClockDomainInfo.cs │ │ │ ├── ClockFrequenciesV1.cs │ │ │ ├── ClockFrequenciesV2.cs │ │ │ ├── ClockFrequenciesV3.cs │ │ │ ├── DisplayDriverMemoryInfoV1.cs │ │ │ ├── DisplayDriverMemoryInfoV2.cs │ │ │ ├── DisplayDriverMemoryInfoV3.cs │ │ │ ├── DisplayIdsV2.cs │ │ │ ├── DynamicPerformanceStatesInfoV1.cs │ │ │ ├── ECCConfigurationInfoV1.cs │ │ │ ├── ECCErrorInfoV1.cs │ │ │ ├── ECCStatusInfoV1.cs │ │ │ ├── EDIDV1.cs │ │ │ ├── EDIDV2.cs │ │ │ ├── EDIDV3.cs │ │ │ ├── GetIlluminationParameterV1.cs │ │ │ ├── I2CInfoV2.cs │ │ │ ├── I2CInfoV3.cs │ │ │ ├── IlluminationDeviceControlParametersV1.cs │ │ │ ├── IlluminationDeviceControlV1.cs │ │ │ ├── IlluminationDeviceInfoParametersV1.cs │ │ │ ├── IlluminationDeviceInfoV1.cs │ │ │ ├── IlluminationDeviceSyncV1.cs │ │ │ ├── IlluminationZoneControlDataFixedColor.cs │ │ │ ├── IlluminationZoneControlDataFixedColorParameters.cs │ │ │ ├── IlluminationZoneControlDataManualFixedColor.cs │ │ │ ├── IlluminationZoneControlDataManualRGB.cs │ │ │ ├── IlluminationZoneControlDataManualRGBParameters.cs │ │ │ ├── IlluminationZoneControlDataPiecewiseLinear.cs │ │ │ ├── IlluminationZoneControlDataPiecewiseLinearFixedColor.cs │ │ │ ├── IlluminationZoneControlDataPiecewiseLinearRGB.cs │ │ │ ├── IlluminationZoneControlDataRGB.cs │ │ │ ├── IlluminationZoneControlParametersV1.cs │ │ │ ├── IlluminationZoneControlV1.cs │ │ │ ├── IlluminationZoneInfoParametersV1.cs │ │ │ ├── IlluminationZoneInfoV1.cs │ │ │ ├── LogicalGPUHandle.cs │ │ │ ├── PerformanceStates20BaseVoltageEntryV1.cs │ │ │ ├── PerformanceStates20ClockEntryV1.cs │ │ │ ├── PerformanceStates20InfoV1.cs │ │ │ ├── PerformanceStates20InfoV2.cs │ │ │ ├── PerformanceStates20InfoV3.cs │ │ │ ├── PerformanceStates20ParameterDelta.cs │ │ │ ├── PerformanceStatesInfoV1.cs │ │ │ ├── PerformanceStatesInfoV2.cs │ │ │ ├── PerformanceStatesInfoV3.cs │ │ │ ├── PhysicalGPUHandle.cs │ │ │ ├── PrivateActiveApplicationV2.cs │ │ │ ├── PrivateArchitectInfoV2.cs │ │ │ ├── PrivateClockBoostLockV2.cs │ │ │ ├── PrivateClockBoostMasksV1.cs │ │ │ ├── PrivateClockBoostRangesV1.cs │ │ │ ├── PrivateClockBoostTableV1.cs │ │ │ ├── PrivateClockBoostTableV2.cs │ │ │ ├── PrivateCoolerLevelsV1.cs │ │ │ ├── PrivateCoolerPolicyTableV1.cs │ │ │ ├── PrivateCoolerSettingsV1.cs │ │ │ ├── PrivateFanCoolersControlV1.cs │ │ │ ├── PrivateFanCoolersInfoV1.cs │ │ │ ├── PrivateFanCoolersStatusV1.cs │ │ │ ├── PrivatePCIeInfoV2.cs │ │ │ ├── PrivatePerformanceInfoV1.cs │ │ │ ├── PrivatePerformanceStatusV1.cs │ │ │ ├── PrivatePowerPoliciesInfoV1.cs │ │ │ ├── PrivatePowerPoliciesStatusV1.cs │ │ │ ├── PrivatePowerTopologiesStatusV1.cs │ │ │ ├── PrivateThermalPoliciesInfoV2.cs │ │ │ ├── PrivateThermalPoliciesStatusV2.cs │ │ │ ├── PrivateThermalSensorsV2.cs │ │ │ ├── PrivateUsagesInfoV1.cs │ │ │ ├── PrivateVFPCurveV1.cs │ │ │ ├── PrivateVFPCurveV3.cs │ │ │ ├── PrivateVoltageBoostPercentV1.cs │ │ │ ├── PrivateVoltageStatusV1.cs │ │ │ ├── QueryIlluminationSupportParameterV1.cs │ │ │ ├── SetIlluminationParameterV1.cs │ │ │ ├── ThermalSettingsV1.cs │ │ │ └── ThermalSettingsV2.cs │ │ ├── SystemType.cs │ │ ├── ThermalController.cs │ │ ├── ThermalSettingsTarget.cs │ │ └── UtilizationDomain.cs │ ├── GPUApi.Display.cs │ ├── GPUApi.Illumination.cs │ ├── GPUApi.Performance.cs │ ├── GPUApi.PowerPolicies.cs │ ├── GPUApi.Thermal.cs │ ├── GPUApi.Usage.cs │ ├── GPUApi.cs │ ├── General │ │ ├── ChipsetInfoFlag.cs │ │ ├── Status.cs │ │ └── Structures │ │ │ ├── ChipsetInfoV1.cs │ │ │ ├── ChipsetInfoV2.cs │ │ │ ├── ChipsetInfoV3.cs │ │ │ ├── ChipsetInfoV4.cs │ │ │ ├── GenericString.cs │ │ │ ├── LIDDockParameters.cs │ │ │ ├── LongString.cs │ │ │ ├── Rectangle.cs │ │ │ ├── ShortString.cs │ │ │ ├── StructureVersion.cs │ │ │ └── UnicodeString.cs │ ├── GeneralApi.cs │ ├── Helpers │ │ ├── DelegateFactory.cs │ │ ├── ExtensionMethods.cs │ │ ├── FunctionId.cs │ │ └── Structures │ │ │ ├── ValueTypeArray.cs │ │ │ ├── ValueTypeArray`1.cs │ │ │ ├── ValueTypeReference.cs │ │ │ └── ValueTypeReference`1.cs │ ├── Interfaces │ │ ├── Display │ │ │ ├── IColorData.cs │ │ │ ├── IDisplayColorData.cs │ │ │ ├── IDisplayDVCInfo.cs │ │ │ ├── IHDMISupportInfo.cs │ │ │ ├── IHDRColorData.cs │ │ │ ├── IPathInfo.cs │ │ │ ├── IPathTargetInfo.cs │ │ │ └── IScanOutIntensityData.cs │ │ ├── GPU │ │ │ ├── IClockFrequencies.cs │ │ │ ├── IDisplayDriverMemoryInfo.cs │ │ │ ├── IDisplayIds.cs │ │ │ ├── IEDID.cs │ │ │ ├── II2CInfo.cs │ │ │ ├── IPerformanceState.cs │ │ │ ├── IPerformanceState20.cs │ │ │ ├── IPerformanceStates20ClockDependentFrequencyRange.cs │ │ │ ├── IPerformanceStates20ClockDependentSingleFrequency.cs │ │ │ ├── IPerformanceStates20ClockEntry.cs │ │ │ ├── IPerformanceStates20Info.cs │ │ │ ├── IPerformanceStates20VoltageEntry.cs │ │ │ ├── IPerformanceStatesClock.cs │ │ │ ├── IPerformanceStatesInfo.cs │ │ │ ├── IPerformanceStatesVoltage.cs │ │ │ ├── IThermalSensor.cs │ │ │ ├── IThermalSettings.cs │ │ │ ├── IUtilizationDomainInfo.cs │ │ │ └── IUtilizationStatus.cs │ │ ├── General │ │ │ └── IChipsetInfo.cs │ │ ├── IAllocatable.cs │ │ ├── IHandle.cs │ │ └── IInitializable.cs │ ├── Stereo │ │ ├── StereoActivationFlag.cs │ │ ├── StereoActiveEye.cs │ │ ├── StereoDriverMode.cs │ │ ├── StereoFrustumAdjustMode.cs │ │ ├── StereoRegistryIdentification.cs │ │ ├── StereoRegistryProfileType.cs │ │ ├── StereoSurfaceCreateMode.cs │ │ ├── StereoSwapChainMode.cs │ │ └── Structures │ │ │ ├── StereoCapabilities.cs │ │ │ └── StereoHandle.cs │ └── StereoApi.cs ├── NvAPIWrapper.csproj ├── Stereo │ ├── StereoApplicationConfiguration.cs │ └── StereoDeviceSession.cs └── readme.txt ├── README.md ├── Shared ├── Common │ ├── ExceptionExtensions.cs │ ├── GlobalContext.cs │ ├── InfoDto.cs │ ├── NestedItemsBuilder.cs │ ├── PipeUtils.cs │ ├── ProcessExtensions.cs │ ├── ShortcutStruct.cs │ ├── StreamString.cs │ ├── UpdateInfoDto.cs │ └── Utils.cs ├── Contracts │ ├── AMD │ │ ├── ADL.cs │ │ ├── ADLWrapper.cs │ │ ├── AmdPreset.cs │ │ └── AmdServiceConfig.cs │ ├── Base │ │ └── BaseDeviceDto.cs │ ├── Config.cs │ ├── Delegates.cs │ ├── DisplayConfig.cs │ ├── DisplayInfo │ │ ├── ColorProfileDto.cs │ │ └── DisplayInfoDto.cs │ ├── DpiScaling.cs │ ├── FieldDefinition.cs │ ├── Game │ │ ├── GameApp.cs │ │ ├── GamePreset.cs │ │ └── GameServiceConfig.cs │ ├── InvokableActionDto.cs │ ├── LG │ │ ├── LgDeviceDto.cs │ │ ├── LgDeviceOptions.cs │ │ ├── LgEnums.cs │ │ ├── LgFields.cs │ │ ├── LgPreset.cs │ │ ├── LgPresets.cs │ │ ├── LgRcDto.cs │ │ └── LgServiceConfigDto.cs │ ├── ListViewSortState.cs │ ├── Module.cs │ ├── ModuleDto.cs │ ├── NVIDIA │ │ ├── NovideoSettings.cs │ │ ├── NvColorEnhancementSettings.cs │ │ ├── NvColorProfileSettings.cs │ │ ├── NvEnums.cs │ │ ├── NvGpuInfoDto.cs │ │ ├── NvGpuOcSettings.cs │ │ ├── NvHdmiInfoFrameSettings.cs │ │ ├── NvHdrSettings.cs │ │ ├── NvPreset.cs │ │ ├── NvProfile.cs │ │ ├── NvServiceConfig.cs │ │ ├── NvSettingConstants.cs │ │ └── NvSettingItemDto.cs │ ├── PresetStep.cs │ ├── Presets │ │ └── PresetBase.cs │ ├── Rational.cs │ ├── RemoteControl │ │ ├── BaseRcButtonDto.cs │ │ └── BaseRcDto.cs │ ├── Samsung │ │ ├── SamsungButtons.cs │ │ ├── SamsungDeviceDto.cs │ │ ├── SamsungDeviceOptions.cs │ │ ├── SamsungEnums.cs │ │ ├── SamsungFields.cs │ │ ├── SamsungPreset.cs │ │ ├── SamsungPresets.cs │ │ ├── SamsungRcDto.cs │ │ └── SamsungServiceConfigDto.cs │ ├── StartUpParams.cs │ ├── Svc │ │ ├── SvcMessage.cs │ │ └── SvcResultMessage.cs │ └── VirtualResolution.cs ├── EventDispatcher │ ├── DisplayChangeEventDispatcher.cs │ ├── EventDispatcher.cs │ ├── EventExtensions.cs │ ├── KeyboardShortcutDispatcher.cs │ ├── PowerEventDispatcher.cs │ ├── ProcessEventDispatcher.cs │ ├── SessionSwitchDispatcher.cs │ └── WindowMessageDispatcher.cs ├── Forms │ ├── DarkModeUtils.cs │ ├── FormUtils.cs │ ├── ListViewColumnSorter.cs │ ├── MessageForms.cs │ ├── MessageForms.resx │ └── TreeNodeBuilder.cs ├── Native │ ├── CCD.cs │ ├── CmsFunctions.cs │ ├── DXWrapper.cs │ ├── PnpDev.cs │ ├── RestartDetector.cs │ └── WinApi.cs ├── Services │ ├── RpcClientService.cs │ ├── RpcServerService.cs │ ├── WinApiAdminService.cs │ ├── WinApiService.cs │ ├── WinElevatedProcessManager.cs │ └── WolService.cs ├── Shared.csproj ├── Themes │ └── DarkTheme.xaml └── XForms │ ├── BaseViewModel.cs │ └── BaseWindow.xaml.cs ├── images ├── LgController.png ├── NvPresets.png └── Options.png └── novideo_srgb ├── AboutWindow.xaml ├── AboutWindow.xaml.cs ├── AdvancedViewModel.cs ├── AdvancedWindow.xaml ├── AdvancedWindow.xaml.cs ├── Colorimetry.cs ├── DisplayConfigManager.cs ├── DoubleToneCurve.cs ├── GammaToneCurve.cs ├── ICCBinaryReader.cs ├── ICCMatrixProfile.cs ├── ICCProfileException.cs ├── Lut16.cs ├── LutToneCurve.cs ├── MainViewModel.cs ├── MainWindow.xaml ├── MainWindow.xaml.cs ├── Matrix.cs ├── MonitorData.cs ├── Novideo.cs ├── Properties ├── Resources.Designer.cs ├── Resources.resx ├── Settings.Designer.cs └── Settings.settings ├── RangeRule.cs ├── SrgbEOTF.cs ├── ToneCurve.cs ├── icon.ico └── novideo_srgb.csproj /ColorControl.UI/Components/Layout/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 |
4 | 7 | 8 |
9 | 10 | 11 |
12 | @Body 13 |
14 |
15 |
16 | 17 |
18 | An unhandled error has occurred. 19 | Reload 20 | 🗙 21 |
22 | -------------------------------------------------------------------------------- /ColorControl.UI/Components/Layout/TopMenu.razor: -------------------------------------------------------------------------------- 1 | @using ColorControl.Shared.Contracts 2 | @using ColorControl.UI.Services 3 | @inherits LayoutComponentBase 4 | 5 | @inject AppState AppState 6 | @inject NavigationManager _navigationManager; 7 | @rendermode Constants.RenderMode 8 | 9 |
10 | @* *@ 11 | GitHub 12 |
13 | 14 | @code { 15 | 16 | private string ThemeTransitionName = "Dark"; 17 | 18 | protected override void OnInitialized() 19 | { 20 | ThemeTransitionName = AppState.SelectedTheme == "light" ? "Dark theme" : "Light theme"; 21 | } 22 | 23 | private void ChangeTheme() 24 | { 25 | AppState.SetTheme(AppState.SelectedTheme == "light" ? "dark" : "light"); 26 | ThemeTransitionName = AppState.SelectedTheme == "light" ? "Dark theme" : "Light theme"; 27 | _navigationManager.Refresh(); 28 | } 29 | } -------------------------------------------------------------------------------- /ColorControl.UI/Components/Pages/LG/LgSettings.razor: -------------------------------------------------------------------------------- 1 | @using ColorControl.Shared.Contracts 2 | @using ColorControl.Shared.Contracts.LG 3 | @using ColorControl.UI.Services; 4 | @using ColorControl.Shared.Common; 5 | @using ColorControl.UI.Components.Pages.Generic 6 | 7 | @rendermode Constants.RenderMode 8 | @inject RpcUiClientService _rpcClientService 9 | 10 | 11 | 12 | @code { 13 | private LgServiceConfigDto? Config { get; set; } 14 | private List? Fields { get; set; } 15 | 16 | protected async Task ModalOnShow() 17 | { 18 | Config = await _rpcClientService.CallAsync("LgService", "GetConfig"); 19 | Fields = LgFields.GetSettingsFields(Config); 20 | StateHasChanged(); 21 | } 22 | 23 | private async Task ApplyClick() 24 | { 25 | if (Config == null) 26 | { 27 | return; 28 | } 29 | 30 | FieldDefinition.UpdateObject(Fields, Config); 31 | 32 | var result = await _rpcClientService.CallAsync("LgService", "UpdateConfig", Config); 33 | } 34 | } -------------------------------------------------------------------------------- /ColorControl.UI/Components/Pages/Samsung/SamsungSettings.razor: -------------------------------------------------------------------------------- 1 | @using ColorControl.Shared.Contracts 2 | @using ColorControl.Shared.Contracts.Samsung 3 | @using ColorControl.UI.Services; 4 | @using ColorControl.Shared.Common; 5 | @using ColorControl.UI.Components.Pages.Generic 6 | 7 | @rendermode Constants.RenderMode 8 | @inject RpcUiClientService _rpcClientService 9 | 10 | 11 | 12 | @code { 13 | private SamsungServiceConfigDto? Config { get; set; } 14 | private List? Fields { get; set; } 15 | 16 | protected async Task ModalOnShow() 17 | { 18 | Config = await _rpcClientService.CallAsync("SamsungService", "GetConfig"); 19 | Fields = SamsungFields.GetSettingsFields(Config); 20 | StateHasChanged(); 21 | } 22 | 23 | private async Task ApplyClick() 24 | { 25 | if (Config == null) 26 | { 27 | return; 28 | } 29 | 30 | FieldDefinition.UpdateObject(Fields, Config); 31 | 32 | var result = await _rpcClientService.CallAsync("SamsungService", "UpdateConfig", Config); 33 | } 34 | } -------------------------------------------------------------------------------- /ColorControl.UI/Components/Routes.razor: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /ColorControl.UI/Components/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using System.Net.Http.Json 3 | @using Microsoft.AspNetCore.Components.Forms 4 | @using Microsoft.AspNetCore.Components.Routing 5 | @using Microsoft.AspNetCore.Components.Web 6 | @using static Microsoft.AspNetCore.Components.Web.RenderMode 7 | @using Microsoft.AspNetCore.Components.Web.Virtualization 8 | @using Microsoft.JSInterop 9 | @using ColorControl.UI 10 | @using ColorControl.UI.Components 11 | -------------------------------------------------------------------------------- /ColorControl.UI/Constants.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | using Microsoft.AspNetCore.Components.Web; 3 | 4 | public static class Constants 5 | { 6 | public const string Primary = "primary"; 7 | public const string Secondary = "secondary"; 8 | public const string Success = "success"; 9 | public const string Danger = "danger"; 10 | public const string Warning = "warning"; 11 | public const string Info = "info"; 12 | public const string Light = "light"; 13 | public const string Dark = "dark"; 14 | 15 | 16 | public static IComponentRenderMode RenderMode = new InteractiveServerRenderMode(prerender: false); 17 | 18 | } -------------------------------------------------------------------------------- /ColorControl.UI/Extensions/GeneralExtensions.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage; 2 | using System.Security.Cryptography; 3 | 4 | namespace ColorControl.UI.Generics; 5 | 6 | public static class GeneralExtensions 7 | { 8 | public static async ValueTask TryGet(this ProtectedBrowserStorage storage, string key, TValue? def = default) 9 | { 10 | try 11 | { 12 | var result = await storage.GetAsync(key); 13 | var value = result.Success ? result.Value : def; 14 | 15 | return value; 16 | } 17 | catch (CryptographicException) 18 | { 19 | await storage.DeleteAsync(key); 20 | return def; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ColorControl.UI/Extensions/PresetExtensions.cs: -------------------------------------------------------------------------------- 1 | using ColorControl.Shared.Contracts; 2 | 3 | namespace ColorControl.UI.Generics; 4 | 5 | public static class PresetExtensions 6 | { 7 | public static List? OrderPresetsBy(this List presets, PresetOrder order) where T : PresetBase 8 | { 9 | if (presets == null) 10 | { 11 | return null; 12 | } 13 | 14 | if (order == PresetOrder.ByName) 15 | { 16 | presets = presets.OrderBy(p => p.name).ToList(); 17 | } 18 | else if (order == PresetOrder.ByLastUsed) 19 | { 20 | presets = presets.OrderByDescending(p => p.LastUsed).ToList(); 21 | } 22 | 23 | return presets; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /ColorControl.UI/NotificationDto.cs: -------------------------------------------------------------------------------- 1 | using NStandard; 2 | 3 | namespace ColorControl.UI; 4 | 5 | public class NotificationDto 6 | { 7 | public long Id { get; } 8 | public string Message { get; } 9 | public string Level { get; } = Constants.Info; 10 | public DateTime? ScheduledAt { get; set; } 11 | public string? InternalUrl { get; set; } 12 | public DateTime? ShownAt { get; set; } 13 | 14 | public NotificationDto(string message, string level = Constants.Info) 15 | { 16 | Message = message; 17 | Level = level; 18 | Id = Random.Shared.NextInt64(); 19 | } 20 | 21 | public string Category => Level switch 22 | { 23 | Constants.Danger => "Error", 24 | _ => Level[0].ToUpper() + Level.Substring(1) 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /ColorControl.UI/Program.cs: -------------------------------------------------------------------------------- 1 | //using ColorControl.UI; 2 | 3 | //Blazor.Start(); 4 | 5 | //var builder = WebApplication.CreateBuilder(args); 6 | 7 | //// Add services to the container. 8 | //builder.Services.AddRazorComponents() 9 | // .AddInteractiveServerComponents(); 10 | 11 | //builder.Services.AddSingleton(); 12 | //builder.Services.AddSingleton(); 13 | 14 | //var app = builder.Build(); 15 | 16 | //// Configure the HTTP request pipeline. 17 | //if (!app.Environment.IsDevelopment()) 18 | //{ 19 | // app.UseExceptionHandler("/Error", createScopeForErrors: true); 20 | // // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. 21 | // app.UseHsts(); 22 | //} 23 | 24 | //app.UseHttpsRedirection(); 25 | 26 | //app.UseStaticFiles(); 27 | //app.UseAntiforgery(); 28 | 29 | //app.MapRazorComponents() 30 | // .AddInteractiveServerRenderMode(); 31 | 32 | //app.Run(); 33 | -------------------------------------------------------------------------------- /ColorControl.UI/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:31433", 8 | "sslPort": 44330 9 | } 10 | }, 11 | "profiles": { 12 | "http": { 13 | "commandName": "Project", 14 | "dotnetRunMessages": true, 15 | "launchBrowser": true, 16 | "applicationUrl": "http://localhost:5175", 17 | "environmentVariables": { 18 | "ASPNETCORE_ENVIRONMENT": "Development" 19 | } 20 | }, 21 | "https": { 22 | "commandName": "Project", 23 | "dotnetRunMessages": true, 24 | "launchBrowser": true, 25 | "applicationUrl": "https://localhost:7135;http://localhost:5175", 26 | "environmentVariables": { 27 | "ASPNETCORE_ENVIRONMENT": "Development" 28 | } 29 | }, 30 | "IIS Express": { 31 | "commandName": "IISExpress", 32 | "launchBrowser": true, 33 | "environmentVariables": { 34 | "ASPNETCORE_ENVIRONMENT": "Development" 35 | } 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /ColorControl.UI/Services/NotificationService.cs: -------------------------------------------------------------------------------- 1 | namespace ColorControl.UI.Services; 2 | 3 | public class NotificationService 4 | { 5 | public event Func? OnNotification; 6 | 7 | private List _scheduledNotifications = new(); 8 | 9 | public void SendNotification(NotificationDto notification) 10 | { 11 | var now = DateTime.UtcNow; 12 | if (notification.ScheduledAt == null || notification.ScheduledAt <= now) 13 | { 14 | OnNotification?.Invoke(notification); 15 | 16 | return; 17 | } 18 | 19 | Task.Run(async () => 20 | { 21 | await Task.Delay(notification.ScheduledAt.Value - now); 22 | 23 | OnNotification?.Invoke(notification); 24 | }); 25 | } 26 | 27 | public async Task SendNotificationDirect(NotificationDto notification) 28 | { 29 | if (OnNotification != null) 30 | { 31 | await OnNotification.Invoke(notification); 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /ColorControl.UI/State/AppState.cs: -------------------------------------------------------------------------------- 1 | namespace ColorControl.UI; 2 | 3 | public class AppState 4 | { 5 | public string SelectedTheme { get; set; } = "light"; 6 | 7 | public event Action? OnChange; 8 | 9 | public void SetTheme(string theme) 10 | { 11 | SelectedTheme = theme; 12 | NotifyStateChanged(); 13 | } 14 | 15 | private void NotifyStateChanged() => OnChange?.Invoke(); 16 | } 17 | -------------------------------------------------------------------------------- /ColorControl.UI/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "DetailedErrors": true, 3 | "Logging": { 4 | "LogLevel": { 5 | "Default": "Information", 6 | "Microsoft.AspNetCore": "Warning" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /ColorControl.UI/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "DetailedErrors": true, 3 | "Logging": { 4 | "LogLevel": { 5 | "Default": "Information", 6 | "Microsoft.AspNetCore": "Warning" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /ColorControl.UI/wwwroot/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/ColorControl.UI/wwwroot/favicon.png -------------------------------------------------------------------------------- /ColorControl.UI/wwwroot/helper.js: -------------------------------------------------------------------------------- 1 | export function FormValid(formId) { 2 | let form = document.getElementById(formId); 3 | return form.checkValidity(); 4 | } 5 | 6 | export function CloseModal(modalId) { 7 | bootstrap.Modal.getOrCreateInstance('#' + modalId)?.hide(); 8 | } 9 | 10 | export function OpenModal(modalId) { 11 | bootstrap.Modal.getOrCreateInstance('#' + modalId)?.show(); 12 | } 13 | 14 | export function ShowToast(toastId) { 15 | const toastBootstrap = bootstrap.Toast.getOrCreateInstance('#' + toastId); 16 | toastBootstrap?.show(); 17 | } 18 | 19 | export function GetElementDimensions(elementId) { 20 | return document.getElementById(elementId).getBoundingClientRect(); 21 | } 22 | 23 | export function GetElementClassName(elementId) { 24 | return document.getElementById(elementId).className; 25 | } -------------------------------------------------------------------------------- /ColorControl.UI/wwwroot/remotes/LG_FactorySVC.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/ColorControl.UI/wwwroot/remotes/LG_FactorySVC.jpg -------------------------------------------------------------------------------- /ColorControl.UI/wwwroot/remotes/LG_MR20GA.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/ColorControl.UI/wwwroot/remotes/LG_MR20GA.jpg -------------------------------------------------------------------------------- /ColorControl.UI/wwwroot/remotes/LG_MR23GN.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/ColorControl.UI/wwwroot/remotes/LG_MR23GN.jpg -------------------------------------------------------------------------------- /ColorControl.UI/wwwroot/remotes/Samsung_AA81-00243A.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/ColorControl.UI/wwwroot/remotes/Samsung_AA81-00243A.jpg -------------------------------------------------------------------------------- /ColorControl.UI/wwwroot/remotes/Samsung_BN59-01315B.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/ColorControl.UI/wwwroot/remotes/Samsung_BN59-01315B.jpg -------------------------------------------------------------------------------- /ColorControl/.upgrade-assistant: -------------------------------------------------------------------------------- 1 | {"Build":"0.3.261602\u002Befb3cc30a24e699e6e4337f263a2b9478f04f618","CurrentProject":"ColorControl.csproj","EntryPoints":["ColorControl.csproj"],"Properties":{}} -------------------------------------------------------------------------------- /ColorControl/IModulePanel.cs: -------------------------------------------------------------------------------- 1 | namespace ColorControl 2 | { 3 | internal interface IModulePanel 4 | { 5 | public void UpdateInfo(); 6 | public void Init(); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /ColorControl/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "ColorControl": { 4 | "commandName": "Project" 5 | } 6 | } 7 | } -------------------------------------------------------------------------------- /ColorControl/Resources/LG_remote.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/ColorControl/Resources/LG_remote.jpg -------------------------------------------------------------------------------- /ColorControl/Resources/RC_coords.txt: -------------------------------------------------------------------------------- 1 | Power;120;136 2 | 1;106;228 3 | 2;196;228 4 | 3;286;228 5 | 4;106;296 6 | 5;196;296 7 | 6;286;296 8 | 7;106;362 9 | 8;196;362 10 | 9;286;362 11 | List;106;425 12 | 0;196;425 13 | SAP;286;425 14 | Vol +;98;513 15 | Mute;198;513 16 | Channel +;298;513 17 | Vol -;98;622 18 | Channel -;298;622 19 | Home;78;695 20 | Settings;318;695 21 | Up;200;748 22 | Left;98;852 23 | Enter;200;852 24 | Right;304;852 25 | Down;200;952 26 | Back;80;1000 27 | TV Guide;320;1000 28 | Netflix;92;1076 29 | Inputs;200;1066 30 | Amazon Prime;312;1076 31 | Red;90;1150 32 | Green;164;1150 33 | Yellow;240;1150 34 | Blue;316;1150 35 | Rakuten TV;116;1218 36 | Play;202;1218 37 | Pause;291;1218 -------------------------------------------------------------------------------- /ColorControl/Resources/pngbarn.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/ColorControl/Resources/pngbarn.ico -------------------------------------------------------------------------------- /ColorControl/Services/AMD/AmdDisplayInfo.cs: -------------------------------------------------------------------------------- 1 | using ATI.ADL; 2 | using System.Collections.Generic; 3 | 4 | namespace ColorControl.Services.AMD; 5 | 6 | class AmdDisplayInfo 7 | { 8 | public ADLDisplayInfo Display { get; } 9 | 10 | public List Values { get; set; } 11 | 12 | public string InfoLine { get; set; } 13 | 14 | public AmdDisplayInfo(ADLDisplayInfo display, List values, string infoLine) 15 | { 16 | Display = display; 17 | Values = values; 18 | InfoLine = infoLine; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /ColorControl/Services/Common/IServiceBase.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ColorControl.Services.Common; 4 | 5 | public interface IServiceBase 6 | { 7 | List GetInfo(); 8 | void InstallEventHandlers(); 9 | } 10 | -------------------------------------------------------------------------------- /ColorControl/Services/Samsung/ISamsungService.cs: -------------------------------------------------------------------------------- 1 | using ColorControl.Shared.Contracts.Samsung; 2 | using System.Collections.Generic; 3 | using System.Threading.Tasks; 4 | 5 | namespace ColorControl.Services.Samsung 6 | { 7 | internal interface ISamsungService 8 | { 9 | SamsungServiceConfig Config { get; } 10 | List Devices { get; } 11 | SamsungDevice SelectedDevice { get; set; } 12 | string ServiceName { get; } 13 | 14 | Task ApplyPreset(SamsungPreset preset); 15 | Task ApplyPreset(string idOrName); 16 | SamsungDevice GetPresetDevice(SamsungPreset preset); 17 | void GlobalSave(); 18 | Task RefreshDevices(bool connect = true, bool afterStartUp = false); 19 | } 20 | } -------------------------------------------------------------------------------- /ColorControl/Services/Samsung/RawRequestMessage.cs: -------------------------------------------------------------------------------- 1 |  2 | using Newtonsoft.Json; 3 | 4 | namespace ColorControl.Services.Samsung 5 | { 6 | internal class RawRequestMessage 7 | { 8 | public RawRequestMessage(RequestMessage rm, int commandCount) 9 | { 10 | Id = commandCount.ToString(); 11 | Method = rm.Method; 12 | Params = rm.Params; 13 | } 14 | 15 | [JsonIgnore] 16 | public string Id { get; set; } 17 | 18 | [JsonProperty("method")] 19 | public string Method { get; set; } 20 | [JsonProperty("params")] 21 | public object Params { get; set; } 22 | } 23 | } -------------------------------------------------------------------------------- /ColorControl/Services/Samsung/RequestMessage.cs: -------------------------------------------------------------------------------- 1 | namespace ColorControl.Services.Samsung 2 | { 3 | public class RequestMessage 4 | { 5 | public RequestMessage(string method, object payload) 6 | { 7 | Method = method; 8 | Params = payload; 9 | } 10 | 11 | public string Method { get; set; } 12 | public object Params { get; set; } 13 | } 14 | } -------------------------------------------------------------------------------- /ColorControl/Services/Samsung/SamsungApp.cs: -------------------------------------------------------------------------------- 1 | namespace ColorControl.Services.Samsung 2 | { 3 | public class SamsungApp 4 | { 5 | public string Title { get; set; } 6 | public string AppId { get; set; } 7 | 8 | public SamsungApp(string appId, string title) 9 | { 10 | AppId = appId; 11 | Title = title; 12 | } 13 | 14 | public override string ToString() 15 | { 16 | return Title; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /ColorControl/XForms/BrowserWindow.xaml: -------------------------------------------------------------------------------- 1 |  17 | 18 | 20 | 21 | -------------------------------------------------------------------------------- /ColorControl/lgtv/App.cs: -------------------------------------------------------------------------------- 1 | namespace LgTv 2 | { 3 | public class App 4 | { 5 | public string Id { get; set; } 6 | public string LaunchPointId { get; set; } 7 | public string Icon { get; set; } 8 | public string Title { get; set; } 9 | 10 | } 11 | } -------------------------------------------------------------------------------- /ColorControl/lgtv/Channel.cs: -------------------------------------------------------------------------------- 1 | namespace LgTv 2 | { 3 | public class Channel 4 | { 5 | public string Id { get; set; } 6 | public int Number { get; set; } 7 | public string Name { get; set; } 8 | 9 | } 10 | } -------------------------------------------------------------------------------- /ColorControl/lgtv/ExternalInput.cs: -------------------------------------------------------------------------------- 1 | namespace LgTv 2 | { 3 | public class ExternalInput 4 | { 5 | public ExternalInput(string id,string label) 6 | { 7 | Id = id; 8 | Label = label; 9 | } 10 | public string Id { get; set; } 11 | public string Label { get; set; } 12 | public string Icon { get; set; } 13 | 14 | } 15 | } -------------------------------------------------------------------------------- /ColorControl/lgtv/LgApp.cs: -------------------------------------------------------------------------------- 1 | namespace LgTv 2 | { 3 | public class LgApp 4 | { 5 | public string title { get; set; } 6 | public string appId { get; set; } 7 | 8 | public LgApp(string appId, string title) 9 | { 10 | this.appId = appId; 11 | this.title = title; 12 | } 13 | 14 | public override string ToString() 15 | { 16 | return title; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /ColorControl/lgtv/README.md: -------------------------------------------------------------------------------- 1 | # lgtv.net 2 | LG TV WebOS API for .NET 3 | 4 | For now, there is only API, example app will be added in the future. 5 | 6 | ## inspiration: 7 | * https://github.com/msloth/lgtv.js/blob/master/lgtv.js 8 | 9 | ## references: 10 | * https://github.com/ConnectSDK/Connect-SDK-Android-Core 11 | * https://github.com/CODeRUS/harbour-lgremote-webos 12 | * https://github.com/openwebos 13 | * https://mym.hackpad.com/ep/pad/static/rLlshKkzdNj 14 | 15 | ## Usage 16 | ```C# 17 | // Initalization 18 | var _instance = new LgTvApi(ip,new LgTvApiCore(), new ClientKeyStore(ip)); 19 | await _instance.Connect(); 20 | await _instance.MakeHandShake(); 21 | await _instance.GetMouse(); 22 | 23 | //control 24 | await _instance.VolumeDown(); 25 | await _instance.TurnOff(); 26 | ...... 27 | (await _instance.GetMouse()).SendButton(ButtonType.RED); 28 | (await _instance.GetMouse()).SendButton(ButtonType.LEFT); 29 | .. 30 | ``` 31 | -------------------------------------------------------------------------------- /ColorControl/lgtv/RawRequestMessage.cs: -------------------------------------------------------------------------------- 1 | namespace LgTv 2 | { 3 | internal class RawRequestMessage 4 | { 5 | public RawRequestMessage(RequestMessage rm, int commandCount) 6 | { 7 | var prefix = (rm.Prefix ?? ""); 8 | Id = prefix + (prefix.Length>0?"_":"") + commandCount; 9 | Type = rm.Type??"request"; 10 | Uri = rm.Uri; 11 | Payload = rm.Payload; 12 | } 13 | public string Id { get; set; } 14 | public string Type { get; set; } 15 | public string Uri { get; set; } 16 | public string Payload { get; set; } 17 | } 18 | } -------------------------------------------------------------------------------- /ColorControl/lgtv/RequestMessage.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace LgTv 4 | { 5 | public class RequestMessage 6 | { 7 | public RequestMessage(string prefix, string uri) 8 | { 9 | Prefix = prefix; 10 | Uri = uri; 11 | } 12 | public RequestMessage(string uri, object payload, string type = "request") 13 | { 14 | Uri = uri; 15 | if (payload != null) 16 | { 17 | Payload = JsonConvert.SerializeObject(payload); 18 | } 19 | Type = type; 20 | } 21 | 22 | public string Prefix { get; set; } 23 | public string Type { get; set; } 24 | public string Uri { get; set; } 25 | public string Payload { get; set; } 26 | } 27 | } -------------------------------------------------------------------------------- /LICENSE-NOVIDEO.txt: -------------------------------------------------------------------------------- 1 | ColorControl (this application) contains customized code of the app "Novideo sRGB" by ledoge (https://github.com/ledoge/novideo_srgb) 2 | 3 | The included license of ColorControl (GNU General Public License v3.0) covers all rights. -------------------------------------------------------------------------------- /LittleCms/CmsExtension.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace LittleCms 8 | { 9 | public static class CmsExtension 10 | { 11 | 12 | public static CIExyY ToCIExyY(this CIEXYZ xyz) 13 | { 14 | return new CIExyY { x = xyz.X / (xyz.X + xyz.Y + xyz.Z), y = xyz.Y / (xyz.X + xyz.Y + xyz.Z), Y = xyz.Y }; 15 | } 16 | public static CIExyY ToXY(this CIEXYZ xyz) 17 | { 18 | var sum = xyz.X + xyz.Y + xyz.Z; 19 | return new() { x = xyz.X / sum, y = xyz.Y / sum, Y = 1 }; 20 | } 21 | 22 | public static CIEXYZ ToXYZ(this CIExyY xyY) 23 | { 24 | return new() { X = xyY.x * xyY.Y / xyY.y, Y = xyY.Y, Z = (1 - xyY.x - xyY.y) * xyY.Y / xyY.y }; 25 | } 26 | 27 | public static int GetChannelCount(this ColorSpaceSignature sig) 28 | { 29 | return (int)CmsNative.cmsChannelsOf(sig); 30 | } 31 | 32 | 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /LittleCms/CmsGlobal.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace LittleCms 6 | { 7 | public class CmsGlobal 8 | { 9 | 10 | public static CIEXYZ D50XYZ { get; } = CmsNative.cmsD50_XYZ(); 11 | public static CIExyY D50xyY { get; } = CmsNative.cmsD50_xyY(); 12 | 13 | 14 | public unsafe static CIEXYZ AdaptToIlluminant(in CIEXYZ SourceWhitePt, in CIEXYZ Illuminant, in CIEXYZ Value) 15 | { 16 | CmsNative.CheckError(CmsNative.cmsAdaptToIlluminant(out var result, SourceWhitePt, Illuminant, Value)); 17 | return result; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /LittleCms/CmsObject.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace LittleCms 4 | { 5 | public abstract class CmsObject 6 | { 7 | private IntPtr handle; 8 | private bool isOwner; 9 | 10 | public IntPtr Handle => handle; 11 | public bool IsOwner => isOwner; 12 | 13 | public abstract CmsContext Context { get; } 14 | 15 | 16 | protected CmsObject() { } 17 | 18 | protected CmsObject(IntPtr handle, bool moveOwnership) 19 | { 20 | AttachObject(handle, isOwner); 21 | } 22 | 23 | 24 | protected void AttachObject(IntPtr handle, bool moveOwnership) 25 | { 26 | if (handle != IntPtr.Zero && isOwner) 27 | { 28 | FreeObject(); 29 | } 30 | if (handle == IntPtr.Zero) 31 | { 32 | throw new NullReferenceException(); 33 | } 34 | this.handle = handle; 35 | this.isOwner = moveOwnership; 36 | } 37 | 38 | ~CmsObject() { 39 | if (handle != IntPtr.Zero && isOwner) { 40 | FreeObject(); 41 | } 42 | } 43 | 44 | protected abstract void FreeObject(); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /LittleCms/Data/BlittableDataTagSignature.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace LittleCms.Data 5 | { 6 | internal record BlittableDataTag(TagSignature TagSignature) : ISafeTagSignature where T : unmanaged 7 | { 8 | public unsafe T ReadFromProfile(IccProfile profile) 9 | { 10 | var ptr = profile.ReadTag(TagSignature); 11 | if (ptr == null) throw new TagNotFoundException(); 12 | return *(T*)ptr; 13 | } 14 | 15 | public unsafe void WriteToProfile(IccProfile profile, T data) 16 | { 17 | profile.WriteTag(TagSignature, &data); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /LittleCms/Data/ChromaticAdaptationTagSignature.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Numerics; 5 | using System.Runtime.InteropServices; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace LittleCms.Data 10 | { 11 | internal class ChromaticAdaptationTagSignature : ISafeTagSignature 12 | { 13 | public TagSignature TagSignature => TagSignature.ChromaticAdaptationTag; 14 | 15 | public unsafe double[,] ReadFromProfile(IccProfile profile) 16 | { 17 | var ptr = (double*)profile.ReadTag(TagSignature); 18 | if (ptr == null) throw new TagNotFoundException(); 19 | var result = new double[3, 3]; 20 | new ReadOnlySpan(ptr, 9).CopyTo(MemoryMarshal.CreateSpan(ref result[0, 0], 9)); 21 | return result; 22 | } 23 | 24 | public unsafe void WriteToProfile(IccProfile profile, double[,] data) 25 | { 26 | if (data == null) throw new ArgumentNullException(nameof(data)); 27 | fixed (double* ptr = &data[0, 0]) 28 | profile.WriteTag(TagSignature, ptr); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /LittleCms/Data/ISafeTagSignature.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace LittleCms.Data 8 | { 9 | public interface ISafeTagSignature 10 | { 11 | TagSignature TagSignature { get; } 12 | T ReadFromProfile(IccProfile profile); 13 | void WriteToProfile(IccProfile profile, T data); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /LittleCms/Data/IccDataTagSignature.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace LittleCms.Data 8 | { 9 | internal record IccDataTagSignature(TagSignature TagSignature) : ISafeTagSignature 10 | { 11 | public unsafe ICCData ReadFromProfile(IccProfile profile) 12 | { 13 | var ptr = profile.ReadTag(TagSignature); 14 | if (ptr == null) throw new TagNotFoundException(); 15 | return _ICCData.ToManaged((_ICCData*)ptr); 16 | } 17 | 18 | public unsafe void WriteToProfile(IccProfile profile, ICCData obj) 19 | { 20 | var data = new byte[sizeof(_ICCDataHeader) + obj.Data.Length]; 21 | obj.Data.Span.CopyTo(data.AsSpan().Slice(sizeof(_ICCDataHeader))); 22 | fixed (byte* ptr = data) 23 | { 24 | var header = (_ICCDataHeader*)ptr; 25 | header->flag = obj.Flag; 26 | header->len = (uint)obj.Data.Length; 27 | 28 | profile.WriteTag(TagSignature, ptr); 29 | } 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /LittleCms/Data/MluTagSignature.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace LittleCms.Data 8 | { 9 | internal record MluTagSignature(TagSignature TagSignature) : ISafeTagSignature 10 | { 11 | public unsafe MLU ReadFromProfile(IccProfile profile) 12 | { 13 | var ptr = profile.ReadTag(TagSignature); 14 | if (ptr == null) throw new TagNotFoundException(); 15 | return MLU.CopyFromObject((IntPtr)ptr); 16 | } 17 | 18 | public unsafe void WriteToProfile(IccProfile profile, MLU data) 19 | { 20 | if (data == null) throw new ArgumentNullException(nameof(data)); 21 | profile.WriteTag(TagSignature, (void*)data.Handle); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /LittleCms/Data/RgbToneCurve.cs: -------------------------------------------------------------------------------- 1 | namespace LittleCms.Data 2 | { 3 | public record RgbToneCurve(ToneCurve Red, ToneCurve Green, ToneCurve Blue) 4 | { 5 | public ToneCurve[] ToArray() => new[] { Red, Green, Blue }; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /LittleCms/Data/TagNotFoundException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.Serialization; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace LittleCms.Data 9 | { 10 | public class TagNotFoundException : Exception 11 | { 12 | private const int hr = unchecked((int)0x80131577); 13 | public TagNotFoundException() 14 | { 15 | HResult = hr; 16 | } 17 | 18 | public TagNotFoundException(string message) : base(message) 19 | { 20 | HResult = hr; 21 | 22 | } 23 | public TagNotFoundException(string? message, Exception? innerException) 24 | : base(message, innerException) 25 | { 26 | HResult = hr; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /LittleCms/Data/ToneCurveTagSignature.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace LittleCms.Data 8 | { 9 | internal record ToneCurveTagSignature(TagSignature TagSignature) : ISafeTagSignature 10 | { 11 | public unsafe ToneCurve ReadFromProfile(IccProfile profile) 12 | { 13 | var ptr = profile.ReadTag(TagSignature); 14 | if (ptr == null) throw new TagNotFoundException(); 15 | return ToneCurve.CopyFromObject((IntPtr)ptr); 16 | } 17 | 18 | public unsafe void WriteToProfile(IccProfile profile, ToneCurve data) 19 | { 20 | if (data == null) throw new ArgumentNullException(nameof(data)); 21 | profile.WriteTag(TagSignature, (void*)data.Handle); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /LittleCms/LittleCms.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net9.0-windows 5 | enable 6 | True 7 | 8 | 9 | 10 | 11 | PreserveNewest 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /LittleCms/lcms2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/LittleCms/lcms2.dll -------------------------------------------------------------------------------- /MHC2Gen/DisplayEnums.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | 3 | namespace MHC2Gen; 4 | 5 | public enum SaveOption 6 | { 7 | Install, 8 | [Description("Install and associate to display")] 9 | InstallAndAssociate, 10 | [Description("Install and set as display default")] 11 | InstallAndSetAsDefault, 12 | [Description("Save to file")] 13 | SaveToFile 14 | } 15 | 16 | public enum DisplayPrimariesSource 17 | { 18 | Custom, 19 | EDID, 20 | Windows, 21 | ColorProfile, 22 | } 23 | 24 | public enum SDRTransferFunction 25 | { 26 | [Description("BT.1886")] 27 | BT_1886 = 0, 28 | [Description("Pure Power")] 29 | PurePower = 1, 30 | [Description("Piecewise")] 31 | Piecewise = 2, 32 | [Description("Tone Mapped Piecewise")] 33 | ToneMappedPiecewise = 3 34 | } 35 | 36 | public enum ColorGamut 37 | { 38 | Native = 0, 39 | sRGB = 1, 40 | P3 = 2, 41 | Rec2020 = 3, 42 | AdobeRGB = 4 43 | } 44 | -------------------------------------------------------------------------------- /MHC2Gen/Extension.cs: -------------------------------------------------------------------------------- 1 | using LittleCms; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace MHC2Gen 9 | { 10 | internal static class Extension 11 | { 12 | 13 | public static CIExy ToXY(in this CIExyY xyY) 14 | { 15 | return new() { x = xyY.x, y = xyY.y }; 16 | } 17 | public static CIExy ToXY(in this CIEXYZ xyz) 18 | { 19 | return xyz.ToCIExyY().ToXY(); 20 | } 21 | 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /MHC2Gen/GenerateProfileCommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MHC2Gen; 4 | 5 | public class GenerateProfileCommand 6 | { 7 | public string Description { get; set; } = ""; 8 | public bool HasExtraInfo { get; set; } 9 | public bool IsHDRProfile { get; set; } 10 | public RgbPrimaries DevicePrimaries { get; set; } = new RgbPrimaries(RgbPrimaries.sRGB); 11 | public SDRTransferFunction SDRTransferFunction { get; set; } 12 | public ColorGamut ColorGamut { get; set; } 13 | public double MinCLL { get; set; } 14 | public double MaxCLL { get; set; } 15 | public double WhiteLuminance { get; set; } = 2000; 16 | public double BlackLuminance { get; set; } 17 | public double SDRMinBrightness { get; set; } 18 | public double SDRMaxBrightness { get; set; } = 100; 19 | public double SDRBrightnessBoost { get; set; } 20 | public double ShadowDetailBoost { get; set; } 21 | public double Gamma { get; set; } = 2.2; 22 | 23 | public double ToneMappingFromLuminance { get; set; } 24 | public double ToneMappingToLuminance { get; set; } 25 | 26 | public double HdrGammaMultiplier { get; set; } 27 | public double HdrBrightnessMultiplier { get; set; } 28 | } 29 | -------------------------------------------------------------------------------- /MHC2Gen/ST2084.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace MHC2Gen 8 | { 9 | internal class ST2084 10 | { 11 | private const double m1 = 2610.0 / 16384.0; 12 | private const double m2 = 128.0 * 2523.0 / 4096.0; 13 | private const double c1 = 3424.0 / 4096.0; 14 | private const double c2 = 32.0 * 2413.0 / 4096.0; 15 | private const double c3 = 32.0 * 2392.0 / 4096.0; 16 | 17 | public static double NitsToSignal(double nits) 18 | { 19 | var Ypowm1 = Math.Pow(nits / 10000.0, m1); 20 | return Math.Pow((c1 + c2 * Ypowm1) / (1 + c3 * Ypowm1), m2); 21 | } 22 | 23 | public static double SignalToNits(double signal) 24 | { 25 | var Epow1divm2 = Math.Pow(signal, 1.0 / m2); 26 | return 10000 * Math.Pow(Math.Max(Epow1divm2 - c1, 0) / (c2 - c3 * Epow1divm2), 1 / m1); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /NLogViewer/ActionCommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Input; 3 | 4 | namespace DJ 5 | { 6 | public sealed class ActionCommand : ICommand 7 | { 8 | private readonly Action _Action; 9 | private readonly Action _ObjectAction; 10 | 11 | public ActionCommand(Action action) 12 | { 13 | _Action = action; 14 | } 15 | 16 | public ActionCommand(Action objectAction) 17 | { 18 | _ObjectAction = objectAction; 19 | } 20 | 21 | private event EventHandler CanExecuteChanged; 22 | 23 | event EventHandler ICommand.CanExecuteChanged 24 | { 25 | add => CanExecuteChanged += value; 26 | remove => CanExecuteChanged -= value; 27 | } 28 | 29 | bool ICommand.CanExecute(object parameter) 30 | { 31 | return true; 32 | } 33 | 34 | public void Execute(object parameter) 35 | { 36 | if (_ObjectAction != null) 37 | _ObjectAction(parameter); 38 | else 39 | _Action(); 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /NLogViewer/Helper/ListViewLayoutManager/LayoutColumn.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows; 3 | using System.Windows.Controls; 4 | 5 | namespace DJ.Helper.ListViewLayoutManager 6 | { 7 | public abstract class LayoutColumn 8 | { 9 | protected static bool HasPropertyValue(GridViewColumn column, DependencyProperty dp) 10 | { 11 | if (column == null) 12 | { 13 | throw new ArgumentNullException(nameof(column)); 14 | } 15 | 16 | object value = column.ReadLocalValue(dp); 17 | if (value?.GetType() == dp.PropertyType) 18 | { 19 | return true; 20 | } 21 | 22 | return false; 23 | } 24 | 25 | protected static double? GetColumnWidth(GridViewColumn column, DependencyProperty dp) 26 | { 27 | if (column == null) 28 | { 29 | throw new ArgumentNullException(nameof(column)); 30 | } 31 | 32 | object value = column.ReadLocalValue(dp); 33 | if (value?.GetType() == dp.PropertyType) 34 | { 35 | return (double) value; 36 | } 37 | 38 | return null; 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /NLogViewer/Helper/PredicateBuilder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Linq.Expressions; 4 | 5 | namespace DJ.Helper 6 | { 7 | public static class PredicateBuilder 8 | { 9 | public static Expression> True () { return f => true; } 10 | public static Expression> False () { return f => false; } 11 | 12 | public static Expression> Or (this Expression> expr1, 13 | Expression> expr2) 14 | { 15 | var invokedExpr = Expression.Invoke (expr2, expr1.Parameters.Cast ()); 16 | return Expression.Lambda> 17 | (Expression.OrElse (expr1.Body, invokedExpr), expr1.Parameters); 18 | } 19 | 20 | public static Expression> And (this Expression> expr1, 21 | Expression> expr2) 22 | { 23 | var invokedExpr = Expression.Invoke (expr2, expr1.Parameters.Cast ()); 24 | return Expression.Lambda> 25 | (Expression.AndAlso (expr1.Body, invokedExpr), expr1.Parameters); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /NLogViewer/Images/Glyphs/SortDownArrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/NLogViewer/Images/Glyphs/SortDownArrow.png -------------------------------------------------------------------------------- /NLogViewer/Images/Glyphs/SortUpArrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/NLogViewer/Images/Glyphs/SortUpArrow.png -------------------------------------------------------------------------------- /NLogViewer/Images/Small/Add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/NLogViewer/Images/Small/Add.png -------------------------------------------------------------------------------- /NLogViewer/Images/Small/Clear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/NLogViewer/Images/Small/Clear.png -------------------------------------------------------------------------------- /NLogViewer/Images/Small/Clock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/NLogViewer/Images/Small/Clock.png -------------------------------------------------------------------------------- /NLogViewer/Images/Small/Context.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/NLogViewer/Images/Small/Context.png -------------------------------------------------------------------------------- /NLogViewer/Images/Small/Debug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/NLogViewer/Images/Small/Debug.png -------------------------------------------------------------------------------- /NLogViewer/Images/Small/DebugSource.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/NLogViewer/Images/Small/DebugSource.png -------------------------------------------------------------------------------- /NLogViewer/Images/Small/Error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/NLogViewer/Images/Small/Error.png -------------------------------------------------------------------------------- /NLogViewer/Images/Small/Exception.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/NLogViewer/Images/Small/Exception.png -------------------------------------------------------------------------------- /NLogViewer/Images/Small/Exit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/NLogViewer/Images/Small/Exit.png -------------------------------------------------------------------------------- /NLogViewer/Images/Small/Export.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/NLogViewer/Images/Small/Export.png -------------------------------------------------------------------------------- /NLogViewer/Images/Small/Fatal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/NLogViewer/Images/Small/Fatal.png -------------------------------------------------------------------------------- /NLogViewer/Images/Small/Info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/NLogViewer/Images/Small/Info.png -------------------------------------------------------------------------------- /NLogViewer/Images/Small/Layout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/NLogViewer/Images/Small/Layout.png -------------------------------------------------------------------------------- /NLogViewer/Images/Small/MonoLightning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/NLogViewer/Images/Small/MonoLightning.png -------------------------------------------------------------------------------- /NLogViewer/Images/Small/Network.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/NLogViewer/Images/Small/Network.png -------------------------------------------------------------------------------- /NLogViewer/Images/Small/Open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/NLogViewer/Images/Small/Open.png -------------------------------------------------------------------------------- /NLogViewer/Images/Small/Pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/NLogViewer/Images/Small/Pause.png -------------------------------------------------------------------------------- /NLogViewer/Images/Small/Save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/NLogViewer/Images/Small/Save.png -------------------------------------------------------------------------------- /NLogViewer/Images/Small/ScrollDown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/NLogViewer/Images/Small/ScrollDown.png -------------------------------------------------------------------------------- /NLogViewer/Images/Small/Settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/NLogViewer/Images/Small/Settings.png -------------------------------------------------------------------------------- /NLogViewer/Images/Small/Thread.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/NLogViewer/Images/Small/Thread.png -------------------------------------------------------------------------------- /NLogViewer/Images/Small/Trace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/NLogViewer/Images/Small/Trace.png -------------------------------------------------------------------------------- /NLogViewer/Images/Small/Unknown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/NLogViewer/Images/Small/Unknown.png -------------------------------------------------------------------------------- /NLogViewer/Images/Small/Warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/NLogViewer/Images/Small/Warning.png -------------------------------------------------------------------------------- /NLogViewer/Resolver/ILogEventInfoResolver.cs: -------------------------------------------------------------------------------- 1 | using NLog; 2 | 3 | namespace DJ.Resolver 4 | { 5 | /// 6 | /// Default interface to resolve a for your personal needs 7 | /// 8 | public interface ILogEventInfoResolver 9 | { 10 | string Resolve(LogEventInfo logEventInfo); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /NLogViewer/Resolver/IdResolver.cs: -------------------------------------------------------------------------------- 1 | using NLog; 2 | 3 | namespace DJ.Resolver 4 | { 5 | public class IdResolver : ILogEventInfoResolver 6 | { 7 | public string Resolve(LogEventInfo logEventInfo) 8 | { 9 | return logEventInfo.SequenceID.ToString(); 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /NLogViewer/Resolver/LoggerNameResolver.cs: -------------------------------------------------------------------------------- 1 | using NLog; 2 | 3 | namespace DJ.Resolver 4 | { 5 | public class LoggerNameResolver : ILogEventInfoResolver 6 | { 7 | public string Resolve(LogEventInfo logEventInfo) 8 | { 9 | return logEventInfo.LoggerName; 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /NLogViewer/Resolver/MessageResolver.cs: -------------------------------------------------------------------------------- 1 | using System.Text; 2 | using NLog; 3 | 4 | namespace DJ.Resolver 5 | { 6 | public class MessageResolver : ILogEventInfoResolver 7 | { 8 | public string Resolve(LogEventInfo logEventInfo) 9 | { 10 | StringBuilder builder = new StringBuilder(); 11 | builder.Append(logEventInfo.FormattedMessage); 12 | 13 | if (logEventInfo.Exception != null) 14 | { 15 | builder.AppendLine().Append(logEventInfo.Exception); 16 | } 17 | 18 | return builder.ToString(); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /NLogViewer/Resolver/TimeStampResolver.cs: -------------------------------------------------------------------------------- 1 | using NLog; 2 | 3 | namespace DJ.Resolver 4 | { 5 | public class TimeStampResolver : ILogEventInfoResolver 6 | { 7 | public string Resolve(LogEventInfo logEventInfo) 8 | { 9 | return logEventInfo.TimeStamp.ToString("dd-MM-yyyy HH:mm:ss.fff"); 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /NLogViewer/XamlMultiValueConverter/ILogEventResolverToStringConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Windows.Data; 4 | using DJ.Resolver; 5 | using NLog; 6 | 7 | namespace DJ.XamlMultiValueConverter 8 | { 9 | public class ILogEventResolverToStringConverter : IMultiValueConverter 10 | { 11 | public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) 12 | { 13 | if (values[0] is LogEventInfo logEventInfo && values[1] is ILogEventInfoResolver resolver) 14 | return resolver.Resolve(logEventInfo); 15 | return "####"; 16 | } 17 | 18 | public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) 19 | { 20 | throw new NotImplementedException(); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /NLogViewer/nuget.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Nspector/Common/Cache/CachedSettingValue.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Text; 3 | 4 | namespace nspector.Common 5 | { 6 | internal class CachedSettingValue 7 | { 8 | 9 | internal CachedSettingValue() { } 10 | 11 | internal CachedSettingValue(uint Value, string ProfileNames) 12 | { 13 | this.Value = Value; 14 | this.ProfileNames = new StringBuilder(ProfileNames); 15 | this.ValueProfileCount = 1; 16 | } 17 | 18 | internal CachedSettingValue(string ValueStr, string ProfileNames) 19 | { 20 | this.ValueStr = ValueStr; 21 | this.ProfileNames = new StringBuilder(ProfileNames); 22 | this.ValueProfileCount = 1; 23 | } 24 | 25 | internal CachedSettingValue(byte[] ValueBin, string ProfileNames) 26 | { 27 | this.ValueBin = ValueBin; 28 | this.ProfileNames = new StringBuilder(ProfileNames); 29 | this.ValueProfileCount = 1; 30 | } 31 | 32 | internal string ValueStr = ""; 33 | internal uint Value = 0; 34 | internal byte[] ValueBin = new byte[0]; 35 | internal StringBuilder ProfileNames; 36 | internal uint ValueProfileCount; 37 | } 38 | } -------------------------------------------------------------------------------- /Nspector/Common/CustomSettings/CustomSetting.cs: -------------------------------------------------------------------------------- 1 | using System.Xml.Serialization; 2 | 3 | namespace nspector.Common.CustomSettings 4 | { 5 | [Serializable] 6 | public class CustomSetting 7 | { 8 | 9 | public string UserfriendlyName { get; set; } 10 | [XmlElement(ElementName = "HexSettingID")] 11 | public string HexSettingId { get; set; } 12 | public string Description { get; set; } 13 | public string GroupName { get; set; } 14 | public string OverrideDefault { get; set; } 15 | public float MinRequiredDriverVersion { get; set; } 16 | public bool Hidden { get; set; } 17 | public bool HasConstraints { get; set; } 18 | public string DataType { get; set; } 19 | 20 | public List SettingValues { get; set; } 21 | 22 | internal uint SettingId 23 | { 24 | get { return Convert.ToUInt32(HexSettingId.Trim(), 16); } 25 | } 26 | 27 | internal uint? DefaultValue 28 | { 29 | get { return string.IsNullOrEmpty(OverrideDefault) ? null : (uint?)Convert.ToUInt32(OverrideDefault.Trim(), 16); } 30 | } 31 | 32 | } 33 | } -------------------------------------------------------------------------------- /Nspector/Common/CustomSettings/CustomSettingValue.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace nspector.Common.CustomSettings 4 | { 5 | [Serializable] 6 | public class CustomSettingValue 7 | { 8 | internal uint SettingValue 9 | { 10 | get { return Convert.ToUInt32(HexValue.Trim(), 16); } 11 | } 12 | 13 | public string UserfriendlyName { get; set; } 14 | 15 | public string HexValue { get; set; } 16 | 17 | } 18 | } -------------------------------------------------------------------------------- /Nspector/Common/Helper/AdminHelper.cs: -------------------------------------------------------------------------------- 1 | using System.Security.Principal; 2 | 3 | namespace nspector.Common.Helper 4 | { 5 | public static class AdminHelper 6 | { 7 | private static bool isAdmin = false; 8 | static AdminHelper() 9 | { 10 | var identity = WindowsIdentity.GetCurrent(); 11 | var principal = new WindowsPrincipal(identity); 12 | isAdmin = principal.IsInRole(WindowsBuiltInRole.Administrator); 13 | } 14 | 15 | public static bool IsAdmin 16 | { 17 | get { return isAdmin; } 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Nspector/Common/Helper/ListSort.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | 3 | namespace nspector.Common.Helper 4 | { 5 | internal class ListSort : IComparer 6 | { 7 | public int Compare(object x, object y) 8 | { 9 | try 10 | { 11 | return System.String.CompareOrdinal(x.ToString(), y.ToString()); 12 | } 13 | catch 14 | { 15 | return 0; 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /Nspector/Common/Helper/NoBorderRenderer.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Forms; 2 | 3 | namespace nspector.Common.Helper 4 | { 5 | internal class NoBorderRenderer : ToolStripProfessionalRenderer 6 | { 7 | protected override void OnRenderToolStripBackground(ToolStripRenderEventArgs e) {} 8 | 9 | protected override void OnRenderToolStripBorder(ToolStripRenderEventArgs e) {} 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Nspector/Common/Helper/TempFile.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | 4 | namespace nspector.Common.Helper 5 | { 6 | internal static class TempFile 7 | { 8 | public static string GetTempFileName() 9 | { 10 | while (true) 11 | { 12 | var tempFile = GenerateTempFileName(); 13 | if (!File.Exists(tempFile)) 14 | return tempFile; 15 | } 16 | } 17 | 18 | private static string GenerateTempFileName() 19 | { 20 | return Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString().Replace("-", "")); 21 | } 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Nspector/Common/Import/Profile.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace nspector.Common.Import 5 | { 6 | [Serializable] 7 | public class Profile 8 | { 9 | public string ProfileName = ""; 10 | public List Executeables = new List(); 11 | public List Settings = new List(); 12 | } 13 | } -------------------------------------------------------------------------------- /Nspector/Common/Import/ProfileSetting.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Xml.Serialization; 3 | 4 | namespace nspector.Common.Import 5 | { 6 | [Serializable] 7 | public class ProfileSetting 8 | { 9 | public string SettingNameInfo = ""; 10 | 11 | [XmlElement(ElementName = "SettingID")] 12 | public uint SettingId = 0; 13 | 14 | public string SettingValue = "0"; 15 | 16 | public SettingValueType ValueType = SettingValueType.Dword; 17 | } 18 | } -------------------------------------------------------------------------------- /Nspector/Common/Import/Profiles.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace nspector.Common.Import 5 | { 6 | [Serializable] 7 | public class Profiles : List 8 | { 9 | 10 | } 11 | } -------------------------------------------------------------------------------- /Nspector/Common/Import/SettingValueType.cs: -------------------------------------------------------------------------------- 1 | namespace nspector.Common.Import 2 | { 3 | public enum SettingValueType : int 4 | { 5 | Dword, 6 | AnsiString, 7 | String, 8 | Binary 9 | } 10 | } -------------------------------------------------------------------------------- /Nspector/Common/Meta/ISettingMetaService.cs: -------------------------------------------------------------------------------- 1 | using nspector.Native.NVAPI2; 2 | 3 | namespace nspector.Common.Meta 4 | { 5 | public interface ISettingMetaService 6 | { 7 | SettingMetaSource Source { get; } 8 | 9 | NVDRS_SETTING_TYPE? GetSettingValueType(uint settingId); 10 | 11 | string GetSettingName(uint settingId); 12 | 13 | string GetGroupName(uint settingId); 14 | 15 | uint? GetDwordDefaultValue(uint settingId); 16 | 17 | string GetStringDefaultValue(uint settingId); 18 | 19 | byte[] GetBinaryDefaultValue(uint settingId); 20 | 21 | List> GetStringValues(uint settingId); 22 | 23 | List> GetDwordValues(uint settingId); 24 | 25 | List> GetBinaryValues(uint settingId); 26 | 27 | List GetSettingIds(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Nspector/Common/Meta/MetaServiceItem.cs: -------------------------------------------------------------------------------- 1 | namespace nspector.Common.Meta 2 | { 3 | internal class MetaServiceItem 4 | { 5 | public ISettingMetaService Service { get; set; } 6 | public uint ValueNamePrio { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Nspector/Common/Meta/SettingMetaSource.cs: -------------------------------------------------------------------------------- 1 | namespace nspector.Common.Meta 2 | { 3 | public enum SettingMetaSource 4 | { 5 | CustomSettings = 10, 6 | DriverSettings = 20, 7 | ConstantSettings = 30, 8 | ReferenceSettings = 40, 9 | ScannedSettings = 50, 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Nspector/Common/Meta/SettingValue.cs: -------------------------------------------------------------------------------- 1 | namespace nspector.Common.Meta 2 | { 3 | public class SettingValue 4 | { 5 | 6 | public SettingMetaSource ValueSource; 7 | 8 | public SettingValue(SettingMetaSource source) 9 | { 10 | ValueSource = source; 11 | } 12 | 13 | public int ValuePos { get; set; } 14 | public string ValueName { get; set; } 15 | public T Value { get; set; } 16 | 17 | public override string ToString() 18 | { 19 | if (typeof(T) == typeof(uint)) 20 | return string.Format("Value=0x{0:X8}; ValueName={1}; Source={2};", Value, ValueName, ValueSource); 21 | 22 | return string.Format("Value={0}; ValueName={1};", Value, ValueName); 23 | } 24 | 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Nspector/Common/NvapiException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using nspector.Native.NVAPI2; 3 | 4 | namespace nspector.Common 5 | { 6 | public class NvapiException : Exception 7 | { 8 | public readonly NvAPI_Status Status; 9 | 10 | public NvapiException(string function, NvAPI_Status status) 11 | : base(function + " failed: " + status) 12 | { 13 | Status = status; 14 | } 15 | 16 | } 17 | 18 | public class NvapiAddApplicationException : NvapiException 19 | { 20 | public readonly string ApplicationName; 21 | 22 | public NvapiAddApplicationException(string applicationName) 23 | : base("DRS_CreateApplication", NvAPI_Status.NVAPI_EXECUTABLE_ALREADY_IN_USE) 24 | { 25 | ApplicationName = applicationName; 26 | } 27 | 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Nspector/Common/SettingItem.cs: -------------------------------------------------------------------------------- 1 | namespace nspector.Common 2 | { 3 | 4 | public enum SettingState 5 | { 6 | NotAssiged, 7 | GlobalSetting, 8 | UserdefinedSetting, 9 | NvidiaSetting, 10 | } 11 | 12 | public class SettingItem 13 | { 14 | public uint SettingId { get; set; } 15 | 16 | public string SettingText { get; set; } 17 | 18 | public string ValueText { get; set; } 19 | 20 | public string ValueRaw { get; set; } 21 | 22 | public string GroupName { get; set; } 23 | 24 | public SettingState State { get; set; } 25 | 26 | public bool IsStringValue { get; set; } 27 | 28 | public bool IsApiExposed { get; set; } 29 | 30 | public bool IsSettingHidden { get; set; } 31 | 32 | public override string ToString() 33 | { 34 | return string.Format("{0}; 0x{1:X8}; {2}; {3}; {4};", State, SettingId, SettingText, ValueText, ValueRaw); 35 | } 36 | 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Nspector/Common/SettingViewMode.cs: -------------------------------------------------------------------------------- 1 | namespace nspector.Common 2 | { 3 | public enum SettingViewMode 4 | { 5 | Normal, 6 | IncludeScannedSetttings, 7 | CustomSettingsOnly, 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Nspector/Images/0_gear2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/Nspector/Images/0_gear2.png -------------------------------------------------------------------------------- /Nspector/Images/1_gear2_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/Nspector/Images/1_gear2_2.png -------------------------------------------------------------------------------- /Nspector/Images/4_gear_nv2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/Nspector/Images/4_gear_nv2.png -------------------------------------------------------------------------------- /Nspector/Images/6_gear_inherit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/Nspector/Images/6_gear_inherit.png -------------------------------------------------------------------------------- /Nspector/Images/PortableDeviceStatus_3_16-011.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/Nspector/Images/PortableDeviceStatus_3_16-011.png -------------------------------------------------------------------------------- /Nspector/Images/apply.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/Nspector/Images/apply.png -------------------------------------------------------------------------------- /Nspector/Images/export1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/Nspector/Images/export1.png -------------------------------------------------------------------------------- /Nspector/Images/filter_user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/Nspector/Images/filter_user.png -------------------------------------------------------------------------------- /Nspector/Images/find_set2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/Nspector/Images/find_set2.png -------------------------------------------------------------------------------- /Nspector/Images/home_sm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/Nspector/Images/home_sm.png -------------------------------------------------------------------------------- /Nspector/Images/ieframe_1_18212.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/Nspector/Images/ieframe_1_18212.png -------------------------------------------------------------------------------- /Nspector/Images/ieframe_1_31073-002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/Nspector/Images/ieframe_1_31073-002.png -------------------------------------------------------------------------------- /Nspector/Images/import1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/Nspector/Images/import1.png -------------------------------------------------------------------------------- /Nspector/Images/n1-016.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/Nspector/Images/n1-016.png -------------------------------------------------------------------------------- /Nspector/Images/nv_btn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/Nspector/Images/nv_btn.png -------------------------------------------------------------------------------- /Nspector/Images/shield.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/Nspector/Images/shield.png -------------------------------------------------------------------------------- /Nspector/Images/shield16.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/Nspector/Images/shield16.ico -------------------------------------------------------------------------------- /Nspector/Images/text_binary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/Nspector/Images/text_binary.png -------------------------------------------------------------------------------- /Nspector/Images/transparent16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/Nspector/Images/transparent16.png -------------------------------------------------------------------------------- /Nspector/Images/window_application_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/Nspector/Images/window_application_add.png -------------------------------------------------------------------------------- /Nspector/Images/window_application_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/Nspector/Images/window_application_delete.png -------------------------------------------------------------------------------- /Nspector/Native/WINAPI/SafeNativeMethods.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | namespace nspector.Native.WINAPI 4 | { 5 | static class SafeNativeMethods 6 | { 7 | [DllImport("kernel32", CharSet = CharSet.Unicode, SetLastError = true)] 8 | [return: MarshalAs(UnmanagedType.Bool)] 9 | internal static extern bool DeleteFile(string name); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Nspector/app.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | true 13 | 14 | 15 | -------------------------------------------------------------------------------- /Nspector/n1.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/Nspector/n1.ico -------------------------------------------------------------------------------- /NvAPIWrapper/GPU/AGPInformation.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.GPU 2 | { 3 | /// 4 | /// Contains information about the accelerated graphics connection 5 | /// 6 | public class AGPInformation 7 | { 8 | internal AGPInformation(int aperture, int currentRate) 9 | { 10 | ApertureInMB = aperture; 11 | CurrentRate = currentRate; 12 | } 13 | 14 | /// 15 | /// Gets AGP aperture in megabytes 16 | /// 17 | public int ApertureInMB { get; } 18 | 19 | /// 20 | /// Gets current AGP Rate (0 = AGP not present, 1 = 1x, 2 = 2x, etc.) 21 | /// 22 | public int CurrentRate { get; } 23 | 24 | /// 25 | public override string ToString() 26 | { 27 | return $"AGP Aperture: {ApertureInMB}MB, Current Rate: {CurrentRate}x"; 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /NvAPIWrapper/GPU/GPUPowerTopologyInformation.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using NvAPIWrapper.Native; 4 | 5 | namespace NvAPIWrapper.GPU 6 | { 7 | /// 8 | /// Holds information regarding current power topology and their current power usage 9 | /// 10 | public class GPUPowerTopologyInformation 11 | { 12 | internal GPUPowerTopologyInformation(PhysicalGPU physicalGPU) 13 | { 14 | PhysicalGPU = physicalGPU; 15 | } 16 | 17 | /// 18 | /// Gets the physical GPU that this instance describes 19 | /// 20 | public PhysicalGPU PhysicalGPU { get; } 21 | 22 | /// 23 | /// Gets the current power topology entries 24 | /// 25 | public IEnumerable PowerTopologyEntries 26 | { 27 | get 28 | { 29 | return GPUApi.ClientPowerTopologyGetStatus(PhysicalGPU.Handle).PowerPolicyStatusEntries 30 | .Select(entry => new GPUPowerTopologyStatus(entry)); 31 | } 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /NvAPIWrapper/GPU/GPUUsageDomainStatus.cs: -------------------------------------------------------------------------------- 1 | using NvAPIWrapper.Native.GPU; 2 | using NvAPIWrapper.Native.Interfaces.GPU; 3 | 4 | namespace NvAPIWrapper.GPU 5 | { 6 | /// 7 | /// Holds information about a utilization domain 8 | /// 9 | public class GPUUsageDomainStatus 10 | { 11 | internal GPUUsageDomainStatus(UtilizationDomain domain, IUtilizationDomainInfo utilizationDomainInfo) 12 | { 13 | Domain = domain; 14 | Percentage = (int) utilizationDomainInfo.Percentage; 15 | } 16 | 17 | /// 18 | /// Gets the utilization domain that this instance describes 19 | /// 20 | public UtilizationDomain Domain { get; } 21 | 22 | /// 23 | /// Gets the percentage of time where the domain is considered busy in the last 1 second interval. 24 | /// 25 | public int Percentage { get; } 26 | 27 | /// 28 | public override string ToString() 29 | { 30 | return $"[{Domain}] {Percentage}%"; 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/NvAPIWrapper/Icon.png -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Attributes/AcceptsAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NvAPIWrapper.Native.Attributes 4 | { 5 | [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Delegate)] 6 | internal class AcceptsAttribute : Attribute 7 | { 8 | public AcceptsAttribute(params Type[] types) 9 | { 10 | Types = types; 11 | } 12 | 13 | public Type[] Types { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Attributes/FunctionIdAttribute.cs: -------------------------------------------------------------------------------- 1 | using NvAPIWrapper.Native.Helpers; 2 | using System; 3 | 4 | namespace NvAPIWrapper.Native.Attributes 5 | { 6 | [AttributeUsage(AttributeTargets.Delegate)] 7 | public class FunctionIdAttribute : Attribute 8 | { 9 | public FunctionIdAttribute(FunctionId functionId) 10 | { 11 | FunctionId = functionId; 12 | } 13 | 14 | public FunctionId FunctionId { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Attributes/StructureVersionAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NvAPIWrapper.Native.Attributes 4 | { 5 | [AttributeUsage(AttributeTargets.Struct)] 6 | internal class StructureVersionAttribute : Attribute 7 | { 8 | public StructureVersionAttribute() 9 | { 10 | } 11 | 12 | public StructureVersionAttribute(int versionNumber) 13 | { 14 | VersionNumber = versionNumber; 15 | } 16 | 17 | public int VersionNumber { get; set; } 18 | } 19 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Constants/Display.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Constants 2 | { 3 | internal static class Display 4 | { 5 | public const int AdvancedDisplayHeads = 4; 6 | public const int MaxDisplayHeads = 2; 7 | } 8 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Constants/General.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Constants 2 | { 3 | internal static class General 4 | { 5 | public const int BinaryDataMax = 4096; 6 | public const int UnicodeStringLength = 2048; 7 | } 8 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/ColorDataCommand.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible values for the color data command 5 | /// 6 | public enum ColorDataCommand : uint 7 | { 8 | /// 9 | /// Get the current color data 10 | /// 11 | Get = 1, 12 | 13 | /// 14 | /// Set the current color data 15 | /// 16 | Set, 17 | 18 | /// 19 | /// Check if the passed color data is supported 20 | /// 21 | IsSupportedColor, 22 | 23 | /// 24 | /// Get the default color data 25 | /// 26 | GetDefault 27 | } 28 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/ColorDataDepth.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible values for the color data depth 5 | /// 6 | public enum ColorDataDepth : uint 7 | { 8 | /// 9 | /// Default color depth meaning that the current setting should be kept 10 | /// 11 | Default = 0, 12 | 13 | /// 14 | /// 6bit per color depth 15 | /// 16 | BPC6 = 1, 17 | 18 | /// 19 | /// 8bit per color depth 20 | /// 21 | BPC8 = 2, 22 | 23 | /// 24 | /// 10bit per color depth 25 | /// 26 | BPC10 = 3, 27 | 28 | /// 29 | /// 12bit per color depth 30 | /// 31 | BPC12 = 4, 32 | 33 | /// 34 | /// 16bit per color depth 35 | /// 36 | BPC16 = 5 37 | } 38 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/ColorDataDesktopDepth.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible values for the color data desktop color depth 5 | /// 6 | public enum ColorDataDesktopDepth : uint 7 | { 8 | /// 9 | /// Default color depth meaning that the current setting should be kept 10 | /// 11 | Default = 0x0, 12 | 13 | /// 14 | /// 8bit per integer color component 15 | /// 16 | BPC8 = 0x1, 17 | 18 | /// 19 | /// 10bit integer per color component 20 | /// 21 | BPC10 = 0x2, 22 | 23 | /// 24 | /// 16bit float per color component 25 | /// 26 | BPC16Float = 0x3, 27 | 28 | /// 29 | /// 16bit float per color component wide color gamut 30 | /// 31 | BPC16FloatWcg = 0x4, 32 | 33 | /// 34 | /// 16bit float per color component HDR 35 | /// 36 | BPC16FloatHDR = 0x5 37 | } 38 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/ColorDataDynamicRange.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible values for color data dynamic range 5 | /// 6 | public enum ColorDataDynamicRange : uint 7 | { 8 | /// 9 | /// VESA standard progress signal 10 | /// 11 | VESA = 0, 12 | 13 | /// 14 | /// CEA interlaced signal 15 | /// 16 | CEA, 17 | 18 | /// 19 | /// Automatically select the best value 20 | /// 21 | Auto 22 | } 23 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/ColorDataFormat.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible color data color format values 5 | /// 6 | public enum ColorDataFormat : uint 7 | { 8 | /// 9 | /// RGB color format 10 | /// 11 | RGB = 0, 12 | 13 | /// 14 | /// YUV422 color format 15 | /// 16 | YUV422, 17 | 18 | /// 19 | /// YUV444 color format 20 | /// 21 | YUV444, 22 | 23 | /// 24 | /// YUV420 color format 25 | /// 26 | YUV420, 27 | 28 | /// 29 | /// Default color format 30 | /// 31 | Default = 0xFE, 32 | 33 | /// 34 | /// Automatically select the best color format 35 | /// 36 | Auto = 0xFF 37 | } 38 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/ColorDataHDRCommand.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible values for the HDR color data command 5 | /// 6 | public enum ColorDataHDRCommand : uint 7 | { 8 | /// 9 | /// Get the current HDR color data 10 | /// 11 | Get = 0, 12 | 13 | /// 14 | /// Set the current HDR color data 15 | /// 16 | Set = 1 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/ColorDataSelectionPolicy.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Possible values for the color data selection policy 5 | /// 6 | public enum ColorDataSelectionPolicy : uint 7 | { 8 | /// 9 | /// Application or the Nvidia Control Panel user configuration are used to decide the best color format 10 | /// 11 | User = 0, 12 | 13 | /// 14 | /// Driver or the Operating System decides the best color format 15 | /// 16 | BestQuality = 1, 17 | 18 | /// 19 | /// Default value, 20 | /// 21 | Default = BestQuality, 22 | 23 | /// 24 | /// Unknown policy 25 | /// 26 | Unknown = 0xFF 27 | } 28 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/ColorFormat.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Possible color formats 5 | /// 6 | public enum ColorFormat 7 | { 8 | /// 9 | /// Unknown, driver will choose one automatically. 10 | /// 11 | Unknown = 0, 12 | 13 | /// 14 | /// 8bpp mode 15 | /// 16 | P8 = 41, 17 | 18 | /// 19 | /// 16bpp mode 20 | /// 21 | R5G6B5 = 23, 22 | 23 | /// 24 | /// 32bpp mode 25 | /// 26 | A8R8G8B8 = 21, 27 | 28 | /// 29 | /// 64bpp (floating point) 30 | /// 31 | A16B16G16R16F = 113 32 | } 33 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/DisplayConfigFlags.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NvAPIWrapper.Native.Display 4 | { 5 | /// 6 | /// Flags for applying settings, used by NvAPI_DISP_SetDisplayConfig() 7 | /// 8 | [Flags] 9 | public enum DisplayConfigFlags 10 | { 11 | /// 12 | /// None 13 | /// 14 | None = 0, 15 | 16 | /// 17 | /// Do not apply 18 | /// 19 | ValidateOnly = 0x00000001, 20 | 21 | /// 22 | /// Save to the persistence storage 23 | /// 24 | SaveToPersistence = 0x00000002, 25 | 26 | /// 27 | /// Driver reload is permitted if necessary 28 | /// 29 | DriverReloadAllowed = 0x00000004, 30 | 31 | /// 32 | /// Refresh OS mode list. 33 | /// 34 | ForceModeEnumeration = 0x00000008, 35 | 36 | /// 37 | /// Tell OS to avoid optimizing CommitVidPn call during a modeset 38 | /// 39 | ForceCommitVideoPresentNetwork = 0x00000010 40 | } 41 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/DisplayPortColorDepth.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Possible display port color depths 5 | /// 6 | public enum DisplayPortColorDepth : uint 7 | { 8 | /// 9 | /// Default color depth 10 | /// 11 | Default = 0, 12 | /// 13 | /// 6 bit per color color depth 14 | /// 15 | BPC6, 16 | /// 17 | /// 8 bit per color color depth 18 | /// 19 | BPC8, 20 | /// 21 | /// 10 bit per color color depth 22 | /// 23 | BPC10, 24 | /// 25 | /// 12 bit per color color depth 26 | /// 27 | BPC12, 28 | 29 | /// 30 | /// 16 bit per color color depth 31 | /// 32 | BPC16, 33 | } 34 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/DisplayPortColorFormat.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Possible display port color formats 5 | /// 6 | public enum DisplayPortColorFormat : uint 7 | { 8 | /// 9 | /// RGB color format 10 | /// 11 | RGB = 0, 12 | 13 | /// 14 | /// YCbCr422 color format 15 | /// 16 | YCbCr422 = 1, 17 | 18 | /// 19 | /// YCbCr444 color format 20 | /// 21 | YCbCr444 = 2 22 | } 23 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/InfoFrameAudioExtendedCodec.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible extended audio codecs 5 | /// 6 | public enum InfoFrameAudioExtendedCodec : uint 7 | { 8 | /// 9 | /// Use the primary audio codec type, data not available 10 | /// 11 | UseCodecType = 0, 12 | 13 | /// 14 | /// High-Efficiency Advanced Audio Coding 15 | /// 16 | HEAAC, 17 | 18 | /// 19 | /// High-Efficiency Advanced Audio Coding 2 20 | /// 21 | HEAACVersion2, 22 | 23 | /// 24 | /// MPEG Surround 25 | /// 26 | MPEGSurround, 27 | 28 | /// 29 | /// Auto (Unspecified) 30 | /// 31 | Auto = 63 32 | } 33 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/InfoFrameAudioLFEPlaybackLevel.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible audio low frequency effects channel playback level 5 | /// 6 | public enum InfoFrameAudioLFEPlaybackLevel : uint 7 | { 8 | /// 9 | /// Data not available 10 | /// 11 | NoData = 0, 12 | 13 | /// 14 | /// No change to the source audio 15 | /// 16 | Plus0Decibel, 17 | 18 | /// 19 | /// Adds 10 decibel 20 | /// 21 | Plus10Decibel, 22 | 23 | /// 24 | /// Auto (Unspecified) 25 | /// 26 | Auto = 7 27 | } 28 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/InfoFrameAudioSampleSize.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible audio sample size (bit depth) 5 | /// 6 | public enum InfoFrameAudioSampleSize : uint 7 | { 8 | /// 9 | /// Data is available in the header of source data 10 | /// 11 | InHeader = 0, 12 | 13 | /// 14 | /// 16bit audio sample size 15 | /// 16 | B16, 17 | 18 | /// 19 | /// 20bit audio sample size 20 | /// 21 | B20, 22 | 23 | /// 24 | /// 24bit audio sample size 25 | /// 26 | B24, 27 | 28 | /// 29 | /// Auto (Unspecified) 30 | /// 31 | Auto = 7 32 | } 33 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/InfoFrameBoolean.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible values for info-frame properties that accept or return a boolean value 5 | /// 6 | public enum InfoFrameBoolean : uint 7 | { 8 | /// 9 | /// False 10 | /// 11 | False = 0, 12 | 13 | /// 14 | /// True 15 | /// 16 | True, 17 | 18 | /// 19 | /// Auto (Unspecified) 20 | /// 21 | Auto = 3 22 | } 23 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/InfoFrameDataType.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible info-frame data type 5 | /// 6 | public enum InfoFrameDataType : uint 7 | { 8 | /// 9 | /// Auxiliary Video data 10 | /// 11 | AuxiliaryVideoInformation = 2, 12 | 13 | /// 14 | /// Audio data 15 | /// 16 | AudioInformation = 4, 17 | } 18 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/InfoFramePropertyMode.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible info-frame property modes 5 | /// 6 | public enum InfoFramePropertyMode : uint 7 | { 8 | /// 9 | /// Driver determines whether to send info-frames. 10 | /// 11 | Auto = 0, 12 | 13 | /// 14 | /// Driver always sends info-frame. 15 | /// 16 | Enable, 17 | 18 | /// 19 | /// Driver never sends info-frame. 20 | /// 21 | Disable, 22 | 23 | /// 24 | /// Driver only sends info-frame when client requests it via info-frame escape call. 25 | /// 26 | AllowOverride 27 | } 28 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/InfoFrameVideoAspectRatioCodedFrame.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Gets the possible values for AVI source aspect ratio 5 | /// 6 | public enum InfoFrameVideoAspectRatioCodedFrame : uint 7 | { 8 | /// 9 | /// No data available 10 | /// 11 | NoData = 0, 12 | 13 | /// 14 | /// The 4x3 aspect ratio 15 | /// 16 | Aspect4X3, 17 | 18 | /// 19 | /// The 16x9 aspect ratio 20 | /// 21 | Aspect16X9, 22 | 23 | /// 24 | /// Auto (Unspecified) 25 | /// 26 | Auto = 7 27 | } 28 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/InfoFrameVideoBarData.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible AVI bar data that are available and should be used 5 | /// 6 | public enum InfoFrameVideoBarData : uint 7 | { 8 | /// 9 | /// No bar data present 10 | /// 11 | NotPresent = 0, 12 | 13 | /// 14 | /// Vertical bar 15 | /// 16 | Vertical, 17 | 18 | /// 19 | /// Horizontal bar 20 | /// 21 | Horizontal, 22 | 23 | /// 24 | /// Both sides have bars 25 | /// 26 | Both, 27 | 28 | /// 29 | /// Auto (Unspecified) 30 | /// 31 | Auto = 7 32 | } 33 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/InfoFrameVideoColorFormat.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible AVI color formats 5 | /// 6 | public enum InfoFrameVideoColorFormat : uint 7 | { 8 | /// 9 | /// The RGB color format 10 | /// 11 | RGB = 0, 12 | 13 | /// 14 | /// The YCbCr422 color format 15 | /// 16 | YCbCr422, 17 | 18 | /// 19 | /// The YCbCr444 color format 20 | /// 21 | YCbCr444, 22 | 23 | /// 24 | /// Auto (Unspecified) 25 | /// 26 | Auto = 7 27 | } 28 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/InfoFrameVideoColorimetry.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible values for the AVI color space 5 | /// 6 | public enum InfoFrameVideoColorimetry : uint 7 | { 8 | /// 9 | /// No data available 10 | /// 11 | NoData = 0, 12 | 13 | /// 14 | /// The SMPTE170M color space 15 | /// 16 | SMPTE170M, 17 | 18 | /// 19 | /// The ITURBT709 color space 20 | /// 21 | ITURBT709, 22 | 23 | /// 24 | /// Extended colorimetry value should be used to get information regarding AVI color space 25 | /// 26 | UseExtendedColorimetry, 27 | 28 | /// 29 | /// Auto (Unspecified) 30 | /// 31 | Auto = 7 32 | } 33 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/InfoFrameVideoContentType.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible AVI content type 5 | /// 6 | public enum InfoFrameVideoContentType : uint 7 | { 8 | /// 9 | /// Graphics content 10 | /// 11 | Graphics = 0, 12 | 13 | /// 14 | /// Photo content 15 | /// 16 | Photo, 17 | 18 | /// 19 | /// Cinematic content 20 | /// 21 | Cinema, 22 | 23 | /// 24 | /// Gaming content 25 | /// 26 | Game, 27 | 28 | /// 29 | /// Auto (Unspecified) 30 | /// 31 | Auto = 7 32 | } 33 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/InfoFrameVideoITC.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible AVI video content modes 5 | /// 6 | public enum InfoFrameVideoITC : uint 7 | { 8 | /// 9 | /// Normal video content (Consumer Electronics) 10 | /// 11 | VideoContent = 0, 12 | 13 | /// 14 | /// Information Technology content 15 | /// 16 | ITContent, 17 | 18 | /// 19 | /// Auto (Unspecified) 20 | /// 21 | Auto = 3 22 | } 23 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/InfoFrameVideoNonUniformPictureScaling.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible values for the AVI non uniform picture scaling 5 | /// 6 | public enum InfoFrameVideoNonUniformPictureScaling : uint 7 | { 8 | /// 9 | /// No data available 10 | /// 11 | NoData = 0, 12 | 13 | /// 14 | /// Horizontal scaling 15 | /// 16 | Horizontal, 17 | 18 | /// 19 | /// Vertical scaling 20 | /// 21 | Vertical, 22 | 23 | /// 24 | /// Scaling in both directions 25 | /// 26 | Both, 27 | 28 | /// 29 | /// Auto (Unspecified) 30 | /// 31 | Auto = 7 32 | } 33 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/InfoFrameVideoRGBQuantization.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible values for the AVI RGB quantization 5 | /// 6 | public enum InfoFrameVideoRGBQuantization : uint 7 | { 8 | /// 9 | /// Default setting 10 | /// 11 | Default = 0, 12 | 13 | /// 14 | /// Limited RGB range [16-235] (86%) 15 | /// 16 | LimitedRange, 17 | 18 | /// 19 | /// Full RGB range [0-255] (100%) 20 | /// 21 | FullRange, 22 | 23 | /// 24 | /// Auto (Unspecified) 25 | /// 26 | Auto = 7 27 | } 28 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/InfoFrameVideoScanInfo.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible values for AVI scan information 5 | /// 6 | public enum InfoFrameVideoScanInfo : uint 7 | { 8 | /// 9 | /// No data available 10 | /// 11 | NoData = 0, 12 | 13 | /// 14 | /// Overscan 15 | /// 16 | OverScan, 17 | 18 | /// 19 | /// Underscan 20 | /// 21 | UnderScan, 22 | 23 | /// 24 | /// Auto (Unspecified) 25 | /// 26 | Auto = 7 27 | } 28 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/InfoFrameVideoYCCQuantization.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible AVI YCC quantization 5 | /// 6 | public enum InfoFrameVideoYCCQuantization : uint 7 | { 8 | /// 9 | /// Limited YCC range 10 | /// 11 | LimitedRange = 0, 12 | 13 | /// 14 | /// Full YCC range 15 | /// 16 | FullRange, 17 | 18 | /// 19 | /// Auto (Unspecified) 20 | /// 21 | Auto = 7 22 | } 23 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/MonitorCapabilitiesConnectorType.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Possible values for the monitor capabilities connector type 5 | /// 6 | public enum MonitorCapabilitiesConnectorType : uint 7 | { 8 | /// 9 | /// Unknown or invalid connector 10 | /// 11 | Unknown = 0, 12 | 13 | /// 14 | /// VGA connector 15 | /// 16 | VGA, 17 | 18 | /// 19 | /// Composite connector (TV) 20 | /// 21 | TV, 22 | 23 | /// 24 | /// DVI connector 25 | /// 26 | DVI, 27 | 28 | /// 29 | /// HDMI connector 30 | /// 31 | HDMI, 32 | 33 | /// 34 | /// Display Port connector 35 | /// 36 | DisplayPort 37 | } 38 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/MonitorCapabilitiesType.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible values for the monitor capabilities type 5 | /// 6 | public enum MonitorCapabilitiesType : uint 7 | { 8 | /// 9 | /// The Vendor Specific Data Block 10 | /// 11 | VSDB = 0x1000, 12 | 13 | /// 14 | /// The Video Capability Data Block 15 | /// 16 | VCDB = 0x1001 17 | } 18 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/Rotate.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Possible rotate modes 5 | /// 6 | public enum Rotate : uint 7 | { 8 | /// 9 | /// No rotation 10 | /// 11 | Degree0 = 0, 12 | 13 | /// 14 | /// 90 degree rotation 15 | /// 16 | Degree90 = 1, 17 | 18 | /// 19 | /// 180 degree rotation 20 | /// 21 | Degree180 = 2, 22 | 23 | /// 24 | /// 270 degree rotation 25 | /// 26 | Degree270 = 3, 27 | 28 | /// 29 | /// This value is ignored 30 | /// 31 | Ignored = 4 32 | } 33 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/ScanOutCompositionParameter.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Holds a list of possible scan out composition configurable parameters 5 | /// 6 | public enum ScanOutCompositionParameter : uint 7 | { 8 | /// 9 | /// Warping re-sampling method parameter 10 | /// 11 | WarpingReSamplingMethod = 0 12 | } 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/SpanningOrientation.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Display spanning for Windows XP 5 | /// 6 | public enum SpanningOrientation 7 | { 8 | /// 9 | /// No spanning 10 | /// 11 | None = 0, 12 | 13 | /// 14 | /// Horizontal spanning 15 | /// 16 | Horizontal = 1, 17 | 18 | /// 19 | /// Vertical spanning 20 | /// 21 | Vertical = 2 22 | } 23 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/StaticMetadataDescriptorId.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible values for the type of the Static Metadata Descriptor block structure 5 | /// 6 | public enum StaticMetadataDescriptorId : uint 7 | { 8 | /// 9 | /// Type 1 Static Metadata Descriptor block structure 10 | /// 11 | StaticMetadataType1 = 0 12 | } 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/Structures/PrivateDisplayHUEInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using NvAPIWrapper.Native.Attributes; 3 | using NvAPIWrapper.Native.General.Structures; 4 | using NvAPIWrapper.Native.Interfaces; 5 | 6 | namespace NvAPIWrapper.Native.Display.Structures 7 | { 8 | /// 9 | /// Holds the current and the default HUE information 10 | /// 11 | [StructLayout(LayoutKind.Sequential, Pack = 8)] 12 | [StructureVersion(1)] 13 | public struct PrivateDisplayHUEInfo : IInitializable 14 | { 15 | internal StructureVersion _Version; 16 | internal int _CurrentAngle; 17 | internal int _DefaultAngle; 18 | 19 | /// 20 | /// Gets or sets the current HUE offset angle [0-359] 21 | /// 22 | public int CurrentAngle 23 | { 24 | get => _CurrentAngle; 25 | } 26 | 27 | /// 28 | /// Gets or sets the default HUE offset angle [0-359] 29 | /// 30 | public int DefaultAngle 31 | { 32 | get => _DefaultAngle; 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/Structures/ScanOutIntensityStateV1.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using NvAPIWrapper.Native.Attributes; 3 | using NvAPIWrapper.Native.General.Structures; 4 | using NvAPIWrapper.Native.Interfaces; 5 | 6 | namespace NvAPIWrapper.Native.Display.Structures 7 | { 8 | /// 9 | /// Contains information regarding the scan-out intensity state 10 | /// 11 | [StructLayout(LayoutKind.Sequential, Pack = 8)] 12 | [StructureVersion(1)] 13 | public struct ScanOutIntensityStateV1 : IInitializable 14 | { 15 | internal StructureVersion _Version; 16 | internal uint _IsEnabled; 17 | 18 | /// 19 | /// Gets a boolean value indicating if the scan out intensity is enabled or not 20 | /// 21 | public bool IsEnabled 22 | { 23 | get => _IsEnabled > 0; 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/Structures/ScanOutWarpingStateV1.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using NvAPIWrapper.Native.Attributes; 3 | using NvAPIWrapper.Native.General.Structures; 4 | using NvAPIWrapper.Native.Interfaces; 5 | 6 | namespace NvAPIWrapper.Native.Display.Structures 7 | { 8 | /// 9 | /// Contains information regarding the scan-out warping state 10 | /// 11 | [StructLayout(LayoutKind.Sequential, Pack = 8)] 12 | [StructureVersion(1)] 13 | public struct ScanOutWarpingStateV1 : IInitializable 14 | { 15 | internal StructureVersion _Version; 16 | internal uint _IsEnabled; 17 | 18 | /// 19 | /// Gets a boolean value indicating if the scan out warping is enabled or not 20 | /// 21 | public bool IsEnabled 22 | { 23 | get => _IsEnabled > 0; 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/TargetViewMode.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Display view modes 5 | /// 6 | public enum TargetViewMode 7 | { 8 | /// 9 | /// Standard view mode 10 | /// 11 | Standard = 0, 12 | 13 | /// 14 | /// Cloned view mode 15 | /// 16 | Clone = 1, 17 | 18 | /// 19 | /// Horizontal span view mode 20 | /// 21 | HorizontalSpan = 2, 22 | 23 | /// 24 | /// Vertical span view mode 25 | /// 26 | VerticalSpan = 3, 27 | 28 | /// 29 | /// Dual view mode 30 | /// 31 | DualView = 4, 32 | 33 | /// 34 | /// Multi view mode 35 | /// 36 | MultiView = 5 37 | } 38 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/TimingHorizontalSyncPolarity.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Horizontal synchronized polarity modes 5 | /// 6 | public enum TimingHorizontalSyncPolarity : byte 7 | { 8 | /// 9 | /// Positive horizontal synchronized polarity 10 | /// 11 | Positive = 0, 12 | 13 | /// 14 | /// Negative horizontal synchronized polarity 15 | /// 16 | Negative = 1, 17 | 18 | /// 19 | /// Default horizontal synchronized polarity 20 | /// 21 | Default = Negative 22 | } 23 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/TimingScanMode.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Timing scan modes 5 | /// 6 | public enum TimingScanMode : ushort 7 | { 8 | /// 9 | /// Progressive scan mode 10 | /// 11 | Progressive = 0, 12 | 13 | /// 14 | /// Interlaced scan mode 15 | /// 16 | Interlaced = 1, 17 | 18 | /// 19 | /// Interlaced scan mode with extra vertical blank 20 | /// 21 | InterlacedWithExtraVerticalBlank = 1, 22 | 23 | /// 24 | /// Interlaced scan mode without extra vertical blank 25 | /// 26 | InterlacedWithNoExtraVerticalBlank = 2 27 | } 28 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/TimingVerticalSyncPolarity.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Vertical synchronized polarity modes 5 | /// 6 | public enum TimingVerticalSyncPolarity : byte 7 | { 8 | /// 9 | /// Positive vertical synchronized polarity 10 | /// 11 | Positive = 0, 12 | 13 | /// 14 | /// Negative vertical synchronized polarity 15 | /// 16 | Negative = 1, 17 | 18 | /// 19 | /// Default vertical synchronized polarity 20 | /// 21 | Default = Positive 22 | } 23 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/WarpingVerticeFormat.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Holds a list of possible warping vertex formats 5 | /// 6 | public enum WarpingVerticeFormat : uint 7 | { 8 | /// 9 | /// XYUVRQ Triangle Strip vertex format 10 | /// 11 | TriangleStripXYUVRQ = 0, 12 | 13 | /// 14 | /// XYUVRQ Triangles format 15 | /// 16 | TrianglesXYUVRQ = 1 17 | } 18 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Exceptions/NVIDIAApiException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using NvAPIWrapper.Native.General; 3 | 4 | namespace NvAPIWrapper.Native.Exceptions 5 | { 6 | /// 7 | /// Represents errors that raised by NVIDIA Api 8 | /// 9 | public class NVIDIAApiException : Exception 10 | { 11 | internal NVIDIAApiException(Status status) 12 | { 13 | Status = status; 14 | } 15 | 16 | /// 17 | public override string Message 18 | { 19 | get => GeneralApi.GetErrorMessage(Status) ?? Status.ToString(); 20 | } 21 | 22 | /// 23 | /// Gets NVIDIA Api exception status code 24 | /// 25 | public Status Status { get; } 26 | } 27 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Exceptions/NVIDIANotSupportedException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NvAPIWrapper.Native.Exceptions 4 | { 5 | /// 6 | /// Represents errors that raised by NvAPIWrapper 7 | /// 8 | public class NVIDIANotSupportedException : NotSupportedException 9 | { 10 | internal NVIDIANotSupportedException(string message) : base(message) 11 | { 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/ClockLockMode.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.GPU 2 | { 3 | /// 4 | /// Holds the possible clock lock modes 5 | /// 6 | public enum ClockLockMode : uint 7 | { 8 | /// 9 | /// No clock lock 10 | /// 11 | None = 0, 12 | 13 | /// 14 | /// Manual clock lock 15 | /// 16 | Manual = 3 17 | } 18 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/ClockType.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.GPU 2 | { 3 | /// 4 | /// Clock types to request 5 | /// 6 | public enum ClockType : uint 7 | { 8 | /// 9 | /// Current clock frequencies 10 | /// 11 | CurrentClock = 0, 12 | 13 | /// 14 | /// Base clock frequencies 15 | /// 16 | BaseClock = 1, 17 | 18 | /// 19 | /// Boost clock frequencies 20 | /// 21 | BoostClock = 2 22 | } 23 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/ConnectedIdsFlag.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NvAPIWrapper.Native.GPU 4 | { 5 | /// 6 | /// Flags used for retrieving a list of display identifications 7 | /// 8 | [Flags] 9 | public enum ConnectedIdsFlag : uint 10 | { 11 | /// 12 | /// No specific flag 13 | /// 14 | None = 0, 15 | 16 | /// 17 | /// Get un-cached connected devices 18 | /// 19 | UnCached = 1, 20 | 21 | /// 22 | /// Get devices such that those can be selected in an SLI configuration 23 | /// 24 | SLI = 2, 25 | 26 | /// 27 | /// Get devices such that to reflect the Lid State 28 | /// 29 | LidState = 4, 30 | 31 | /// 32 | /// Get devices that includes the fake connected monitors 33 | /// 34 | Fake = 8, 35 | 36 | /// 37 | /// Excludes devices that are part of the multi stream topology 38 | /// 39 | ExcludeList = 16 40 | } 41 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/CoolerControlMode.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.GPU 2 | { 3 | /// 4 | /// Holds possible cooler control modes 5 | /// 6 | public enum CoolerControlMode : uint 7 | { 8 | /// 9 | /// No cooler control 10 | /// 11 | None = 0, 12 | 13 | /// 14 | /// Toggle based cooler control mode 15 | /// 16 | Toggle, 17 | 18 | /// 19 | /// Variable cooler control mode 20 | /// 21 | Variable 22 | } 23 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/CoolerController.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.GPU 2 | { 3 | /// 4 | /// Holds the list of possible cooler controllers 5 | /// 6 | public enum CoolerController : uint 7 | { 8 | /// 9 | /// No cooler controller 10 | /// 11 | None = 0, 12 | 13 | /// 14 | /// ADI cooler controller 15 | /// 16 | ADI, 17 | 18 | /// 19 | /// Internal cooler controller 20 | /// 21 | Internal 22 | } 23 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/CoolerPolicy.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NvAPIWrapper.Native.GPU 4 | { 5 | /// 6 | /// Holds possible cooler policies 7 | /// 8 | [Flags] 9 | public enum CoolerPolicy : uint 10 | { 11 | /// 12 | /// No cooler policy 13 | /// 14 | None = 0, 15 | 16 | /// 17 | /// Manual cooler control 18 | /// 19 | Manual = 0b1, 20 | 21 | /// 22 | /// Performance optimized cooler policy 23 | /// 24 | Performance = 0b10, 25 | 26 | /// 27 | /// Discrete temperature based cooler policy 28 | /// 29 | TemperatureDiscrete = 0b100, 30 | 31 | /// 32 | /// Continues temperature based cooler policy 33 | /// 34 | TemperatureContinuous = 0b1000, 35 | 36 | /// 37 | /// Silent cooler policy 38 | /// 39 | Silent = 0b10000 40 | } 41 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/CoolerTarget.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NvAPIWrapper.Native.GPU 4 | { 5 | /// 6 | /// Holds a list of possible cooler targets 7 | /// 8 | [Flags] 9 | public enum CoolerTarget : uint 10 | { 11 | /// 12 | /// No cooler target 13 | /// 14 | None = 0, 15 | 16 | /// 17 | /// Cooler targets GPU 18 | /// 19 | GPU = 0b1, 20 | 21 | /// 22 | /// Cooler targets memory 23 | /// 24 | Memory = 0b10, 25 | 26 | /// 27 | /// Cooler targets power supply 28 | /// 29 | PowerSupply = 0b100, 30 | 31 | /// 32 | /// Cooler targets GPU, memory and power supply 33 | /// 34 | All = GPU | Memory | PowerSupply 35 | } 36 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/CoolerType.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.GPU 2 | { 3 | /// 4 | /// Holds a list of possible cooler types 5 | /// 6 | public enum CoolerType : uint 7 | { 8 | /// 9 | /// No cooler type 10 | /// 11 | None, 12 | 13 | /// 14 | /// Air cooling 15 | /// 16 | Fan, 17 | 18 | /// 19 | /// Water cooling 20 | /// 21 | Water, 22 | 23 | /// 24 | /// Liquid nitrogen cooling 25 | /// 26 | LiquidNitrogen 27 | } 28 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/ECCConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.GPU 2 | { 3 | /// 4 | /// Holds a list of possible ECC memory configurations 5 | /// 6 | public enum ECCConfiguration : uint 7 | { 8 | /// 9 | /// ECC memory configurations are not supported 10 | /// 11 | NotSupported = 0, 12 | 13 | /// 14 | /// Changes require a POST to take effect 15 | /// 16 | Deferred, 17 | 18 | /// 19 | /// Changes can optionally be made to take effect immediately 20 | /// 21 | Immediate 22 | } 23 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/FanCoolersControlMode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NvAPIWrapper.Native.GPU 4 | { 5 | /// 6 | /// Holds possible fan cooler control modes 7 | /// 8 | [Flags] 9 | public enum FanCoolersControlMode : uint 10 | { 11 | /// 12 | /// Automatic fan cooler control 13 | /// 14 | Auto = 0, 15 | 16 | /// 17 | /// Manual fan cooler control 18 | /// 19 | Manual = 0b1, 20 | } 21 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/GPUBusType.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.GPU 2 | { 3 | /// 4 | /// Associated GPU bus types 5 | /// 6 | public enum GPUBusType 7 | { 8 | /// 9 | /// Bus type is undefined 10 | /// 11 | Undefined = 0, 12 | 13 | /// 14 | /// PCI Bus 15 | /// 16 | PCI = 1, 17 | 18 | /// 19 | /// AGP Bus 20 | /// 21 | AGP = 2, 22 | 23 | /// 24 | /// PCIExpress Bus 25 | /// 26 | PCIExpress = 3, 27 | 28 | /// 29 | /// FPCI Bus 30 | /// 31 | FPCI = 4, 32 | 33 | /// 34 | /// AXI Bus 35 | /// 36 | AXI = 5 37 | } 38 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/GPUFoundry.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics.CodeAnalysis; 2 | 3 | namespace NvAPIWrapper.Native.GPU 4 | { 5 | /// 6 | /// Holds a list of known GPU foundries 7 | /// 8 | [SuppressMessage("ReSharper", "IdentifierTypo")] 9 | public enum GPUFoundry : uint 10 | { 11 | /// 12 | /// Unknown foundry 13 | /// 14 | Unknown, 15 | 16 | /// 17 | /// Taiwan Semiconductor Manufacturing Company Limited 18 | /// 19 | TSMC, 20 | 21 | /// 22 | /// United Microelectronics 23 | /// 24 | UMC, 25 | 26 | /// 27 | /// International Business Machines Corporation 28 | /// 29 | IBM, 30 | 31 | /// 32 | /// Semiconductor Manufacturing International Corporation 33 | /// 34 | SMIC, 35 | 36 | /// 37 | /// Chartered Semiconductor Manufacturing 38 | /// 39 | CSM, 40 | 41 | /// 42 | /// Toshiba Corporation 43 | /// 44 | Toshiba 45 | } 46 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/GPUType.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.GPU 2 | { 3 | /// 4 | /// Possible GPU types 5 | /// 6 | public enum GPUType 7 | { 8 | /// 9 | /// Unknown GPU type 10 | /// 11 | Unknown = 0, 12 | 13 | /// 14 | /// Integrated GPU 15 | /// 16 | Integrated = 1, 17 | 18 | /// 19 | /// Discrete GPU 20 | /// 21 | Discrete = 2 22 | } 23 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/GetPerformanceStatesInfoFlags.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NvAPIWrapper.Native.GPU 4 | { 5 | /// 6 | /// Contains the flags used by the GPUApi.GetPerformanceStatesInfo() function 7 | /// 8 | [Flags] 9 | public enum GetPerformanceStatesInfoFlags 10 | { 11 | /// 12 | /// Current performance states settings 13 | /// 14 | Current = 0, 15 | 16 | /// 17 | /// Default performance states settings 18 | /// 19 | Default = 1, 20 | 21 | /// 22 | /// Maximum range of performance states values 23 | /// 24 | Maximum = 2, 25 | 26 | /// 27 | /// Minimum range of performance states values 28 | /// 29 | Minimum = 4 30 | } 31 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/I2CSpeed.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.GPU 2 | { 3 | /// 4 | /// Contains possible I2C bus speed values in kHz 5 | /// 6 | public enum I2CSpeed : uint 7 | { 8 | /// 9 | /// Current / Default frequency setting 10 | /// 11 | Default, 12 | 13 | /// 14 | /// 3kHz 15 | /// 16 | I2C3KHz, 17 | 18 | /// 19 | /// 10kHz 20 | /// 21 | I2C10KHz, 22 | 23 | /// 24 | /// 33kHz 25 | /// 26 | I2C33KHz, 27 | 28 | /// 29 | /// 100kHz 30 | /// 31 | I2C100KHz, 32 | 33 | /// 34 | /// 200kHz 35 | /// 36 | I2C200KHz, 37 | 38 | /// 39 | /// 400kHz 40 | /// 41 | I2C400KHz 42 | } 43 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/IlluminationAttribute.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.GPU 2 | { 3 | /// 4 | /// Contains a list of valid illumination attributes 5 | /// 6 | public enum IlluminationAttribute : uint 7 | { 8 | /// 9 | /// Logo brightness control 10 | /// 11 | LogoBrightness = 0, 12 | 13 | /// 14 | /// SLI bridge brightness control 15 | /// 16 | SLIBrightness 17 | } 18 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/IlluminationDeviceType.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.GPU 2 | { 3 | /// 4 | /// Contains a list of valid illumination zone device types 5 | /// 6 | public enum IlluminationDeviceType : uint 7 | { 8 | /// 9 | /// Invalid device type 10 | /// 11 | Invalid = 0, 12 | 13 | /// 14 | /// MCUV10 device 15 | /// 16 | MCUV10 17 | } 18 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/IlluminationPiecewiseLinearCycleType.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.GPU 2 | { 3 | /// 4 | /// Contains a list of valid cycle types for the piecewise linear control mode 5 | /// 6 | public enum IlluminationPiecewiseLinearCycleType : uint 7 | { 8 | /// 9 | /// Half half cycle mode 10 | /// 11 | HalfHalf = 0, 12 | 13 | /// 14 | /// Full half cycle mode 15 | /// 16 | FullHalf, 17 | 18 | /// 19 | /// Full repeat cycle mode 20 | /// 21 | FullRepeat, 22 | 23 | /// 24 | /// Invalid cycle mode 25 | /// 26 | Invalid = 0xFF 27 | } 28 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/IlluminationZoneControlMode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NvAPIWrapper.Native.GPU 4 | { 5 | /// 6 | /// Contains a list of available illumination zone control modes 7 | /// 8 | [Flags] 9 | public enum IlluminationZoneControlMode : uint 10 | { 11 | /// 12 | /// manual RGB control 13 | /// 14 | ManualRGB = 0, 15 | 16 | /// 17 | /// Piecewise linear RGB control 18 | /// 19 | PiecewiseLinearRGB, 20 | 21 | /// 22 | /// Invalid control mode 23 | /// 24 | Invalid = 0xFF 25 | } 26 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/IlluminationZoneControlValuesType.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.GPU 2 | { 3 | /// 4 | /// Contains a list of valid zone control value types to set or to retrieve 5 | /// 6 | public enum IlluminationZoneControlValuesType 7 | { 8 | /// 9 | /// Currently active values 10 | /// 11 | CurrentlyActive = 0, 12 | 13 | /// 14 | /// Default values 15 | /// 16 | Default = 1 17 | } 18 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/IlluminationZoneLocation.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.GPU 2 | { 3 | /// 4 | /// Contains a list of possible illumination zone locations 5 | /// 6 | public enum IlluminationZoneLocation : uint 7 | { 8 | /// 9 | /// Located on the top of GPU 10 | /// 11 | GPUTop = 0x00, 12 | 13 | /// 14 | /// Located on the top of SLI bridge 15 | /// 16 | SLITop = 0x20, 17 | 18 | /// 19 | /// Invalid zone location 20 | /// 21 | Invalid = 0xFFFFFFFF 22 | } 23 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/IlluminationZoneType.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.GPU 2 | { 3 | /// 4 | /// Contains a list of valid illumination zone types 5 | /// 6 | public enum IlluminationZoneType : uint 7 | { 8 | /// 9 | /// Invalid zone type 10 | /// 11 | Invalid = 0, 12 | 13 | /// 14 | /// RGB zone 15 | /// 16 | RGB, 17 | 18 | /// 19 | /// Fixed color zone 20 | /// 21 | FixedColor 22 | } 23 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/OutputType.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.GPU 2 | { 3 | /// 4 | /// Connected output device types 5 | /// 6 | public enum OutputType : uint 7 | { 8 | /// 9 | /// Unknown display device 10 | /// 11 | Unknown = 0, 12 | 13 | /// 14 | /// CRT display device 15 | /// 16 | CRT = 1, 17 | 18 | /// 19 | /// Digital Flat Panel display device 20 | /// 21 | DFP = 2, 22 | 23 | /// 24 | /// TV display device 25 | /// 26 | TV = 3 27 | } 28 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/PCIeGeneration.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.GPU 2 | { 3 | /// 4 | /// Holds a list of known PCI-e generations and versions 5 | /// 6 | public enum PCIeGeneration : uint 7 | { 8 | /// 9 | /// PCI-e 1.0 10 | /// 11 | PCIe1 = 0, 12 | 13 | /// 14 | /// PCI-e 1.1 15 | /// 16 | PCIe1Minor1, 17 | 18 | /// 19 | /// PCI-e 2.0 20 | /// 21 | PCIe2, 22 | 23 | /// 24 | /// PCI-e 3.0 25 | /// 26 | PCIe3 27 | } 28 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/PerformanceLimit.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NvAPIWrapper.Native.GPU 4 | { 5 | /// 6 | /// Holds a list of known performance limitations 7 | /// 8 | [Flags] 9 | public enum PerformanceLimit : uint 10 | { 11 | /// 12 | /// No performance limitation 13 | /// 14 | None = 0, 15 | 16 | /// 17 | /// Limited by power usage 18 | /// 19 | PowerLimit = 0b1, 20 | 21 | /// 22 | /// Limited by temperature 23 | /// 24 | TemperatureLimit = 0b10, 25 | 26 | /// 27 | /// Limited by voltage 28 | /// 29 | VoltageLimit = 0b100, 30 | 31 | /// 32 | /// Unknown limitation 33 | /// 34 | Unknown8 = 0b1000, 35 | 36 | /// 37 | /// Limited due to no load 38 | /// 39 | NoLoadLimit = 0b10000 40 | } 41 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/PerformanceStates20ClockType.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.GPU 2 | { 3 | /// 4 | /// Contains valid clock frequency types 5 | /// 6 | public enum PerformanceStates20ClockType 7 | { 8 | /// 9 | /// Single frequency clock 10 | /// 11 | Single = 0, 12 | 13 | /// 14 | /// Variable frequency clock 15 | /// 16 | Range 17 | } 18 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/PerformanceVoltageDomain.cs: -------------------------------------------------------------------------------- 1 | using NvAPIWrapper.Native.GPU.Structures; 2 | 3 | namespace NvAPIWrapper.Native.GPU 4 | { 5 | /// 6 | /// Contains the list of possible voltage domains 7 | /// 8 | public enum PerformanceVoltageDomain : uint 9 | { 10 | /// 11 | /// GPU Core 12 | /// 13 | Core = 0, 14 | 15 | /// 16 | /// Undefined voltage domain 17 | /// 18 | Undefined = PerformanceStatesInfoV2.MaxPerformanceStateVoltages 19 | } 20 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/PowerTopologyDomain.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.GPU 2 | { 3 | /// 4 | /// Holds a list of known power topology domain 5 | /// 6 | public enum PowerTopologyDomain : uint 7 | { 8 | /// 9 | /// The GPU 10 | /// 11 | GPU = 0, 12 | 13 | /// 14 | /// The GPU board 15 | /// 16 | Board 17 | } 18 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/PublicClockDomain.cs: -------------------------------------------------------------------------------- 1 | using NvAPIWrapper.Native.GPU.Structures; 2 | 3 | namespace NvAPIWrapper.Native.GPU 4 | { 5 | /// 6 | /// Contains the list of clocks available to public 7 | /// 8 | public enum PublicClockDomain 9 | { 10 | /// 11 | /// Undefined 12 | /// 13 | Undefined = ClockFrequenciesV1.MaxClocksPerGPU, 14 | 15 | /// 16 | /// 3D graphics clock 17 | /// 18 | Graphics = 0, 19 | 20 | /// 21 | /// Memory clock 22 | /// 23 | Memory = 4, 24 | 25 | /// 26 | /// Processor clock 27 | /// 28 | Processor = 7, 29 | 30 | /// 31 | /// Video decoding clock 32 | /// 33 | Video = 8 34 | } 35 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/Structures/ClockDomainInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using NvAPIWrapper.Native.Helpers; 3 | 4 | namespace NvAPIWrapper.Native.GPU.Structures 5 | { 6 | /// 7 | /// Holds information about the clock frequency of an specific clock domain 8 | /// 9 | [StructLayout(LayoutKind.Sequential, Pack = 8)] 10 | public struct ClockDomainInfo 11 | { 12 | internal readonly uint _IsPresent; 13 | internal readonly uint _Frequency; 14 | 15 | /// 16 | /// Gets a boolean value that indicates if this clock domain is present on this GPU and with the requested clock type. 17 | /// 18 | public bool IsPresent 19 | { 20 | get => _IsPresent.GetBit(0); 21 | } 22 | 23 | /// 24 | /// Gets the clock frequency in kHz 25 | /// 26 | public uint Frequency 27 | { 28 | get => _Frequency; 29 | } 30 | 31 | /// 32 | public override string ToString() 33 | { 34 | return IsPresent ? $"{_Frequency:N0} kHz" : "N/A"; 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/Structures/ECCConfigurationInfoV1.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using NvAPIWrapper.Native.Attributes; 3 | using NvAPIWrapper.Native.General.Structures; 4 | using NvAPIWrapper.Native.Helpers; 5 | using NvAPIWrapper.Native.Interfaces; 6 | 7 | namespace NvAPIWrapper.Native.GPU.Structures 8 | { 9 | /// 10 | /// Contains information about the ECC memory configurations 11 | /// 12 | [StructLayout(LayoutKind.Sequential, Pack = 8)] 13 | [StructureVersion(1)] 14 | public struct ECCConfigurationInfoV1 : IInitializable 15 | { 16 | internal StructureVersion _Version; 17 | internal uint _Flags; 18 | 19 | /// 20 | /// Gets a boolean value indicating if the ECC memory is enabled 21 | /// 22 | public bool IsEnabled 23 | { 24 | get => _Flags.GetBit(0); 25 | } 26 | 27 | /// 28 | /// Gets a boolean value indicating if the ECC memory is enabled by default 29 | /// 30 | public bool IsEnabledByDefault 31 | { 32 | get => _Flags.GetBit(1); 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/Structures/IlluminationZoneControlDataFixedColorParameters.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | namespace NvAPIWrapper.Native.GPU.Structures 4 | { 5 | /// 6 | /// Holds information regarding a fixed color 7 | /// 8 | [StructLayout(LayoutKind.Sequential, Pack = 8)] 9 | public struct IlluminationZoneControlDataFixedColorParameters 10 | { 11 | internal byte _BrightnessInPercentage; 12 | 13 | /// 14 | /// Creates a new instance of . 15 | /// 16 | /// The brightness percentage value of the zone. 17 | public IlluminationZoneControlDataFixedColorParameters(byte brightnessInPercentage) 18 | { 19 | _BrightnessInPercentage = brightnessInPercentage; 20 | } 21 | 22 | /// 23 | /// Gets the brightness percentage value of the zone. 24 | /// 25 | public byte BrightnessInPercentage 26 | { 27 | get => _BrightnessInPercentage; 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/Structures/IlluminationZoneControlDataManualFixedColor.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using NvAPIWrapper.Native.Interfaces; 3 | 4 | namespace NvAPIWrapper.Native.GPU.Structures 5 | { 6 | /// 7 | /// Holds information regarding a manual fixed color control method 8 | /// 9 | [StructLayout(LayoutKind.Sequential, Pack = 8)] 10 | public struct IlluminationZoneControlDataManualFixedColor : IInitializable 11 | { 12 | internal IlluminationZoneControlDataFixedColorParameters _Parameters; 13 | 14 | /// 15 | /// Creates a new instance of . 16 | /// 17 | /// The fixed color parameters. 18 | public IlluminationZoneControlDataManualFixedColor(IlluminationZoneControlDataFixedColorParameters parameters) 19 | { 20 | _Parameters = parameters; 21 | } 22 | 23 | /// 24 | /// Gets the fixed color parameters 25 | /// 26 | internal IlluminationZoneControlDataFixedColorParameters Parameters 27 | { 28 | get => _Parameters; 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/Structures/IlluminationZoneControlDataManualRGB.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using NvAPIWrapper.Native.Interfaces; 3 | 4 | namespace NvAPIWrapper.Native.GPU.Structures 5 | { 6 | /// 7 | /// Holds information regarding a RGB control method 8 | /// 9 | [StructLayout(LayoutKind.Sequential, Pack = 8)] 10 | public struct IlluminationZoneControlDataManualRGB : IInitializable 11 | { 12 | internal IlluminationZoneControlDataManualRGBParameters _Parameters; 13 | 14 | /// 15 | /// Creates a new instance of . 16 | /// 17 | /// The RGB parameters. 18 | public IlluminationZoneControlDataManualRGB(IlluminationZoneControlDataManualRGBParameters parameters) 19 | { 20 | _Parameters = parameters; 21 | } 22 | 23 | /// 24 | /// Gets the RGB parameters 25 | /// 26 | public IlluminationZoneControlDataManualRGBParameters Parameters 27 | { 28 | get => _Parameters; 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/Structures/PrivateActiveApplicationV2.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using NvAPIWrapper.Native.Attributes; 3 | using NvAPIWrapper.Native.General.Structures; 4 | using NvAPIWrapper.Native.Interfaces; 5 | 6 | namespace NvAPIWrapper.Native.GPU.Structures 7 | { 8 | [StructureVersion(2)] 9 | [StructLayout(LayoutKind.Sequential)] 10 | public struct PrivateActiveApplicationV2 : IInitializable 11 | { 12 | internal const int MaximumNumberOfApplications = 128; 13 | 14 | internal StructureVersion _Version; 15 | internal uint _ProcessId; 16 | internal LongString _ProcessName; 17 | 18 | public int ProcessId 19 | { 20 | get => (int) _ProcessId; 21 | } 22 | 23 | public string ProcessName 24 | { 25 | get => _ProcessName.Value; 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/Structures/PrivateArchitectInfoV2.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using NvAPIWrapper.Native.Attributes; 3 | using NvAPIWrapper.Native.General.Structures; 4 | using NvAPIWrapper.Native.Interfaces; 5 | 6 | namespace NvAPIWrapper.Native.GPU.Structures 7 | { 8 | /// 9 | /// Contains information regarding a GPU architecture 10 | /// 11 | [StructLayout(LayoutKind.Sequential)] 12 | [StructureVersion(2)] 13 | public struct PrivateArchitectInfoV2 : IInitializable 14 | { 15 | internal StructureVersion _Version; 16 | internal uint _Unknown1; 17 | internal uint _Unknown2; 18 | internal uint _Revision; 19 | 20 | /// 21 | /// Gets the GPU revision 22 | /// 23 | public uint Revision 24 | { 25 | get => _Revision; 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/SystemType.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.GPU 2 | { 3 | /// 4 | /// GPU systems 5 | /// 6 | public enum SystemType 7 | { 8 | /// 9 | /// Unknown type 10 | /// 11 | Unknown = 0, 12 | 13 | /// 14 | /// Laptop GPU 15 | /// 16 | Laptop = 1, 17 | 18 | /// 19 | /// Desktop GPU 20 | /// 21 | Desktop = 2 22 | } 23 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/UtilizationDomain.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.GPU 2 | { 3 | /// 4 | /// Valid utilization domain 5 | /// 6 | public enum UtilizationDomain 7 | { 8 | /// 9 | /// GPU utilization domain 10 | /// 11 | GPU, 12 | 13 | /// 14 | /// Frame buffer utilization domain 15 | /// 16 | FrameBuffer, 17 | 18 | /// 19 | /// Video engine utilization domain 20 | /// 21 | VideoEngine, 22 | 23 | /// 24 | /// Bus interface utilization domain 25 | /// 26 | BusInterface 27 | } 28 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/General/ChipsetInfoFlag.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NvAPIWrapper.Native.General 4 | { 5 | /// 6 | /// Chipset information flags - obsolete 7 | /// 8 | [Flags] 9 | public enum ChipsetInfoFlag 10 | { 11 | /// 12 | /// No flags 13 | /// 14 | None = 0, 15 | 16 | /// 17 | /// Hybrid chipset configuration 18 | /// 19 | Hybrid = 1 20 | } 21 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/General/Structures/GenericString.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using NvAPIWrapper.Native.Interfaces; 3 | 4 | namespace NvAPIWrapper.Native.General.Structures 5 | { 6 | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] 7 | internal struct GenericString : IInitializable 8 | { 9 | public const int GenericStringLength = 4096; 10 | 11 | [MarshalAs(UnmanagedType.ByValTStr, SizeConst = GenericStringLength)] 12 | private readonly string _Value; 13 | 14 | public string Value 15 | { 16 | get => _Value; 17 | } 18 | 19 | public GenericString(string value) 20 | { 21 | _Value = value ?? string.Empty; 22 | } 23 | 24 | public override string ToString() 25 | { 26 | return Value; 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/General/Structures/LongString.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using NvAPIWrapper.Native.Interfaces; 3 | 4 | namespace NvAPIWrapper.Native.General.Structures 5 | { 6 | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] 7 | internal struct LongString : IInitializable 8 | { 9 | public const int LongStringLength = 256; 10 | 11 | [MarshalAs(UnmanagedType.ByValTStr, SizeConst = LongStringLength)] 12 | private readonly string _Value; 13 | 14 | public string Value 15 | { 16 | get => _Value; 17 | } 18 | 19 | public LongString(string value) 20 | { 21 | _Value = value ?? string.Empty; 22 | } 23 | 24 | public override string ToString() 25 | { 26 | return Value; 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/General/Structures/ShortString.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using NvAPIWrapper.Native.Interfaces; 3 | 4 | namespace NvAPIWrapper.Native.General.Structures 5 | { 6 | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] 7 | internal struct ShortString : IInitializable 8 | { 9 | public const int ShortStringLength = 64; 10 | 11 | [MarshalAs(UnmanagedType.ByValTStr, SizeConst = ShortStringLength)] 12 | private readonly string _Value; 13 | 14 | public string Value 15 | { 16 | get => _Value; 17 | } 18 | 19 | public ShortString(string value) 20 | { 21 | _Value = value ?? string.Empty; 22 | } 23 | 24 | public override string ToString() 25 | { 26 | return Value; 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/General/Structures/StructureVersion.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | 4 | namespace NvAPIWrapper.Native.General.Structures 5 | { 6 | [StructLayout(LayoutKind.Sequential)] 7 | internal struct StructureVersion 8 | { 9 | private readonly uint _version; 10 | 11 | public int VersionNumber 12 | { 13 | get => (int) (_version >> 16); 14 | } 15 | 16 | public int StructureSize 17 | { 18 | get => (int) (_version & ~(0xFFFF << 16)); 19 | } 20 | 21 | public StructureVersion(int version, Type structureType) 22 | { 23 | _version = (uint) (Marshal.SizeOf(structureType) | (version << 16)); 24 | } 25 | 26 | public override string ToString() 27 | { 28 | return $"Structure Size: {StructureSize} Bytes, Version: {VersionNumber}"; 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/General/Structures/UnicodeString.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using NvAPIWrapper.Native.Interfaces; 3 | 4 | namespace NvAPIWrapper.Native.General.Structures 5 | { 6 | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] 7 | internal struct UnicodeString : IInitializable 8 | { 9 | public const int UnicodeStringLength = 2048; 10 | 11 | [MarshalAs(UnmanagedType.ByValTStr, SizeConst = UnicodeStringLength)] 12 | private readonly string _Value; 13 | 14 | public string Value 15 | { 16 | get => _Value; 17 | } 18 | 19 | public UnicodeString(string value) 20 | { 21 | _Value = value ?? string.Empty; 22 | } 23 | 24 | public override string ToString() 25 | { 26 | return Value; 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/Display/IDisplayColorData.cs: -------------------------------------------------------------------------------- 1 | using NvAPIWrapper.Native.Display.Structures; 2 | 3 | namespace NvAPIWrapper.Native.Interfaces.Display 4 | { 5 | /// 6 | /// Holds information regarding a display color space configurations 7 | /// 8 | public interface IDisplayColorData 9 | { 10 | /// 11 | /// Gets the first primary color space coordinate (e.g. Red for RGB) [(0.0, 0.0)-(1.0, 1.0)] 12 | /// 13 | ColorDataColorCoordinate FirstColorCoordinate { get; } 14 | 15 | /// 16 | /// Gets the second primary color space coordinate (e.g. Green for RGB) [(0.0, 0.0)-(1.0, 1.0)] 17 | /// 18 | ColorDataColorCoordinate SecondColorCoordinate { get; } 19 | 20 | /// 21 | /// Gets the third primary color space coordinate (e.g. Blue for RGB) [(0.0, 0.0)-(1.0, 1.0)] 22 | /// 23 | ColorDataColorCoordinate ThirdColorCoordinate { get; } 24 | 25 | /// 26 | /// Gets the white color space coordinate [(0.0, 0.0)-(1.0, 1.0)] 27 | /// 28 | ColorDataColorCoordinate WhiteColorCoordinate { get; } 29 | } 30 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/Display/IDisplayDVCInfo.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Interfaces.Display 2 | { 3 | /// 4 | /// Holds the Digital Vibrance Control information regarding the saturation level. 5 | /// 6 | public interface IDisplayDVCInfo 7 | { 8 | /// 9 | /// Gets the current saturation level 10 | /// 11 | int CurrentLevel { get; } 12 | 13 | /// 14 | /// Gets the default saturation level 15 | /// 16 | int DefaultLevel { get; } 17 | 18 | /// 19 | /// Gets the maximum valid saturation level 20 | /// 21 | int MaximumLevel { get; } 22 | 23 | /// 24 | /// Gets the minimum valid saturation level 25 | /// 26 | int MinimumLevel { get; } 27 | } 28 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/Display/IPathInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using NvAPIWrapper.Native.Display.Structures; 4 | 5 | namespace NvAPIWrapper.Native.Interfaces.Display 6 | { 7 | /// 8 | /// Interface for all PathInfo structures 9 | /// 10 | public interface IPathInfo : IDisposable 11 | { 12 | /// 13 | /// Identifies sourceId used by Windows CCD. This can be optionally set. 14 | /// 15 | uint SourceId { get; } 16 | 17 | /// 18 | /// Contains information about the source mode 19 | /// 20 | SourceModeInfo SourceModeInfo { get; } 21 | 22 | /// 23 | /// Contains information about path targets 24 | /// 25 | IEnumerable TargetsInfo { get; } 26 | } 27 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/Display/IPathTargetInfo.cs: -------------------------------------------------------------------------------- 1 | using NvAPIWrapper.Native.Display.Structures; 2 | 3 | namespace NvAPIWrapper.Native.Interfaces.Display 4 | { 5 | /// 6 | /// Interface for all PathTargetInfo structures 7 | /// 8 | public interface IPathTargetInfo 9 | { 10 | /// 11 | /// Contains extra information. NULL for Non-NVIDIA Display. 12 | /// 13 | PathAdvancedTargetInfo? Details { get; } 14 | 15 | /// 16 | /// Display identification 17 | /// 18 | uint DisplayId { get; } 19 | } 20 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/Display/IScanOutIntensityData.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display.Structures 2 | { 3 | /// 4 | /// Contains information regarding the scan-out intensity data 5 | /// 6 | public interface IScanOutIntensity { 7 | 8 | /// 9 | /// Gets the array of floating values building an intensity RGB texture 10 | /// 11 | float[] BlendingTexture { get; } 12 | 13 | /// 14 | /// Gets the height of the input texture 15 | /// 16 | uint Height { get; } 17 | 18 | 19 | /// 20 | /// Gets the width of the input texture 21 | /// 22 | uint Width { get; } 23 | } 24 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/GPU/IEDID.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Interfaces.GPU 2 | { 3 | /// 4 | /// Interface for all EDID structures 5 | /// 6 | public interface IEDID 7 | { 8 | /// 9 | /// Gets whole or a part of the EDID data 10 | /// 11 | byte[] Data { get; } 12 | } 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/GPU/IPerformanceState.cs: -------------------------------------------------------------------------------- 1 | using NvAPIWrapper.Native.GPU; 2 | 3 | namespace NvAPIWrapper.Native.Interfaces.GPU 4 | { 5 | /// 6 | /// Holds information regarding a performance state 7 | /// 8 | public interface IPerformanceState 9 | { 10 | /// 11 | /// Gets a boolean value indicating if this performance state is overclockable 12 | /// 13 | bool IsOverclockable { get; } 14 | 15 | /// 16 | /// Gets a boolean value indicating if this performance state is currently overclocked 17 | /// 18 | bool IsOverclocked { get; } 19 | 20 | /// 21 | /// Gets a boolean value indicating if this performance state is limited to use PCIE generation 1 or PCIE generation 2 22 | /// 23 | bool IsPCIELimited { get; } 24 | 25 | /// 26 | /// Gets the performance state identification 27 | /// 28 | PerformanceStateId StateId { get; } 29 | } 30 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/GPU/IPerformanceState20.cs: -------------------------------------------------------------------------------- 1 | using NvAPIWrapper.Native.GPU; 2 | 3 | namespace NvAPIWrapper.Native.Interfaces.GPU 4 | { 5 | /// 6 | /// Holds information regarding a performance state v2 7 | /// 8 | public interface IPerformanceState20 9 | { 10 | /// 11 | /// Gets a boolean value indicating if this performance state is editable 12 | /// 13 | bool IsEditable { get; } 14 | 15 | /// 16 | /// Gets the performance state identification 17 | /// 18 | PerformanceStateId StateId { get; } 19 | } 20 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/GPU/IPerformanceStates20ClockDependentSingleFrequency.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Interfaces.GPU 2 | { 3 | /// 4 | /// Holds information regarding the clock frequency of a fixed frequency clock domain 5 | /// 6 | public interface IPerformanceStates20ClockDependentSingleFrequency 7 | { 8 | /// 9 | /// Gets the clock frequency of a clock domain in kHz 10 | /// 11 | uint FrequencyInkHz { get; } 12 | } 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/GPU/IPerformanceStates20VoltageEntry.cs: -------------------------------------------------------------------------------- 1 | using NvAPIWrapper.Native.GPU; 2 | using NvAPIWrapper.Native.GPU.Structures; 3 | 4 | namespace NvAPIWrapper.Native.Interfaces.GPU 5 | { 6 | /// 7 | /// Holds information regarding the voltage of a voltage domain 8 | /// 9 | public interface IPerformanceStates20VoltageEntry 10 | { 11 | /// 12 | /// Gets the voltage domain identification 13 | /// 14 | PerformanceVoltageDomain DomainId { get; } 15 | 16 | /// 17 | /// Gets a boolean value indicating this voltage domain is editable 18 | /// 19 | bool IsEditable { get; } 20 | 21 | /// 22 | /// Gets the base voltage delta and the range of valid values for the delta value 23 | /// 24 | PerformanceStates20ParameterDelta ValueDeltaInMicroVolt { get; } 25 | 26 | /// 27 | /// Gets the current value of this voltage domain in uV 28 | /// 29 | uint ValueInMicroVolt { get; } 30 | } 31 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/GPU/IPerformanceStatesClock.cs: -------------------------------------------------------------------------------- 1 | using NvAPIWrapper.Native.GPU; 2 | 3 | namespace NvAPIWrapper.Native.Interfaces.GPU 4 | { 5 | /// 6 | /// Holds information regarding a clock domain of a performance state 7 | /// 8 | public interface IPerformanceStatesClock 9 | { 10 | /// 11 | /// Gets the clock domain identification 12 | /// 13 | PublicClockDomain DomainId { get; } 14 | 15 | /// 16 | /// Gets the clock frequency in kHz 17 | /// 18 | uint Frequency { get; } 19 | } 20 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/GPU/IPerformanceStatesVoltage.cs: -------------------------------------------------------------------------------- 1 | using NvAPIWrapper.Native.GPU; 2 | 3 | namespace NvAPIWrapper.Native.Interfaces.GPU 4 | { 5 | /// 6 | /// Holds information regarding a voltage domain of a performance state 7 | /// 8 | public interface IPerformanceStatesVoltage 9 | { 10 | /// 11 | /// Gets the voltage domain identification 12 | /// 13 | PerformanceVoltageDomain DomainId { get; } 14 | 15 | /// 16 | /// Gets the voltage in mV 17 | /// 18 | uint Value { get; } 19 | } 20 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/GPU/IThermalSensor.cs: -------------------------------------------------------------------------------- 1 | using NvAPIWrapper.Native.GPU; 2 | 3 | namespace NvAPIWrapper.Native.Interfaces.GPU 4 | { 5 | /// 6 | /// Provides information about a single thermal sensor 7 | /// 8 | public interface IThermalSensor 9 | { 10 | /// 11 | /// Internal, ADM1032, MAX6649... 12 | /// 13 | ThermalController Controller { get; } 14 | 15 | /// 16 | /// Current temperature value of the thermal sensor in degree Celsius 17 | /// 18 | int CurrentTemperature { get; } 19 | 20 | /// 21 | /// Maximum default temperature value of the thermal sensor in degree Celsius 22 | /// 23 | int DefaultMaximumTemperature { get; } 24 | 25 | /// 26 | /// Minimum default temperature value of the thermal sensor in degree Celsius 27 | /// 28 | int DefaultMinimumTemperature { get; } 29 | 30 | /// 31 | /// Thermal sensor targeted - GPU, memory, chipset, power supply, Visual Computing Device, etc 32 | /// 33 | ThermalSettingsTarget Target { get; } 34 | } 35 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/GPU/IThermalSettings.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Interfaces.GPU 2 | { 3 | /// 4 | /// Holds a list of thermal sensors 5 | /// 6 | public interface IThermalSettings 7 | { 8 | /// 9 | /// Gets a list of requested thermal sensor information 10 | /// 11 | IThermalSensor[] Sensors { get; } 12 | } 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/GPU/IUtilizationDomainInfo.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Interfaces.GPU 2 | { 3 | 4 | /// 5 | /// Holds information about a utilization domain 6 | /// 7 | public interface IUtilizationDomainInfo 8 | { 9 | /// 10 | /// Gets a boolean value that indicates if this utilization domain is present on this GPU. 11 | /// 12 | bool IsPresent { get; } 13 | 14 | /// 15 | /// Gets the percentage of time where the domain is considered busy in the last 1 second interval. 16 | /// 17 | uint Percentage { get; } 18 | } 19 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/GPU/IUtilizationStatus.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using NvAPIWrapper.Native.Interfaces.GPU; 3 | 4 | namespace NvAPIWrapper.Native.GPU.Structures 5 | { 6 | /// 7 | /// Holds information about the GPU utilization domains 8 | /// 9 | public interface IUtilizationStatus 10 | { 11 | 12 | /// 13 | /// Gets the Bus interface (BUS) utilization 14 | /// 15 | IUtilizationDomainInfo BusInterface { get; } 16 | /// 17 | /// Gets all valid utilization domains and information 18 | /// 19 | Dictionary Domains { get; } 20 | 21 | /// 22 | /// Gets the frame buffer (FB) utilization 23 | /// 24 | IUtilizationDomainInfo FrameBuffer { get; } 25 | 26 | /// 27 | /// Gets the graphic engine (GPU) utilization 28 | /// 29 | IUtilizationDomainInfo GPU { get; } 30 | 31 | 32 | /// 33 | /// Gets the Video engine (VID) utilization 34 | /// 35 | IUtilizationDomainInfo VideoEngine { get; } 36 | } 37 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/General/IChipsetInfo.cs: -------------------------------------------------------------------------------- 1 | using NvAPIWrapper.Native.General; 2 | 3 | namespace NvAPIWrapper.Native.Interfaces.General 4 | { 5 | /// 6 | /// Interface for all ChipsetInfo structures 7 | /// 8 | public interface IChipsetInfo 9 | { 10 | /// 11 | /// Chipset device name 12 | /// 13 | string ChipsetName { get; } 14 | 15 | /// 16 | /// Chipset device identification 17 | /// 18 | int DeviceId { get; } 19 | 20 | /// 21 | /// Chipset information flags - obsolete 22 | /// 23 | ChipsetInfoFlag Flags { get; } 24 | 25 | /// 26 | /// Chipset vendor identification 27 | /// 28 | int VendorId { get; } 29 | 30 | /// 31 | /// Chipset vendor name 32 | /// 33 | string VendorName { get; } 34 | } 35 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/IAllocatable.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NvAPIWrapper.Native.Interfaces 4 | { 5 | /// 6 | /// Marker interface for all types that should be allocated before passing to the managed code 7 | /// 8 | internal interface IAllocatable : IInitializable, IDisposable 9 | { 10 | void Allocate(); 11 | } 12 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/IHandle.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NvAPIWrapper.Native.Interfaces 4 | { 5 | /// 6 | /// Interface for all pointer based handles 7 | /// 8 | public interface IHandle 9 | { 10 | /// 11 | /// Returns true if the handle is null and not pointing to a valid location in the memory 12 | /// 13 | bool IsNull { get; } 14 | 15 | /// 16 | /// Gets the address of the handle in the memory 17 | /// 18 | IntPtr MemoryAddress { get; } 19 | } 20 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/IInitializable.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Interfaces 2 | { 3 | /// 4 | /// Marker interface for all types that should be filled with information before passing to un-managed code 5 | /// 6 | internal interface IInitializable 7 | { 8 | } 9 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Stereo/StereoActivationFlag.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Stereo 2 | { 3 | /// 4 | /// Holds a list of valid values for the stereo activation process 5 | /// 6 | public enum StereoActivationFlag 7 | { 8 | /// 9 | /// Immediate activation 10 | /// 11 | Immediate = 0, 12 | 13 | /// 14 | /// Delayed activation 15 | /// 16 | Delayed 17 | } 18 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Stereo/StereoActiveEye.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Stereo 2 | { 3 | /// 4 | /// Holds a list of valid values for back buffer mode 5 | /// 6 | public enum StereoActiveEye 7 | { 8 | /// 9 | /// No back buffer 10 | /// 11 | None = 0, 12 | 13 | /// 14 | /// Right eye back buffer mode 15 | /// 16 | RightEye = 1, 17 | 18 | /// 19 | /// Left eye back buffer mode 20 | /// 21 | LeftEye = 2, 22 | 23 | /// 24 | /// Mono back buffer mode 25 | /// 26 | Mono = 3 27 | } 28 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Stereo/StereoDriverMode.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Stereo 2 | { 3 | /// 4 | /// Holds a list of possible values for the driver stereo mode 5 | /// 6 | public enum StereoDriverMode 7 | { 8 | /// 9 | /// Automatic stereo mode 10 | /// 11 | Automatic = 0, 12 | 13 | /// 14 | /// Direct stereo mode 15 | /// 16 | Direct = 2 17 | } 18 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Stereo/StereoFrustumAdjustMode.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Stereo 2 | { 3 | /// 4 | /// Holds a list of valid frustum adjust modes 5 | /// 6 | public enum StereoFrustumAdjustMode 7 | { 8 | /// 9 | /// No frustum adjustment 10 | /// 11 | NoFrustumAdjust, 12 | 13 | /// 14 | /// Stretch frustum adjustment 15 | /// 16 | Stretch, 17 | 18 | /// 19 | /// Clear edges frustum adjustment 20 | /// 21 | ClearEdges 22 | } 23 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Stereo/StereoRegistryIdentification.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Stereo 2 | { 3 | /// 4 | /// Holds a list of valid identification for registry values 5 | /// 6 | public enum StereoRegistryIdentification 7 | { 8 | /// 9 | /// Convergence value identification 10 | /// 11 | Convergence, 12 | 13 | /// 14 | /// Frustum adjust mode value identification 15 | /// 16 | FrustumAdjustMode 17 | } 18 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Stereo/StereoRegistryProfileType.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Stereo 2 | { 3 | /// 4 | /// Holds a list of valid application configuration registry profiles 5 | /// 6 | public enum StereoRegistryProfileType 7 | { 8 | /// 9 | /// The default profile 10 | /// 11 | DefaultProfile, 12 | 13 | /// 14 | /// The DirectX 9 specific profile 15 | /// 16 | DirectX9Profile, 17 | 18 | /// 19 | /// The DirectX 10 specific profile 20 | /// 21 | DirectX10Profile 22 | } 23 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Stereo/StereoSurfaceCreateMode.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Stereo 2 | { 3 | /// 4 | /// Holds a list of valid values for the stereo surface creation mode 5 | /// 6 | public enum StereoSurfaceCreateMode 7 | { 8 | /// 9 | /// Automatic surface creation 10 | /// 11 | Auto = 0, 12 | 13 | /// 14 | /// Force stereo surface creation 15 | /// 16 | ForceStereo, 17 | 18 | /// 19 | /// Force mono surface creation 20 | /// 21 | ForceMono 22 | } 23 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Stereo/StereoSwapChainMode.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Stereo 2 | { 3 | /// 4 | /// Holds a list of valid flags for the swap chain mode 5 | /// 6 | public enum StereoSwapChainMode 7 | { 8 | /// 9 | /// Automatic 10 | /// 11 | Default = 0, 12 | 13 | /// 14 | /// Stereo 15 | /// 16 | Stereo, 17 | 18 | /// 19 | /// Mono 20 | /// 21 | Mono 22 | } 23 | } -------------------------------------------------------------------------------- /NvAPIWrapper/readme.txt: -------------------------------------------------------------------------------- 1 |  NvAPIWrapper Library 2 | ------------------------------------------------------------ 3 | NvAPIWrapper is a library released under the LGPLv3 license, 4 | allowing all .Net developers to access and use the NVAPI 5 | functionalities. 6 | 7 | For more information about this library, please check out 8 | our GitHub page: 9 | https://github.com/falahati/NvAPIWrapper 10 | 11 | 12 | 2017 Soroush Falahati (https://falahati.net) -------------------------------------------------------------------------------- /Shared/Common/InfoDto.cs: -------------------------------------------------------------------------------- 1 | namespace ColorControl.Shared.Common; 2 | 3 | public class InfoDto 4 | { 5 | public string DataPath { get; set; } 6 | public DateTime StartTime { get; set; } 7 | public string ApplicationTitle { get; set; } 8 | public string ApplicationTitleAdmin { get; set; } 9 | public string LegalCopyright { get; set; } 10 | public UpdateInfoDto UpdateInfoDto { get; set; } 11 | } -------------------------------------------------------------------------------- /Shared/Common/UpdateInfoDto.cs: -------------------------------------------------------------------------------- 1 | namespace ColorControl.Shared.Common; 2 | 3 | public class UpdateInfoDto 4 | { 5 | public bool UpdateAvailable { get; set; } 6 | public string NewVersionNumber { get; set; } 7 | public string HtmlUrl { get; set; } 8 | public string DownloadUrl { get; set; } 9 | } -------------------------------------------------------------------------------- /Shared/Contracts/AMD/AmdServiceConfig.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace ColorControl.Shared.Contracts.AMD; 3 | 4 | public class AmdServiceConfig 5 | { 6 | public string QuickAccessShortcut { get; set; } 7 | 8 | public AmdServiceConfig() 9 | { 10 | } 11 | 12 | public void Update(AmdServiceConfig config) 13 | { 14 | QuickAccessShortcut = config.QuickAccessShortcut; 15 | } 16 | } 17 | 18 | -------------------------------------------------------------------------------- /Shared/Contracts/Base/BaseDeviceDto.cs: -------------------------------------------------------------------------------- 1 | namespace ColorControl.Shared.Contracts.Base; 2 | 3 | public abstract class BaseDeviceDto 4 | { 5 | public string Name { get; set; } 6 | public string IpAddress { get; set; } 7 | public string MacAddress { get; set; } 8 | public bool IsCustom { get; set; } 9 | public string Token { get; set; } 10 | 11 | public bool IsDummy { get; set; } 12 | 13 | public bool PoweredOn { get; set; } 14 | 15 | public DateTimeOffset PoweredOffAt { get; set; } 16 | 17 | public bool IsConnected { get; set; } 18 | 19 | public bool IsSelected { get; set; } 20 | 21 | public override string ToString() 22 | { 23 | if (IpAddress != null) 24 | { 25 | return $"{Name} ({IpAddress})"; 26 | } 27 | 28 | return Name; 29 | } 30 | } 31 | 32 | -------------------------------------------------------------------------------- /Shared/Contracts/Delegates.cs: -------------------------------------------------------------------------------- 1 | namespace ColorControl.Shared.Contracts; 2 | 3 | public delegate string GetValueByKey(string key); 4 | -------------------------------------------------------------------------------- /Shared/Contracts/DpiScaling.cs: -------------------------------------------------------------------------------- 1 | namespace ColorControl.Shared.Contracts; 2 | 3 | public class DpiScaling 4 | { 5 | public bool ApplyScaling { get; set; } 6 | public uint Percentage { get; set; } 7 | 8 | public DpiScaling() 9 | { 10 | Percentage = 100; 11 | } 12 | 13 | public DpiScaling(DpiScaling dpiScaling) 14 | { 15 | ApplyScaling = dpiScaling.ApplyScaling; 16 | Percentage = dpiScaling.Percentage; 17 | } 18 | 19 | public override string ToString() 20 | { 21 | return $"{Percentage:0}%"; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Shared/Contracts/Game/GameApp.cs: -------------------------------------------------------------------------------- 1 | namespace ColorControl.Shared.Contracts.Game; 2 | 3 | public class GameApp 4 | { 5 | public string Path { get; set; } 6 | public string Filename { get; set; } 7 | public string FriendlyName { get; set; } 8 | } 9 | -------------------------------------------------------------------------------- /Shared/Contracts/Game/GameServiceConfig.cs: -------------------------------------------------------------------------------- 1 | namespace ColorControl.Shared.Contracts.Game; 2 | 3 | public class GameServiceConfig 4 | { 5 | public string QuickAccessShortcut { get; set; } 6 | public bool ApplyExternallyLaunched { get; set; } 7 | 8 | public GameServiceConfig() 9 | { 10 | } 11 | 12 | public void Update(GameServiceConfig config) 13 | { 14 | QuickAccessShortcut = config.QuickAccessShortcut; 15 | ApplyExternallyLaunched = config.ApplyExternallyLaunched; 16 | } 17 | } 18 | 19 | -------------------------------------------------------------------------------- /Shared/Contracts/InvokableActionDto.cs: -------------------------------------------------------------------------------- 1 | using ColorControl.Shared.Contracts.LG; 2 | 3 | namespace ColorControl.Shared.Contracts; 4 | 5 | public class InvokableActionDto where T : PresetBase 6 | { 7 | public string Name { get; set; } 8 | public Type EnumType { get; set; } 9 | public decimal MinValue { get; set; } 10 | public decimal MaxValue { get; set; } 11 | public string Category { get; set; } 12 | public string Title { get; set; } 13 | public int CurrentValue { get; set; } 14 | public int NumberOfValues { get; set; } 15 | public bool Advanced { get; set; } 16 | public T Preset { get; set; } 17 | public List ValueLabels { get; set; } 18 | public LgDeviceDto SelectedDevice { get; set; } 19 | } 20 | -------------------------------------------------------------------------------- /Shared/Contracts/LG/LgDeviceDto.cs: -------------------------------------------------------------------------------- 1 | using ColorControl.Shared.Contracts.Base; 2 | 3 | namespace ColorControl.Shared.Contracts.LG; 4 | 5 | public class LgDeviceDto : BaseDeviceDto 6 | { 7 | public LgDeviceOptions Options { get; set; } = new(); 8 | } 9 | 10 | -------------------------------------------------------------------------------- /Shared/Contracts/LG/LgDeviceOptions.cs: -------------------------------------------------------------------------------- 1 | namespace ColorControl.Shared.Contracts.LG; 2 | 3 | public class LgDeviceOptions 4 | { 5 | public bool PowerOnAfterStartup { get; set; } 6 | public bool PowerOnAfterResume { get; set; } 7 | public bool PowerOffOnShutdown { get; set; } 8 | public bool PowerOffOnStandby { get; set; } 9 | public bool PowerOffOnScreenSaver { get; set; } 10 | public int ScreenSaverMinimalDuration { get; set; } 11 | public bool TurnScreenOffOnScreenSaver { get; set; } 12 | public bool HandleManualScreenSaver { get; set; } 13 | public bool PowerOnAfterScreenSaver { get; set; } 14 | public bool TurnScreenOnAfterScreenSaver { get; set; } 15 | public bool PowerOnAfterManualPowerOff { get; set; } 16 | public bool PowerOnByWindows { get; set; } 17 | public bool PowerOffByWindows { get; set; } 18 | public bool PowerOnAfterSessionUnlock { get; set; } 19 | public bool PowerOffAfterSessionLock { get; set; } 20 | public bool TriggersEnabled { get; set; } 21 | public int HDMIPortNumber { get; set; } 22 | 23 | public bool UseSecureConnection { get; set; } = true; 24 | } 25 | 26 | -------------------------------------------------------------------------------- /Shared/Contracts/LG/LgPresets.cs: -------------------------------------------------------------------------------- 1 | namespace ColorControl.Shared.Contracts.LG; 2 | 3 | public static class LgPresets 4 | { 5 | public static readonly LgPreset InStartPreset = new("InStart", "com.webos.app.factorywin", ["0", "4", "1", "3"], new { id = "executeFactory", irKey = "inStart" }); 6 | public static readonly LgPreset EzAdjustPreset = new("EzAdjust", "com.webos.app.factorywin", ["0", "4", "1", "3"], new { id = "executeFactory", irKey = "ezAdjust" }); 7 | public static readonly LgPreset SoftwareUpdatePreset = new("Software Update", "com.webos.app.softwareupdate", null, new { mode = "user", flagUpdate = true }); 8 | } 9 | -------------------------------------------------------------------------------- /Shared/Contracts/LG/LgRcDto.cs: -------------------------------------------------------------------------------- 1 |  2 | using ColorControl.Shared.Contracts.RemoteControl; 3 | 4 | namespace ColorControl.Shared.Contracts.LG; 5 | 6 | public class LgRcDto : BaseRcDto 7 | { 8 | } 9 | -------------------------------------------------------------------------------- /Shared/Contracts/LG/LgServiceConfigDto.cs: -------------------------------------------------------------------------------- 1 | namespace ColorControl.Shared.Contracts.LG; 2 | 3 | public class LgServiceConfigDto 4 | { 5 | public bool PowerOnAfterStartup { get; set; } 6 | public int PowerOnDelayAfterResume { get; set; } 7 | public int PowerOnRetries { get; set; } 8 | public string PreferredMacAddress { get; set; } 9 | public string DeviceSearchKey { get; set; } 10 | public bool ShowRemoteControl { get; set; } 11 | public bool ShowAdvancedActions { get; set; } 12 | public string GameBarShortcut { get; set; } 13 | public int GameBarTop { get; set; } 14 | public int GameBarLeft { get; set; } 15 | public int ShutdownDelay { get; set; } 16 | public bool SetSelectedDeviceByPowerOn { get; set; } 17 | public string QuickAccessShortcut { get; set; } 18 | public int DefaultButtonDelay { get; set; } 19 | public int GameBarShowingTime { get; set; } 20 | } 21 | -------------------------------------------------------------------------------- /Shared/Contracts/ListViewSortState.cs: -------------------------------------------------------------------------------- 1 | namespace ColorControl.Shared.Contracts 2 | { 3 | public class ListViewSortState 4 | { 5 | public SortOrder SortOrder { get; set; } 6 | public int SortIndex { get; set; } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Shared/Contracts/ModuleDto.cs: -------------------------------------------------------------------------------- 1 | namespace ColorControl.Shared.Contracts; 2 | 3 | public class ModuleDto 4 | { 5 | public bool IsActive { get; set; } 6 | public string DisplayName { get; set; } 7 | public string Link { get; set; } 8 | public List Info { get; set; } 9 | 10 | public string GetIconClass() 11 | { 12 | if (DisplayName.Contains("NVIDIA")) 13 | { 14 | return "nvidia"; 15 | } 16 | if (DisplayName.Contains("AMD")) 17 | { 18 | return "gpu-card"; 19 | } 20 | if (DisplayName.Contains("LG") || DisplayName.Contains("Samsung")) 21 | { 22 | return "tv"; 23 | } 24 | if (DisplayName.Contains("Game")) 25 | { 26 | return "controller"; 27 | } 28 | 29 | return "plus-square-fill"; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Shared/Contracts/NVIDIA/NovideoSettings.cs: -------------------------------------------------------------------------------- 1 | namespace ColorControl.Shared.Contracts.NVIDIA; 2 | 3 | public class NovideoSettings 4 | { 5 | public bool ApplyClamp { get; set; } 6 | public NovideoColorSpace ColorSpace { get; set; } 7 | 8 | public NovideoSettings() 9 | { 10 | } 11 | 12 | public NovideoSettings(NovideoSettings settings) 13 | { 14 | settings ??= new NovideoSettings(); 15 | 16 | ApplyClamp = settings.ApplyClamp; 17 | ColorSpace = settings.ColorSpace; 18 | } 19 | 20 | public override string ToString() 21 | { 22 | return ApplyClamp ? $"Clamped at {ColorSpace}" : "Not clamped"; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Shared/Contracts/NVIDIA/NvColorEnhancementSettings.cs: -------------------------------------------------------------------------------- 1 | namespace ColorControl.Shared.Contracts.NVIDIA; 2 | 3 | public class NvColorEnhancementSettings 4 | { 5 | public int DigitalVibranceLevel { get; set; } = 50; 6 | public int HueAngle { get; set; } 7 | 8 | public NvColorEnhancementSettings() 9 | { 10 | } 11 | 12 | public NvColorEnhancementSettings(NvColorEnhancementSettings settings) 13 | { 14 | settings ??= new NvColorEnhancementSettings(); 15 | 16 | DigitalVibranceLevel = settings.DigitalVibranceLevel; 17 | HueAngle = settings.HueAngle; 18 | } 19 | 20 | public override string ToString() 21 | { 22 | return 23 | ((DigitalVibranceLevel != 50 ? $"Digital vibrance: {DigitalVibranceLevel}" : "") + 24 | (HueAngle != 0 ? $" Hue: {HueAngle}" : "")).Trim(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Shared/Contracts/NVIDIA/NvColorProfileSettings.cs: -------------------------------------------------------------------------------- 1 | namespace ColorControl.Shared.Contracts.NVIDIA 2 | { 3 | public class NvColorProfileSettings 4 | { 5 | public string ProfileName { get; set; } 6 | 7 | public NvColorProfileSettings() 8 | { 9 | } 10 | 11 | public NvColorProfileSettings(NvColorProfileSettings settings) 12 | { 13 | settings ??= new NvColorProfileSettings(); 14 | 15 | ProfileName = settings.ProfileName; 16 | } 17 | 18 | public override string ToString() 19 | { 20 | var value = string.Empty; 21 | 22 | return value; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Shared/Contracts/NVIDIA/NvEnums.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | 3 | namespace ColorControl.Shared.Contracts.NVIDIA; 4 | 5 | public enum NvDitherState 6 | { 7 | [Description("Auto")] 8 | Auto = 0, 9 | [Description("Enabled")] 10 | Enabled = 1, 11 | [Description("Disabled")] 12 | Disabled = 2 13 | } 14 | 15 | public enum NvDitherBits 16 | { 17 | [Description("6-bit")] 18 | Bits6 = 0, 19 | [Description("8-bit")] 20 | Bits8 = 1, 21 | [Description("10-bit")] 22 | Bits10 = 2 23 | } 24 | 25 | public enum NvDitherMode 26 | { 27 | [Description("Spatial Dynamic")] 28 | SpatialDynamic = 0, 29 | [Description("Spatial Static")] 30 | SpatialStatic = 1, 31 | [Description("Spatial Dynamic 2x2")] 32 | SpatialDynamic2x2 = 2, 33 | [Description("Spatial Static 2x2")] 34 | SpatialStatic2x2 = 3, 35 | [Description("Temporal")] 36 | Temporal = 4 37 | } 38 | 39 | public enum NovideoColorSpace 40 | { 41 | sRGB, 42 | DisplayP3, 43 | AdobeRGB, 44 | BT2020 45 | } 46 | 47 | public enum NvThermalSensorType 48 | { 49 | Gpu = 0, 50 | HotSpot = 1, 51 | Memory = 3 52 | } -------------------------------------------------------------------------------- /Shared/Contracts/NVIDIA/NvProfile.cs: -------------------------------------------------------------------------------- 1 | namespace ColorControl.Shared.Contracts.NVIDIA; 2 | 3 | public class NvProfile 4 | { 5 | public bool IsBase { get; set; } 6 | public string Name { get; set; } 7 | 8 | public List Apps { get; set; } 9 | 10 | public NvProfile() 11 | { 12 | Apps = []; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Shared/Contracts/NVIDIA/NvServiceConfig.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace ColorControl.Shared.Contracts.NVIDIA; 3 | 4 | public class NvServiceConfig 5 | { 6 | public string QuickAccessShortcut { get; set; } 7 | public bool ShowOverclocking { get; set; } 8 | public bool ApplyNovideoOnStartup { get; set; } 9 | 10 | public NvServiceConfig() 11 | { 12 | } 13 | 14 | public void Update(NvServiceConfig config) 15 | { 16 | QuickAccessShortcut = config.QuickAccessShortcut; 17 | ShowOverclocking = config.ShowOverclocking; 18 | ApplyNovideoOnStartup = config.ApplyNovideoOnStartup; 19 | } 20 | } 21 | 22 | -------------------------------------------------------------------------------- /Shared/Contracts/Rational.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace ColorControl.Shared.Contracts; 4 | 5 | public class Rational 6 | { 7 | public uint Numerator { get; set; } 8 | public uint Denominator { get; set; } 9 | 10 | public Rational(uint numerator, uint denominator) 11 | { 12 | Numerator = numerator; 13 | Denominator = denominator; 14 | } 15 | 16 | public override string ToString() 17 | { 18 | var value = Numerator / (double)Denominator; 19 | 20 | return $"{value:0.000}"; 21 | } 22 | 23 | [JsonIgnore] 24 | public uint MilliValue => (uint)(Numerator / (double)Denominator * 1000); 25 | 26 | public bool Equals(Rational other) 27 | { 28 | return MilliValue == other.MilliValue; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Shared/Contracts/RemoteControl/BaseRcButtonDto.cs: -------------------------------------------------------------------------------- 1 | namespace ColorControl.Shared.Contracts.RemoteControl; 2 | 3 | public class BaseRcButtonDto where TPreset : PresetBase where TButtonEnum : Enum 4 | { 5 | public string Name { get; set; } 6 | public TButtonEnum Button { get; set; } 7 | public TPreset Preset { get; set; } 8 | public double Top { get; set; } 9 | public double Left { get; set; } 10 | 11 | public BaseRcButtonDto() 12 | { 13 | 14 | } 15 | 16 | public BaseRcButtonDto(BaseRcButtonDto button) 17 | { 18 | Update(button); 19 | } 20 | 21 | public void Update(BaseRcButtonDto button) 22 | { 23 | Name = button.Name; 24 | Button = button.Button; 25 | Preset = button.Preset; 26 | Top = button.Top; 27 | Left = button.Left; 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /Shared/Contracts/RemoteControl/BaseRcDto.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace ColorControl.Shared.Contracts.RemoteControl; 3 | 4 | public class BaseRcDto where TPreset : PresetBase where TButtonEnum : Enum 5 | { 6 | public string Name { get; set; } 7 | public string ImageFileName { get; set; } 8 | public List> Buttons { get; set; } 9 | 10 | public void Update(BaseRcDto remoteSpec) 11 | { 12 | Name = remoteSpec.Name; 13 | ImageFileName = remoteSpec.ImageFileName; 14 | Buttons = remoteSpec.Buttons; 15 | } 16 | } 17 | 18 | -------------------------------------------------------------------------------- /Shared/Contracts/Samsung/SamsungButtons.cs: -------------------------------------------------------------------------------- 1 | namespace ColorControl.Shared.Contracts.Samsung; 2 | 3 | public enum ButtonType 4 | { 5 | KEY_POWER, 6 | KEY_UP, 7 | KEY_DOWN, 8 | KEY_LEFT, 9 | KEY_RIGHT, 10 | KEY_CHUP, 11 | KEY_CHDOWN, 12 | KEY_ENTER, 13 | KEY_RETURN, 14 | KEY_EXIT, 15 | KEY_HOME, 16 | KEY_CH_LIST, 17 | KEY_MENU, 18 | KEY_SOURCE, 19 | KEY_GUIDE, 20 | KEY_TOOLS, 21 | KEY_INFO, 22 | KEY_RED, 23 | KEY_GREEN, 24 | KEY_YELLOW, 25 | KEY_BLUE, 26 | KEY_PANNEL_CHDOWN, 27 | KEY_VOLUP, 28 | KEY_VOLDOWN, 29 | KEY_MUTE, 30 | KEY_0, 31 | KEY_1, 32 | KEY_2, 33 | KEY_3, 34 | KEY_4, 35 | KEY_5, 36 | KEY_6, 37 | KEY_7, 38 | KEY_8, 39 | KEY_9, 40 | KEY_DTV, 41 | KEY_HDMI, 42 | KEY_CONTENTS, 43 | KEY_TV_MODE, 44 | KEY_PC_MODE, 45 | KEY_SUB_TITLE, 46 | KEY_AD, 47 | KEY_PMODE, 48 | KEY_ASPECT, 49 | KEY_AMBIENT, 50 | KEY_FACTORY 51 | } 52 | -------------------------------------------------------------------------------- /Shared/Contracts/Samsung/SamsungDeviceDto.cs: -------------------------------------------------------------------------------- 1 | using ColorControl.Shared.Contracts.Base; 2 | 3 | namespace ColorControl.Shared.Contracts.Samsung; 4 | 5 | public class SamsungDeviceDto : BaseDeviceDto 6 | { 7 | public SamsungDeviceOptions Options { get; set; } = new(); 8 | } 9 | 10 | -------------------------------------------------------------------------------- /Shared/Contracts/Samsung/SamsungDeviceOptions.cs: -------------------------------------------------------------------------------- 1 | namespace ColorControl.Shared.Contracts.Samsung; 2 | 3 | public class SamsungDeviceOptions 4 | { 5 | public bool PowerOnAfterStartup { get; set; } 6 | public bool PowerOnAfterResume { get; set; } 7 | public bool PowerOffOnShutdown { get; set; } 8 | public bool PowerOffOnStandby { get; set; } 9 | public bool PowerOffOnScreenSaver { get; set; } 10 | public int ScreenSaverMinimalDuration { get; set; } 11 | public bool TurnScreenOffOnScreenSaver { get; set; } 12 | public bool HandleManualScreenSaver { get; set; } 13 | public bool PowerOnAfterScreenSaver { get; set; } 14 | public bool TurnScreenOnAfterScreenSaver { get; set; } 15 | public bool PowerOnAfterManualPowerOff { get; set; } 16 | public bool PowerOnByWindows { get; set; } 17 | public bool PowerOffByWindows { get; set; } 18 | public bool PowerOnAfterSessionUnlock { get; set; } 19 | public bool PowerOffAfterSessionLock { get; set; } 20 | public bool TriggersEnabled { get; set; } 21 | public int HDMIPortNumber { get; set; } 22 | 23 | public bool UseSecureConnection { get; set; } = true; 24 | } 25 | 26 | -------------------------------------------------------------------------------- /Shared/Contracts/Samsung/SamsungEnums.cs: -------------------------------------------------------------------------------- 1 | namespace ColorControl.Shared.Contracts.Samsung; 2 | 3 | public enum ServiceMenuType 4 | { 5 | FactoryMenu, 6 | HospitalityMenu 7 | } 8 | 9 | public enum ExitServiceMenuType 10 | { 11 | Exit, 12 | Reboot 13 | } 14 | 15 | public enum AdvancedUnlockType 16 | { 17 | TV, 18 | Monitor 19 | } 20 | 21 | -------------------------------------------------------------------------------- /Shared/Contracts/Samsung/SamsungRcDto.cs: -------------------------------------------------------------------------------- 1 |  2 | using ColorControl.Shared.Contracts.RemoteControl; 3 | 4 | namespace ColorControl.Shared.Contracts.Samsung; 5 | 6 | public class SamsungRcDto : BaseRcDto 7 | { 8 | } 9 | -------------------------------------------------------------------------------- /Shared/Contracts/Samsung/SamsungServiceConfigDto.cs: -------------------------------------------------------------------------------- 1 | namespace ColorControl.Shared.Contracts.Samsung; 2 | 3 | public class SamsungServiceConfigDto 4 | { 5 | public bool PowerOnAfterStartup { get; set; } 6 | public int PowerOnRetries { get; set; } 7 | public string PreferredMacAddress { get; set; } 8 | public string DeviceSearchKey { get; set; } 9 | public List Devices { get; set; } 10 | public int ShutdownDelay { get; set; } 11 | public bool SetSelectedDeviceByPowerOn { get; set; } 12 | public string QuickAccessShortcut { get; set; } 13 | public int DefaultButtonDelay { get; set; } 14 | public bool ShowAdvancedActions { get; set; } 15 | 16 | public SamsungServiceConfigDto() 17 | { 18 | ShutdownDelay = 1000; 19 | DeviceSearchKey = "Samsung"; 20 | PowerOnRetries = 10; 21 | DefaultButtonDelay = 500; 22 | Devices = new List(); 23 | } 24 | 25 | public static List GetFields() 26 | { 27 | return 28 | [ 29 | new FieldDefinition { FieldType = FieldType.TrackBar, Label = "M", SubLabel = "R", } 30 | 31 | ]; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Shared/Contracts/Svc/SvcResultMessage.cs: -------------------------------------------------------------------------------- 1 | namespace ColorControl.Shared.Contracts 2 | { 3 | public class SvcResultMessage 4 | { 5 | public bool Result { get; set; } 6 | 7 | public string Data { get; set; } 8 | 9 | public string ErrorMessage { get; set; } 10 | 11 | 12 | public static SvcResultMessage FromResult(bool result, string errorMessage = null) => new SvcResultMessage { Result = result, ErrorMessage = errorMessage }; 13 | public static SvcResultMessage FromResult(string data) => new SvcResultMessage { Result = true, Data = data }; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Shared/EventDispatcher/DisplayChangeEventDispatcher.cs: -------------------------------------------------------------------------------- 1 | namespace ColorControl.Shared.EventDispatcher; 2 | 3 | public class DisplayChangedEventArgs : EventArgs 4 | { 5 | public uint Width { get; set; } 6 | public uint Height { get; set; } 7 | public uint BitsPerPixel { get; set; } 8 | } 9 | 10 | public class DisplayChangeEventDispatcher : EventDispatcher 11 | { 12 | public const string Event_DisplayChanged = "DisplayChanged"; 13 | public DisplayChangeEventDispatcher(WindowMessageDispatcher windowMessageDispatcher) 14 | { 15 | windowMessageDispatcher.RegisterEventHandler(WindowMessageDispatcher.Event_WindowMessageDisplayChange, OnWindowMessageDisplayChange); 16 | } 17 | 18 | private async void OnWindowMessageDisplayChange(object sender, WindowMessageEventArgs e) 19 | { 20 | uint width = (uint)(e.Message.LParam & 0xffff); 21 | uint height = (uint)(e.Message.LParam >> 16); 22 | uint bpp = (uint)e.Message.WParam; 23 | await DispatchEventAsync(Event_DisplayChanged, new DisplayChangedEventArgs { Width = width, Height = height, BitsPerPixel = bpp }); 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /Shared/EventDispatcher/EventExtensions.cs: -------------------------------------------------------------------------------- 1 | namespace ColorControl.Shared.EventDispatcher; 2 | 3 | public static class EventExtensions 4 | { 5 | public delegate Task AsyncEventHandler(object sender, TEventArgs e, CancellationToken token); 6 | 7 | public static Task InvokeAsync(this AsyncEventHandler func, object sender, TArgs e) 8 | { 9 | return func == null ? Task.CompletedTask 10 | : Task.WhenAll(func.GetInvocationList().Cast>().Select(f => f(sender, e, CancellationToken.None))); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Shared/Forms/TreeNodeBuilder.cs: -------------------------------------------------------------------------------- 1 | using ColorControl.Shared.Common; 2 | using static ColorControl.Shared.Common.NestedItemsBuilder; 3 | 4 | namespace ColorControl.Shared.Forms; 5 | 6 | public class TreeNodeBuilder 7 | { 8 | public static TreeNode CreateTree(object obj, string text) 9 | { 10 | var nestedItem = NestedItemsBuilder.CreateTree(obj, text); 11 | 12 | return BuildTree(nestedItem); 13 | } 14 | 15 | private static TreeNode BuildTree(NestedItem nestedItem) 16 | { 17 | var treeNode = new TreeNode 18 | { 19 | Text = nestedItem.Value, 20 | Name = nestedItem.Name 21 | }; 22 | var nodes = nestedItem.NestedItems.Select(BuildTree); 23 | 24 | treeNode.Nodes.AddRange([.. nodes]); 25 | 26 | return treeNode; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Shared/Native/PnpDev.cs: -------------------------------------------------------------------------------- 1 | namespace ColorControl.Shared.Native 2 | { 3 | public class PnpDev 4 | { 5 | public bool IsCustom { get; private set; } 6 | 7 | public string Name { get; private set; } 8 | public string IpAddress { get; private set; } 9 | 10 | public string MacAddress { get; private set; } 11 | 12 | public PnpDev(string name, string ipAddress, string macAddress) 13 | { 14 | IsCustom = true; 15 | Name = name; 16 | IpAddress = ipAddress; 17 | MacAddress = macAddress; 18 | } 19 | 20 | public PnpDev(bool isCustom, string name, string ipAddress, string macAddress) : this(name, ipAddress, macAddress) 21 | { 22 | IsCustom = isCustom; 23 | } 24 | 25 | public override string ToString() 26 | { 27 | return (IsCustom ? "Custom: " : "Auto detect: ") + $"{Name}" + (!string.IsNullOrEmpty(IpAddress) ? $"({IpAddress})" : string.Empty); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Shared/XForms/BaseWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using ColorControl.Shared.Forms; 2 | using ColorControl.Shared.Native; 3 | using System.Windows; 4 | using System.Windows.Interop; 5 | 6 | namespace ColorControl.Shared.XForms 7 | { 8 | public partial class BaseWindow : Window 9 | { 10 | public BaseWindow() : base() 11 | { 12 | ContentRendered += ContenRenderedHandler; 13 | } 14 | 15 | private void ContenRenderedHandler(object sender, EventArgs e) 16 | { 17 | InitThemeAfterShow(); 18 | } 19 | 20 | protected void InitThemeAfterShow() 21 | { 22 | var useDarkTheme = DarkModeUtils.UseDarkMode; 23 | 24 | var handle = new WindowInteropHelper(this).Handle; 25 | 26 | var value = useDarkTheme ? 1 : 0; 27 | 28 | // Takes care of title bar 29 | WinApi.DwmSetWindowAttribute(handle, DarkModeUtils.DWMWA_USE_IMMERSIVE_DARK_MODE, ref value, 4); 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /images/LgController.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/images/LgController.png -------------------------------------------------------------------------------- /images/NvPresets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/images/NvPresets.png -------------------------------------------------------------------------------- /images/Options.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/images/Options.png -------------------------------------------------------------------------------- /novideo_srgb/AboutWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using ColorControl.Shared.XForms; 2 | using System.Windows.Navigation; 3 | 4 | namespace novideo_srgb 5 | { 6 | public partial class AboutWindow : BaseWindow 7 | { 8 | public AboutWindow() 9 | { 10 | InitializeComponent(); 11 | } 12 | 13 | private void OnRequestNavigate(object sender, RequestNavigateEventArgs e) 14 | { 15 | var processStartInfo = new System.Diagnostics.ProcessStartInfo(e.Uri.AbsoluteUri) 16 | { 17 | UseShellExecute = true, 18 | }; 19 | System.Diagnostics.Process.Start(processStartInfo); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /novideo_srgb/ICCProfileException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace novideo_srgb 4 | { 5 | public class ICCProfileException : FormatException 6 | { 7 | public ICCProfileException(string message) : base(message) 8 | { 9 | } 10 | } 11 | } -------------------------------------------------------------------------------- /novideo_srgb/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace novideo_srgb.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.5.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /novideo_srgb/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /novideo_srgb/SrgbEOTF.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace novideo_srgb 4 | { 5 | public class SrgbEOTF : ToneCurve 6 | { 7 | private double _black; 8 | 9 | public SrgbEOTF(double black) 10 | { 11 | _black = black; 12 | } 13 | 14 | public double SampleAt(double x) 15 | { 16 | if (x >= 1) return 1; 17 | 18 | double result; 19 | if (x <= 0.04045) 20 | { 21 | result = x / 12.92; 22 | } 23 | else 24 | { 25 | result = Math.Pow((x + 0.055) / 1.055, 2.4); 26 | } 27 | 28 | return result * (1 - _black) + _black; 29 | } 30 | 31 | public double SampleInverseAt(double x) 32 | { 33 | if (_black != 0) throw new NotSupportedException(); 34 | if (x >= 1) return 1; 35 | 36 | if (x <= 0.0031308) return 12.92 * x; 37 | return 1.055 * Math.Pow(x, 1 / 2.4) - 0.055; 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /novideo_srgb/ToneCurve.cs: -------------------------------------------------------------------------------- 1 | namespace novideo_srgb 2 | { 3 | public interface ToneCurve 4 | { 5 | double SampleAt(double x); 6 | double SampleInverseAt(double x); 7 | } 8 | } -------------------------------------------------------------------------------- /novideo_srgb/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/novideo_srgb/icon.ico --------------------------------------------------------------------------------