internal PathTargetInfo(DisplayConfigPathInfoFlags pathFlags, DisplayConfigPathTargetInfo targetInfo, DisplayConfigTargetMode?targetMode, DisplayConfigDesktopImageInfo?desktopImageMode) { IsPathActive = pathFlags.HasFlag(DisplayConfigPathInfoFlags.Active); IsVirtualModeSupportedByPath = pathFlags.HasFlag(DisplayConfigPathInfoFlags.SupportVirtualMode); DisplayTarget = new PathDisplayTarget(new PathDisplayAdapter(targetInfo.AdapterId), targetInfo.TargetId, targetInfo.TargetAvailable); OutputTechnology = targetInfo.OutputTechnology; Rotation = targetInfo.Rotation; Scaling = targetInfo.Scaling; ScanLineOrdering = targetInfo.ScanLineOrdering; FrequencyInMillihertz = targetInfo.RefreshRate.ToValue(1000); ForcedBootAvailability = targetInfo.StatusFlags.HasFlag(DisplayConfigPathTargetInfoFlags.AvailabilityBoot); ForcedPathAvailability = targetInfo.StatusFlags.HasFlag(DisplayConfigPathTargetInfoFlags.AvailabilityPath); ForcedSystemAvailability = targetInfo.StatusFlags.HasFlag(DisplayConfigPathTargetInfoFlags.AvailabilitySystem); IsCurrentlyInUse = targetInfo.StatusFlags.HasFlag(DisplayConfigPathTargetInfoFlags.InUse); IsForcible = targetInfo.StatusFlags.HasFlag(DisplayConfigPathTargetInfoFlags.Forcible); IsSignalInformationAvailable = targetMode.HasValue; if (targetMode.HasValue) { _signalInfo = new PathTargetSignalInfo(targetMode.Value.TargetVideoSignalInfo); } IsDesktopImageInformationAvailable = desktopImageMode.HasValue; if (desktopImageMode.HasValue) { _desktopImage = new PathTargetDesktopImage(desktopImageMode.Value); } }
/// <summary> /// Creates a new PathTargetInfo /// </summary> /// <param name="displayTarget">The display target device</param> /// <param name="signalInfo">The display signal information</param> /// <param name="desktopImage">The display desktop image information</param> /// <param name="isVirtualModeSupported">A boolean value indicating the target virtual mode support</param> public PathTargetInfo( PathDisplayTarget displayTarget, PathTargetSignalInfo signalInfo, PathTargetDesktopImage desktopImage, bool isVirtualModeSupported = false ) : this(displayTarget, signalInfo, isVirtualModeSupported) { _desktopImage = desktopImage; IsDesktopImageInformationAvailable = true; }
/// <summary> /// Creates a new PathTargetInfo /// </summary> /// <param name="displayTarget">The display target device</param> /// <param name="signalInfo">The display signal information</param> /// <param name="isVirtualModeSupported">A boolean value indicating the target virtual mode support</param> public PathTargetInfo( PathDisplayTarget displayTarget, PathTargetSignalInfo signalInfo, bool isVirtualModeSupported = false ) : this(displayTarget, isVirtualModeSupported) { _signalInfo = signalInfo; FrequencyInMillihertz = signalInfo.VerticalSyncFrequencyInMillihertz; ScanLineOrdering = signalInfo.ScanLineOrdering; IsSignalInformationAvailable = true; }
/// <summary> /// Creates a new PathTargetInfo /// </summary> /// <param name="displayTarget">The display target device</param> /// <param name="signalInfo">The display signal information</param> /// <param name="desktopImage">The display desktop image information</param> /// <param name="rotation">Display rotation</param> /// <param name="scaling">Display scaling</param> /// <param name="isVirtualModeSupported">A boolean value indicating the target virtual mode support</param> public PathTargetInfo( PathDisplayTarget displayTarget, PathTargetSignalInfo signalInfo, PathTargetDesktopImage desktopImage, DisplayConfigRotation rotation = DisplayConfigRotation.NotSpecified, DisplayConfigScaling scaling = DisplayConfigScaling.Preferred, bool isVirtualModeSupported = false ) : this(displayTarget, signalInfo, rotation, scaling, isVirtualModeSupported) { _desktopImage = desktopImage; IsDesktopImageInformationAvailable = true; }
/// <summary> /// Creates a new PathTargetInfo /// </summary> /// <param name="displayTarget">The display target device</param> /// <param name="frequencyInMillihertz">Display frequency in millihertz</param> /// <param name="scanLineOrdering">Display scan line ordering</param> /// <param name="rotation">Display rotation</param> /// <param name="scaling">Display scaling</param> /// <param name="isVirtualModeSupported">A boolean value indicating the target virtual mode support</param> public PathTargetInfo( PathDisplayTarget displayTarget, ulong frequencyInMillihertz, DisplayConfigScanLineOrdering scanLineOrdering = DisplayConfigScanLineOrdering.NotSpecified, DisplayConfigRotation rotation = DisplayConfigRotation.NotSpecified, DisplayConfigScaling scaling = DisplayConfigScaling.Preferred, bool isVirtualModeSupported = false ) : this(displayTarget, isVirtualModeSupported) { FrequencyInMillihertz = frequencyInMillihertz; ScanLineOrdering = scanLineOrdering; Rotation = rotation; Scaling = scaling; }
/// <summary> /// Creates a new PathTargetInfo /// </summary> /// <param name="displayTarget">The display target device</param> /// <param name="signalInfo">The display signal information</param> /// <param name="rotation">Display rotation</param> /// <param name="scaling">Display scaling</param> /// <param name="isVirtualModeSupported">A boolean value indicating the target virtual mode support</param> public PathTargetInfo( PathDisplayTarget displayTarget, PathTargetSignalInfo signalInfo, DisplayConfigRotation rotation = DisplayConfigRotation.NotSpecified, DisplayConfigScaling scaling = DisplayConfigScaling.Preferred, bool isVirtualModeSupported = false) : this(displayTarget, 0, DisplayConfigScanLineOrdering.NotSpecified, rotation, scaling, isVirtualModeSupported ) { _signalInfo = signalInfo; FrequencyInMillihertz = signalInfo.VerticalSyncFrequencyInMillihertz; ScanLineOrdering = signalInfo.ScanLineOrdering; IsSignalInformationAvailable = true; }
/// <summary> /// Creates a new PathTargetInfo /// </summary> /// <param name="displayTarget">The display target device</param> /// <param name="isVirtualModeSupported">A boolean value indicating the target virtual mode support</param> public PathTargetInfo(PathDisplayTarget displayTarget, bool isVirtualModeSupported = false) { DisplayTarget = displayTarget; IsVirtualModeSupportedByPath = isVirtualModeSupported; }