1 module directx.d2d1effectauthor;
2 //---------------------------------------------------------------------------
3 // Copyright (c) Microsoft Corporation.  All rights reserved.
4 //
5 // This file is automatically generated.  Please do not edit it directly.
6 //
7 // File name: D2D1EffectAuthor.h
8 //---------------------------------------------------------------------------
9 
10 public import directx.d2d1_1;
11 
12 public import directx.com;
13 
14 /// <summary>
15 /// Function pointer that sets a property on an effect.
16 /// </summary>
17 alias PD2D1_PROPERTY_SET_FUNCTION = extern(Windows) HRESULT function(IUnknown effect, const(BYTE)* data, UINT32 dataSize);
18 
19 /// <summary>
20 /// Function pointer that gets a property from an effect.
21 /// </summary>
22 alias PD2D1_PROPERTY_GET_FUNCTION = extern(Windows) HRESULT function(const IUnknown effect, BYTE* data, UINT32 dataSize, UINT32* actualSize);
23 
24 /// <summary>
25 /// Indicates what has changed since the last time the effect was asked to prepare
26 /// to render.
27 /// </summary>
28 alias D2D1_CHANGE_TYPE = uint;
29 enum : D2D1_CHANGE_TYPE
30 {
31 
32     /// <summary>
33     /// Nothing has changed.
34     /// </summary>
35     D2D1_CHANGE_TYPE_NONE = 0,
36     
37     /// <summary>
38     /// The effect's properties have changed.
39     /// </summary>
40     D2D1_CHANGE_TYPE_PROPERTIES = 1,
41     
42     /// <summary>
43     /// The internal context has changed and should be inspected.
44     /// </summary>
45     D2D1_CHANGE_TYPE_CONTEXT = 2,
46     
47     /// <summary>
48     /// A new graph has been set due to a change in the input count.
49     /// </summary>
50     D2D1_CHANGE_TYPE_GRAPH = 3
51 }
52 
53 
54 /// <summary>
55 /// Indicates options for drawing using a pixel shader.
56 /// </summary>
57 alias D2D1_PIXEL_OPTIONS = uint;
58 enum : D2D1_PIXEL_OPTIONS
59 {
60     
61     /// <summary>
62     /// Default pixel processing.
63     /// </summary>
64     D2D1_PIXEL_OPTIONS_NONE = 0,
65     
66     /// <summary>
67     /// Indicates that the shader samples its inputs only at exactly the same scene
68     /// coordinate as the output pixel, and that it returns transparent black whenever
69     /// the input pixels are also transparent black.
70     /// </summary>
71     D2D1_PIXEL_OPTIONS_TRIVIAL_SAMPLING = 1
72 }
73 
74 
75 /// <summary>
76 /// Indicates options for drawing custom vertices set by transforms.
77 /// </summary>
78 alias D2D1_VERTEX_OPTIONS = uint;
79 enum : D2D1_VERTEX_OPTIONS
80 {
81     
82     /// <summary>
83     /// Default vertex processing.
84     /// </summary>
85     D2D1_VERTEX_OPTIONS_NONE = 0,
86     
87     /// <summary>
88     /// Indicates that the output rectangle does not need to be cleared before drawing
89     /// custom vertices. This must only be used by transforms whose custom vertices
90     /// completely cover their output rectangle.
91     /// </summary>
92     D2D1_VERTEX_OPTIONS_DO_NOT_CLEAR = 1,
93     
94     /// <summary>
95     /// Causes a depth buffer to be used while drawing custom vertices. This impacts
96     /// drawing behavior when primitives overlap one another.
97     /// </summary>
98     D2D1_VERTEX_OPTIONS_USE_DEPTH_BUFFER = 2,
99     
100     /// <summary>
101     /// Indicates that custom vertices do not form primitives which overlap one another.
102     /// </summary>
103     D2D1_VERTEX_OPTIONS_ASSUME_NO_OVERLAP = 4
104 }
105 
106 
107 /// <summary>
108 /// Describes how a vertex buffer is to be managed.
109 /// </summary>
110 alias D2D1_VERTEX_USAGE = uint;
111 enum : D2D1_VERTEX_USAGE
112 {
113     
114     /// <summary>
115     /// The vertex buffer content do not change frequently from frame to frame.
116     /// </summary>
117     D2D1_VERTEX_USAGE_STATIC = 0,
118     
119     /// <summary>
120     /// The vertex buffer is intended to be updated frequently.
121     /// </summary>
122     D2D1_VERTEX_USAGE_DYNAMIC = 1
123 
124 }
125 
126 
127 /// <summary>
128 /// Describes a particular blend in the D2D1_BLEND_DESCRIPTION structure.
129 /// </summary>
130 alias D2D1_BLEND_OPERATION = uint;
131 enum : D2D1_BLEND_OPERATION
132 {
133     D2D1_BLEND_OPERATION_ADD = 1,
134     D2D1_BLEND_OPERATION_SUBTRACT = 2,
135     D2D1_BLEND_OPERATION_REV_SUBTRACT = 3,
136     D2D1_BLEND_OPERATION_MIN = 4,
137     D2D1_BLEND_OPERATION_MAX = 5
138 }
139 
140 
141 /// <summary>
142 /// Describes a particular blend in the D2D1_BLEND_DESCRIPTION structure.
143 /// </summary>
144 alias D2D1_BLEND = uint;
145 enum : D2D1_BLEND
146 {
147     D2D1_BLEND_ZERO = 1,
148     D2D1_BLEND_ONE = 2,
149     D2D1_BLEND_SRC_COLOR = 3,
150     D2D1_BLEND_INV_SRC_COLOR = 4,
151     D2D1_BLEND_SRC_ALPHA = 5,
152     D2D1_BLEND_INV_SRC_ALPHA = 6,
153     D2D1_BLEND_DEST_ALPHA = 7,
154     D2D1_BLEND_INV_DEST_ALPHA = 8,
155     D2D1_BLEND_DEST_COLOR = 9,
156     D2D1_BLEND_INV_DEST_COLOR = 10,
157     D2D1_BLEND_SRC_ALPHA_SAT = 11,
158     D2D1_BLEND_BLEND_FACTOR = 14,
159     D2D1_BLEND_INV_BLEND_FACTOR = 15
160 }
161 
162 
163 /// <summary>
164 /// Allows a caller to control the channel depth of a stage in the rendering
165 /// pipeline.
166 /// </summary>
167 alias D2D1_CHANNEL_DEPTH = uint;
168 enum : D2D1_CHANNEL_DEPTH
169 {
170     D2D1_CHANNEL_DEPTH_DEFAULT = 0,
171     D2D1_CHANNEL_DEPTH_1 = 1,
172     D2D1_CHANNEL_DEPTH_4 = 4
173 }
174 
175 
176 /// <summary>
177 /// Represents filtering modes transforms may select to use on their input textures.
178 /// </summary>
179 alias D2D1_FILTER = uint;
180 enum : D2D1_FILTER
181 {
182     D2D1_FILTER_MIN_MAG_MIP_POINT = 0x00,
183     D2D1_FILTER_MIN_MAG_POINT_MIP_LINEAR = 0x01,
184     D2D1_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x04,
185     D2D1_FILTER_MIN_POINT_MAG_MIP_LINEAR = 0x05,
186     D2D1_FILTER_MIN_LINEAR_MAG_MIP_POINT = 0x10,
187     D2D1_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x11,
188     D2D1_FILTER_MIN_MAG_LINEAR_MIP_POINT = 0x14,
189     D2D1_FILTER_MIN_MAG_MIP_LINEAR = 0x15,
190     D2D1_FILTER_ANISOTROPIC = 0x55
191 }
192 
193 
194 /// <summary>
195 /// Defines capabilities of the underlying D3D device which may be queried using
196 /// CheckFeatureSupport.
197 /// </summary>
198 alias D2D1_FEATURE = uint;
199 enum : D2D1_FEATURE
200 {
201     D2D1_FEATURE_DOUBLES = 0,
202     D2D1_FEATURE_D3D10_X_HARDWARE_OPTIONS = 1
203 }
204 
205 
206 /// <summary>
207 /// Defines a property binding to a function. The name must match the property
208 /// defined in the registration schema.
209 /// </summary>
210 struct D2D1_PROPERTY_BINDING
211 {
212     
213     /// <summary>
214     /// The name of the property.
215     /// </summary>
216     PCWSTR propertyName;
217     
218     /// <summary>
219     /// The function that will receive the data to set.
220     /// </summary>
221     PD2D1_PROPERTY_SET_FUNCTION setFunction;
222     
223     /// <summary>
224     /// The function that will be asked to write the output data.
225     /// </summary>
226     PD2D1_PROPERTY_GET_FUNCTION getFunction;
227 }
228 
229 
230 /// <summary>
231 /// This is used to define a resource texture when that resource texture is created.
232 /// </summary>
233 struct D2D1_RESOURCE_TEXTURE_PROPERTIES
234 {
235     const(UINT32)* extents;
236     UINT32 dimensions;
237     D2D1_BUFFER_PRECISION bufferPrecision;
238     D2D1_CHANNEL_DEPTH channelDepth;
239     D2D1_FILTER filter;
240     const(D2D1_EXTEND_MODE)* extendModes;
241 }
242 
243 
244 /// <summary>
245 /// This defines a single element of the vertex layout.
246 /// </summary>
247 struct D2D1_INPUT_ELEMENT_DESC
248 {
249     PCSTR semanticName;
250     UINT32 semanticIndex;
251     DXGI_FORMAT format;
252     UINT32 inputSlot;
253     UINT32 alignedByteOffset;
254 }
255 
256 
257 // 
258 // Set to alignedByteOffset within D2D1_INPUT_ELEMENT_DESC for elements that 
259 // immediately follow preceding elements in memory
260 //
261 enum D2D1_APPEND_ALIGNED_ELEMENT = 0xffffffff;
262 
263 
264 /// <summary>
265 /// This defines the properties of a vertex buffer which uses the default vertex
266 /// layout.
267 /// </summary>
268 struct D2D1_VERTEX_BUFFER_PROPERTIES
269 {
270     UINT32 inputCount;
271     D2D1_VERTEX_USAGE usage;
272     const(BYTE)* data;
273     UINT32 byteWidth;
274 }
275 
276 
277 /// <summary>
278 /// This defines the input layout of vertices and the vertex shader which processes
279 /// them.
280 /// </summary>
281 struct D2D1_CUSTOM_VERTEX_BUFFER_PROPERTIES
282 {
283     const(BYTE)* shaderBufferWithInputSignature;
284     UINT32 shaderBufferSize;
285     const(D2D1_INPUT_ELEMENT_DESC)* inputElements;
286     UINT32 elementCount;
287     UINT32 stride;
288 }
289 
290 
291 /// <summary>
292 /// This defines the range of vertices from a vertex buffer to draw.
293 /// </summary>
294 struct D2D1_VERTEX_RANGE
295 {
296     UINT32 startVertex;
297     UINT32 vertexCount;
298 }
299 
300 
301 /// <summary>
302 /// Blend description which configures a blend transform object.
303 /// </summary>
304 struct D2D1_BLEND_DESCRIPTION
305 {
306     D2D1_BLEND sourceBlend;
307     D2D1_BLEND destinationBlend;
308     D2D1_BLEND_OPERATION blendOperation;
309     D2D1_BLEND sourceBlendAlpha;
310     D2D1_BLEND destinationBlendAlpha;
311     D2D1_BLEND_OPERATION blendOperationAlpha;
312     FLOAT[4] blendFactor;
313 };
314 
315 
316 /// <summary>
317 /// Describes options transforms may select to use on their input textures.
318 /// </summary>
319 struct D2D1_INPUT_DESCRIPTION
320 {
321     D2D1_FILTER filter;
322     UINT32 levelOfDetailCount;
323 }
324 
325 
326 /// <summary>
327 /// Indicates whether shader support for doubles is present on the underlying
328 /// hardware.  This may be populated using CheckFeatureSupport.
329 /// </summary>
330 struct D2D1_FEATURE_DATA_DOUBLES
331 {
332     BOOL doublePrecisionFloatShaderOps;
333 }
334 
335 
336 /// <summary>
337 /// Indicates support for features which are optional on D3D10 feature levels.  This
338 /// may be populated using CheckFeatureSupport.
339 /// </summary>
340 struct D2D1_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS
341 {
342     BOOL computeShaders_Plus_RawAndStructuredBuffers_Via_Shader_4_x;
343 }
344 
345 mixin(uuid!(ID2D1VertexBuffer, "9b8b1336-00a5-4668-92b7-ced5d8bf9b7b"));
346 /// <summary>
347 /// A transform uses this interface to write new vertices to a vertex buffer.
348 /// </summary>
349 interface ID2D1VertexBuffer : IUnknown
350 {
351 	extern(Windows):
352     HRESULT Map(
353     	BYTE** data,
354         UINT32 bufferSize 
355         );
356     
357     HRESULT Unmap();
358 } // interface ID2D1VertexBuffer
359 
360 mixin(uuid!(ID2D1ResourceTexture, "688d15c3-02b0-438d-b13a-d1b44c32c39a"));
361 interface ID2D1ResourceTexture : IUnknown
362 {
363 	extern(Windows):
364     /// <summary>
365     /// Update the vertex text.
366     /// </summary>
367     HRESULT Update(
368         const(UINT32)* minimumExtents,
369         const(UINT32)* maximimumExtents,
370         const(UINT32)* strides,
371         UINT32 dimensions,
372         const(BYTE)* data,
373         UINT32 dataCount 
374         );
375 } // interface ID2D1ResourceTexture
376 
377 
378 mixin(uuid!(ID2D1RenderInfo, "519ae1bd-d19a-420d-b849-364f594776b7"));
379 /// <summary>
380 /// A transform uses this interface to specify how to render a particular pass in
381 /// D2D.
382 /// </summary>
383 interface ID2D1RenderInfo : IUnknown
384 {
385 	extern(Windows):
386     /// <summary>
387     /// Sets options for sampling the specified image input
388     /// </summary>
389     HRESULT SetInputDescription(
390         UINT32 inputIndex,
391         D2D1_INPUT_DESCRIPTION inputDescription 
392         );
393     
394     /// <summary>
395     /// Controls the output precision and channel-depth for the associated transform.
396     /// </summary>
397     HRESULT SetOutputBuffer(
398         D2D1_BUFFER_PRECISION bufferPrecision,
399         D2D1_CHANNEL_DEPTH channelDepth 
400         );
401     
402     /// <summary>
403     /// Controls whether the output of the associated transform is cached.
404     /// </summary>
405     void SetCached(BOOL isCached);
406     
407     /// <summary>
408     /// Provides a hint of the approximate shader instruction count per pixel.  If
409     /// provided, it may improve performance when processing large images.  Instructions
410     /// should be counted multiple times if occurring within loops.
411     /// </summary>
412     void SetInstructionCountHint(UINT32 instructionCount);
413 } // interface ID2D1RenderInfo
414 
415 
416 mixin(uuid!(ID2D1DrawInfo, "693ce632-7f2f-45de-93fe-18d88b37aa21"));
417 /// <summary>
418 /// A transform uses this interface to specify how to render a particular pass using
419 /// pixel and vertex shaders.
420 /// </summary>
421 interface ID2D1DrawInfo : ID2D1RenderInfo
422 {
423 	extern(Windows):
424     /// <summary>
425     /// Set the constant buffer for this transform's pixel shader.
426     /// </summary>
427     HRESULT SetPixelShaderConstantBuffer(
428         const(BYTE)* buffer,
429         UINT32 bufferCount 
430         );
431     
432     /// <summary>
433     /// Sets the resource texture corresponding to the given shader texture index.
434     /// </summary>
435     HRESULT SetResourceTexture(
436         UINT32 textureIndex,
437         ID2D1ResourceTexture resourceTexture 
438         );
439     
440     /// <summary>
441     /// Set the constant buffer for this transform's vertex shader.
442     /// </summary>
443     HRESULT SetVertexShaderConstantBuffer(
444         const(BYTE)* buffer,
445         UINT32 bufferCount 
446         );
447     
448     /// <summary>
449     /// Set the shader instructions for this transform.
450     /// </summary>
451     HRESULT SetPixelShader(
452         REFGUID shaderId,
453         D2D1_PIXEL_OPTIONS pixelOptions = D2D1_PIXEL_OPTIONS_NONE 
454         );
455     
456     /// <summary>
457     /// Set custom vertices for the associated transform.  A blend mode if
458     /// foreground-over will be used if blendDescription is null.
459     /// </summary>
460     HRESULT SetVertexProcessing(
461         ID2D1VertexBuffer vertexBuffer,
462         D2D1_VERTEX_OPTIONS vertexOptions,
463         const(D2D1_BLEND_DESCRIPTION)* blendDescription = null,
464         const(D2D1_VERTEX_RANGE)* vertexRange = null,
465         const(GUID)* vertexShader = null 
466         );
467 } // interface ID2D1DrawInfo
468 
469 
470 mixin(uuid!(ID2D1ComputeInfo, "5598b14b-9fd7-48b7-9bdb-8f0964eb38bc"));
471 /// <summary>
472 /// A transform uses this interface to specify how to render a particular pass using
473 /// compute shader.
474 /// </summary>
475 interface ID2D1ComputeInfo : ID2D1RenderInfo
476 {
477 	extern(Windows):
478     /// <summary>
479     /// Set the constant buffer for this transform.
480     /// </summary>
481     HRESULT SetComputeShaderConstantBuffer(
482         const(BYTE)* buffer,
483         UINT32 bufferCount 
484         );
485     
486     /// <summary>
487     /// Set the shader instructions for this transform.
488     /// </summary>
489     HRESULT SetComputeShader(REFGUID shaderId);
490     
491     /// <summary>
492     /// Sets the resource texture corresponding to the given shader texture index.
493     /// </summary>
494     HRESULT SetResourceTexture(
495         UINT32 textureIndex,
496         ID2D1ResourceTexture resourceTexture 
497         );
498 } // interface ID2D1ComputeInfo
499 
500 
501 mixin(uuid!(ID2D1TransformNode, "b2efe1e7-729f-4102-949f-505fa21bf666"));
502 /// <summary>
503 /// A base object which can be inserted into a transform graph.
504 /// </summary>
505 interface ID2D1TransformNode : IUnknown
506 {
507 	extern(Windows):
508     /// <summary>
509     /// Return the number of input this node has.
510     /// </summary>
511     UINT32 GetInputCount() const;
512 } // interface ID2D1TransformNode
513 
514 
515 mixin(uuid!(ID2D1TransformGraph, "13d29038-c3e6-4034-9081-13b53a417992"));
516 /// <summary>
517 /// The implementation of the actual graph.
518 /// </summary>
519 interface ID2D1TransformGraph : IUnknown
520 {
521 	extern(Windows):
522     /// <summary>
523     /// Return the number of input this graph has.
524     /// </summary>
525     UINT32 GetInputCount() const;
526     
527     /// <summary>
528     /// Sets the graph to contain a single transform whose inputs map 1:1 with effect
529     /// inputs.
530     /// </summary>
531     HRESULT SetSingleTransformNode(ID2D1TransformNode node);
532     
533     /// <summary>
534     /// Adds the given transform node to the graph.
535     /// </summary>
536     HRESULT AddNode(ID2D1TransformNode node);
537     
538     /// <summary>
539     /// Removes the given transform node from the graph.
540     /// </summary>
541     HRESULT RemoveNode(ID2D1TransformNode node);
542     
543     /// <summary>
544     /// Indicates that the given transform node should be considered to be the output
545     /// node of the graph.
546     /// </summary>
547     HRESULT SetOutputNode(ID2D1TransformNode node);
548     
549     /// <summary>
550     /// Connects one node to another node inside the graph.
551     /// </summary>
552     HRESULT ConnectNode(
553         ID2D1TransformNode fromNode,
554         ID2D1TransformNode toNode,
555         UINT32 toNodeInputIndex 
556         );
557     
558     /// <summary>
559     /// Connects a transform node inside the graph to the corresponding input of the
560     /// encapsulating effect.
561     /// </summary>
562     HRESULT ConnectToEffectInput(
563         UINT32 toEffectInputIndex,
564         ID2D1TransformNode node,
565         UINT32 toNodeInputIndex 
566         );
567     
568     /// <summary>
569     /// Clears all nodes and connections from the transform graph.
570     /// </summary>
571     void Clear();
572     
573     /// <summary>
574     /// Uses the specified input as the effect output.
575     /// </summary>
576     HRESULT SetPassthroughGraph(
577         UINT32 effectInputIndex 
578         );
579 } // interface ID2D1TransformGraph
580 
581 
582 mixin(uuid!(ID2D1Transform, "ef1a287d-342a-4f76-8fdb-da0d6ea9f92b"));
583 /// <summary>
584 /// The interface implemented by a transform author.
585 /// </summary>
586 interface ID2D1Transform : ID2D1TransformNode
587 {
588 	extern(Windows):
589     HRESULT MapOutputRectToInputRects(
590         const(D2D1_RECT_L)* outputRect,
591         D2D1_RECT_L* inputRects,
592         UINT32 inputRectsCount 
593         ) const;
594     
595     HRESULT MapInputRectsToOutputRect(
596         const(D2D1_RECT_L)* inputRects,
597         const(D2D1_RECT_L)* inputOpaqueSubRects,
598         UINT32 inputRectCount,
599         D2D1_RECT_L* outputRect,
600         D2D1_RECT_L* outputOpaqueSubRect 
601         );
602     
603     HRESULT MapInvalidRect(
604         UINT32 inputIndex,
605         D2D1_RECT_L invalidInputRect,
606         D2D1_RECT_L* invalidOutputRect 
607         ) const;
608 } // interface ID2D1Transform
609 
610 
611 mixin(uuid!(ID2D1DrawTransform, "36bfdcb6-9739-435d-a30d-a653beff6a6f"));
612 /// <summary>
613 /// The interface implemented by a transform author to provide a GPU-based effect.
614 /// </summary>
615 interface ID2D1DrawTransform : ID2D1Transform
616 {
617 	extern(Windows):
618     HRESULT SetDrawInfo(ID2D1DrawInfo drawInfo);
619 } // interface ID2D1DrawTransform
620 
621 
622 mixin(uuid!(ID2D1ComputeTransform, "0d85573c-01e3-4f7d-bfd9-0d60608bf3c3"));
623 /// <summary>
624 /// The interface implemented by a transform author to provide a Compute Shader
625 /// based effect.
626 /// </summary>
627 interface ID2D1ComputeTransform : ID2D1Transform
628 {
629     extern(Windows):
630     HRESULT SetComputeInfo(ID2D1ComputeInfo computeInfo);
631     
632     HRESULT CalculateThreadgroups(
633         const(D2D1_RECT_L)* outputRect,
634         UINT32* dimensionX,
635         UINT32* dimensionY,
636         UINT32* dimensionZ 
637         );
638 } // interface ID2D1ComputeTransform
639 
640 
641 mixin(uuid!(ID2D1AnalysisTransform, "0359dc30-95e6-4568-9055-27720d130e93"));
642 /// <summary>
643 /// The interface implemented by a transform author to indicate that it should
644 /// receive an analysis result callback.
645 /// </summary>
646 interface ID2D1AnalysisTransform : IUnknown
647 {
648     extern(Windows):
649     HRESULT ProcessAnalysisResults(
650         const(BYTE)* analysisData,
651         UINT32 analysisDataCount 
652         );
653 } // interface ID2D1AnalysisTransform
654 
655 
656 mixin(uuid!(ID2D1SourceTransform, "db1800dd-0c34-4cf9-be90-31cc0a5653e1"));
657 /// <summary>
658 /// The interface implemented by a transform author to provide a CPU based source
659 /// effect.
660 /// </summary>
661 interface ID2D1SourceTransform : ID2D1Transform
662 {
663     extern(Windows):
664     HRESULT SetRenderInfo(ID2D1RenderInfo renderInfo);
665     
666     HRESULT Draw(
667         ID2D1Bitmap1 target,
668         const(D2D1_RECT_L)* drawRect,
669         D2D1_POINT_2U targetOrigin 
670         );
671 } // interface ID2D1SourceTransform
672 
673 
674 mixin(uuid!(ID2D1ConcreteTransform, "1a799d8a-69f7-4e4c-9fed-437ccc6684cc"));
675 /// <summary>
676 /// Base interface for built-in transforms on which precision and caching may be
677 /// controlled.
678 /// </summary>
679 interface ID2D1ConcreteTransform : ID2D1TransformNode
680 {
681     extern(Windows):
682     /// <summary>
683     /// Controls the output precision and channel-depth for this transform.
684     /// </summary>
685     HRESULT SetOutputBuffer(
686         D2D1_BUFFER_PRECISION bufferPrecision,
687         D2D1_CHANNEL_DEPTH channelDepth 
688         );
689     
690     /// <summary>
691     /// Controls whether the output of this transform is cached.
692     /// </summary>
693     void SetCached(BOOL isCached);
694 } // interface ID2D1ConcreteTransform
695 
696 
697 mixin(uuid!(ID2D1BlendTransform, "63ac0b32-ba44-450f-8806-7f4ca1ff2f1b"));
698 /// <summary>
699 /// An effect uses this interface to configure a blending operation.
700 /// </summary>
701 interface ID2D1BlendTransform : ID2D1ConcreteTransform
702 {
703     extern(Windows):
704     void SetDescription(const(D2D1_BLEND_DESCRIPTION)* description);
705     
706     void GetDescription(D2D1_BLEND_DESCRIPTION* description) const;
707 } // interface ID2D1BlendTransform
708 
709 
710 mixin(uuid!(ID2D1BorderTransform, "4998735c-3a19-473c-9781-656847e3a347"));
711 /// <summary>
712 /// An effect uses this interface to configure border generation.
713 /// </summary>
714 interface ID2D1BorderTransform :ID2D1ConcreteTransform
715 {
716     extern(Windows):
717     void SetExtendModeX(D2D1_EXTEND_MODE extendMode);
718     
719     void SetExtendModeY(D2D1_EXTEND_MODE extendMode);
720     
721     D2D1_EXTEND_MODE GetExtendModeX() const;
722     
723     D2D1_EXTEND_MODE GetExtendModeY() const;
724 } // interface ID2D1BorderTransform
725 
726 
727 mixin(uuid!(ID2D1OffsetTransform, "3fe6adea-7643-4f53-bd14-a0ce63f24042"));
728 /// <summary>
729 /// An effect uses this interface to offset an image without inserting a rendering
730 /// pass.
731 /// </summary>
732 interface ID2D1OffsetTransform : ID2D1TransformNode
733 {
734     extern(Windows):
735     void SetOffset(D2D1_POINT_2L offset);
736     
737     D2D1_POINT_2L GetOffset() const;
738 } // interface ID2D1OffsetTransform
739 
740 
741 mixin(uuid!(ID2D1BoundsAdjustmentTransform, "90f732e2-5092-4606-a819-8651970baccd"));
742 /// <summary>
743 /// An effect uses this interface to alter the image rectangle of its input.
744 /// </summary>
745 interface ID2D1BoundsAdjustmentTransform : ID2D1TransformNode
746 {
747     extern(Windows):
748     void SetOutputBounds(const(D2D1_RECT_L)* outputBounds);
749     
750     void GetOutputBounds(D2D1_RECT_L* outputBounds) const;
751 } // interface ID2D1BoundsAdjustmentTransform
752 
753 
754 mixin(uuid!(ID2D1EffectImpl, "a248fd3f-3e6c-4e63-9f03-7f68ecc91db9"));
755 /// <summary>
756 /// This is the interface implemented by an effect author, along with the
757 /// constructor and registration information.
758 /// </summary>
759 interface ID2D1EffectImpl : IUnknown
760 {
761     extern(Windows):
762     /// <summary>
763     /// Initialize the effect with a context and a transform graph. The effect must
764     /// populate the transform graph with a topology and can update it later.
765     /// </summary>
766     HRESULT Initialize(
767         ID2D1EffectContext effectContext,
768         ID2D1TransformGraph transformGraph 
769         );
770     
771     /// <summary>
772     /// Initialize the effect with a context and a transform graph. The effect must
773     /// populate the transform graph with a topology and can update it later.
774     /// </summary>
775     HRESULT PrepareForRender(
776         D2D1_CHANGE_TYPE changeType 
777         );
778     
779     /// <summary>
780     /// Sets a new transform graph to the effect.  This happens when the number of
781     /// inputs to the effect changes, if the effect support a variable number of inputs.
782     /// </summary>
783     HRESULT SetGraph(
784         ID2D1TransformGraph transformGraph 
785         );
786 } // interface ID2D1EffectImpl
787 
788 
789 mixin(uuid!(ID2D1EffectContext, "3d9f916b-27dc-4ad7-b4f1-64945340f563"));
790 /// <summary>
791 /// The internal context handed to effect authors to create transforms from effects
792 /// and any other operation tied to context which is not useful to the application
793 /// facing API.
794 /// </summary>
795 interface ID2D1EffectContext : IUnknown
796 {
797     
798     void GetDpi(
799         FLOAT* dpiX,
800         FLOAT* dpiY 
801         ) const;
802     
803     /// <summary>
804     /// Create a new effect, the effect must either be built in or previously registered
805     /// through ID2D1Factory1::RegisterEffect.
806     /// </summary>
807     HRESULT CreateEffect(
808         REFCLSID effectId,
809         ID2D1Effect *effect 
810         );
811     
812     HRESULT GetMaximumSupportedFeatureLevel(
813         const(D3D_FEATURE_LEVEL)* featureLevels,
814         UINT32 featureLevelsCount,
815         D3D_FEATURE_LEVEL* maximumSupportedFeatureLevel 
816         ) const;
817     
818     /// <summary>
819     /// Create a transform node from the passed in effect.
820     /// </summary>
821     HRESULT CreateTransformNodeFromEffect(
822         ID2D1Effect effect,
823         ID2D1TransformNode *transformNode 
824         );
825     
826     HRESULT CreateBlendTransform(
827         UINT32 numInputs,
828         const(D2D1_BLEND_DESCRIPTION)* blendDescription,
829         ID2D1BlendTransform *transform 
830         );
831     
832     HRESULT CreateBorderTransform(
833         D2D1_EXTEND_MODE extendModeX,
834         D2D1_EXTEND_MODE extendModeY,
835         ID2D1BorderTransform *transform 
836         );
837     
838     HRESULT CreateOffsetTransform(
839         D2D1_POINT_2L offset,
840         ID2D1OffsetTransform *transform 
841         );
842     
843     HRESULT CreateBoundsAdjustmentTransform(
844         const(D2D1_RECT_L)* outputRectangle,
845         ID2D1BoundsAdjustmentTransform *transform 
846         );
847     
848     HRESULT LoadPixelShader(
849         REFGUID shaderId,
850         const(BYTE)* shaderBuffer,
851         UINT32 shaderBufferCount 
852         );
853     
854     HRESULT LoadVertexShader(
855         REFGUID resourceId,
856         const(BYTE)* shaderBuffer,
857         UINT32 shaderBufferCount 
858         );
859     
860     HRESULT LoadComputeShader(
861         REFGUID resourceId,
862         const(BYTE)* shaderBuffer,
863         UINT32 shaderBufferCount 
864         );
865     
866     BOOL IsShaderLoaded(REFGUID shaderId);
867     
868     HRESULT CreateResourceTexture(
869         const(GUID)* resourceId,
870         const(D2D1_RESOURCE_TEXTURE_PROPERTIES)* resourceTextureProperties,
871     	const(BYTE)* data,
872         const(UINT32)* strides,
873         UINT32 dataSize,
874         ID2D1ResourceTexture *resourceTexture 
875         );
876     
877     HRESULT FindResourceTexture(
878         const(GUID)* resourceId,
879         ID2D1ResourceTexture *resourceTexture 
880         );
881     
882     HRESULT CreateVertexBuffer(
883         const(D2D1_VERTEX_BUFFER_PROPERTIES)* vertexBufferProperties,
884         const(GUID)* resourceId,
885         const(D2D1_CUSTOM_VERTEX_BUFFER_PROPERTIES)* customVertexBufferProperties,
886         ID2D1VertexBuffer *buffer 
887         );
888     
889     HRESULT FindVertexBuffer(
890         const(GUID)* resourceId,
891         ID2D1VertexBuffer *buffer 
892         );
893     
894     /// <summary>
895     /// Creates a color context from a color space.  If the space is Custom, the context
896     /// is initialized from the profile/profileSize arguments.  Otherwise the context is
897     /// initialized with the profile bytes associated with the space and
898     /// profile/profileSize are ignored.
899     /// </summary>
900     HRESULT CreateColorContext(
901         D2D1_COLOR_SPACE space,
902         const(BYTE)* profile,
903         UINT32 profileSize,
904         ID2D1ColorContext *colorContext 
905         );
906     
907     HRESULT CreateColorContextFromFilename(
908         PCWSTR filename,
909         ID2D1ColorContext *colorContext 
910         );
911     
912     HRESULT CreateColorContextFromWicColorContext(
913         IWICColorContext wicColorContext,
914         ID2D1ColorContext *colorContext 
915         );
916     
917     HRESULT CheckFeatureSupport(
918         D2D1_FEATURE feature,
919         void* featureSupportData,
920         UINT32 featureSupportDataSize 
921         ) const;
922     
923     /// <summary>
924     /// Indicates whether the buffer precision is supported by D2D.
925     /// </summary>
926     BOOL IsBufferPrecisionSupported(D2D1_BUFFER_PRECISION bufferPrecision) const;
927 } // interface ID2D1EffectContext