d3d9/tests: AMD GPUs sample the border color of cube textures.
[wine.git] / include / d2d1_3.idl
blob29bcc8df56deae90d1fc37a566ab3bfedbaa2f4f
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_2.idl";
20 import "d2d1effects_2.idl";
22 interface ID2D1SpriteBatch;
24 typedef enum D2D1_INK_NIB_SHAPE
26 D2D1_INK_NIB_SHAPE_ROUND = 0x0,
27 D2D1_INK_NIB_SHAPE_SQUARE = 0x1,
28 D2D1_INK_NIB_SHAPE_FORCE_DWORD = 0xffffffff
29 } D2D1_INK_NIB_SHAPE;
31 typedef enum D2D1_PATCH_EDGE_MODE
33 D2D1_PATCH_EDGE_MODE_ALIASED = 0x0,
34 D2D1_PATCH_EDGE_MODE_ANTIALIASED = 0x1,
35 D2D1_PATCH_EDGE_MODE_ALIASED_INFLATED = 0x2,
36 D2D1_PATCH_EDGE_MODE_FORCE_DWORD = 0xffffffff
37 } D2D1_PATCH_EDGE_MODE;
39 typedef enum D2D1_ORIENTATION
41 D2D1_ORIENTATION_DEFAULT = 0x1,
42 D2D1_ORIENTATION_FLIP_HORIZONTAL = 0x2,
43 D2D1_ORIENTATION_ROTATE_CLOCKWISE180 = 0x3,
44 D2D1_ORIENTATION_ROTATE_CLOCKWISE180_FLIP_HORIZONTAL = 0x4,
45 D2D1_ORIENTATION_ROTATE_CLOCKWISE90_FLIP_HORIZONTAL = 0x5,
46 D2D1_ORIENTATION_ROTATE_CLOCKWISE270 = 0x6,
47 D2D1_ORIENTATION_ROTATE_CLOCKWISE270_FLIP_HORIZONTAL = 0x7,
48 D2D1_ORIENTATION_ROTATE_CLOCKWISE90 = 0x8,
49 D2D1_ORIENTATION_FORCE_DWORD = 0xffffffff
50 } D2D1_ORIENTATION;
52 typedef enum D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS
54 D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS_NONE = 0x0,
55 D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS_DISABLE_DPI_SCALE = 0x1,
56 D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS_FORCE_DWORD = 0xffffffff
57 } D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS;
59 typedef enum D2D1_IMAGE_SOURCE_LOADING_OPTIONS
61 D2D1_IMAGE_SOURCE_LOADING_OPTIONS_NONE = 0x0,
62 D2D1_IMAGE_SOURCE_LOADING_OPTIONS_RELEASE_SOURCE = 0x1,
63 D2D1_IMAGE_SOURCE_LOADING_OPTIONS_CACHE_ON_DEMAND = 0x2,
64 D2D1_IMAGE_SOURCE_LOADING_OPTIONS_FORCE_DWORD = 0xffffffff
65 } D2D1_IMAGE_SOURCE_LOADING_OPTIONS;
67 typedef enum D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS
69 D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS_NONE = 0x0,
70 D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS_LOW_QUALITY_PRIMARY_CONVERSION = 0x1,
71 D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS_FORCE_DWORD = 0xffffffff
72 } D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS;
74 typedef enum D2D1_SPRITE_OPTIONS
76 D2D1_SPRITE_OPTIONS_NONE = 0x0,
77 D2D1_SPRITE_OPTIONS_CLAMP_TO_SOURCE_RECTANGLE = 0x1,
78 D2D1_SPRITE_OPTIONS_FORCE_DWORD = 0xffffffff
79 } D2D1_SPRITE_OPTIONS;
81 typedef struct D2D1_INK_POINT
83 float x;
84 float y;
85 float radius;
86 } D2D1_INK_POINT;
88 typedef struct D2D1_INK_BEZIER_SEGMENT
90 D2D1_INK_POINT point1;
91 D2D1_INK_POINT point2;
92 D2D1_INK_POINT point3;
93 } D2D1_INK_BEZIER_SEGMENT;
95 typedef struct D2D1_INK_STYLE_PROPERTIES
97 D2D1_INK_NIB_SHAPE nibShape;
98 D2D1_MATRIX_3X2_F nibTransform;
99 } D2D1_INK_STYLE_PROPERTIES;
101 typedef struct D2D1_GRADIENT_MESH_PATCH
103 D2D1_POINT_2F point00;
104 D2D1_POINT_2F point01;
105 D2D1_POINT_2F point02;
106 D2D1_POINT_2F point03;
107 D2D1_POINT_2F point10;
108 D2D1_POINT_2F point11;
109 D2D1_POINT_2F point12;
110 D2D1_POINT_2F point13;
111 D2D1_POINT_2F point20;
112 D2D1_POINT_2F point21;
113 D2D1_POINT_2F point22;
114 D2D1_POINT_2F point23;
115 D2D1_POINT_2F point30;
116 D2D1_POINT_2F point31;
117 D2D1_POINT_2F point32;
118 D2D1_POINT_2F point33;
119 D2D1_COLOR_F color00;
120 D2D1_COLOR_F color03;
121 D2D1_COLOR_F color30;
122 D2D1_COLOR_F color33;
123 D2D1_PATCH_EDGE_MODE topEdgeMode;
124 D2D1_PATCH_EDGE_MODE leftEdgeMode;
125 D2D1_PATCH_EDGE_MODE bottomEdgeMode;
126 D2D1_PATCH_EDGE_MODE rightEdgeMode;
127 } D2D1_GRADIENT_MESH_PATCH;
129 typedef struct D2D1_TRANSFORMED_IMAGE_SOURCE_PROPERTIES
131 D2D1_ORIENTATION orientation;
132 float scaleX;
133 float scaleY;
134 D2D1_INTERPOLATION_MODE interpolationMode;
135 D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS options;
136 } D2D1_TRANSFORMED_IMAGE_SOURCE_PROPERTIES;
139 object,
140 uuid(bae8b344-23fc-4071-8cb5-d05d6f073848),
141 local,
143 interface ID2D1InkStyle : ID2D1Resource
145 void SetNibTransform(
146 [in] const D2D1_MATRIX_3X2_F *transform
148 void GetNibTransform(
149 [out] D2D1_MATRIX_3X2_F *transform
151 void SetNibShape(
152 [in] D2D1_INK_NIB_SHAPE shape
154 D2D1_INK_NIB_SHAPE GetNibShape();
158 object,
159 uuid(b499923b-7029-478f-a8b3-432c7c5f5312),
160 local,
162 interface ID2D1Ink : ID2D1Resource
164 void SetStartPoint(
165 [in] const D2D1_INK_POINT *start_point
167 D2D1_INK_POINT GetStartPoint();
168 HRESULT AddSegments(
169 [in] const D2D1_INK_BEZIER_SEGMENT *segments,
170 [in] UINT32 segment_count
172 HRESULT RemoveSegmentsAtEnd(
173 [in] UINT32 segment_count
175 HRESULT SetSegments(
176 [in] UINT32 start_segment,
177 [in] const D2D1_INK_BEZIER_SEGMENT *segments,
178 [in] UINT32 segment_count
180 HRESULT SetSegmentAtEnd(
181 [in] const D2D1_INK_BEZIER_SEGMENT *segment
183 UINT32 GetSegmentCount();
184 HRESULT GetSegments(
185 [in] UINT32 start_segment,
186 [out] D2D1_INK_BEZIER_SEGMENT *segments,
187 [in] UINT32 segment_count
189 HRESULT StreamAsGeometry(
190 [in, optional] ID2D1InkStyle *ink_style,
191 [in, optional] const D2D1_MATRIX_3X2_F *world_transform,
192 [in] float flattening_tolerance,
193 [in] ID2D1SimplifiedGeometrySink *geometry_sink
195 HRESULT GetBounds(
196 [in, optional] ID2D1InkStyle *ink_style,
197 [in, optional] const D2D1_MATRIX_3X2_F *world_transform,
198 [out] D2D1_RECT_F *bounds
203 object,
204 uuid(f292e401-c050-4cde-83d7-04962d3b23c2),
205 local,
207 interface ID2D1GradientMesh : ID2D1Resource
209 UINT32 GetPatchCount();
210 HRESULT GetPatches(
211 [in] UINT32 start_index,
212 [out] D2D1_GRADIENT_MESH_PATCH *patches,
213 [in] UINT32 patch_count
218 object,
219 uuid(c9b664e5-74a1-4378-9ac2-eefc37a3f4d8),
220 local,
222 interface ID2D1ImageSource : ID2D1Image
224 HRESULT OfferResources();
225 HRESULT TryReclaimResources(
226 [out] BOOL *resources_discarded
231 object,
232 uuid(77395441-1c8f-4555-8683-f50dab0fe792),
233 local,
235 interface ID2D1ImageSourceFromWic : ID2D1ImageSource
237 HRESULT EnsureCached(
238 [in, optional] const D2D1_RECT_U *rect_to_fill
240 HRESULT TrimCache(
241 [in, optional] const D2D1_RECT_U *rect_to_preserve
243 void GetSource(
244 [out] IWICBitmapSource **source
249 object,
250 uuid(7f1f79e5-2796-416c-8f55-700f911445e5),
251 local,
253 interface ID2D1TransformedImageSource : ID2D1Image
255 void GetSource(
256 [out] ID2D1ImageSource **source
258 void GetProperties(
259 [out] D2D1_TRANSFORMED_IMAGE_SOURCE_PROPERTIES *out
264 object,
265 uuid(53dd9855-a3b0-4d5b-82e1-26e25c5e5797),
266 local,
268 interface ID2D1LookupTable3D : ID2D1Resource
273 object,
274 uuid(394ea6a3-0c34-4321-950b-6ca20f0be6c7),
275 local,
277 interface ID2D1DeviceContext2 : ID2D1DeviceContext1
279 HRESULT CreateInk(
280 [in] const D2D1_INK_POINT *start_point,
281 [out] ID2D1Ink **ink
283 HRESULT CreateInkStyle(
284 [in, optional] const D2D1_INK_STYLE_PROPERTIES *ink_style_properties,
285 [out] ID2D1InkStyle **ink_style
287 HRESULT CreateGradientMesh(
288 [in] const D2D1_GRADIENT_MESH_PATCH *patches,
289 [in] UINT32 patches_count,
290 [out] ID2D1GradientMesh **gradient_mesh
292 HRESULT CreateImageSourceFromWic(
293 [in] IWICBitmapSource *wic_bitmap_source,
294 [in] D2D1_IMAGE_SOURCE_LOADING_OPTIONS loading_options,
295 [in] D2D1_ALPHA_MODE alpha_mode,
296 [out] ID2D1ImageSourceFromWic **image_source
298 HRESULT CreateLookupTable3D(
299 [in] D2D1_BUFFER_PRECISION precision,
300 [in] const UINT32 *extents,
301 [in] const BYTE *data,
302 [in] UINT32 data_count,
303 [in] const UINT32 *strides,
304 [out] ID2D1LookupTable3D **lookup_table
306 HRESULT CreateImageSourceFromDxgi(
307 [in] IDXGISurface **surfaces,
308 [in] UINT32 surface_count,
309 [in] DXGI_COLOR_SPACE_TYPE color_space,
310 [in] D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS options,
311 [out] ID2D1ImageSource **image_source
313 HRESULT GetGradientMeshWorldBounds(
314 [in] ID2D1GradientMesh *gradient_mesh,
315 [out] D2D1_RECT_F *bounds
317 void DrawInk(
318 [in] ID2D1Ink *ink,
319 [in] ID2D1Brush *brush,
320 [in, optional] ID2D1InkStyle *ink_style
322 void DrawGradientMesh(
323 [in] ID2D1GradientMesh *gradient_mesh
325 void DrawGdiMetafile(
326 [in] ID2D1GdiMetafile *gdi_metafile,
327 [in, optional] const D2D1_RECT_F *dst_rect,
328 [in, optional] const D2D1_RECT_F *src_rect
330 HRESULT CreateTransformedImageSource(
331 [in] ID2D1ImageSource *source,
332 [in] const D2D1_TRANSFORMED_IMAGE_SOURCE_PROPERTIES *props,
333 [out] ID2D1TransformedImageSource **transformed
338 object,
339 uuid(a44472e1-8dfb-4e60-8492-6e2861c9ca8b),
340 local,
342 interface ID2D1Device2 : ID2D1Device1
344 HRESULT CreateDeviceContext(
345 [in] D2D1_DEVICE_CONTEXT_OPTIONS options,
346 [out] ID2D1DeviceContext2 **context
348 void FlushDeviceContexts(
349 [in] ID2D1Bitmap *bitmap
351 HRESULT GetDxgiDevice(
352 [out] IDXGIDevice **dxgi_device
357 object,
358 uuid(0869759f-4f00-413f-b03e-2bda45404d0f),
359 local,
361 interface ID2D1Factory3 : ID2D1Factory2
363 HRESULT CreateDevice(
364 [in] IDXGIDevice *dxgi_device,
365 [out] ID2D1Device2 **d2d_device
370 object,
371 uuid(3bab440e-417e-47df-a2e2-bc0be6a00916),
372 local,
374 interface ID2D1CommandSink2 : ID2D1CommandSink1
376 HRESULT DrawInk(
377 [in] ID2D1Ink *ink,
378 [in] ID2D1Brush *brush,
379 [in] ID2D1InkStyle *ink_style
382 HRESULT DrawGradientMesh(
383 [in] ID2D1GradientMesh *gradient_mesh
386 HRESULT DrawGdiMetafile(
387 [in] ID2D1GdiMetafile *gdi_metafile,
388 [in] const D2D1_RECT_F *dest_rect,
389 [in] const D2D1_RECT_F *src_rect
394 object,
395 uuid(18079135-4cf3-4868-bc8e-06067e6d242d),
396 local,
398 interface ID2D1CommandSink3 : ID2D1CommandSink2
400 HRESULT DrawSpriteBatch(
401 [in] ID2D1SpriteBatch *sprite_batch,
402 [in] UINT32 start_index,
403 [in] UINT32 sprite_count,
404 [in] ID2D1Bitmap *bitmap,
405 [in] D2D1_BITMAP_INTERPOLATION_MODE interpolation_mode,
406 [in] D2D1_SPRITE_OPTIONS sprite_options
411 object,
412 uuid(c78a6519-40d6-4218-b2de-beeeb744bb3e),
413 local,
415 interface ID2D1CommandSink4 : ID2D1CommandSink3
417 HRESULT SetPrimitiveBlend2(
418 [in] D2D1_PRIMITIVE_BLEND primitive_blend