public DisplayConfigSourceMode(uint width, uint height, DisplayConfigPixelFormat pixelFormat, PointL position)
 {
     Width       = width;
     Height      = height;
     PixelFormat = pixelFormat;
     Position    = position;
 }
Ejemplo n.º 2
0
        private PathInfo(
            DisplayConfigPathSourceInfo sourceInfo,
            DisplayConfigSourceMode?sourceMode,
            IEnumerable <
                Tuple <
                    DisplayConfigPathInfoFlags,
                    DisplayConfigPathTargetInfo,
                    DisplayConfigTargetMode?,
                    DisplayConfigDesktopImageInfo?
                    >
                > targets
            )
        {
            DisplaySource = new PathDisplaySource(new PathDisplayAdapter(sourceInfo.AdapterId), sourceInfo.SourceId);

            IsInUse = sourceInfo.StatusFlags.HasFlag(DisplayConfigPathSourceInfoFlags.InUse);
            IsModeInformationAvailable = sourceMode.HasValue;

            if (sourceMode.HasValue)
            {
                _resolution  = new Size((int)sourceMode.Value.Width, (int)sourceMode.Value.Height);
                _pixelFormat = sourceMode.Value.PixelFormat;
                _position    = new Point(sourceMode.Value.Position.X, sourceMode.Value.Position.Y);
            }

            TargetsInfo = targets.Select(t => new PathTargetInfo(t.Item1, t.Item2, t.Item3, t.Item4)).ToArray();

            if (TargetsInfo.Any(info => info.IsVirtualModeSupportedByPath) &&
                sourceInfo.CloneGroupId != DisplayConfigPathSourceInfo.InvalidCloneGroupId
                )
            {
                _cloneGroupId = sourceInfo.CloneGroupId;
                IsCloneMember = true;
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 ///     Creates a new PathInfo
 /// </summary>
 /// <param name="displaySource">The display source</param>
 /// <param name="position">The display position in desktop</param>
 /// <param name="resolution">The display resolution</param>
 /// <param name="pixelFormat">The display pixel format</param>
 /// <param name="pathTargetInfos">An array of target information</param>
 public PathInfo(
     PathDisplaySource displaySource,
     Point position,
     Size resolution,
     DisplayConfigPixelFormat pixelFormat,
     PathTargetInfo[] pathTargetInfos
     ) : this(displaySource, position, resolution, pixelFormat)
 {
     TargetsInfo = pathTargetInfos;
 }
Ejemplo n.º 4
0
 /// <summary>
 ///     Creates a new PathInfo
 /// </summary>
 /// <param name="displaySource">The display source</param>
 /// <param name="position">The display position in desktop</param>
 /// <param name="resolution">The display resolution</param>
 /// <param name="pixelFormat">The display pixel format</param>
 public PathInfo(
     PathDisplaySource displaySource,
     Point position,
     Size resolution,
     DisplayConfigPixelFormat pixelFormat
     ) : this(displaySource)
 {
     _position    = position;
     _resolution  = resolution;
     _pixelFormat = pixelFormat;
     IsModeInformationAvailable = true;
 }