blob: b139a89e7bf3eb58b31e81d66a3bf4d9116eda73 [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
Piotr Podsiadły0b8b0192019-01-03 20:39:55 +010027from .dxgi import *
28from .d2d1 import D2D_MATRIX_3X2_F, D2D_RECT_F
29from .d3d9types import D3DMATRIX
30from .d2d1 import D2D1_COMPOSITE_MODE
Jose Fonsecabab19212016-01-31 23:58:30 +000031
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 += [
Jose Fonsecafdcd30b2016-02-01 14:13:40 +0000127 StdMethod(HRESULT, 'SetOffsetX', [(Float, 'offsetX')], overloaded=True),
128 StdMethod(HRESULT, 'SetOffsetX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
129 StdMethod(HRESULT, 'SetOffsetY', [(Float, 'offsetY')], overloaded=True),
130 StdMethod(HRESULT, 'SetOffsetY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
131 StdMethod(HRESULT, 'SetTransform', [(Reference(Const(D2D_MATRIX_3X2_F)), 'matrix')], overloaded=True),
132 StdMethod(HRESULT, 'SetTransform', [(ObjPointer(IDCompositionTransform), 'transform')], overloaded=True),
Jose Fonsecabab19212016-01-31 23:58:30 +0000133 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')]),
Jose Fonsecafdcd30b2016-02-01 14:13:40 +0000137 StdMethod(HRESULT, 'SetClip', [(Reference(Const(D2D_RECT_F)), 'rect')], overloaded=True),
138 StdMethod(HRESULT, 'SetClip', [(ObjPointer(IDCompositionClip), 'clip')], overloaded=True),
Jose Fonsecabab19212016-01-31 23:58:30 +0000139 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 += [
Jose Fonsecafdcd30b2016-02-01 14:13:40 +0000153 StdMethod(HRESULT, 'SetOffsetX', [(Float, 'offsetX')], overloaded=True),
154 StdMethod(HRESULT, 'SetOffsetX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
155 StdMethod(HRESULT, 'SetOffsetY', [(Float, 'offsetY')], overloaded=True),
156 StdMethod(HRESULT, 'SetOffsetY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
Jose Fonsecabab19212016-01-31 23:58:30 +0000157]
158
159IDCompositionTranslateTransform3D.methods += [
Jose Fonsecafdcd30b2016-02-01 14:13:40 +0000160 StdMethod(HRESULT, 'SetOffsetX', [(Float, 'offsetX')], overloaded=True),
161 StdMethod(HRESULT, 'SetOffsetX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
162 StdMethod(HRESULT, 'SetOffsetY', [(Float, 'offsetY')], overloaded=True),
163 StdMethod(HRESULT, 'SetOffsetY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
164 StdMethod(HRESULT, 'SetOffsetZ', [(Float, 'offsetZ')], overloaded=True),
165 StdMethod(HRESULT, 'SetOffsetZ', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
Jose Fonsecabab19212016-01-31 23:58:30 +0000166]
167
168IDCompositionScaleTransform.methods += [
Jose Fonsecafdcd30b2016-02-01 14:13:40 +0000169 StdMethod(HRESULT, 'SetScaleX', [(Float, 'scaleX')], overloaded=True),
170 StdMethod(HRESULT, 'SetScaleX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
171 StdMethod(HRESULT, 'SetScaleY', [(Float, 'scaleY')], overloaded=True),
172 StdMethod(HRESULT, 'SetScaleY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
173 StdMethod(HRESULT, 'SetCenterX', [(Float, 'centerX')], overloaded=True),
174 StdMethod(HRESULT, 'SetCenterX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
175 StdMethod(HRESULT, 'SetCenterY', [(Float, 'centerY')], overloaded=True),
176 StdMethod(HRESULT, 'SetCenterY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
Jose Fonsecabab19212016-01-31 23:58:30 +0000177]
178
179IDCompositionScaleTransform3D.methods += [
Jose Fonsecafdcd30b2016-02-01 14:13:40 +0000180 StdMethod(HRESULT, 'SetScaleX', [(Float, 'scaleX')], overloaded=True),
181 StdMethod(HRESULT, 'SetScaleX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
182 StdMethod(HRESULT, 'SetScaleY', [(Float, 'scaleY')], overloaded=True),
183 StdMethod(HRESULT, 'SetScaleY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
184 StdMethod(HRESULT, 'SetScaleZ', [(Float, 'scaleZ')], overloaded=True),
185 StdMethod(HRESULT, 'SetScaleZ', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
186 StdMethod(HRESULT, 'SetCenterX', [(Float, 'centerX')], overloaded=True),
187 StdMethod(HRESULT, 'SetCenterX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
188 StdMethod(HRESULT, 'SetCenterY', [(Float, 'centerY')], overloaded=True),
189 StdMethod(HRESULT, 'SetCenterY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
190 StdMethod(HRESULT, 'SetCenterZ', [(Float, 'centerZ')], overloaded=True),
191 StdMethod(HRESULT, 'SetCenterZ', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
Jose Fonsecabab19212016-01-31 23:58:30 +0000192]
193
194IDCompositionRotateTransform.methods += [
Jose Fonsecafdcd30b2016-02-01 14:13:40 +0000195 StdMethod(HRESULT, 'SetAngle', [(Float, 'angle')], overloaded=True),
196 StdMethod(HRESULT, 'SetAngle', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
197 StdMethod(HRESULT, 'SetCenterX', [(Float, 'centerX')], overloaded=True),
198 StdMethod(HRESULT, 'SetCenterX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
199 StdMethod(HRESULT, 'SetCenterY', [(Float, 'centerY')], overloaded=True),
200 StdMethod(HRESULT, 'SetCenterY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
Jose Fonsecabab19212016-01-31 23:58:30 +0000201]
202
203IDCompositionRotateTransform3D.methods += [
Jose Fonsecafdcd30b2016-02-01 14:13:40 +0000204 StdMethod(HRESULT, 'SetAngle', [(Float, 'angle')], overloaded=True),
205 StdMethod(HRESULT, 'SetAngle', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
206 StdMethod(HRESULT, 'SetAxisX', [(Float, 'axisX')], overloaded=True),
207 StdMethod(HRESULT, 'SetAxisX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
208 StdMethod(HRESULT, 'SetAxisY', [(Float, 'axisY')], overloaded=True),
209 StdMethod(HRESULT, 'SetAxisY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
210 StdMethod(HRESULT, 'SetAxisZ', [(Float, 'axisZ')], overloaded=True),
211 StdMethod(HRESULT, 'SetAxisZ', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
212 StdMethod(HRESULT, 'SetCenterX', [(Float, 'centerX')], overloaded=True),
213 StdMethod(HRESULT, 'SetCenterX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
214 StdMethod(HRESULT, 'SetCenterY', [(Float, 'centerY')], overloaded=True),
215 StdMethod(HRESULT, 'SetCenterY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
216 StdMethod(HRESULT, 'SetCenterZ', [(Float, 'centerZ')], overloaded=True),
217 StdMethod(HRESULT, 'SetCenterZ', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
Jose Fonsecabab19212016-01-31 23:58:30 +0000218]
219
220IDCompositionSkewTransform.methods += [
Jose Fonsecafdcd30b2016-02-01 14:13:40 +0000221 StdMethod(HRESULT, 'SetAngleX', [(Float, 'angleX')], overloaded=True),
222 StdMethod(HRESULT, 'SetAngleX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
223 StdMethod(HRESULT, 'SetAngleY', [(Float, 'angleY')], overloaded=True),
224 StdMethod(HRESULT, 'SetAngleY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
225 StdMethod(HRESULT, 'SetCenterX', [(Float, 'centerX')], overloaded=True),
226 StdMethod(HRESULT, 'SetCenterX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
227 StdMethod(HRESULT, 'SetCenterY', [(Float, 'centerY')], overloaded=True),
228 StdMethod(HRESULT, 'SetCenterY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
Jose Fonsecabab19212016-01-31 23:58:30 +0000229]
230
231IDCompositionMatrixTransform.methods += [
232 StdMethod(HRESULT, 'SetMatrix', [(Reference(Const(D2D_MATRIX_3X2_F)), 'matrix')]),
Jose Fonsecafdcd30b2016-02-01 14:13:40 +0000233 StdMethod(HRESULT, 'SetMatrixElement', [(Int, 'row'), (Int, 'column'), (Float, 'value')], overloaded=True),
234 StdMethod(HRESULT, 'SetMatrixElement', [(Int, 'row'), (Int, 'column'), (ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
Jose Fonsecabab19212016-01-31 23:58:30 +0000235]
236
237IDCompositionMatrixTransform3D.methods += [
238 StdMethod(HRESULT, 'SetMatrix', [(Reference(Const(D3DMATRIX)), 'matrix')]),
Jose Fonsecafdcd30b2016-02-01 14:13:40 +0000239 StdMethod(HRESULT, 'SetMatrixElement', [(Int, 'row'), (Int, 'column'), (Float, 'value')], overloaded=True),
240 StdMethod(HRESULT, 'SetMatrixElement', [(Int, 'row'), (Int, 'column'), (ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
Jose Fonsecabab19212016-01-31 23:58:30 +0000241]
242
243IDCompositionEffect.methods += [
244]
245
246IDCompositionEffectGroup.methods += [
Jose Fonsecafdcd30b2016-02-01 14:13:40 +0000247 StdMethod(HRESULT, 'SetOpacity', [(Float, 'opacity')], overloaded=True),
248 StdMethod(HRESULT, 'SetOpacity', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
Jose Fonsecabab19212016-01-31 23:58:30 +0000249 StdMethod(HRESULT, 'SetTransform3D', [(ObjPointer(IDCompositionTransform3D), 'transform3D')]),
250]
251
252IDCompositionClip.methods += [
253]
254
255IDCompositionRectangleClip.methods += [
Jose Fonsecafdcd30b2016-02-01 14:13:40 +0000256 StdMethod(HRESULT, 'SetLeft', [(Float, 'left')], overloaded=True),
257 StdMethod(HRESULT, 'SetLeft', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
258 StdMethod(HRESULT, 'SetTop', [(Float, 'top')], overloaded=True),
259 StdMethod(HRESULT, 'SetTop', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
260 StdMethod(HRESULT, 'SetRight', [(Float, 'right')], overloaded=True),
261 StdMethod(HRESULT, 'SetRight', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
262 StdMethod(HRESULT, 'SetBottom', [(Float, 'bottom')], overloaded=True),
263 StdMethod(HRESULT, 'SetBottom', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
264 StdMethod(HRESULT, 'SetTopLeftRadiusX', [(Float, 'radius')], overloaded=True),
265 StdMethod(HRESULT, 'SetTopLeftRadiusX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
266 StdMethod(HRESULT, 'SetTopLeftRadiusY', [(Float, 'radius')], overloaded=True),
267 StdMethod(HRESULT, 'SetTopLeftRadiusY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
268 StdMethod(HRESULT, 'SetTopRightRadiusX', [(Float, 'radius')], overloaded=True),
269 StdMethod(HRESULT, 'SetTopRightRadiusX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
270 StdMethod(HRESULT, 'SetTopRightRadiusY', [(Float, 'radius')], overloaded=True),
271 StdMethod(HRESULT, 'SetTopRightRadiusY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
272 StdMethod(HRESULT, 'SetBottomLeftRadiusX', [(Float, 'radius')], overloaded=True),
273 StdMethod(HRESULT, 'SetBottomLeftRadiusX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
274 StdMethod(HRESULT, 'SetBottomLeftRadiusY', [(Float, 'radius')], overloaded=True),
275 StdMethod(HRESULT, 'SetBottomLeftRadiusY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
276 StdMethod(HRESULT, 'SetBottomRightRadiusX', [(Float, 'radius')], overloaded=True),
277 StdMethod(HRESULT, 'SetBottomRightRadiusX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
278 StdMethod(HRESULT, 'SetBottomRightRadiusY', [(Float, 'radius')], overloaded=True),
279 StdMethod(HRESULT, 'SetBottomRightRadiusY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
Jose Fonsecabab19212016-01-31 23:58:30 +0000280]
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])