shell32: Remove unused string (Clang).
[wine/multimedia.git] / dlls / d2d1 / d2d1_private.h
blob05e678c7062e59613900c1433d1206967503d87d
1 /*
2 * Copyright 2014 Henri Verbeet 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 #ifndef __WINE_D2D1_PRIVATE_H
20 #define __WINE_D2D1_PRIVATE_H
22 #include "wine/debug.h"
24 #include <assert.h>
25 #include <limits.h>
26 #define COBJMACROS
27 #include "d2d1.h"
28 #ifdef D2D1_INIT_GUID
29 #include "initguid.h"
30 #endif
31 #include "dwrite.h"
33 enum d2d_brush_type
35 D2D_BRUSH_TYPE_SOLID,
36 D2D_BRUSH_TYPE_LINEAR,
37 D2D_BRUSH_TYPE_BITMAP,
40 struct d2d_clip_stack
42 D2D1_RECT_F *stack;
43 unsigned int size;
44 unsigned int count;
47 struct d2d_d3d_render_target
49 ID2D1RenderTarget ID2D1RenderTarget_iface;
50 IDWriteTextRenderer IDWriteTextRenderer_iface;
51 LONG refcount;
53 ID3D10Device *device;
54 ID3D10RenderTargetView *view;
55 ID3D10StateBlock *stateblock;
56 ID3D10InputLayout *il;
57 unsigned int vb_stride;
58 ID3D10Buffer *vb;
59 ID3D10VertexShader *vs;
60 ID3D10RasterizerState *rs;
61 ID3D10BlendState *bs;
63 ID3D10PixelShader *rect_solid_ps;
65 D2D1_SIZE_U pixel_size;
66 D2D1_MATRIX_3X2_F transform;
67 struct d2d_clip_stack clip_stack;
68 float dpi_x;
69 float dpi_y;
72 HRESULT d2d_d3d_render_target_init(struct d2d_d3d_render_target *render_target, ID2D1Factory *factory,
73 IDXGISurface *surface, const D2D1_RENDER_TARGET_PROPERTIES *desc) DECLSPEC_HIDDEN;
75 struct d2d_wic_render_target
77 ID2D1RenderTarget ID2D1RenderTarget_iface;
78 LONG refcount;
80 IDXGISurface *dxgi_surface;
81 ID2D1RenderTarget *dxgi_target;
82 ID3D10Texture2D *readback_texture;
83 IWICBitmap *bitmap;
85 unsigned int width;
86 unsigned int height;
87 unsigned int bpp;
90 HRESULT d2d_wic_render_target_init(struct d2d_wic_render_target *render_target, ID2D1Factory *factory,
91 IWICBitmap *bitmap, const D2D1_RENDER_TARGET_PROPERTIES *desc) DECLSPEC_HIDDEN;
93 struct d2d_gradient
95 ID2D1GradientStopCollection ID2D1GradientStopCollection_iface;
96 LONG refcount;
98 D2D1_GRADIENT_STOP *stops;
99 UINT32 stop_count;
102 HRESULT d2d_gradient_init(struct d2d_gradient *gradient, ID2D1RenderTarget *render_target,
103 const D2D1_GRADIENT_STOP *stops, UINT32 stop_count, D2D1_GAMMA gamma,
104 D2D1_EXTEND_MODE extend_mode) DECLSPEC_HIDDEN;
106 struct d2d_brush
108 ID2D1Brush ID2D1Brush_iface;
109 LONG refcount;
111 float opacity;
113 enum d2d_brush_type type;
114 union
116 struct
118 D2D1_COLOR_F color;
119 } solid;
120 } u;
123 void d2d_solid_color_brush_init(struct d2d_brush *brush, ID2D1RenderTarget *render_target,
124 const D2D1_COLOR_F *color, const D2D1_BRUSH_PROPERTIES *desc) DECLSPEC_HIDDEN;
125 void d2d_linear_gradient_brush_init(struct d2d_brush *brush, ID2D1RenderTarget *render_target,
126 const D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES *gradient_brush_desc, const D2D1_BRUSH_PROPERTIES *brush_desc,
127 ID2D1GradientStopCollection *gradient) DECLSPEC_HIDDEN;
128 void d2d_bitmap_brush_init(struct d2d_brush *brush, ID2D1RenderTarget *render_target,
129 const ID2D1Bitmap *bitmap, const D2D1_BITMAP_BRUSH_PROPERTIES *bitmap_brush_desc,
130 const D2D1_BRUSH_PROPERTIES *brush_desc) DECLSPEC_HIDDEN;
131 struct d2d_brush *unsafe_impl_from_ID2D1Brush(ID2D1Brush *iface) DECLSPEC_HIDDEN;
133 struct d2d_stroke_style
135 ID2D1StrokeStyle ID2D1StrokeStyle_iface;
136 LONG refcount;
139 void d2d_stroke_style_init(struct d2d_stroke_style *style, ID2D1Factory *factory,
140 const D2D1_STROKE_STYLE_PROPERTIES *desc, const float *dashes, UINT32 dash_count) DECLSPEC_HIDDEN;
142 struct d2d_mesh
144 ID2D1Mesh ID2D1Mesh_iface;
145 LONG refcount;
148 void d2d_mesh_init(struct d2d_mesh *mesh) DECLSPEC_HIDDEN;
150 struct d2d_bitmap
152 ID2D1Bitmap ID2D1Bitmap_iface;
153 LONG refcount;
156 void d2d_bitmap_init(struct d2d_bitmap *bitmap, D2D1_SIZE_U size, const void *src_data,
157 UINT32 pitch, const D2D1_BITMAP_PROPERTIES *desc) DECLSPEC_HIDDEN;
159 #endif /* __WINE_D2D1_PRIVATE_H */