blob: b114bf5e1d3ce7a4b2243b5ee989913371b9d1e0 [file] [log] [blame]
José Fonsecaaf7d2312011-07-07 10:16:57 +01001##########################################################################
2#
3# Copyright 2011 Jose Fonseca
4# All Rights Reserved.
5#
6# Permission is hereby granted, free of charge, to any person obtaining a copy
7# of this software and associated documentation files (the "Software"), to deal
8# in the Software without restriction, including without limitation the rights
9# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10# copies of the Software, and to permit persons to whom the Software is
11# furnished to do so, subject to the following conditions:
12#
13# The above copyright notice and this permission notice shall be included in
14# all copies or substantial portions of the Software.
15#
16# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22# THE SOFTWARE.
23#
24##########################################################################/
25
José Fonsecaca55d162012-04-16 13:05:47 +010026
José Fonsecaaf7d2312011-07-07 10:16:57 +010027from dxgitype import *
28
José Fonsecaca55d162012-04-16 13:05:47 +010029
30IDXGIObject = Interface("IDXGIObject", IUnknown)
31IDXGIDeviceSubObject = Interface("IDXGIDeviceSubObject", IDXGIObject)
32IDXGIResource = Interface("IDXGIResource", IDXGIDeviceSubObject)
33IDXGIKeyedMutex = Interface("IDXGIKeyedMutex", IDXGIDeviceSubObject)
34IDXGISurface = Interface("IDXGISurface", IDXGIDeviceSubObject)
35IDXGISurface1 = Interface("IDXGISurface1", IDXGISurface)
36IDXGIAdapter = Interface("IDXGIAdapter", IDXGIObject)
37IDXGIOutput = Interface("IDXGIOutput", IDXGIObject)
38IDXGISwapChain = Interface("IDXGISwapChain", IDXGIDeviceSubObject)
39IDXGIFactory = Interface("IDXGIFactory", IDXGIObject)
40IDXGIDevice = Interface("IDXGIDevice", IDXGIObject)
41IDXGIFactory1 = Interface("IDXGIFactory1", IDXGIFactory)
42IDXGIAdapter1 = Interface("IDXGIAdapter1", IDXGIAdapter)
43IDXGIDevice1 = Interface("IDXGIDevice1", IDXGIDevice)
44
45
46DXGI_USAGE = Flags(UINT, [
José Fonseca467a42a2012-05-04 11:49:19 +010047 "DXGI_CPU_ACCESS_NONE", # 0
48 "DXGI_CPU_ACCESS_SCRATCH", # 3
49 "DXGI_CPU_ACCESS_DYNAMIC", # 1
50 "DXGI_CPU_ACCESS_READ_WRITE", # 2
José Fonsecaca55d162012-04-16 13:05:47 +010051 "DXGI_USAGE_SHADER_INPUT",
52 "DXGI_USAGE_RENDER_TARGET_OUTPUT",
53 "DXGI_USAGE_BACK_BUFFER",
54 "DXGI_USAGE_SHARED",
55 "DXGI_USAGE_READ_ONLY",
56 "DXGI_USAGE_DISCARD_ON_PRESENT",
57 "DXGI_USAGE_UNORDERED_ACCESS",
José Fonsecaaf7d2312011-07-07 10:16:57 +010058])
59
José Fonsecaca55d162012-04-16 13:05:47 +010060DXGI_FRAME_STATISTICS = Struct("DXGI_FRAME_STATISTICS", [
61 (UINT, "PresentCount"),
62 (UINT, "PresentRefreshCount"),
63 (UINT, "SyncRefreshCount"),
64 (LARGE_INTEGER, "SyncQPCTime"),
65 (LARGE_INTEGER, "SyncGPUTime"),
66])
67
68DXGI_MAPPED_RECT = Struct("DXGI_MAPPED_RECT", [
69 (INT, "Pitch"),
70 (OpaquePointer(BYTE), "pBits"),
71])
72
73DXGI_ADAPTER_DESC = Struct("DXGI_ADAPTER_DESC", [
74 (WString, "Description"),
75 (UINT, "VendorId"),
76 (UINT, "DeviceId"),
77 (UINT, "SubSysId"),
78 (UINT, "Revision"),
79 (SIZE_T, "DedicatedVideoMemory"),
80 (SIZE_T, "DedicatedSystemMemory"),
81 (SIZE_T, "SharedSystemMemory"),
82 (LUID, "AdapterLuid"),
83])
84
85DXGI_OUTPUT_DESC = Struct("DXGI_OUTPUT_DESC", [
86 (WString, "DeviceName"),
87 (RECT, "DesktopCoordinates"),
88 (BOOL, "AttachedToDesktop"),
89 (DXGI_MODE_ROTATION, "Rotation"),
90 (HMONITOR, "Monitor"),
91])
92
93DXGI_SHARED_RESOURCE = Struct("DXGI_SHARED_RESOURCE", [
94 (HANDLE, "Handle"),
95])
96
97DXGI_RESOURCE_PRIORITY = FakeEnum(UINT, [
98 "DXGI_RESOURCE_PRIORITY_MINIMUM",
99 "DXGI_RESOURCE_PRIORITY_LOW",
100 "DXGI_RESOURCE_PRIORITY_NORMAL",
101 "DXGI_RESOURCE_PRIORITY_HIGH",
102 "DXGI_RESOURCE_PRIORITY_MAXIMUM",
José Fonsecaaf7d2312011-07-07 10:16:57 +0100103])
104
105DXGI_RESIDENCY = Enum("DXGI_RESIDENCY", [
106 "DXGI_RESIDENCY_FULLY_RESIDENT",
107 "DXGI_RESIDENCY_RESIDENT_IN_SHARED_MEMORY",
108 "DXGI_RESIDENCY_EVICTED_TO_DISK",
109])
110
111DXGI_SURFACE_DESC = Struct("DXGI_SURFACE_DESC", [
112 (UINT, "Width"),
113 (UINT, "Height"),
114 (DXGI_FORMAT, "Format"),
115 (DXGI_SAMPLE_DESC, "SampleDesc"),
116])
117
José Fonsecaca55d162012-04-16 13:05:47 +0100118DXGI_SWAP_EFFECT = Enum("DXGI_SWAP_EFFECT", [
119 "DXGI_SWAP_EFFECT_DISCARD",
120 "DXGI_SWAP_EFFECT_SEQUENTIAL",
José Fonsecaaf7d2312011-07-07 10:16:57 +0100121])
122
José Fonsecaca55d162012-04-16 13:05:47 +0100123DXGI_SWAP_CHAIN_FLAG = Flags(UINT, [
José Fonsecaaf7d2312011-07-07 10:16:57 +0100124 "DXGI_SWAP_CHAIN_FLAG_NONPREROTATED",
125 "DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH",
126 "DXGI_SWAP_CHAIN_FLAG_GDI_COMPATIBLE",
127])
128
129DXGI_SWAP_CHAIN_DESC = Struct("DXGI_SWAP_CHAIN_DESC", [
130 (DXGI_MODE_DESC, "BufferDesc"),
131 (DXGI_SAMPLE_DESC, "SampleDesc"),
132 (DXGI_USAGE, "BufferUsage"),
133 (UINT, "BufferCount"),
134 (HWND, "OutputWindow"),
135 (BOOL, "Windowed"),
136 (DXGI_SWAP_EFFECT, "SwapEffect"),
José Fonsecaca55d162012-04-16 13:05:47 +0100137 (DXGI_SWAP_CHAIN_FLAG, "Flags"),
138])
139
140IDXGIObject.methods += [
José Fonseca45fff9c2012-05-08 09:07:27 +0100141 StdMethod(HRESULT, "SetPrivateData", [(REFGUID, "Name"), (UINT, "DataSize"), (OpaqueBlob(Const(Void), "DataSize"), "pData")], sideeffects=False),
142 StdMethod(HRESULT, "SetPrivateDataInterface", [(REFGUID, "Name"), (OpaquePointer(Const(IUnknown)), "pUnknown")], sideeffects=False),
143 StdMethod(HRESULT, "GetPrivateData", [(REFGUID, "Name"), Out(Pointer(UINT), "pDataSize"), Out(OpaquePointer(Void), "pData")], sideeffects=False),
José Fonsecaca55d162012-04-16 13:05:47 +0100144 StdMethod(HRESULT, "GetParent", [(REFIID, "riid"), Out(Pointer(ObjPointer(Void)), "ppParent")]),
145]
146
147IDXGIDeviceSubObject.methods += [
148 StdMethod(HRESULT, "GetDevice", [(REFIID, "riid"), Out(Pointer(ObjPointer(Void)), "ppDevice")]),
149]
150
151IDXGIResource.methods += [
152 StdMethod(HRESULT, "GetSharedHandle", [Out(Pointer(HANDLE), "pSharedHandle")]),
José Fonseca45fff9c2012-05-08 09:07:27 +0100153 StdMethod(HRESULT, "GetUsage", [Out(Pointer(DXGI_USAGE), "pUsage")], sideeffects=False),
José Fonsecaca55d162012-04-16 13:05:47 +0100154 StdMethod(HRESULT, "SetEvictionPriority", [(DXGI_RESOURCE_PRIORITY, "EvictionPriority")]),
José Fonseca45fff9c2012-05-08 09:07:27 +0100155 StdMethod(HRESULT, "GetEvictionPriority", [Out(Pointer(DXGI_RESOURCE_PRIORITY), "pEvictionPriority")], sideeffects=False),
José Fonsecaca55d162012-04-16 13:05:47 +0100156]
157
Jeff Muizelaarcd3f69e2013-03-11 15:56:30 -0400158DXGI_SHARED_RESOURCE_FLAG = Flags(DWORD, [
159 "DXGI_SHARED_RESOURCE_READ",
160 "DXGI_SHARED_RESOURCE_WRITE",
161])
162
163
José Fonsecaca55d162012-04-16 13:05:47 +0100164IDXGIKeyedMutex.methods += [
165 StdMethod(HRESULT, "AcquireSync", [(UINT64, "Key"), (DWORD, "dwMilliseconds")]),
166 StdMethod(HRESULT, "ReleaseSync", [(UINT64, "Key")]),
167]
168
169DXGI_MAP = Flags(UINT, [
170 "DXGI_MAP_READ",
171 "DXGI_MAP_WRITE",
172 "DXGI_MAP_DISCARD",
173])
174
175IDXGISurface.methods += [
José Fonseca3f174372012-05-08 12:09:42 +0100176 StdMethod(HRESULT, "GetDesc", [Out(Pointer(DXGI_SURFACE_DESC), "pDesc")], sideeffects=False),
José Fonsecaca55d162012-04-16 13:05:47 +0100177 StdMethod(HRESULT, "Map", [Out(Pointer(DXGI_MAPPED_RECT), "pLockedRect"), (DXGI_MAP, "MapFlags")]),
178 StdMethod(HRESULT, "Unmap", []),
179]
180
181IDXGISurface1.methods += [
182 StdMethod(HRESULT, "GetDC", [(BOOL, "Discard"), Out(Pointer(HDC), "phdc")]),
183 StdMethod(HRESULT, "ReleaseDC", [(Pointer(RECT), "pDirtyRect")]),
184]
185
186IDXGIAdapter.methods += [
187 StdMethod(HRESULT, "EnumOutputs", [(UINT, "Output"), Out(Pointer(ObjPointer(IDXGIOutput)), "ppOutput")]),
José Fonseca45fff9c2012-05-08 09:07:27 +0100188 StdMethod(HRESULT, "GetDesc", [Out(Pointer(DXGI_ADAPTER_DESC), "pDesc")], sideeffects=False),
189 StdMethod(HRESULT, "CheckInterfaceSupport", [(REFGUID, "InterfaceName"), Out(Pointer(LARGE_INTEGER), "pUMDVersion")], sideeffects=False),
José Fonsecaca55d162012-04-16 13:05:47 +0100190]
191
192DXGI_ENUM_MODES = Flags(UINT, [
193 "DXGI_ENUM_MODES_INTERLACED",
194 "DXGI_ENUM_MODES_SCALING",
195])
196
197IDXGIOutput.methods += [
José Fonseca45fff9c2012-05-08 09:07:27 +0100198 StdMethod(HRESULT, "GetDesc", [Out(Pointer(DXGI_OUTPUT_DESC), "pDesc")], sideeffects=False),
199 StdMethod(HRESULT, "GetDisplayModeList", [(DXGI_FORMAT, "EnumFormat"), (DXGI_ENUM_MODES, "Flags"), Out(Pointer(UINT), "pNumModes"), Out(Array(DXGI_MODE_DESC, "*pNumModes"), "pDesc")], sideeffects=False),
José Fonsecaca55d162012-04-16 13:05:47 +0100200 StdMethod(HRESULT, "FindClosestMatchingMode", [(Pointer(Const(DXGI_MODE_DESC)), "pModeToMatch"), Out(Pointer(DXGI_MODE_DESC), "pClosestMatch"), (ObjPointer(IUnknown), "pConcernedDevice")]),
201 StdMethod(HRESULT, "WaitForVBlank", []),
202 StdMethod(HRESULT, "TakeOwnership", [(ObjPointer(IUnknown), "pDevice"), (BOOL, "Exclusive")]),
203 StdMethod(Void, "ReleaseOwnership", []),
204 StdMethod(HRESULT, "GetGammaControlCapabilities", [Out(Pointer(DXGI_GAMMA_CONTROL_CAPABILITIES), "pGammaCaps")]),
205 StdMethod(HRESULT, "SetGammaControl", [(Pointer(Const(DXGI_GAMMA_CONTROL)), "pArray")]),
José Fonseca45fff9c2012-05-08 09:07:27 +0100206 StdMethod(HRESULT, "GetGammaControl", [Out(Pointer(DXGI_GAMMA_CONTROL), "pArray")], sideeffects=False),
José Fonsecaca55d162012-04-16 13:05:47 +0100207 StdMethod(HRESULT, "SetDisplaySurface", [(ObjPointer(IDXGISurface), "pScanoutSurface")]),
208 StdMethod(HRESULT, "GetDisplaySurfaceData", [(ObjPointer(IDXGISurface), "pDestination")]),
José Fonseca45fff9c2012-05-08 09:07:27 +0100209 StdMethod(HRESULT, "GetFrameStatistics", [Out(Pointer(DXGI_FRAME_STATISTICS), "pStats")], sideeffects=False),
José Fonsecaca55d162012-04-16 13:05:47 +0100210]
211
212DXGI_PRESENT = Flags(UINT, [
213 "DXGI_PRESENT_TEST",
214 "DXGI_PRESENT_DO_NOT_SEQUENCE",
215 "DXGI_PRESENT_RESTART",
216])
217
218IDXGISwapChain.methods += [
219 StdMethod(HRESULT, "Present", [(UINT, "SyncInterval"), (DXGI_PRESENT, "Flags")]),
220 StdMethod(HRESULT, "GetBuffer", [(UINT, "Buffer"), (REFIID, "riid"), Out(Pointer(ObjPointer(Void)), "ppSurface")]),
221 StdMethod(HRESULT, "SetFullscreenState", [(BOOL, "Fullscreen"), (ObjPointer(IDXGIOutput), "pTarget")]),
222 StdMethod(HRESULT, "GetFullscreenState", [Out(Pointer(BOOL), "pFullscreen"), Out(Pointer(ObjPointer(IDXGIOutput)), "ppTarget")]),
José Fonseca45fff9c2012-05-08 09:07:27 +0100223 StdMethod(HRESULT, "GetDesc", [Out(Pointer(DXGI_SWAP_CHAIN_DESC), "pDesc")], sideeffects=False),
José Fonsecaf450d8b2012-11-20 14:48:31 +0000224 StdMethod(HRESULT, "ResizeBuffers", [(UINT, "BufferCount"), (UINT, "Width"), (UINT, "Height"), (DXGI_FORMAT, "NewFormat"), (DXGI_SWAP_CHAIN_FLAG, "SwapChainFlags")]),
José Fonsecaca55d162012-04-16 13:05:47 +0100225 StdMethod(HRESULT, "ResizeTarget", [(Pointer(Const(DXGI_MODE_DESC)), "pNewTargetParameters")]),
226 StdMethod(HRESULT, "GetContainingOutput", [Out(Pointer(ObjPointer(IDXGIOutput)), "ppOutput")]),
José Fonseca45fff9c2012-05-08 09:07:27 +0100227 StdMethod(HRESULT, "GetFrameStatistics", [Out(Pointer(DXGI_FRAME_STATISTICS), "pStats")], sideeffects=False),
228 StdMethod(HRESULT, "GetLastPresentCount", [Out(Pointer(UINT), "pLastPresentCount")], sideeffects=False),
José Fonsecaca55d162012-04-16 13:05:47 +0100229]
230
231DXGI_MWA = Flags(UINT, [
232 "DXGI_MWA_NO_WINDOW_CHANGES",
233 "DXGI_MWA_NO_ALT_ENTER",
234 "DXGI_MWA_NO_PRINT_SCREEN",
235 "DXGI_MWA_VALID",
236])
237
238IDXGIFactory.methods += [
239 StdMethod(HRESULT, "EnumAdapters", [(UINT, "Adapter"), Out(Pointer(ObjPointer(IDXGIAdapter)), "ppAdapter")]),
240 StdMethod(HRESULT, "MakeWindowAssociation", [(HWND, "WindowHandle"), (DXGI_MWA, "Flags")]),
José Fonseca45fff9c2012-05-08 09:07:27 +0100241 StdMethod(HRESULT, "GetWindowAssociation", [Out(Pointer(HWND), "pWindowHandle")], sideeffects=False),
José Fonsecaca55d162012-04-16 13:05:47 +0100242 StdMethod(HRESULT, "CreateSwapChain", [(ObjPointer(IUnknown), "pDevice"), (Pointer(DXGI_SWAP_CHAIN_DESC), "pDesc"), Out(Pointer(ObjPointer(IDXGISwapChain)), "ppSwapChain")]),
243 StdMethod(HRESULT, "CreateSoftwareAdapter", [(HMODULE, "Module"), Out(Pointer(ObjPointer(IDXGIAdapter)), "ppAdapter")]),
244]
245
246IDXGIDevice.methods += [
247 StdMethod(HRESULT, "GetAdapter", [Out(Pointer(ObjPointer(IDXGIAdapter)), "pAdapter")]),
248 StdMethod(HRESULT, "CreateSurface", [(Pointer(Const(DXGI_SURFACE_DESC)), "pDesc"), (UINT, "NumSurfaces"), (DXGI_USAGE, "Usage"), (Pointer(Const(DXGI_SHARED_RESOURCE)), "pSharedResource"), Out(Pointer(ObjPointer(IDXGISurface)), "ppSurface")]),
José Fonseca45fff9c2012-05-08 09:07:27 +0100249 StdMethod(HRESULT, "QueryResourceResidency", [(Array(Const(ObjPointer(IUnknown)), "NumResources"), "ppResources"), Out(Array(DXGI_RESIDENCY, "NumResources"), "pResidencyStatus"), (UINT, "NumResources")], sideeffects=False),
José Fonsecaca55d162012-04-16 13:05:47 +0100250 StdMethod(HRESULT, "SetGPUThreadPriority", [(INT, "Priority")]),
José Fonseca45fff9c2012-05-08 09:07:27 +0100251 StdMethod(HRESULT, "GetGPUThreadPriority", [Out(Pointer(INT), "pPriority")], sideeffects=False),
José Fonsecaca55d162012-04-16 13:05:47 +0100252]
253
254DXGI_ADAPTER_FLAG = Enum("DXGI_ADAPTER_FLAG", [
255 "DXGI_ADAPTER_FLAG_NONE",
256 "DXGI_ADAPTER_FLAG_REMOTE",
257])
258
259DXGI_ADAPTER_DESC1 = Struct("DXGI_ADAPTER_DESC1", [
260 (WString, "Description"),
261 (UINT, "VendorId"),
262 (UINT, "DeviceId"),
263 (UINT, "SubSysId"),
264 (UINT, "Revision"),
265 (SIZE_T, "DedicatedVideoMemory"),
266 (SIZE_T, "DedicatedSystemMemory"),
267 (SIZE_T, "SharedSystemMemory"),
268 (LUID, "AdapterLuid"),
José Fonsecaaf7d2312011-07-07 10:16:57 +0100269 (UINT, "Flags"),
270])
271
José Fonsecaca55d162012-04-16 13:05:47 +0100272DXGI_DISPLAY_COLOR_SPACE = Struct("DXGI_DISPLAY_COLOR_SPACE", [
273 (Array(Array(FLOAT, 8), 2), "PrimaryCoordinates"),
274 (Array(Array(FLOAT, 16), 2), "WhitePoints"),
José Fonsecaaf7d2312011-07-07 10:16:57 +0100275])
276
José Fonsecaca55d162012-04-16 13:05:47 +0100277IDXGIFactory1.methods += [
278 StdMethod(HRESULT, "EnumAdapters1", [(UINT, "Adapter"), Out(Pointer(ObjPointer(IDXGIAdapter1)), "ppAdapter")]),
279 StdMethod(BOOL, "IsCurrent", []),
José Fonsecaaf7d2312011-07-07 10:16:57 +0100280]
281
José Fonsecaca55d162012-04-16 13:05:47 +0100282IDXGIAdapter1.methods += [
José Fonseca45fff9c2012-05-08 09:07:27 +0100283 StdMethod(HRESULT, "GetDesc1", [Out(Pointer(DXGI_ADAPTER_DESC1), "pDesc")], sideeffects=False),
José Fonsecaaf7d2312011-07-07 10:16:57 +0100284]
285
José Fonsecaca55d162012-04-16 13:05:47 +0100286IDXGIDevice1.methods += [
287 StdMethod(HRESULT, "SetMaximumFrameLatency", [(UINT, "MaxLatency")]),
José Fonseca45fff9c2012-05-08 09:07:27 +0100288 StdMethod(HRESULT, "GetMaximumFrameLatency", [Out(Pointer(UINT), "pMaxLatency")], sideeffects=False),
José Fonsecaaf7d2312011-07-07 10:16:57 +0100289]
290
José Fonsecaf450d8b2012-11-20 14:48:31 +0000291
292IDXGIFactoryDWM = Interface("IDXGIFactoryDWM", IUnknown)
293IDXGISwapChainDWM = Interface("IDXGISwapChainDWM", IDXGIDeviceSubObject)
294
295IDXGIFactoryDWM.methods += [
296 StdMethod(HRESULT, "CreateSwapChain", [(ObjPointer(IUnknown), "pDevice"), (Pointer(DXGI_SWAP_CHAIN_DESC), "pDesc"), (ObjPointer(IDXGIOutput), "pOutput"), Out(Pointer(ObjPointer(IDXGISwapChainDWM)), "ppSwapChain")]),
297]
298
299IDXGISwapChainDWM.methods += [
300 StdMethod(HRESULT, "Present", [(UINT, "SyncInterval"), (DXGI_PRESENT, "Flags")]),
301 StdMethod(HRESULT, "GetBuffer", [(UINT, "Buffer"), (REFIID, "riid"), Out(Pointer(ObjPointer(Void)), "ppSurface")]),
302 StdMethod(HRESULT, "GetDesc", [Out(Pointer(DXGI_SWAP_CHAIN_DESC), "pDesc")], sideeffects=False),
303 StdMethod(HRESULT, "ResizeBuffers", [(UINT, "BufferCount"), (UINT, "Width"), (UINT, "Height"), (DXGI_FORMAT, "NewFormat"), (DXGI_SWAP_CHAIN_FLAG, "SwapChainFlags")]),
304 StdMethod(HRESULT, "ResizeTarget", [(Pointer(Const(DXGI_MODE_DESC)), "pNewTargetParameters")]),
305 StdMethod(HRESULT, "GetContainingOutput", [Out(Pointer(ObjPointer(IDXGIOutput)), "ppOutput")]),
306 StdMethod(HRESULT, "GetFrameStatistics", [(Pointer(DXGI_FRAME_STATISTICS), "pStats")], sideeffects=False),
307 StdMethod(HRESULT, "GetLastPresentCount", [(Pointer(UINT), "pLastPresentCount")], sideeffects=False),
308 StdMethod(HRESULT, "SetFullscreenState", [(BOOL, "Fullscreen"), (ObjPointer(IDXGIOutput), "pTarget")]),
309 StdMethod(HRESULT, "GetFullscreenState", [Out(Pointer(BOOL), "pFullscreen"), Out(Pointer(ObjPointer(IDXGIOutput)), "ppTarget")]),
310]
311
312
José Fonseca81301932012-11-11 00:10:20 +0000313dxgi = Module('dxgi')
José Fonsecacdefc482012-11-16 20:06:20 +0000314dxgi.addInterfaces([
José Fonsecaf450d8b2012-11-20 14:48:31 +0000315 IDXGIFactory1,
316 IDXGIFactoryDWM,
José Fonsecacdefc482012-11-16 20:06:20 +0000317])
José Fonsecaca55d162012-04-16 13:05:47 +0100318dxgi.addFunctions([
José Fonseca82715be2012-11-04 23:54:27 +0000319 StdFunction(HRESULT, "CreateDXGIFactory", [(REFIID, "riid"), Out(Pointer(ObjPointer(Void)), "ppFactory")]),
320 StdFunction(HRESULT, "CreateDXGIFactory1", [(REFIID, "riid"), Out(Pointer(ObjPointer(Void)), "ppFactory")]),
José Fonsecaca55d162012-04-16 13:05:47 +0100321])