d3dx9_30: Add stub for D3DXCpuOptimizations.
[wine.git] / dlls / d2d1 / d2d1_private.h
blob2d1fea28e0629086f6f501a6a730e2b0ef070f43
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 <limits.h>
25 #define COBJMACROS
26 #include "d2d1.h"
27 #ifdef D2D1_INIT_GUID
28 #include "initguid.h"
29 #endif
30 #include "dwrite.h"
32 struct d2d_clip_stack
34 D2D1_RECT_F *stack;
35 unsigned int size;
36 unsigned int count;
39 struct d2d_d3d_render_target
41 ID2D1RenderTarget ID2D1RenderTarget_iface;
42 IDWriteTextRenderer IDWriteTextRenderer_iface;
43 LONG refcount;
45 ID3D10Device *device;
46 ID3D10RenderTargetView *view;
47 ID3D10StateBlock *stateblock;
49 ID3D10InputLayout *clear_il;
50 unsigned int clear_vb_stride;
51 ID3D10Buffer *clear_vb;
52 ID3D10VertexShader *clear_vs;
53 ID3D10PixelShader *clear_ps;
54 ID3D10RasterizerState *clear_rs;
56 D2D1_SIZE_U pixel_size;
57 D2D1_MATRIX_3X2_F transform;
58 struct d2d_clip_stack clip_stack;
59 float dpi_x;
60 float dpi_y;
63 HRESULT d2d_d3d_render_target_init(struct d2d_d3d_render_target *render_target, ID2D1Factory *factory,
64 IDXGISurface *surface, const D2D1_RENDER_TARGET_PROPERTIES *desc) DECLSPEC_HIDDEN;
66 struct d2d_wic_render_target
68 ID2D1RenderTarget ID2D1RenderTarget_iface;
69 LONG refcount;
71 IDXGISurface *dxgi_surface;
72 ID2D1RenderTarget *dxgi_target;
73 ID3D10Texture2D *readback_texture;
74 IWICBitmap *bitmap;
76 unsigned int width;
77 unsigned int height;
78 unsigned int bpp;
81 HRESULT d2d_wic_render_target_init(struct d2d_wic_render_target *render_target, ID2D1Factory *factory,
82 IWICBitmap *bitmap, const D2D1_RENDER_TARGET_PROPERTIES *desc) DECLSPEC_HIDDEN;
84 struct d2d_gradient
86 ID2D1GradientStopCollection ID2D1GradientStopCollection_iface;
87 LONG refcount;
90 void d2d_gradient_init(struct d2d_gradient *gradient, ID2D1RenderTarget *render_target,
91 const D2D1_GRADIENT_STOP *stops, UINT32 stop_count, D2D1_GAMMA gamma,
92 D2D1_EXTEND_MODE extend_mode) DECLSPEC_HIDDEN;
94 struct d2d_brush
96 ID2D1Brush ID2D1Brush_iface;
97 LONG refcount;
100 void d2d_solid_color_brush_init(struct d2d_brush *brush, ID2D1RenderTarget *render_target,
101 const D2D1_COLOR_F *color, const D2D1_BRUSH_PROPERTIES *desc) DECLSPEC_HIDDEN;
102 void d2d_linear_gradient_brush_init(struct d2d_brush *brush, ID2D1RenderTarget *render_target,
103 const D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES *gradient_brush_desc, const D2D1_BRUSH_PROPERTIES *brush_desc,
104 ID2D1GradientStopCollection *gradient) DECLSPEC_HIDDEN;
106 struct d2d_stroke_style
108 ID2D1StrokeStyle ID2D1StrokeStyle_iface;
109 LONG refcount;
112 void d2d_stroke_style_init(struct d2d_stroke_style *style, ID2D1Factory *factory,
113 const D2D1_STROKE_STYLE_PROPERTIES *desc, const float *dashes, UINT32 dash_count) DECLSPEC_HIDDEN;
115 struct d2d_mesh
117 ID2D1Mesh ID2D1Mesh_iface;
118 LONG refcount;
121 void d2d_mesh_init(struct d2d_mesh *mesh) DECLSPEC_HIDDEN;
123 struct d2d_bitmap
125 ID2D1Bitmap ID2D1Bitmap_iface;
126 LONG refcount;
129 void d2d_bitmap_init(struct d2d_bitmap *bitmap, D2D1_SIZE_U size, const void *src_data,
130 UINT32 pitch, const D2D1_BITMAP_PROPERTIES *desc) DECLSPEC_HIDDEN;
132 #endif /* __WINE_D2D1_PRIVATE_H */