winejoystick: Fix a crash on accessing a CFArray past its end due to an off-by-one...
[wine/multimedia.git] / include / dxgi1_2.idl
blobbba4ab804c3fffca4534427fd03dec121d206cbd
1 /*
2 * Copyright 2014 Jacek Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 import "dxgi.idl";
21 typedef enum _DXGI_OFFER_RESOURCE_PRIORITY {
22 DXGI_OFFER_RESOURCE_PRIORITY_LOW = 1,
23 DXGI_OFFER_RESOURCE_PRIORITY_NORMAL,
24 DXGI_OFFER_RESOURCE_PRIORITY_HIGH
25 } DXGI_OFFER_RESOURCE_PRIORITY;
27 typedef enum DXGI_ALPHA_MODE {
28 DXGI_ALPHA_MODE_UNSPECIFIED = 0,
29 DXGI_ALPHA_MODE_PREMULTIPLIED = 1,
30 DXGI_ALPHA_MODE_STRAIGHT = 2,
31 DXGI_ALPHA_MODE_IGNORE = 3,
32 DXGI_ALPHA_MODE_FORCE_DWORD = 0xffffffff
33 } DXGI_ALPHA_MODE;
36 object,
37 uuid(05008617-fbfd-4051-a790-144884b4f6a9),
38 local,
39 pointer_default(unique)
41 interface IDXGIDevice2 : IDXGIDevice1
43 HRESULT OfferResources(
44 [in] UINT NumResources,
45 [in, size_is(NumResources)] IDXGIResource *const *ppResources,
46 [in] DXGI_OFFER_RESOURCE_PRIORITY Priority);
48 HRESULT ReclaimResources(
49 [in] UINT NumResources,
50 [in, size_is(NumResources)] IDXGIResource *const *ppResources,
51 [out, size_is(NumResources)] BOOL *pDiscarded);
53 HRESULT EnqueueSetEvent(
54 [in] HANDLE hEvent);
57 typedef enum DXGI_SCALING {
58 DXGI_SCALING_STRETCH = 0,
59 DXGI_SCALING_NONE = 1
60 } DXGI_SCALING;
62 typedef struct DXGI_SWAP_CHAIN_DESC1 {
63 UINT Width;
64 UINT Height;
65 DXGI_FORMAT Format;
66 BOOL Stereo;
67 DXGI_SAMPLE_DESC SampleDesc;
68 DXGI_USAGE BufferUsage;
69 UINT BufferCount;
70 DXGI_SCALING Scaling;
71 DXGI_SWAP_EFFECT SwapEffect;
72 DXGI_ALPHA_MODE AlphaMode;
73 UINT Flags;
74 } DXGI_SWAP_CHAIN_DESC1;
76 typedef struct DXGI_SWAP_CHAIN_FULLSCREEN_DESC {
77 DXGI_RATIONAL RefreshRate;
78 DXGI_MODE_SCANLINE_ORDER ScanlineOrdering;
79 DXGI_MODE_SCALING Scaling;
80 BOOL Windowed;
81 } DXGI_SWAP_CHAIN_FULLSCREEN_DESC;
83 typedef struct DXGI_PRESENT_PARAMETERS {
84 UINT DirtyRectsCount;
85 RECT *pDirtyRects;
86 RECT *pScrollRect;
87 POINT *pScrollOffset;
88 } DXGI_PRESENT_PARAMETERS;
91 object,
92 uuid(790a45f7-0d42-4876-983a-0a55cfe6f4aa),
93 local,
94 pointer_default(unique)
96 interface IDXGISwapChain1 : IDXGISwapChain
98 HRESULT GetDesc1(
99 [out] DXGI_SWAP_CHAIN_DESC1 *pDesc);
101 HRESULT GetFullscreenDesc(
102 [out] DXGI_SWAP_CHAIN_FULLSCREEN_DESC *pDesc);
104 HRESULT GetHwnd(
105 [out] HWND *pHwnd);
107 HRESULT GetCoreWindow(
108 [in] REFIID refiid,
109 [out] void **ppUnk);
111 HRESULT Present1(
112 [in] UINT SyncInterval,
113 [in] UINT PresentFlags,
114 [in] const DXGI_PRESENT_PARAMETERS *pPresentParameters);
116 BOOL IsTemporaryMonoSupported();
118 HRESULT GetRestrictToOutput(
119 [out] IDXGIOutput **ppRestrictToOutput);
121 HRESULT SetBackgroundColor(
122 [in] const DXGI_RGBA *pColor);
124 HRESULT GetBackgroundColor(
125 [out] DXGI_RGBA *pColor);
127 HRESULT SetRotation(
128 [in] DXGI_MODE_ROTATION Rotation);
130 HRESULT GetRotation(
131 [out] DXGI_MODE_ROTATION *pRotation);