po: Update Lithuanian translation.
[wine.git] / include / d2d1_3.idl
blob07dc98968f836d1b782e5fb811b26530e2cbc7d4
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 typedef enum D2D1_INK_NIB_SHAPE
24 D2D1_INK_NIB_SHAPE_ROUND = 0x0,
25 D2D1_INK_NIB_SHAPE_SQUARE = 0x1,
26 D2D1_INK_NIB_SHAPE_FORCE_DWORD = 0xffffffff
27 } D2D1_INK_NIB_SHAPE;
29 typedef enum D2D1_PATCH_EDGE_MODE
31 D2D1_PATCH_EDGE_MODE_ALIASED = 0x0,
32 D2D1_PATCH_EDGE_MODE_ANTIALIASED = 0x1,
33 D2D1_PATCH_EDGE_MODE_ALIASED_INFLATED = 0x2,
34 D2D1_PATCH_EDGE_MODE_FORCE_DWORD = 0xffffffff
35 } D2D1_PATCH_EDGE_MODE;
37 typedef enum D2D1_ORIENTATION
39 D2D1_ORIENTATION_DEFAULT = 0x1,
40 D2D1_ORIENTATION_FLIP_HORIZONTAL = 0x2,
41 D2D1_ORIENTATION_ROTATE_CLOCKWISE180 = 0x3,
42 D2D1_ORIENTATION_ROTATE_CLOCKWISE180_FLIP_HORIZONTAL = 0x4,
43 D2D1_ORIENTATION_ROTATE_CLOCKWISE90_FLIP_HORIZONTAL = 0x5,
44 D2D1_ORIENTATION_ROTATE_CLOCKWISE270 = 0x6,
45 D2D1_ORIENTATION_ROTATE_CLOCKWISE270_FLIP_HORIZONTAL = 0x7,
46 D2D1_ORIENTATION_ROTATE_CLOCKWISE90 = 0x8,
47 D2D1_ORIENTATION_FORCE_DWORD = 0xffffffff
48 } D2D1_ORIENTATION;
50 typedef enum D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS
52 D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS_NONE = 0x0,
53 D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS_DISABLE_DPI_SCALE = 0x1,
54 D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS_FORCE_DWORD = 0xffffffff
55 } D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS;
57 typedef enum D2D1_IMAGE_SOURCE_LOADING_OPTIONS
59 D2D1_IMAGE_SOURCE_LOADING_OPTIONS_NONE = 0x0,
60 D2D1_IMAGE_SOURCE_LOADING_OPTIONS_RELEASE_SOURCE = 0x1,
61 D2D1_IMAGE_SOURCE_LOADING_OPTIONS_CACHE_ON_DEMAND = 0x2,
62 D2D1_IMAGE_SOURCE_LOADING_OPTIONS_FORCE_DWORD = 0xffffffff
63 } D2D1_IMAGE_SOURCE_LOADING_OPTIONS;
65 typedef enum D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS
67 D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS_NONE = 0x0,
68 D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS_LOW_QUALITY_PRIMARY_CONVERSION = 0x1,
69 D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS_FORCE_DWORD = 0xffffffff
70 } D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS;
72 typedef struct D2D1_INK_POINT
74 float x;
75 float y;
76 float radius;
77 } D2D1_INK_POINT;
79 typedef struct D2D1_INK_BEZIER_SEGMENT
81 D2D1_INK_POINT point1;
82 D2D1_INK_POINT point2;
83 D2D1_INK_POINT point3;
84 } D2D1_INK_BEZIER_SEGMENT;
86 typedef struct D2D1_INK_STYLE_PROPERTIES
88 D2D1_INK_NIB_SHAPE nibShape;
89 D2D1_MATRIX_3X2_F nibTransform;
90 } D2D1_INK_STYLE_PROPERTIES;
92 typedef struct D2D1_GRADIENT_MESH_PATCH
94 D2D1_POINT_2F point00;
95 D2D1_POINT_2F point01;
96 D2D1_POINT_2F point02;
97 D2D1_POINT_2F point03;
98 D2D1_POINT_2F point10;
99 D2D1_POINT_2F point11;
100 D2D1_POINT_2F point12;
101 D2D1_POINT_2F point13;
102 D2D1_POINT_2F point20;
103 D2D1_POINT_2F point21;
104 D2D1_POINT_2F point22;
105 D2D1_POINT_2F point23;
106 D2D1_POINT_2F point30;
107 D2D1_POINT_2F point31;
108 D2D1_POINT_2F point32;
109 D2D1_POINT_2F point33;
110 D2D1_COLOR_F color00;
111 D2D1_COLOR_F color03;
112 D2D1_COLOR_F color30;
113 D2D1_COLOR_F color33;
114 D2D1_PATCH_EDGE_MODE topEdgeMode;
115 D2D1_PATCH_EDGE_MODE leftEdgeMode;
116 D2D1_PATCH_EDGE_MODE bottomEdgeMode;
117 D2D1_PATCH_EDGE_MODE rightEdgeMode;
118 } D2D1_GRADIENT_MESH_PATCH;
120 typedef struct D2D1_TRANSFORMED_IMAGE_SOURCE_PROPERTIES
122 D2D1_ORIENTATION orientation;
123 float scaleX;
124 float scaleY;
125 D2D1_INTERPOLATION_MODE interpolationMode;
126 D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS options;
127 } D2D1_TRANSFORMED_IMAGE_SOURCE_PROPERTIES;
130 object,
131 uuid(bae8b344-23fc-4071-8cb5-d05d6f073848),
132 local,
134 interface ID2D1InkStyle : ID2D1Resource
136 void SetNibTransform(
137 [in] const D2D1_MATRIX_3X2_F *transform
139 void GetNibTransform(
140 [out] D2D1_MATRIX_3X2_F *transform
142 void SetNibShape(
143 [in] D2D1_INK_NIB_SHAPE shape
145 D2D1_INK_NIB_SHAPE GetNibShape();
149 object,
150 uuid(b499923b-7029-478f-a8b3-432c7c5f5312),
151 local,
153 interface ID2D1Ink : ID2D1Resource
155 void SetStartPoint(
156 [in] const D2D1_INK_POINT *start_point
158 D2D1_INK_POINT GetStartPoint();
159 HRESULT AddSegments(
160 [in] const D2D1_INK_BEZIER_SEGMENT *segments,
161 [in] UINT32 segment_count
163 HRESULT RemoveSegmentsAtEnd(
164 [in] UINT32 segment_count
166 HRESULT SetSegments(
167 [in] UINT32 start_segment,
168 [in] const D2D1_INK_BEZIER_SEGMENT *segments,
169 [in] UINT32 segment_count
171 HRESULT SetSegmentAtEnd(
172 [in] const D2D1_INK_BEZIER_SEGMENT *segment
174 UINT32 GetSegmentCount();
175 HRESULT GetSegments(
176 [in] UINT32 start_segment,
177 [out] D2D1_INK_BEZIER_SEGMENT *segments,
178 [in] UINT32 segment_count
180 HRESULT StreamAsGeometry(
181 [in, optional] ID2D1InkStyle *ink_style,
182 [in, optional] const D2D1_MATRIX_3X2_F *world_transform,
183 [in] float flattening_tolerance,
184 [in] ID2D1SimplifiedGeometrySink *geometry_sink
186 HRESULT GetBounds(
187 [in, optional] ID2D1InkStyle *ink_style,
188 [in, optional] const D2D1_MATRIX_3X2_F *world_transform,
189 [out] D2D1_RECT_F *bounds
194 object,
195 uuid(f292e401-c050-4cde-83d7-04962d3b23c2),
196 local,
198 interface ID2D1GradientMesh : ID2D1Resource
200 UINT32 GetPatchCount();
201 HRESULT GetPatches(
202 [in] UINT32 start_index,
203 [out] D2D1_GRADIENT_MESH_PATCH *patches,
204 [in] UINT32 patch_count
209 object,
210 uuid(c9b664e5-74a1-4378-9ac2-eefc37a3f4d8),
211 local,
213 interface ID2D1ImageSource : ID2D1Image
215 HRESULT OfferResources();
216 HRESULT TryReclaimResources(
217 [out] BOOL *resources_discarded
222 object,
223 uuid(77395441-1c8f-4555-8683-f50dab0fe792),
224 local,
226 interface ID2D1ImageSourceFromWic : ID2D1ImageSource
228 HRESULT EnsureCached(
229 [in, optional] const D2D1_RECT_U *rect_to_fill
231 HRESULT TrimCache(
232 [in, optional] const D2D1_RECT_U *rect_to_preserve
234 void GetSource(
235 [out] IWICBitmapSource **source
240 object,
241 uuid(7f1f79e5-2796-416c-8f55-700f911445e5),
242 local,
244 interface ID2D1TransformedImageSource : ID2D1Image
246 void GetSource(
247 [out] ID2D1ImageSource **source
249 void GetProperties(
250 [out] D2D1_TRANSFORMED_IMAGE_SOURCE_PROPERTIES *out
255 object,
256 uuid(53dd9855-a3b0-4d5b-82e1-26e25c5e5797),
257 local,
259 interface ID2D1LookupTable3D : ID2D1Resource
264 object,
265 uuid(394ea6a3-0c34-4321-950b-6ca20f0be6c7),
266 local,
268 interface ID2D1DeviceContext2 : ID2D1DeviceContext1
270 HRESULT CreateInk(
271 [in] const D2D1_INK_POINT *start_point,
272 [out] ID2D1Ink **ink
274 HRESULT CreateInkStyle(
275 [in, optional] const D2D1_INK_STYLE_PROPERTIES *ink_style_properties,
276 [out] ID2D1InkStyle **ink_style
278 HRESULT CreateGradientMesh(
279 [in] const D2D1_GRADIENT_MESH_PATCH *patches,
280 [in] UINT32 patches_count,
281 [out] ID2D1GradientMesh **gradient_mesh
283 HRESULT CreateImageSourceFromWic(
284 [in] IWICBitmapSource *wic_bitmap_source,
285 [in] D2D1_IMAGE_SOURCE_LOADING_OPTIONS loading_options,
286 [in] D2D1_ALPHA_MODE alpha_mode,
287 [out] ID2D1ImageSourceFromWic **image_source
289 HRESULT CreateLookupTable3D(
290 [in] D2D1_BUFFER_PRECISION precision,
291 [in] const UINT32 *extents,
292 [in] const BYTE *data,
293 [in] UINT32 data_count,
294 [in] const UINT32 *strides,
295 [out] ID2D1LookupTable3D **lookup_table
297 HRESULT CreateImageSourceFromDxgi(
298 [in] IDXGISurface **surfaces,
299 [in] UINT32 surface_count,
300 [in] DXGI_COLOR_SPACE_TYPE color_space,
301 [in] D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS options,
302 [out] ID2D1ImageSource **image_source
304 HRESULT GetGradientMeshWorldBounds(
305 [in] ID2D1GradientMesh *gradient_mesh,
306 [out] D2D1_RECT_F *bounds
308 void DrawInk(
309 [in] ID2D1Ink *ink,
310 [in] ID2D1Brush *brush,
311 [in, optional] ID2D1InkStyle *ink_style
313 void DrawGradientMesh(
314 [in] ID2D1GradientMesh *gradient_mesh
316 void DrawGdiMetafile(
317 [in] ID2D1GdiMetafile *gdi_metafile,
318 [in, optional] const D2D1_RECT_F *dst_rect,
319 [in, optional] const D2D1_RECT_F *src_rect
321 HRESULT CreateTransformedImageSource(
322 [in] ID2D1ImageSource *source,
323 [in] const D2D1_TRANSFORMED_IMAGE_SOURCE_PROPERTIES *props,
324 [out] ID2D1TransformedImageSource **transformed
329 object,
330 uuid(a44472e1-8dfb-4e60-8492-6e2861c9ca8b),
331 local,
333 interface ID2D1Device2 : ID2D1Device1
335 HRESULT CreateDeviceContext(
336 [in] D2D1_DEVICE_CONTEXT_OPTIONS options,
337 [out] ID2D1DeviceContext2 **context
339 void FlushDeviceContexts(
340 [in] ID2D1Bitmap *bitmap
342 HRESULT GetDxgiDevice(
343 [out] IDXGIDevice **dxgi_device
348 object,
349 uuid(0869759f-4f00-413f-b03e-2bda45404d0f),
350 local,
352 interface ID2D1Factory3 : ID2D1Factory2
354 HRESULT CreateDevice(
355 [in] IDXGIDevice *dxgi_device,
356 [out] ID2D1Device2 **d2d_device