winecoreaudio: Adapt "release_render_buffer_params" struct to mmdevapi's.
[wine.git] / include / d2d1effectauthor.idl
bloba58ec35b4b540b2fa8f58b1b353c50e7b12233a0
1 /*
2 * Copyright 2022 Ziqing Hui 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 "d2d1_1.idl";
21 typedef HRESULT (__stdcall *PD2D1_PROPERTY_SET_FUNCTION)(IUnknown *effect,
22 const BYTE *data, UINT32 data_size);
24 typedef HRESULT (__stdcall *PD2D1_PROPERTY_GET_FUNCTION)(const IUnknown *effect,
25 BYTE *data, UINT32 data_size, UINT32 *actual_size);
27 typedef enum D2D1_FILTER
29 D2D1_FILTER_MIN_MAG_MIP_POINT = 0x00,
30 D2D1_FILTER_MIN_MAG_POINT_MIP_LINEAR = 0x01,
31 D2D1_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x04,
32 D2D1_FILTER_MIN_POINT_MAG_MIP_LINEAR = 0x05,
33 D2D1_FILTER_MIN_LINEAR_MAG_MIP_POINT = 0x10,
34 D2D1_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x11,
35 D2D1_FILTER_MIN_MAG_LINEAR_MIP_POINT = 0x14,
36 D2D1_FILTER_MIN_MAG_MIP_LINEAR = 0x15,
37 D2D1_FILTER_ANISOTROPIC = 0x55,
38 D2D1_FILTER_FORCE_DWORD = 0xffffffff
39 } D2D1_FILTER;
41 typedef enum D2D1_FEATURE
43 D2D1_FEATURE_DOUBLES = 0x0,
44 D2D1_FEATURE_D3D10_X_HARDWARE_OPTIONS = 0x1,
45 D2D1_FEATURE_FORCE_DWORD = 0xffffffff
46 } D2D1_FEATURE;
48 typedef struct D2D1_PROPERTY_BINDING
50 const WCHAR *propertyName;
51 PD2D1_PROPERTY_SET_FUNCTION setFunction;
52 PD2D1_PROPERTY_GET_FUNCTION getFunction;
53 } D2D1_PROPERTY_BINDING;
55 typedef enum D2D1_CHANNEL_DEPTH
57 D2D1_CHANNEL_DEPTH_DEFAULT = 0x0,
58 D2D1_CHANNEL_DEPTH_1 = 0x1,
59 D2D1_CHANNEL_DEPTH_4 = 0x4,
60 D2D1_CHANNEL_DEPTH_FORCE_DWORD = 0xffffffff
61 } D2D1_CHANNEL_DEPTH;
63 typedef enum D2D1_CHANGE_TYPE
65 D2D1_CHANGE_TYPE_NONE = 0x0,
66 D2D1_CHANGE_TYPE_PROPERTIES = 0x1,
67 D2D1_CHANGE_TYPE_CONTEXT = 0x2,
68 D2D1_CHANGE_TYPE_GRAPH = 0x3,
69 D2D1_CHANGE_TYPE_FORCE_DWORD = 0xffffffff
70 } D2D1_CHANGE_TYPE;
72 typedef enum D2D1_PIXEL_OPTIONS
74 D2D1_PIXEL_OPTIONS_NONE = 0x0,
75 D2D1_PIXEL_OPTIONS_TRIVIAL_SAMPLING = 0x1,
76 D2D1_PIXEL_OPTIONS_FORCE_DWORD = 0xffffffff
77 } D2D1_PIXEL_OPTIONS;
79 typedef enum D2D1_VERTEX_OPTIONS
81 D2D1_VERTEX_OPTIONS_NONE = 0x0,
82 D2D1_VERTEX_OPTIONS_DO_NOT_CLEAR = 0x1,
83 D2D1_VERTEX_OPTIONS_USE_DEPTH_BUFFER = 0x2,
84 D2D1_VERTEX_OPTIONS_ASSUME_NO_OVERLAP = 0x4,
85 D2D1_VERTEX_OPTIONS_FORCE_DWORD = 0xffffffff
86 } D2D1_VERTEX_OPTIONS;
88 typedef enum D2D1_VERTEX_USAGE
90 D2D1_VERTEX_USAGE_STATIC = 0x0,
91 D2D1_VERTEX_USAGE_DYNAMIC = 0x1,
92 D2D1_VERTEX_USAGE_FORCE_DWORD = 0xffffffff
93 } D2D1_VERTEX_USAGE;
95 typedef enum D2D1_BLEND_OPERATION
97 D2D1_BLEND_OPERATION_ADD = 0x1,
98 D2D1_BLEND_OPERATION_SUBTRACT = 0x2,
99 D2D1_BLEND_OPERATION_REV_SUBTRACT = 0x3,
100 D2D1_BLEND_OPERATION_MIN = 0x4,
101 D2D1_BLEND_OPERATION_MAX = 0x5,
102 D2D1_BLEND_OPERATION_FORCE_DWORD = 0xffffffff
103 } D2D1_BLEND_OPERATION;
105 typedef enum D2D1_BLEND
107 D2D1_BLEND_ZERO = 1,
108 D2D1_BLEND_ONE = 2,
109 D2D1_BLEND_SRC_COLOR = 3,
110 D2D1_BLEND_INV_SRC_COLOR = 4,
111 D2D1_BLEND_SRC_ALPHA = 5,
112 D2D1_BLEND_INV_SRC_ALPHA = 6,
113 D2D1_BLEND_DEST_ALPHA = 7,
114 D2D1_BLEND_INV_DEST_ALPHA = 8,
115 D2D1_BLEND_DEST_COLOR = 9,
116 D2D1_BLEND_INV_DEST_COLOR = 10,
117 D2D1_BLEND_SRC_ALPHA_SAT = 11,
118 D2D1_BLEND_BLEND_FACTOR = 14,
119 D2D1_BLEND_INV_BLEND_FACTOR = 15,
120 D2D1_BLEND_FORCE_DWORD = 0xffffffff
121 } D2D1_BLEND;
123 typedef struct D2D1_INPUT_DESCRIPTION
125 D2D1_FILTER filter;
126 UINT32 levelOfDetailCount;
127 } D2D1_INPUT_DESCRIPTION;
129 typedef struct D2D1_VERTEX_RANGE
131 UINT32 startVertex;
132 UINT32 vertexCount;
133 } D2D1_VERTEX_RANGE;
135 typedef struct D2D1_BLEND_DESCRIPTION
137 D2D1_BLEND sourceBlend;
138 D2D1_BLEND destinationBlend;
139 D2D1_BLEND_OPERATION blendOperation;
140 D2D1_BLEND sourceBlendAlpha;
141 D2D1_BLEND destinationBlendAlpha;
142 D2D1_BLEND_OPERATION blendOperationAlpha;
143 float blendFactor[4];
144 } D2D1_BLEND_DESCRIPTION;
146 typedef struct D2D1_RESOURCE_TEXTURE_PROPERTIES
148 const UINT32 *extents;
149 UINT32 dimensions;
150 D2D1_BUFFER_PRECISION bufferPrecision;
151 D2D1_CHANNEL_DEPTH channelDepth;
152 D2D1_FILTER filter;
153 const D2D1_EXTEND_MODE *extendModes;
154 } D2D1_RESOURCE_TEXTURE_PROPERTIES;
156 typedef struct D2D1_INPUT_ELEMENT_DESC
158 const char *semanticName;
159 UINT32 semanticIndex;
160 DXGI_FORMAT format;
161 UINT32 inputSlot;
162 UINT32 alignedByteOffset;
163 } D2D1_INPUT_ELEMENT_DESC;
165 typedef struct D2D1_VERTEX_BUFFER_PROPERTIES
167 UINT32 inputCount;
168 D2D1_VERTEX_USAGE usage;
169 const BYTE *data;
170 UINT32 byteWidth;
171 } D2D1_VERTEX_BUFFER_PROPERTIES;
173 typedef struct D2D1_CUSTOM_VERTEX_BUFFER_PROPERTIES
175 const BYTE *shaderBufferWithInputSignature;
176 UINT32 shaderBufferSize;
177 const D2D1_INPUT_ELEMENT_DESC *inputElements;
178 UINT32 elementCount;
179 UINT32 stride;
180 } D2D1_CUSTOM_VERTEX_BUFFER_PROPERTIES;
183 object,
184 uuid(9b8b1336-00a5-4668-92b7-ced5d8bf9b7b),
185 local,
187 interface ID2D1VertexBuffer : IUnknown
189 HRESULT Map(
190 [out] BYTE **data,
191 [in] UINT32 size
193 HRESULT Unmap();
197 object,
198 uuid(688d15c3-02b0-438d-b13a-d1b44c32c39a),
199 local,
201 interface ID2D1ResourceTexture : IUnknown
203 HRESULT Update(
204 [in] const UINT32 *min_extents,
205 [in] const UINT32 *max_extents,
206 [in] const UINT32 *strides,
207 [in] UINT32 dimensions,
208 [in] const BYTE *data,
209 [in] UINT32 data_size
214 object,
215 uuid(519ae1bd-d19a-420d-b849-364f594776b7),
216 local,
218 interface ID2D1RenderInfo : IUnknown
220 HRESULT SetInputDescription(
221 [in] UINT32 index,
222 [in] D2D1_INPUT_DESCRIPTION description
224 HRESULT SetOutputBuffer(
225 [in] D2D1_BUFFER_PRECISION precision,
226 [in] D2D1_CHANNEL_DEPTH depth
228 void SetCached(
229 [in] BOOL is_cached
231 void SetInstructionCountHint(
232 [in] UINT32 count
237 object,
238 uuid(693ce632-7f2f-45de-93fe-18d88b37aa21),
239 local,
241 interface ID2D1DrawInfo : ID2D1RenderInfo
243 HRESULT SetPixelShaderConstantBuffer(
244 [in] const BYTE *buffer,
245 [in] UINT32 size
247 HRESULT SetResourceTexture(
248 [in] UINT32 index,
249 [in] ID2D1ResourceTexture *texture
251 HRESULT SetVertexShaderConstantBuffer(
252 [in] const BYTE *buffer,
253 [in] UINT32 size
255 HRESULT SetPixelShader(
256 [in] REFGUID id,
257 [in] D2D1_PIXEL_OPTIONS options
259 HRESULT SetVertexProcessing(
260 [in, optional] ID2D1VertexBuffer *buffer,
261 [in] D2D1_VERTEX_OPTIONS options,
262 [in, optional] const D2D1_BLEND_DESCRIPTION *description,
263 [in, optional] const D2D1_VERTEX_RANGE *range,
264 [in, optional] const GUID *shader
269 object,
270 uuid(5598b14b-9fd7-48b7-9bdb-8f0964eb38bc),
271 local,
273 interface ID2D1ComputeInfo : ID2D1RenderInfo
275 HRESULT SetComputeShaderconstantBuffer(
276 [in] const BYTE *buffer,
277 [in] UINT32 size
279 HRESULT SetComputeShader(
280 [in] REFGUID id
282 HRESULT SetResourceTexture(
283 [in] UINT32 index,
284 [in] ID2D1ResourceTexture *texture
289 object,
290 uuid(b2efe1e7-729f-4102-949f-505fa21bf666),
291 local,
293 interface ID2D1TransformNode : IUnknown
295 UINT32 GetInputCount();
299 object,
300 uuid(13d29038-c3e6-4034-9081-13b53a417992),
301 local,
303 interface ID2D1TransformGraph : IUnknown
305 UINT32 GetInputCount();
306 HRESULT SetSingleTransformNode(
307 [in] ID2D1TransformNode *node
309 HRESULT AddNode(
310 [in] ID2D1TransformNode *node
312 HRESULT RemoveNode(
313 [in] ID2D1TransformNode *node
315 HRESULT SetOutputNode(
316 [in] ID2D1TransformNode *node
318 HRESULT ConnectNode(
319 [in] ID2D1TransformNode *from_node,
320 [in] ID2D1TransformNode *to_node,
321 [in] UINT32 index
323 HRESULT ConnectToEffectInput(
324 [in] UINT32 input_index,
325 [in] ID2D1TransformNode *node,
326 [in] UINT32 node_index
328 void Clear();
329 HRESULT SetPassthroughGraph(
330 [in] UINT32 index
335 object,
336 uuid(ef1a287d-342a-4f76-8fdb-da0d6ea9f92b),
337 local,
339 interface ID2D1Transform : ID2D1TransformNode
341 HRESULT MapOutputRectToInputRects(
342 [in] const D2D1_RECT_L *output_rect,
343 [out] D2D1_RECT_L *input_rects,
344 [in] UINT32 input_rects_count
346 HRESULT MapInputRectsToOutputRect(
347 [in] const D2D1_RECT_L *input_rects,
348 [in] const D2D1_RECT_L *input_opaque_rects,
349 [in] UINT32 input_rect_count,
350 [out] D2D1_RECT_L *output_rect,
351 [out] D2D1_RECT_L *output_opaque_rect
353 HRESULT MapInvalidRect(
354 [in] UINT32 index,
355 [in] D2D1_RECT_L input_rect,
356 [out] D2D1_RECT_L *output_rect
361 object,
362 uuid(36bfdcb6-9739-435d-a30d-a653beff6a6f),
363 local,
365 interface ID2D1DrawTransform : ID2D1Transform
367 HRESULT SetDrawInfo(
368 [in] ID2D1DrawInfo *info
373 object,
374 uuid(0d85573c-01e3-4f7d-bfd9-0d60608bf3c3),
375 local,
377 interface ID2D1ComputeTransform : ID2D1Transform
379 HRESULT SetComputeInfo(
380 [in] ID2D1ComputeInfo *info
382 HRESULT CalculateThreadgroups(
383 [in] const D2D1_RECT_L *output_rect,
384 [out] UINT32 *dimension_x,
385 [out] UINT32 *dimension_y,
386 [out] UINT32 *dimension_z
391 object,
392 uuid(0359dc30-95e6-4568-9055-27720d130e93),
393 local,
395 interface ID2D1AnalysisTransform : IUnknown
397 HRESULT ProcessAnalysisResults(
398 [in] const BYTE *data,
399 [in] UINT32 size
404 object,
405 uuid(db1800dd-0c34-4cf9-be90-31cc0a5653e1),
406 local,
408 interface ID2D1SourceTransform : ID2D1Transform
410 HRESULT SetRenderInfo(
411 [in] ID2D1RenderInfo *info
413 HRESULT Draw(
414 [in] ID2D1Bitmap1 *target,
415 [in] const D2D1_RECT_L *draw_rect,
416 [in] D2D1_POINT_2U target_origin
421 object,
422 uuid(1a799d8a-69f7-4e4c-9fed-437ccc6684cc),
423 local,
425 interface ID2D1ConcreteTransform : ID2D1TransformNode
427 HRESULT SetOutputBuffer(
428 [in] D2D1_BUFFER_PRECISION precision,
429 [in] D2D1_CHANNEL_DEPTH depth
431 void SetCached(
432 [in] BOOL is_cached
437 object,
438 uuid(63ac0b32-ba44-450f-8806-7f4ca1ff2f1b),
439 local,
441 interface ID2D1BlendTransform : ID2D1ConcreteTransform
443 void SetDescription(
444 [in] const D2D1_BLEND_DESCRIPTION *description
446 void GetDescription(
447 [out] D2D1_BLEND_DESCRIPTION *description
452 object,
453 uuid(4998735c-3a19-473c-9781-656847e3a347),
454 local,
456 interface ID2D1BorderTransform : ID2D1ConcreteTransform
458 void SetExtendModeX(
459 [in] D2D1_EXTEND_MODE mode
461 void SetExtendModeY(
462 [in] D2D1_EXTEND_MODE mode
464 D2D1_EXTEND_MODE GetExtendModeX();
465 D2D1_EXTEND_MODE GetExtendModeY();
469 object,
470 uuid(3fe6adea-7643-4f53-bd14-a0ce63f24042),
471 local,
473 interface ID2D1OffsetTransform : ID2D1TransformNode
475 void SetOffset(
476 [in] D2D1_POINT_2L offset
478 D2D1_POINT_2L GetOffset();
482 object,
483 uuid(90f732e2-5092-4606-a819-8651970baccd),
484 local,
486 interface ID2D1BoundsAdjustmentTransform : ID2D1TransformNode
488 void SetOutputBounds(
489 [in] const D2D1_RECT_L *bounds
491 void GetOutputBounds(
492 [out] D2D1_RECT_L *bounds
497 object,
498 uuid(3d9f916b-27dc-4ad7-b4f1-64945340f563),
499 local,
501 interface ID2D1EffectContext : IUnknown
503 void GetDpi(
504 [out] float *dpi_x,
505 [out] float *dpi_y
507 HRESULT CreateEffect(
508 [in] REFCLSID clsid,
509 [out] ID2D1Effect **effect
511 HRESULT GetMaximumSupportedFeatureLevel(
512 [in] const D3D_FEATURE_LEVEL *levels,
513 [in] UINT32 level_count,
514 [out] D3D_FEATURE_LEVEL *max_level
516 HRESULT CreateTransformNodeFromEffect(
517 [in] ID2D1Effect *effect,
518 [out] ID2D1TransformNode **node
520 HRESULT CreateBlendTransform(
521 [in] UINT32 num_inputs,
522 [in] const D2D1_BLEND_DESCRIPTION *description,
523 [out] ID2D1BlendTransform **transform
525 HRESULT CreateBorderTransform(
526 [in] D2D1_EXTEND_MODE mode_x,
527 [in] D2D1_EXTEND_MODE mode_y,
528 [out] ID2D1BorderTransform **transform
530 HRESULT CreateOffsetTransform(
531 [in] D2D1_POINT_2L offset,
532 [out] ID2D1OffsetTransform **transform
534 HRESULT CreateBoundsAdjustmentTransform(
535 [in] const D2D1_RECT_L *output_rect,
536 [out] ID2D1BoundsAdjustmentTransform **transform
538 HRESULT LoadPixelShader(
539 [in] REFGUID shader_id,
540 [in] const BYTE *buffer,
541 [in] UINT32 buffer_size
543 HRESULT LoadVertexShader(
544 [in] REFGUID shader_id,
545 [in] const BYTE *buffer,
546 [in] UINT32 buffer_size
548 HRESULT LoadComputeShader(
549 [in] REFGUID shader_id,
550 [in] const BYTE *buffer,
551 [in] UINT32 buffer_size
553 BOOL IsShaderLoaded(
554 [in] REFGUID shader_id
556 HRESULT CreateResourceTexture(
557 [in, optional] const GUID *id,
558 [in] const D2D1_RESOURCE_TEXTURE_PROPERTIES *texture_properties,
559 [in] const BYTE *data,
560 [in] const UINT32 *strides,
561 [in] UINT32 data_size,
562 [out] ID2D1ResourceTexture **texture
564 HRESULT FindResourceTexture(
565 [in] const GUID *id,
566 [out] ID2D1ResourceTexture **texture
568 HRESULT CreateVertexBuffer(
569 [in] const D2D1_VERTEX_BUFFER_PROPERTIES *buffer_properties,
570 [in, optional] const GUID *id,
571 [in, optional] const D2D1_CUSTOM_VERTEX_BUFFER_PROPERTIES *custom_buffer_properties,
572 [out] ID2D1VertexBuffer **buffer
574 HRESULT FindVertexBuffer(
575 [in] const GUID *id,
576 [out] ID2D1VertexBuffer **buffer
578 HRESULT CreateColorContext(
579 [in] D2D1_COLOR_SPACE space,
580 [in] const BYTE *profile,
581 [in] UINT32 profile_size,
582 [out] ID2D1ColorContext **color_context
584 HRESULT CreateColorContextFromFilename(
585 [in] const WCHAR *filename,
586 [out] ID2D1ColorContext **color_context
588 HRESULT CreateColorContextFromWicColorContext(
589 [in] IWICColorContext *wic_color_context,
590 [out] ID2D1ColorContext **color_context
592 HRESULT CheckFeatureSupport(
593 [in] D2D1_FEATURE feature,
594 [out] void *data,
595 [in] UINT32 data_size
597 BOOL IsBufferPrecisionSupported(
598 [in] D2D1_BUFFER_PRECISION precision
603 object,
604 uuid(a248fd3f-3e6c-4e63-9f03-7f68ecc91db9),
605 local,
607 interface ID2D1EffectImpl : IUnknown
609 HRESULT Initialize(
610 [in] ID2D1EffectContext *context,
611 [in] ID2D1TransformGraph *graph
613 HRESULT PrepareForRender(
614 [in] D2D1_CHANGE_TYPE type
616 HRESULT SetGraph(
617 [in] ID2D1TransformGraph *graph