2 * Copyright (c) 2007-2010 SlimDX Group
4 * Permission is hereby granted, free of charge, to any person obtaining a copy
5 * of this software and associated documentation files (the "Software"), to deal
6 * in the Software without restriction, including without limitation the rights
7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 * copies of the Software, and to permit persons to whom the Software is
9 * furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 #include "ObjectDxgi.h"
32 value class FrameStatistics;
33 ref class GammaControl;
34 value class GammaControlCapabilities;
35 value class ModeDescription;
36 value class OutputDescription;
39 /// Represents the output of an adapter (such as a monitor).
41 /// <unmanaged>IDXGIOutput</unmanaged>
42 public ref class Output : DXGIObject
44 COMOBJECT(IDXGIOutput, Output);
48 /// Gets the output's description.
50 property OutputDescription Description
52 OutputDescription get();
56 /// Gets statistics about recently rendered frames.
58 property DXGI::FrameStatistics FrameStatistics
60 DXGI::FrameStatistics get();
64 /// Gets a description of the output's gamma-control capabilities.
66 property DXGI::GammaControlCapabilities GammaControlCapabilities
68 DXGI::GammaControlCapabilities get();
72 /// Gets a list of display modes matching certain specifications.
74 /// <param name="format">The display mode color format.</param>
75 /// <param name="flags">Flags indicating how the display mode scanline order and scaling.</param>
76 /// <returns>A list of matching display mode descriptions. The list is null if an error occured.</returns>
77 System::Collections::ObjectModel::ReadOnlyCollection<ModeDescription>^ GetDisplayModeList( Format format, DisplayModeEnumerationFlags flags );
80 /// Gets the display mode that best matches the requested mode.
82 /// <param name="device">The device interface. If this parameter is null, only
83 /// modes whose format matches the specified mode will be returned; otherwise, only those
84 /// formats that are supported for scan-out by the device are returned.</param>
85 /// <param name="modeToMatch">The description of the display mode to match.</param>
86 /// <param name="result">Receives the best-matching display mode.</param>
87 /// <returns>A <see cref="SlimDX::Result"/> object describing the result of the operation.</returns>
88 Result GetClosestMatchingMode( ComObject^ device, ModeDescription modeToMatch, [Out] ModeDescription %result );
91 /// Sets gamma control information.
93 /// <param name="control">The gamma control information.</param>
94 /// <returns>A <see cref="SlimDX::Result"/> object describing the result of the operation.</returns>
95 Result SetGammaControl( GammaControl^ control );
98 /// Changes the current display surface to the specified surface.
100 /// <param name="surface">The new display surface.</param>
101 /// <returns>A <see cref="SlimDX::Result"/> object describing the result of the operation.</returns>
102 Result SetDisplaySurface( Surface^ surface );
105 /// Copies the display surface content to the specified destination surface.
107 /// <param name="surface">The destination surface.</param>
108 /// <returns>A <see cref="SlimDX::Result"/> object describing the result of the operation.</returns>
109 Result CopyDisplaySurfaceTo( Surface^ surface );
112 /// Takes ownership of an output.
114 /// <param name="device">The device interface.</param>
115 /// <param name="exclusive">If true, ownership is exclusive.</param>
116 /// <returns>A <see cref="SlimDX::Result"/> object describing the result of the operation.</returns>
117 Result TakeOwnership( ComObject^ device, bool exclusive );
120 /// Releases ownership of an output.
122 void ReleaseOwnership();
125 /// Halts the current thread until a vertical blank occurs.
127 /// <returns>A <see cref="SlimDX::Result"/> object describing the result of the operation.</returns>
128 Result WaitForVerticalBlank();
131 /// Converts the value of the object to its equivalent string representation.
133 /// <returns>The string representation of the value of this instance.</returns>
134 virtual System::String^ ToString() override;