blob: 983ce3c3f65f355a74de889eff0538a70c11cbb7 [file] [log] [blame]
Jose Fonsecabab19212016-01-31 23:58:30 +00001##########################################################################
2#
3# Copyright 2009-2016 VMware, Inc.
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
26
27from dxgi import *
28from d2d1 import D2D_MATRIX_3X2_F, D2D_RECT_F
29from d3d9types import D3DMATRIX
30from d2d1 import D2D1_COMPOSITE_MODE
31
32DCOMPOSITION_BITMAP_INTERPOLATION_MODE = Enum('DCOMPOSITION_BITMAP_INTERPOLATION_MODE', [
33 'DCOMPOSITION_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR',
34 'DCOMPOSITION_BITMAP_INTERPOLATION_MODE_LINEAR',
35 'DCOMPOSITION_BITMAP_INTERPOLATION_MODE_INHERIT',
36])
37
38DCOMPOSITION_BORDER_MODE = Enum('DCOMPOSITION_BORDER_MODE', [
39 'DCOMPOSITION_BORDER_MODE_SOFT',
40 'DCOMPOSITION_BORDER_MODE_HARD',
41 'DCOMPOSITION_BORDER_MODE_INHERIT',
42])
43
44DCOMPOSITION_COMPOSITE_MODE = Enum('DCOMPOSITION_COMPOSITE_MODE', [
45 'DCOMPOSITION_COMPOSITE_MODE_SOURCE_OVER',
46 'DCOMPOSITION_COMPOSITE_MODE_DESTINATION_INVERT',
47 'DCOMPOSITION_COMPOSITE_MODE_INHERIT',
48])
49
50DCOMPOSITION_FRAME_STATISTICS = Struct('DCOMPOSITION_FRAME_STATISTICS', [
51 (LARGE_INTEGER, 'lastFrameTime'),
52 (DXGI_RATIONAL, 'currentCompositionRate'),
53 (LARGE_INTEGER, 'currentTime'),
54 (LARGE_INTEGER, 'timeFrequency'),
55 (LARGE_INTEGER, 'nextEstimatedFrameTime'),
56])
57
58COMPOSITIONOBJECT = Flags(DWORD, [
59 'COMPOSITIONOBJECT_ALL_ACCESS', # 0x0003
60 'COMPOSITIONOBJECT_READ', # 0x0001
61 'COMPOSITIONOBJECT_WRITE', # 0x0002
62])
63
64IDCompositionAnimation = Interface('IDCompositionAnimation', IUnknown)
65IDCompositionDevice = Interface('IDCompositionDevice', IUnknown)
66IDCompositionTarget = Interface('IDCompositionTarget', IUnknown)
67IDCompositionVisual = Interface('IDCompositionVisual', IUnknown)
68IDCompositionEffect = Interface('IDCompositionEffect', IUnknown)
69IDCompositionEffectGroup = Interface('IDCompositionEffectGroup', IDCompositionEffect)
70IDCompositionTransform3D = Interface('IDCompositionTransform3D', IDCompositionEffect)
71IDCompositionTransform = Interface('IDCompositionTransform', IDCompositionTransform3D)
72IDCompositionTranslateTransform = Interface('IDCompositionTranslateTransform', IDCompositionTransform)
73IDCompositionTranslateTransform3D = Interface('IDCompositionTranslateTransform3D', IDCompositionTransform3D)
74IDCompositionScaleTransform = Interface('IDCompositionScaleTransform', IDCompositionTransform)
75IDCompositionScaleTransform3D = Interface('IDCompositionScaleTransform3D', IDCompositionTransform3D)
76IDCompositionRotateTransform = Interface('IDCompositionRotateTransform', IDCompositionTransform)
77IDCompositionRotateTransform3D = Interface('IDCompositionRotateTransform3D', IDCompositionTransform3D)
78IDCompositionSkewTransform = Interface('IDCompositionSkewTransform', IDCompositionTransform)
79IDCompositionMatrixTransform = Interface('IDCompositionMatrixTransform', IDCompositionTransform)
80IDCompositionMatrixTransform3D = Interface('IDCompositionMatrixTransform3D', IDCompositionTransform3D)
81IDCompositionClip = Interface('IDCompositionClip', IUnknown)
82IDCompositionRectangleClip = Interface('IDCompositionRectangleClip', IDCompositionClip)
83IDCompositionSurface = Interface('IDCompositionSurface', IUnknown)
84IDCompositionVirtualSurface = Interface('IDCompositionVirtualSurface', IDCompositionSurface)
85
86IDCompositionAnimation.methods += [
87 StdMethod(HRESULT, 'Reset', []),
88 StdMethod(HRESULT, 'SetAbsoluteBeginTime', [(LARGE_INTEGER, 'beginTime')]),
89 StdMethod(HRESULT, 'AddCubic', [(Double, 'beginOffset'), (Float, 'constantCoefficient'), (Float, 'linearCoefficient'), (Float, 'quadraticCoefficient'), (Float, 'cubicCoefficient')]),
90 StdMethod(HRESULT, 'AddSinusoidal', [(Double, 'beginOffset'), (Float, 'bias'), (Float, 'amplitude'), (Float, 'frequency'), (Float, 'phase')]),
91 StdMethod(HRESULT, 'AddRepeat', [(Double, 'beginOffset'), (Double, 'durationToRepeat')]),
92 StdMethod(HRESULT, 'End', [(Double, 'endOffset'), (Float, 'endValue')]),
93]
94
95IDCompositionDevice.methods += [
96 StdMethod(HRESULT, 'Commit', []),
97 StdMethod(HRESULT, 'WaitForCommitCompletion', []),
98 StdMethod(HRESULT, 'GetFrameStatistics', [Out(Pointer(DCOMPOSITION_FRAME_STATISTICS), 'statistics')]),
99 StdMethod(HRESULT, 'CreateTargetForHwnd', [(HWND, 'hwnd'), (BOOL, 'topmost'), Out(Pointer(ObjPointer(IDCompositionTarget)), 'target')]),
100 StdMethod(HRESULT, 'CreateVisual', [Out(Pointer(ObjPointer(IDCompositionVisual)), 'visual')]),
101 StdMethod(HRESULT, 'CreateSurface', [(UINT, 'width'), (UINT, 'height'), (DXGI_FORMAT, 'pixelFormat'), (DXGI_ALPHA_MODE, 'alphaMode'), Out(Pointer(ObjPointer(IDCompositionSurface)), 'surface')]),
102 StdMethod(HRESULT, 'CreateVirtualSurface', [(UINT, 'initialWidth'), (UINT, 'initialHeight'), (DXGI_FORMAT, 'pixelFormat'), (DXGI_ALPHA_MODE, 'alphaMode'), Out(Pointer(ObjPointer(IDCompositionVirtualSurface)), 'virtualSurface')]),
103 StdMethod(HRESULT, 'CreateSurfaceFromHandle', [(HANDLE, 'handle'), Out(Pointer(ObjPointer(IUnknown)), 'surface')]),
104 StdMethod(HRESULT, 'CreateSurfaceFromHwnd', [(HWND, 'hwnd'), Out(Pointer(ObjPointer(IUnknown)), 'surface')]),
105 StdMethod(HRESULT, 'CreateTranslateTransform', [Out(Pointer(ObjPointer(IDCompositionTranslateTransform)), 'translateTransform')]),
106 StdMethod(HRESULT, 'CreateScaleTransform', [Out(Pointer(ObjPointer(IDCompositionScaleTransform)), 'scaleTransform')]),
107 StdMethod(HRESULT, 'CreateRotateTransform', [Out(Pointer(ObjPointer(IDCompositionRotateTransform)), 'rotateTransform')]),
108 StdMethod(HRESULT, 'CreateSkewTransform', [Out(Pointer(ObjPointer(IDCompositionSkewTransform)), 'skewTransform')]),
109 StdMethod(HRESULT, 'CreateMatrixTransform', [Out(Pointer(ObjPointer(IDCompositionMatrixTransform)), 'matrixTransform')]),
110 StdMethod(HRESULT, 'CreateTransformGroup', [(Array(ObjPointer(IDCompositionTransform), 'elements'), 'transforms'), (UINT, 'elements'), Out(Pointer(ObjPointer(IDCompositionTransform)), 'transformGroup')]),
111 StdMethod(HRESULT, 'CreateTranslateTransform3D', [Out(Pointer(ObjPointer(IDCompositionTranslateTransform3D)), 'translateTransform3D')]),
112 StdMethod(HRESULT, 'CreateScaleTransform3D', [Out(Pointer(ObjPointer(IDCompositionScaleTransform3D)), 'scaleTransform3D')]),
113 StdMethod(HRESULT, 'CreateRotateTransform3D', [Out(Pointer(ObjPointer(IDCompositionRotateTransform3D)), 'rotateTransform3D')]),
114 StdMethod(HRESULT, 'CreateMatrixTransform3D', [Out(Pointer(ObjPointer(IDCompositionMatrixTransform3D)), 'matrixTransform3D')]),
115 StdMethod(HRESULT, 'CreateTransform3DGroup', [(Array(ObjPointer(IDCompositionTransform3D), 'elements'), 'transforms3D'), (UINT, 'elements'), Out(Pointer(ObjPointer(IDCompositionTransform3D)), 'transform3DGroup')]),
116 StdMethod(HRESULT, 'CreateEffectGroup', [Out(Pointer(ObjPointer(IDCompositionEffectGroup)), 'effectGroup')]),
117 StdMethod(HRESULT, 'CreateRectangleClip', [Out(Pointer(ObjPointer(IDCompositionRectangleClip)), 'clip')]),
118 StdMethod(HRESULT, 'CreateAnimation', [Out(Pointer(ObjPointer(IDCompositionAnimation)), 'animation')]),
119 StdMethod(HRESULT, 'CheckDeviceState', [Out(Pointer(BOOL), 'pfValid')]),
120]
121
122IDCompositionTarget.methods += [
123 StdMethod(HRESULT, 'SetRoot', [(ObjPointer(IDCompositionVisual), 'visual')]),
124]
125
126IDCompositionVisual.methods += [
127 StdMethod(HRESULT, 'SetOffsetX', [(Float, 'offsetX')]),
128 StdMethod(HRESULT, 'SetOffsetX', [(ObjPointer(IDCompositionAnimation), 'animation')]),
129 StdMethod(HRESULT, 'SetOffsetY', [(Float, 'offsetY')]),
130 StdMethod(HRESULT, 'SetOffsetY', [(ObjPointer(IDCompositionAnimation), 'animation')]),
131 StdMethod(HRESULT, 'SetTransform', [(Reference(Const(D2D_MATRIX_3X2_F)), 'matrix')]),
132 StdMethod(HRESULT, 'SetTransform', [(ObjPointer(IDCompositionTransform), 'transform')]),
133 StdMethod(HRESULT, 'SetTransformParent', [(ObjPointer(IDCompositionVisual), 'visual')]),
134 StdMethod(HRESULT, 'SetEffect', [(ObjPointer(IDCompositionEffect), 'effect')]),
135 StdMethod(HRESULT, 'SetBitmapInterpolationMode', [(DCOMPOSITION_BITMAP_INTERPOLATION_MODE, 'interpolationMode')]),
136 StdMethod(HRESULT, 'SetBorderMode', [(DCOMPOSITION_BORDER_MODE, 'borderMode')]),
137 StdMethod(HRESULT, 'SetClip', [(Reference(Const(D2D_RECT_F)), 'rect')]),
138 StdMethod(HRESULT, 'SetClip', [(ObjPointer(IDCompositionClip), 'clip')]),
139 StdMethod(HRESULT, 'SetContent', [(ObjPointer(IUnknown), 'content')]),
140 StdMethod(HRESULT, 'AddVisual', [(ObjPointer(IDCompositionVisual), 'visual'), (BOOL, 'insertAbove'), (ObjPointer(IDCompositionVisual), 'referenceVisual')]),
141 StdMethod(HRESULT, 'RemoveVisual', [(ObjPointer(IDCompositionVisual), 'visual')]),
142 StdMethod(HRESULT, 'RemoveAllVisuals', []),
143 StdMethod(HRESULT, 'SetCompositeMode', [(DCOMPOSITION_COMPOSITE_MODE, 'compositeMode')]),
144]
145
146IDCompositionTransform.methods += [
147]
148
149IDCompositionTransform3D.methods += [
150]
151
152IDCompositionTranslateTransform.methods += [
153 StdMethod(HRESULT, 'SetOffsetX', [(Float, 'offsetX')]),
154 StdMethod(HRESULT, 'SetOffsetX', [(ObjPointer(IDCompositionAnimation), 'animation')]),
155 StdMethod(HRESULT, 'SetOffsetY', [(Float, 'offsetY')]),
156 StdMethod(HRESULT, 'SetOffsetY', [(ObjPointer(IDCompositionAnimation), 'animation')]),
157]
158
159IDCompositionTranslateTransform3D.methods += [
160 StdMethod(HRESULT, 'SetOffsetX', [(Float, 'offsetX')]),
161 StdMethod(HRESULT, 'SetOffsetX', [(ObjPointer(IDCompositionAnimation), 'animation')]),
162 StdMethod(HRESULT, 'SetOffsetY', [(Float, 'offsetY')]),
163 StdMethod(HRESULT, 'SetOffsetY', [(ObjPointer(IDCompositionAnimation), 'animation')]),
164 StdMethod(HRESULT, 'SetOffsetZ', [(Float, 'offsetZ')]),
165 StdMethod(HRESULT, 'SetOffsetZ', [(ObjPointer(IDCompositionAnimation), 'animation')]),
166]
167
168IDCompositionScaleTransform.methods += [
169 StdMethod(HRESULT, 'SetScaleX', [(Float, 'scaleX')]),
170 StdMethod(HRESULT, 'SetScaleX', [(ObjPointer(IDCompositionAnimation), 'animation')]),
171 StdMethod(HRESULT, 'SetScaleY', [(Float, 'scaleY')]),
172 StdMethod(HRESULT, 'SetScaleY', [(ObjPointer(IDCompositionAnimation), 'animation')]),
173 StdMethod(HRESULT, 'SetCenterX', [(Float, 'centerX')]),
174 StdMethod(HRESULT, 'SetCenterX', [(ObjPointer(IDCompositionAnimation), 'animation')]),
175 StdMethod(HRESULT, 'SetCenterY', [(Float, 'centerY')]),
176 StdMethod(HRESULT, 'SetCenterY', [(ObjPointer(IDCompositionAnimation), 'animation')]),
177]
178
179IDCompositionScaleTransform3D.methods += [
180 StdMethod(HRESULT, 'SetScaleX', [(Float, 'scaleX')]),
181 StdMethod(HRESULT, 'SetScaleX', [(ObjPointer(IDCompositionAnimation), 'animation')]),
182 StdMethod(HRESULT, 'SetScaleY', [(Float, 'scaleY')]),
183 StdMethod(HRESULT, 'SetScaleY', [(ObjPointer(IDCompositionAnimation), 'animation')]),
184 StdMethod(HRESULT, 'SetScaleZ', [(Float, 'scaleZ')]),
185 StdMethod(HRESULT, 'SetScaleZ', [(ObjPointer(IDCompositionAnimation), 'animation')]),
186 StdMethod(HRESULT, 'SetCenterX', [(Float, 'centerX')]),
187 StdMethod(HRESULT, 'SetCenterX', [(ObjPointer(IDCompositionAnimation), 'animation')]),
188 StdMethod(HRESULT, 'SetCenterY', [(Float, 'centerY')]),
189 StdMethod(HRESULT, 'SetCenterY', [(ObjPointer(IDCompositionAnimation), 'animation')]),
190 StdMethod(HRESULT, 'SetCenterZ', [(Float, 'centerZ')]),
191 StdMethod(HRESULT, 'SetCenterZ', [(ObjPointer(IDCompositionAnimation), 'animation')]),
192]
193
194IDCompositionRotateTransform.methods += [
195 StdMethod(HRESULT, 'SetAngle', [(Float, 'angle')]),
196 StdMethod(HRESULT, 'SetAngle', [(ObjPointer(IDCompositionAnimation), 'animation')]),
197 StdMethod(HRESULT, 'SetCenterX', [(Float, 'centerX')]),
198 StdMethod(HRESULT, 'SetCenterX', [(ObjPointer(IDCompositionAnimation), 'animation')]),
199 StdMethod(HRESULT, 'SetCenterY', [(Float, 'centerY')]),
200 StdMethod(HRESULT, 'SetCenterY', [(ObjPointer(IDCompositionAnimation), 'animation')]),
201]
202
203IDCompositionRotateTransform3D.methods += [
204 StdMethod(HRESULT, 'SetAngle', [(Float, 'angle')]),
205 StdMethod(HRESULT, 'SetAngle', [(ObjPointer(IDCompositionAnimation), 'animation')]),
206 StdMethod(HRESULT, 'SetAxisX', [(Float, 'axisX')]),
207 StdMethod(HRESULT, 'SetAxisX', [(ObjPointer(IDCompositionAnimation), 'animation')]),
208 StdMethod(HRESULT, 'SetAxisY', [(Float, 'axisY')]),
209 StdMethod(HRESULT, 'SetAxisY', [(ObjPointer(IDCompositionAnimation), 'animation')]),
210 StdMethod(HRESULT, 'SetAxisZ', [(Float, 'axisZ')]),
211 StdMethod(HRESULT, 'SetAxisZ', [(ObjPointer(IDCompositionAnimation), 'animation')]),
212 StdMethod(HRESULT, 'SetCenterX', [(Float, 'centerX')]),
213 StdMethod(HRESULT, 'SetCenterX', [(ObjPointer(IDCompositionAnimation), 'animation')]),
214 StdMethod(HRESULT, 'SetCenterY', [(Float, 'centerY')]),
215 StdMethod(HRESULT, 'SetCenterY', [(ObjPointer(IDCompositionAnimation), 'animation')]),
216 StdMethod(HRESULT, 'SetCenterZ', [(Float, 'centerZ')]),
217 StdMethod(HRESULT, 'SetCenterZ', [(ObjPointer(IDCompositionAnimation), 'animation')]),
218]
219
220IDCompositionSkewTransform.methods += [
221 StdMethod(HRESULT, 'SetAngleX', [(Float, 'angleX')]),
222 StdMethod(HRESULT, 'SetAngleX', [(ObjPointer(IDCompositionAnimation), 'animation')]),
223 StdMethod(HRESULT, 'SetAngleY', [(Float, 'angleY')]),
224 StdMethod(HRESULT, 'SetAngleY', [(ObjPointer(IDCompositionAnimation), 'animation')]),
225 StdMethod(HRESULT, 'SetCenterX', [(Float, 'centerX')]),
226 StdMethod(HRESULT, 'SetCenterX', [(ObjPointer(IDCompositionAnimation), 'animation')]),
227 StdMethod(HRESULT, 'SetCenterY', [(Float, 'centerY')]),
228 StdMethod(HRESULT, 'SetCenterY', [(ObjPointer(IDCompositionAnimation), 'animation')]),
229]
230
231IDCompositionMatrixTransform.methods += [
232 StdMethod(HRESULT, 'SetMatrix', [(Reference(Const(D2D_MATRIX_3X2_F)), 'matrix')]),
233 StdMethod(HRESULT, 'SetMatrixElement', [(Int, 'row'), (Int, 'column'), (Float, 'value')]),
234 StdMethod(HRESULT, 'SetMatrixElement', [(Int, 'row'), (Int, 'column'), (ObjPointer(IDCompositionAnimation), 'animation')]),
235]
236
237IDCompositionMatrixTransform3D.methods += [
238 StdMethod(HRESULT, 'SetMatrix', [(Reference(Const(D3DMATRIX)), 'matrix')]),
239 StdMethod(HRESULT, 'SetMatrixElement', [(Int, 'row'), (Int, 'column'), (Float, 'value')]),
240 StdMethod(HRESULT, 'SetMatrixElement', [(Int, 'row'), (Int, 'column'), (ObjPointer(IDCompositionAnimation), 'animation')]),
241]
242
243IDCompositionEffect.methods += [
244]
245
246IDCompositionEffectGroup.methods += [
247 StdMethod(HRESULT, 'SetOpacity', [(Float, 'opacity')]),
248 StdMethod(HRESULT, 'SetOpacity', [(ObjPointer(IDCompositionAnimation), 'animation')]),
249 StdMethod(HRESULT, 'SetTransform3D', [(ObjPointer(IDCompositionTransform3D), 'transform3D')]),
250]
251
252IDCompositionClip.methods += [
253]
254
255IDCompositionRectangleClip.methods += [
256 StdMethod(HRESULT, 'SetLeft', [(Float, 'left')]),
257 StdMethod(HRESULT, 'SetLeft', [(ObjPointer(IDCompositionAnimation), 'animation')]),
258 StdMethod(HRESULT, 'SetTop', [(Float, 'top')]),
259 StdMethod(HRESULT, 'SetTop', [(ObjPointer(IDCompositionAnimation), 'animation')]),
260 StdMethod(HRESULT, 'SetRight', [(Float, 'right')]),
261 StdMethod(HRESULT, 'SetRight', [(ObjPointer(IDCompositionAnimation), 'animation')]),
262 StdMethod(HRESULT, 'SetBottom', [(Float, 'bottom')]),
263 StdMethod(HRESULT, 'SetBottom', [(ObjPointer(IDCompositionAnimation), 'animation')]),
264 StdMethod(HRESULT, 'SetTopLeftRadiusX', [(Float, 'radius')]),
265 StdMethod(HRESULT, 'SetTopLeftRadiusX', [(ObjPointer(IDCompositionAnimation), 'animation')]),
266 StdMethod(HRESULT, 'SetTopLeftRadiusY', [(Float, 'radius')]),
267 StdMethod(HRESULT, 'SetTopLeftRadiusY', [(ObjPointer(IDCompositionAnimation), 'animation')]),
268 StdMethod(HRESULT, 'SetTopRightRadiusX', [(Float, 'radius')]),
269 StdMethod(HRESULT, 'SetTopRightRadiusX', [(ObjPointer(IDCompositionAnimation), 'animation')]),
270 StdMethod(HRESULT, 'SetTopRightRadiusY', [(Float, 'radius')]),
271 StdMethod(HRESULT, 'SetTopRightRadiusY', [(ObjPointer(IDCompositionAnimation), 'animation')]),
272 StdMethod(HRESULT, 'SetBottomLeftRadiusX', [(Float, 'radius')]),
273 StdMethod(HRESULT, 'SetBottomLeftRadiusX', [(ObjPointer(IDCompositionAnimation), 'animation')]),
274 StdMethod(HRESULT, 'SetBottomLeftRadiusY', [(Float, 'radius')]),
275 StdMethod(HRESULT, 'SetBottomLeftRadiusY', [(ObjPointer(IDCompositionAnimation), 'animation')]),
276 StdMethod(HRESULT, 'SetBottomRightRadiusX', [(Float, 'radius')]),
277 StdMethod(HRESULT, 'SetBottomRightRadiusX', [(ObjPointer(IDCompositionAnimation), 'animation')]),
278 StdMethod(HRESULT, 'SetBottomRightRadiusY', [(Float, 'radius')]),
279 StdMethod(HRESULT, 'SetBottomRightRadiusY', [(ObjPointer(IDCompositionAnimation), 'animation')]),
280]
281
282IDCompositionSurface.methods += [
283 # XXX: riid might be ID2D1DeviceContext
284 StdMethod(HRESULT, 'BeginDraw', [(Pointer(Const(RECT)), 'updateRect'), (REFIID, 'iid'), Out(Pointer(ObjPointer(Void)), 'updateObject'), Out(Pointer(POINT), 'updateOffset')]),
285 StdMethod(HRESULT, 'EndDraw', []),
286 StdMethod(HRESULT, 'SuspendDraw', []),
287 StdMethod(HRESULT, 'ResumeDraw', []),
288 StdMethod(HRESULT, 'Scroll', [(Pointer(Const(RECT)), 'scrollRect'), (Pointer(Const(RECT)), 'clipRect'), (Int, 'offsetX'), (Int, 'offsetY')]),
289]
290
291IDCompositionVirtualSurface.methods += [
292 StdMethod(HRESULT, 'Resize', [(UINT, 'width'), (UINT, 'height')]),
293 StdMethod(HRESULT, 'Trim', [(Array(Const(RECT), 'count'), 'rectangles'), (UINT, 'count')]),
294]
295
296dcomp = Module('dcomp')
297dcomp.addFunctions([
298 StdFunction(HRESULT, 'DCompositionCreateDevice', [(ObjPointer(IDXGIDevice), 'dxgiDevice'), (REFIID, 'iid'), Out(Pointer(ObjPointer(Void)), 'dcompositionDevice')]),
299 StdFunction(HRESULT, 'DCompositionCreateSurfaceHandle', [(COMPOSITIONOBJECT, 'desiredAccess'), (Pointer(SECURITY_ATTRIBUTES), 'securityAttributes'), Out(Pointer(HANDLE), 'surfaceHandle')]),
300])
301dcomp.addInterfaces([
302 IDCompositionDevice,
303])