OSDN Git Service

DTXMania089リリースに際してのtag付け。
[dtxmania/dtxmania.git] / 110401(DTXMania089) / SlimDXc_Jun2010(VC++2008) / source / dxgi / SwapChainDxgi.h
1 /*\r
2 * Copyright (c) 2007-2010 SlimDX Group\r
3\r
4 * Permission is hereby granted, free of charge, to any person obtaining a copy\r
5 * of this software and associated documentation files (the "Software"), to deal\r
6 * in the Software without restriction, including without limitation the rights\r
7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
8 * copies of the Software, and to permit persons to whom the Software is\r
9 * furnished to do so, subject to the following conditions:\r
10\r
11 * The above copyright notice and this permission notice shall be included in\r
12 * all copies or substantial portions of the Software.\r
13\r
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r
20 * THE SOFTWARE.\r
21 */\r
22 #pragma once\r
23 \r
24 #include "Enums.h"\r
25 #include "DeviceChildDxgi.h"\r
26 \r
27 namespace SlimDX\r
28 {\r
29         namespace DXGI\r
30         {\r
31                 ref class Factory;\r
32                 ref class Output;\r
33                 value class FrameStatistics;\r
34                 value class ModeDescription;\r
35                 value class SwapChainDescription;\r
36                 \r
37                 /// <summary>\r
38                 /// Holds one or more surfaces that store rendered data prior to presenting\r
39                 /// that data to an output.\r
40                 /// </summary>\r
41                 /// <unmanaged>IDXGISwapChain</unmanaged>\r
42                 public ref class SwapChain : DeviceChild\r
43                 {\r
44                         COMOBJECT(IDXGISwapChain, SwapChain);\r
45                 \r
46                 public:\r
47                         /// <summary>\r
48                         /// Gets the swap chain's description.\r
49                         /// </summary>\r
50                         property SwapChainDescription Description\r
51                         {\r
52                                 SwapChainDescription get();\r
53                         }\r
54                         \r
55                         /// <summary>\r
56                         /// Get performance statistics about the last render frame.\r
57                         /// </summary>\r
58                         property DXGI::FrameStatistics FrameStatistics\r
59                         {\r
60                                 DXGI::FrameStatistics get();\r
61                         }\r
62                         \r
63                         /// <summary>\r
64                         /// Gets the number of times this swap chain's Present method has been called.\r
65                         /// </summary>\r
66                         property int PresentCount\r
67                         {\r
68                                 int get();\r
69                         }\r
70                         \r
71                         /// <summary>\r
72                         /// Gets the output (the display monitor) that contains the majority of the client area of the target window.\r
73                         /// </summary>\r
74                         property Output^ ContainingOutput\r
75                         {\r
76                                 Output^ get();\r
77                         }\r
78 \r
79                         /// <summary>\r
80                         /// Gets or sets a value indicating whether the swap chain is rendering in full screen mode.\r
81                         /// </summary>\r
82                         property bool IsFullScreen\r
83                         {\r
84                                 bool get();\r
85                                 void set(bool value);\r
86                         }\r
87                         \r
88                         /// <summary>\r
89                         /// Initializes a new instance of the <see cref="SwapChain"/> class.\r
90                         /// </summary>\r
91                         /// <param name="factory">The factory used to create the swap chain.</param>\r
92                         /// <param name="device">The device used to present images to the swap chain.</param>\r
93                         /// <param name="description">Swap chain properties.</param>\r
94                         SwapChain( Factory^ factory, ComObject^ device, SwapChainDescription description );\r
95 \r
96                         /// <summary>\r
97                         /// Releases all resources used by the <see cref="SwapChain"/>.\r
98                         /// </summary>\r
99                         virtual ~SwapChain();\r
100                         \r
101                         /// <summary>\r
102                         /// Gets the full screen state.\r
103                         /// </summary>\r
104                         /// <param name="isFullScreen">Receives a value indicating if the swap chain is running in full screen mode.</param>\r
105                         /// <param name="target">Receives the full screen output if the swap chain is in full screen mode. Otherwise ignored.</param>\r
106                         /// <returns>A <see cref="SlimDX::Result"/> object describing the result of the operation.</returns>\r
107                         Result GetFullScreenState( [Out] bool% isFullScreen, [Out] Output^% target );\r
108                         \r
109                         /// <summary>\r
110                         /// Sets the full screen state.\r
111                         /// </summary>\r
112                         /// <param name="isFullScreen">Set to true for full screen mode, false for windowed mode.</param>\r
113                         /// <param name="target">If the current display mode is full screen, this parameter must be the\r
114                         /// output containing the swap chain; otherwise, this parameter is ignored. If you set this parameter\r
115                         /// to null, DXGI will choose the output based on the swap-chain's device and the output window's placement.</param>\r
116                         /// <returns>A <see cref="SlimDX::Result"/> object describing the result of the operation.</returns>\r
117                         Result SetFullScreenState( bool isFullScreen, Output^ target );\r
118                         \r
119                         /// <summary>\r
120                         /// Changes the swap chain's back buffer size, format, and count.\r
121                         /// </summary>\r
122                         /// <param name="count">The new back buffer count.</param>\r
123                         /// <param name="width">The new back buffer width.</param>\r
124                         /// <param name="height">The new back buffer height.</param>\r
125                         /// <param name="format">The new back buffer format.</param>\r
126                         /// <param name="flags">Flags controlling swap chain functionality.</param>\r
127                         /// <returns>A <see cref="SlimDX::Result"/> object describing the result of the operation.</returns>\r
128                         Result ResizeBuffers( int count, int width, int height, Format format, SwapChainFlags flags );\r
129                         \r
130                         /// <summary>\r
131                         /// Changes the output target's size.\r
132                         /// </summary>\r
133                         /// <param name="description">Properties of the new output display mode.</param>\r
134                         /// <returns>A <see cref="SlimDX::Result"/> object describing the result of the operation.</returns>\r
135                         Result ResizeTarget( ModeDescription description );\r
136                         \r
137                         /// <summary>\r
138                         /// Presents a rendered image to the attached output.\r
139                         /// </summary>\r
140                         /// <param name="syncInterval">Specified how to synchronize the presentation with the vertical blank interrupt. 0\r
141                         /// indicates that presentation should occur immediately, without synchronization. Any other value indicates that\r
142                         /// presentation should be synchonized with the specified next vertical blank.</param>\r
143                         /// <param name="flags">Flags controlling presentation behavior.</param>\r
144                         /// <returns>A <see cref="SlimDX::Result"/> object describing the result of the operation.</returns>\r
145                         Result Present( int syncInterval, PresentFlags flags );\r
146                 };\r
147         }\r
148 }