1 // Licensed under the Apache License, Version 2.0 2 // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license 3 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. 4 // All files in the project carrying such notice may not be copied, modified, or distributed 5 // except according to those terms 6 //! Mappings for the contents of d2d1.h 7 use ctypes::c_void; 8 use shared::basetsd::{UINT32, UINT64}; 9 use shared::dxgi::IDXGISurface; 10 use shared::guiddef::REFIID; 11 use shared::minwindef::{BOOL, DWORD, FLOAT}; 12 use shared::windef::{HDC, HWND, RECT}; 13 use um::d2dbasetypes::{ 14 D2D_COLOR_F, D2D_MATRIX_3X2_F, D2D_POINT_2F, D2D_POINT_2U, D2D_RECT_F, D2D_RECT_U, D2D_SIZE_F, 15 D2D_SIZE_U, 16 }; 17 use um::d3dcommon::{D3D_FEATURE_LEVEL_10_0, D3D_FEATURE_LEVEL_9_1}; 18 use um::dcommon::{D2D1_PIXEL_FORMAT, DWRITE_MEASURING_MODE}; 19 use um::dwrite::{DWRITE_GLYPH_RUN, IDWriteRenderingParams, IDWriteTextFormat, IDWriteTextLayout}; 20 use um::unknwnbase::{IUnknown, IUnknownVtbl}; 21 use um::wincodec::{IWICBitmap, IWICBitmapSource}; 22 use um::winnt::{HRESULT, WCHAR}; 23 // Types confirmed affected by the ABI issue: 24 // D2D1_SIZE_F, D2D1_SIZE_U, D2D1_COLOR_F, D2D1_PIXEL_FORMAT, D2D1_POINT_2F 25 pub const D2D1_DEFAULT_FLATTENING_TOLERANCE: FLOAT = 0.25; 26 pub const D2D1_INTERPOLATION_MODE_DEFINITION_NEAREST_NEIGHBOR: DWORD = 0; 27 pub const D2D1_INTERPOLATION_MODE_DEFINITION_LINEAR: DWORD = 1; 28 pub const D2D1_INTERPOLATION_MODE_DEFINITION_CUBIC: DWORD = 2; 29 pub const D2D1_INTERPOLATION_MODE_DEFINITION_MULTI_SAMPLE_LINEAR: DWORD = 3; 30 pub const D2D1_INTERPOLATION_MODE_DEFINITION_ANISOTROPIC: DWORD = 4; 31 pub const D2D1_INTERPOLATION_MODE_DEFINITION_HIGH_QUALITY_CUBIC: DWORD = 5; 32 pub const D2D1_INTERPOLATION_MODE_DEFINITION_FANT: DWORD = 6; 33 pub const D2D1_INTERPOLATION_MODE_DEFINITION_MIPMAP_LINEAR: DWORD = 7; 34 ENUM!{enum D2D1_GAMMA { 35 D2D1_GAMMA_2_2 = 0, 36 D2D1_GAMMA_1_0 = 1, 37 }} 38 ENUM!{enum D2D1_OPACITY_MASK_CONTENT { 39 D2D1_OPACITY_MASK_CONTENT_GRAPHICS = 0, 40 D2D1_OPACITY_MASK_CONTENT_TEXT_NATURAL = 1, 41 D2D1_OPACITY_MASK_CONTENT_TEXT_GDI_COMPATIBLE = 2, 42 }} 43 ENUM!{enum D2D1_EXTEND_MODE { 44 D2D1_EXTEND_MODE_CLAMP = 0, 45 D2D1_EXTEND_MODE_WRAP = 1, 46 D2D1_EXTEND_MODE_MIRROR = 2, 47 }} 48 ENUM!{enum D2D1_ANTIALIAS_MODE { 49 D2D1_ANTIALIAS_MODE_PER_PRIMITIVE = 0, 50 D2D1_ANTIALIAS_MODE_ALIASED = 1, 51 }} 52 ENUM!{enum D2D1_TEXT_ANTIALIAS_MODE { 53 D2D1_TEXT_ANTIALIAS_MODE_DEFAULT = 0, 54 D2D1_TEXT_ANTIALIAS_MODE_CLEARTYPE = 1, 55 D2D1_TEXT_ANTIALIAS_MODE_GRAYSCALE = 2, 56 D2D1_TEXT_ANTIALIAS_MODE_ALIASED = 3, 57 }} 58 ENUM!{enum D2D1_BITMAP_INTERPOLATION_MODE { 59 D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR = 60 D2D1_INTERPOLATION_MODE_DEFINITION_NEAREST_NEIGHBOR, 61 D2D1_BITMAP_INTERPOLATION_MODE_LINEAR = 62 D2D1_INTERPOLATION_MODE_DEFINITION_LINEAR, 63 }} 64 ENUM!{enum D2D1_DRAW_TEXT_OPTIONS { 65 D2D1_DRAW_TEXT_OPTIONS_NO_SNAP = 0x00000001, 66 D2D1_DRAW_TEXT_OPTIONS_CLIP = 0x00000002, 67 D2D1_DRAW_TEXT_OPTIONS_ENABLE_COLOR_FONT = 0x00000004, 68 D2D1_DRAW_TEXT_OPTIONS_NONE = 0x00000000, 69 }} 70 pub type D2D1_POINT_2U = D2D_POINT_2U; 71 pub type D2D1_POINT_2F = D2D_POINT_2F; 72 pub type D2D1_RECT_F = D2D_RECT_F; 73 pub type D2D1_RECT_U = D2D_RECT_U; 74 pub type D2D1_SIZE_F = D2D_SIZE_F; 75 pub type D2D1_SIZE_U = D2D_SIZE_U; 76 pub type D2D1_COLOR_F = D2D_COLOR_F; 77 pub type D2D1_MATRIX_3X2_F = D2D_MATRIX_3X2_F; 78 pub type D2D1_TAG = UINT64; 79 STRUCT!{struct D2D1_BITMAP_PROPERTIES { 80 pixelFormat: D2D1_PIXEL_FORMAT, 81 dpiX: FLOAT, 82 dpiY: FLOAT, 83 }} 84 STRUCT!{struct D2D1_GRADIENT_STOP { 85 position: FLOAT, 86 color: D2D1_COLOR_F, 87 }} 88 STRUCT!{struct D2D1_BRUSH_PROPERTIES { 89 opacity: FLOAT, 90 transform: D2D1_MATRIX_3X2_F, 91 }} 92 STRUCT!{struct D2D1_BITMAP_BRUSH_PROPERTIES { 93 extendModeX: D2D1_EXTEND_MODE, 94 extendModeY: D2D1_EXTEND_MODE, 95 interpolationMode: D2D1_BITMAP_INTERPOLATION_MODE, 96 }} 97 STRUCT!{struct D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES { 98 startPoint: D2D1_POINT_2F, 99 endPoint: D2D1_POINT_2F, 100 }} 101 STRUCT!{struct D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES { 102 center: D2D1_POINT_2F, 103 gradientOriginOffset: D2D1_POINT_2F, 104 radiusX: FLOAT, 105 radiusY: FLOAT, 106 }} 107 ENUM!{enum D2D1_ARC_SIZE { 108 D2D1_ARC_SIZE_SMALL = 0, 109 D2D1_ARC_SIZE_LARGE = 1, 110 }} 111 ENUM!{enum D2D1_CAP_STYLE { 112 D2D1_CAP_STYLE_FLAT = 0, 113 D2D1_CAP_STYLE_SQUARE = 1, 114 D2D1_CAP_STYLE_ROUND = 2, 115 D2D1_CAP_STYLE_TRIANGLE = 3, 116 }} 117 ENUM!{enum D2D1_DASH_STYLE { 118 D2D1_DASH_STYLE_SOLID = 0, 119 D2D1_DASH_STYLE_DASH = 1, 120 D2D1_DASH_STYLE_DOT = 2, 121 D2D1_DASH_STYLE_DASH_DOT = 3, 122 D2D1_DASH_STYLE_DASH_DOT_DOT = 4, 123 D2D1_DASH_STYLE_CUSTOM = 5, 124 }} 125 ENUM!{enum D2D1_LINE_JOIN { 126 D2D1_LINE_JOIN_MITER = 0, 127 D2D1_LINE_JOIN_BEVEL = 1, 128 D2D1_LINE_JOIN_ROUND = 2, 129 D2D1_LINE_JOIN_MITER_OR_BEVEL = 3, 130 }} 131 ENUM!{enum D2D1_COMBINE_MODE { 132 D2D1_COMBINE_MODE_UNION = 0, 133 D2D1_COMBINE_MODE_INTERSECT = 1, 134 D2D1_COMBINE_MODE_XOR = 2, 135 D2D1_COMBINE_MODE_EXCLUDE = 3, 136 }} 137 ENUM!{enum D2D1_GEOMETRY_RELATION { 138 D2D1_GEOMETRY_RELATION_UNKNOWN = 0, 139 D2D1_GEOMETRY_RELATION_DISJOINT = 1, 140 D2D1_GEOMETRY_RELATION_IS_CONTAINED = 2, 141 D2D1_GEOMETRY_RELATION_CONTAINS = 3, 142 D2D1_GEOMETRY_RELATION_OVERLAP = 4, 143 }} 144 ENUM!{enum D2D1_GEOMETRY_SIMPLIFICATION_OPTION { 145 D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES = 0, 146 D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES = 1, 147 }} 148 ENUM!{enum D2D1_FIGURE_BEGIN { 149 D2D1_FIGURE_BEGIN_FILLED = 0, 150 D2D1_FIGURE_BEGIN_HOLLOW = 1, 151 }} 152 ENUM!{enum D2D1_FIGURE_END { 153 D2D1_FIGURE_END_OPEN = 0, 154 D2D1_FIGURE_END_CLOSED = 1, 155 }} 156 STRUCT!{struct D2D1_BEZIER_SEGMENT { 157 point1: D2D1_POINT_2F, 158 point2: D2D1_POINT_2F, 159 point3: D2D1_POINT_2F, 160 }} 161 STRUCT!{struct D2D1_TRIANGLE { 162 point1: D2D1_POINT_2F, 163 point2: D2D1_POINT_2F, 164 point3: D2D1_POINT_2F, 165 }} 166 ENUM!{enum D2D1_PATH_SEGMENT { 167 D2D1_PATH_SEGMENT_NONE = 0x00000000, 168 D2D1_PATH_SEGMENT_FORCE_UNSTROKED = 0x00000001, 169 D2D1_PATH_SEGMENT_FORCE_ROUND_LINE_JOIN = 0x00000002, 170 }} 171 ENUM!{enum D2D1_SWEEP_DIRECTION { 172 D2D1_SWEEP_DIRECTION_COUNTER_CLOCKWISE = 0, 173 D2D1_SWEEP_DIRECTION_CLOCKWISE = 1, 174 }} 175 ENUM!{enum D2D1_FILL_MODE { 176 D2D1_FILL_MODE_ALTERNATE = 0, 177 D2D1_FILL_MODE_WINDING = 1, 178 }} 179 STRUCT!{struct D2D1_ARC_SEGMENT { 180 point: D2D1_POINT_2F, 181 size: D2D1_SIZE_F, 182 rotationAngle: FLOAT, 183 sweepDirection: D2D1_SWEEP_DIRECTION, 184 arcSize: D2D1_ARC_SIZE, 185 }} 186 STRUCT!{struct D2D1_QUADRATIC_BEZIER_SEGMENT { 187 point1: D2D1_POINT_2F, 188 point2: D2D1_POINT_2F, 189 }} 190 STRUCT!{struct D2D1_ELLIPSE { 191 point: D2D1_POINT_2F, 192 radiusX: FLOAT, 193 radiusY: FLOAT, 194 }} 195 STRUCT!{struct D2D1_ROUNDED_RECT { 196 rect: D2D1_RECT_F, 197 radiusX: FLOAT, 198 radiusY: FLOAT, 199 }} 200 STRUCT!{struct D2D1_STROKE_STYLE_PROPERTIES { 201 startCap: D2D1_CAP_STYLE, 202 endCap: D2D1_CAP_STYLE, 203 dashCap: D2D1_CAP_STYLE, 204 lineJoin: D2D1_LINE_JOIN, 205 miterLimit: FLOAT, 206 dashStyle: D2D1_DASH_STYLE, 207 dashOffset: FLOAT, 208 }} 209 ENUM!{enum D2D1_LAYER_OPTIONS { 210 D2D1_LAYER_OPTIONS_NONE = 0x00000000, 211 D2D1_LAYER_OPTIONS_INITIALIZE_FOR_CLEARTYPE = 0x00000001, 212 }} 213 STRUCT!{struct D2D1_LAYER_PARAMETERS { 214 contentBounds: D2D1_RECT_F, 215 geometricMask: *mut ID2D1Geometry, 216 maskAntialiasMode: D2D1_ANTIALIAS_MODE, 217 maskTransform: D2D1_MATRIX_3X2_F, 218 opacity: FLOAT, 219 opacityBrush: *mut ID2D1Brush, 220 layerOptions: D2D1_LAYER_OPTIONS, 221 }} 222 ENUM!{enum D2D1_WINDOW_STATE { 223 D2D1_WINDOW_STATE_NONE = 0x0000000, 224 D2D1_WINDOW_STATE_OCCLUDED = 0x0000001, 225 }} 226 ENUM!{enum D2D1_RENDER_TARGET_TYPE { 227 D2D1_RENDER_TARGET_TYPE_DEFAULT = 0, 228 D2D1_RENDER_TARGET_TYPE_SOFTWARE = 1, 229 D2D1_RENDER_TARGET_TYPE_HARDWARE = 2, 230 }} 231 ENUM!{enum D2D1_FEATURE_LEVEL { 232 D2D1_FEATURE_LEVEL_DEFAULT = 0, 233 D2D1_FEATURE_LEVEL_9 = D3D_FEATURE_LEVEL_9_1, 234 D2D1_FEATURE_LEVEL_10 = D3D_FEATURE_LEVEL_10_0, 235 }} 236 ENUM!{enum D2D1_RENDER_TARGET_USAGE { 237 D2D1_RENDER_TARGET_USAGE_NONE = 0x00000000, 238 D2D1_RENDER_TARGET_USAGE_FORCE_BITMAP_REMOTING = 0x00000001, 239 D2D1_RENDER_TARGET_USAGE_GDI_COMPATIBLE = 0x00000002, 240 }} 241 ENUM!{enum D2D1_PRESENT_OPTIONS { 242 D2D1_PRESENT_OPTIONS_NONE = 0x00000000, 243 D2D1_PRESENT_OPTIONS_RETAIN_CONTENTS = 0x00000001, 244 D2D1_PRESENT_OPTIONS_IMMEDIATELY = 0x00000002, 245 }} 246 STRUCT!{struct D2D1_RENDER_TARGET_PROPERTIES { 247 _type: D2D1_RENDER_TARGET_TYPE, 248 pixelFormat: D2D1_PIXEL_FORMAT, 249 dpiX: FLOAT, 250 dpiY: FLOAT, 251 usage: D2D1_RENDER_TARGET_USAGE, 252 minLevel: D2D1_FEATURE_LEVEL, 253 }} 254 STRUCT!{struct D2D1_HWND_RENDER_TARGET_PROPERTIES { 255 hwnd: HWND, 256 pixelSize: D2D1_SIZE_U, 257 presentOptions: D2D1_PRESENT_OPTIONS, 258 }} 259 ENUM!{enum D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS { 260 D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE = 0x00000000, 261 D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_GDI_COMPATIBLE = 0x00000001, 262 }} 263 STRUCT!{struct D2D1_DRAWING_STATE_DESCRIPTION { 264 antialiasMode: D2D1_ANTIALIAS_MODE, 265 textAntialiasMode: D2D1_TEXT_ANTIALIAS_MODE, 266 tag1: D2D1_TAG, 267 tag2: D2D1_TAG, 268 transform: D2D1_MATRIX_3X2_F, 269 }} 270 ENUM!{enum D2D1_DC_INITIALIZE_MODE { 271 D2D1_DC_INITIALIZE_MODE_COPY = 0, 272 D2D1_DC_INITIALIZE_MODE_CLEAR = 1, 273 }} 274 ENUM!{enum D2D1_DEBUG_LEVEL { 275 D2D1_DEBUG_LEVEL_NONE = 0, 276 D2D1_DEBUG_LEVEL_ERROR = 1, 277 D2D1_DEBUG_LEVEL_WARNING = 2, 278 D2D1_DEBUG_LEVEL_INFORMATION = 3, 279 }} 280 ENUM!{enum D2D1_FACTORY_TYPE { 281 D2D1_FACTORY_TYPE_SINGLE_THREADED = 0, 282 D2D1_FACTORY_TYPE_MULTI_THREADED = 1, 283 }} 284 STRUCT!{struct D2D1_FACTORY_OPTIONS { 285 debugLevel: D2D1_DEBUG_LEVEL, 286 }} 287 RIDL!{#[uuid(0x2cd90691, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)] 288 interface ID2D1Resource(ID2D1ResourceVtbl): IUnknown(IUnknownVtbl) { 289 fn GetFactory( 290 factory: *mut *mut ID2D1Factory, 291 ) -> (), 292 }} 293 RIDL!{#[uuid(0x65019f75, 0x8da2, 0x497c, 0xb3, 0x2c, 0xdf, 0xa3, 0x4e, 0x48, 0xed, 0xe6)] 294 interface ID2D1Image(ID2D1ImageVtbl): ID2D1Resource(ID2D1ResourceVtbl) {}} 295 RIDL!{#[uuid(0xa2296057, 0xea42, 0x4099, 0x98, 0x3b, 0x53, 0x9f, 0xb6, 0x50, 0x54, 0x26)] 296 interface ID2D1Bitmap(ID2D1BitmapVtbl): ID2D1Image(ID2D1ImageVtbl) { 297 #[fixme] fn GetSize() -> D2D1_SIZE_F, 298 #[fixme] fn GetPixelSize() -> D2D1_SIZE_U, 299 #[fixme] fn GetPixelFormat() -> D2D1_PIXEL_FORMAT, 300 fn GetDpi( 301 dpiX: *mut FLOAT, 302 dpiY: *mut FLOAT, 303 ) -> (), 304 fn CopyFromBitmap( 305 destPoint: *const D2D1_POINT_2U, 306 bitmap: *mut ID2D1Bitmap, 307 srcRect: *const D2D1_RECT_U, 308 ) -> HRESULT, 309 fn CopyFromRenderTarget( 310 destPoint: *const D2D1_POINT_2U, 311 renderTarget: *mut ID2D1RenderTarget, 312 srcRect: *const D2D1_RECT_U, 313 ) -> HRESULT, 314 fn CopyFromMemory( 315 dstRect: *const D2D1_RECT_U, 316 srcData: *const c_void, 317 pitch: UINT32, 318 ) -> HRESULT, 319 }} 320 RIDL!{#[uuid(0x2cd906a7, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)] 321 interface ID2D1GradientStopCollection(ID2D1GradientStopCollectionVtbl): 322 ID2D1Resource(ID2D1ResourceVtbl) { 323 fn GetGradientStopCount() -> UINT32, 324 fn GetGradientStops( 325 gradientStops: *mut D2D1_GRADIENT_STOP, 326 gradientStopsCount: UINT32, 327 ) -> (), 328 fn GetColorInterpolationGamma() -> D2D1_GAMMA, 329 fn GetExtendMode() -> D2D1_EXTEND_MODE, 330 }} 331 RIDL!{#[uuid(0x2cd906a8, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)] 332 interface ID2D1Brush(ID2D1BrushVtbl): ID2D1Resource(ID2D1ResourceVtbl) { 333 fn SetOpacity( 334 opacity: FLOAT, 335 ) -> (), 336 fn SetTransform( 337 transform: *const D2D1_MATRIX_3X2_F, 338 ) -> (), 339 fn GetOpacity() -> FLOAT, 340 fn GetTransform( 341 transform: *mut D2D1_MATRIX_3X2_F, 342 ) -> (), 343 }} 344 RIDL!{#[uuid(0x2cd906aa, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)] 345 interface ID2D1BitmapBrush(ID2D1BitmapBrushVtbl): ID2D1Brush(ID2D1BrushVtbl) { 346 fn SetExtendModeX( 347 extendModeX: D2D1_EXTEND_MODE, 348 ) -> (), 349 fn SetExtendModeY( 350 extendModeY: D2D1_EXTEND_MODE, 351 ) -> (), 352 fn SetInterpolationMode( 353 interpolationMode: D2D1_BITMAP_INTERPOLATION_MODE, 354 ) -> (), 355 fn SetBitmap( 356 bitmap: *mut ID2D1Bitmap, 357 ) -> (), 358 fn GetExtendModeX() -> D2D1_EXTEND_MODE, 359 fn GetExtendModeY() -> D2D1_EXTEND_MODE, 360 fn GetInterpolationMode() -> D2D1_BITMAP_INTERPOLATION_MODE, 361 fn GetBitmap( 362 bitmap: *mut *mut ID2D1Bitmap, 363 ) -> (), 364 }} 365 RIDL!{#[uuid(0x2cd906a9, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)] 366 interface ID2D1SolidColorBrush(ID2D1SolidColorBrushVtbl): ID2D1Brush(ID2D1BrushVtbl) { 367 fn SetColor( 368 color: *const D2D1_COLOR_F, 369 ) -> (), 370 #[fixme] fn GetColor() -> D2D1_COLOR_F, 371 }} 372 RIDL!{#[uuid(0x2cd906ab, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)] 373 interface ID2D1LinearGradientBrush(ID2D1LinearGradientBrushVtbl): ID2D1Brush(ID2D1BrushVtbl) { 374 fn SetStartPoint( 375 startPoint: D2D1_POINT_2F, 376 ) -> (), 377 fn SetEndPoint( 378 endPoint: D2D1_POINT_2F, 379 ) -> (), 380 #[fixme] fn GetStartPoint() -> D2D1_POINT_2F, 381 #[fixme] fn GetEndPoint() -> D2D1_POINT_2F, 382 fn GetGradientStopCollection( 383 gradientStopCollection: *mut *mut ID2D1GradientStopCollection, 384 ) -> (), 385 }} 386 RIDL!{#[uuid(0x2cd906ac, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)] 387 interface ID2D1RadialGradientBrush(ID2D1RadialGradientBrushVtbl): ID2D1Brush(ID2D1BrushVtbl) { 388 fn SetCenter( 389 center: D2D1_POINT_2F, 390 ) -> (), 391 fn SetGradientOriginOffset( 392 gradientOriginOffset: D2D1_POINT_2F, 393 ) -> (), 394 fn SetRadiusX( 395 radiusX: FLOAT, 396 ) -> (), 397 fn SetRadiusY( 398 radiusY: FLOAT, 399 ) -> (), 400 #[fixme] fn GetCenter() -> D2D1_POINT_2F, 401 #[fixme] fn GetGradientOriginOffset() -> D2D1_POINT_2F, 402 fn GetRadiusX() -> FLOAT, 403 fn GetRadiusY() -> FLOAT, 404 fn GetGradientStopCollection( 405 gradientStopCollection: *mut *mut ID2D1GradientStopCollection, 406 ) -> (), 407 }} 408 RIDL!{#[uuid(0x2cd9069d, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)] 409 interface ID2D1StrokeStyle(ID2D1StrokeStyleVtbl): ID2D1Resource(ID2D1ResourceVtbl) { 410 fn GetStartCap() -> D2D1_CAP_STYLE, 411 fn GetEndCap() -> D2D1_CAP_STYLE, 412 fn GetDashCap() -> D2D1_CAP_STYLE, 413 fn GetMiterLimit() -> FLOAT, 414 fn GetLineJoin() -> D2D1_LINE_JOIN, 415 fn GetDashOffset() -> FLOAT, 416 fn GetDashStyle() -> D2D1_DASH_STYLE, 417 fn GetDashesCount() -> UINT32, 418 fn GetDashes( 419 dashes: *mut FLOAT, 420 dashesCount: UINT32, 421 ) -> (), 422 }} 423 RIDL!{#[uuid(0x2cd906a1, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)] 424 interface ID2D1Geometry(ID2D1GeometryVtbl): ID2D1Resource(ID2D1ResourceVtbl) { 425 fn GetBounds( 426 worldTransform: *const D2D1_MATRIX_3X2_F, 427 bounds: *mut D2D1_RECT_F, 428 ) -> HRESULT, 429 fn GetWidenedBounds( 430 strokeWidth: FLOAT, 431 strokeStyle: *mut ID2D1StrokeStyle, 432 worldTransform: *const D2D1_MATRIX_3X2_F, 433 flatteningTolerance: FLOAT, 434 bounds: *mut D2D1_RECT_F, 435 ) -> HRESULT, 436 fn StrokeContainsPoint( 437 point: D2D1_POINT_2F, 438 strokeWidth: FLOAT, 439 strokeStyle: *mut ID2D1StrokeStyle, 440 worldTransform: *const D2D1_MATRIX_3X2_F, 441 flatteningTolerance: FLOAT, 442 contains: *mut BOOL, 443 ) -> HRESULT, 444 fn FillContainsPoint( 445 point: D2D1_POINT_2F, 446 worldTransform: *const D2D1_MATRIX_3X2_F, 447 flatteningTolerance: FLOAT, 448 contains: *mut BOOL, 449 ) -> HRESULT, 450 fn CompareWithGeometry( 451 inputGeometry: *mut ID2D1Geometry, 452 inputGeometryTransform: *const D2D1_MATRIX_3X2_F, 453 flatteningTolerance: FLOAT, 454 relation: *mut D2D1_GEOMETRY_RELATION, 455 ) -> HRESULT, 456 fn Simplify( 457 simplificationOption: D2D1_GEOMETRY_SIMPLIFICATION_OPTION, 458 worldTransform: *const D2D1_MATRIX_3X2_F, 459 flatteningTolerance: FLOAT, 460 geometrySink: *mut ID2D1SimplifiedGeometrySink, 461 ) -> HRESULT, 462 fn Tessellate( 463 worldTransform: *const D2D1_MATRIX_3X2_F, 464 flatteningTolerance: FLOAT, 465 tessellationSink: *mut ID2D1TessellationSink, 466 ) -> HRESULT, 467 fn CombineWithGeometry( 468 inputGeometry: *mut ID2D1Geometry, 469 combineMode: D2D1_COMBINE_MODE, 470 inputGeometryTransform: *const D2D1_MATRIX_3X2_F, 471 flatteningTolerance: FLOAT, 472 geometrySink: *mut ID2D1SimplifiedGeometrySink, 473 ) -> HRESULT, 474 fn Outline( 475 worldTransform: *const D2D1_MATRIX_3X2_F, 476 flatteningTolerance: FLOAT, 477 geometrySink: *mut ID2D1SimplifiedGeometrySink, 478 ) -> HRESULT, 479 fn ComputeArea( 480 worldTransform: *const D2D1_MATRIX_3X2_F, 481 flatteningTolerance: FLOAT, 482 area: *mut FLOAT, 483 ) -> HRESULT, 484 fn ComputeLength( 485 worldTransform: *const D2D1_MATRIX_3X2_F, 486 flatteningTolerance: FLOAT, 487 length: *mut FLOAT, 488 ) -> HRESULT, 489 fn ComputePointAtLength( 490 length: FLOAT, 491 worldTransform: *const D2D1_MATRIX_3X2_F, 492 flatteningTolerance: FLOAT, 493 point: *mut D2D1_POINT_2F, 494 unitTangentVector: *mut D2D1_POINT_2F, 495 ) -> HRESULT, 496 fn Widen( 497 strokeWidth: FLOAT, 498 strokeStyle: *mut ID2D1StrokeStyle, 499 worldTransform: *const D2D1_MATRIX_3X2_F, 500 flatteningTolerance: FLOAT, 501 geometrySink: *mut ID2D1SimplifiedGeometrySink, 502 ) -> HRESULT, 503 }} 504 RIDL!{#[uuid(0x2cd906a2, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)] 505 interface ID2D1RectangleGeometry(ID2D1RectangleGeometryVtbl): ID2D1Geometry(ID2D1GeometryVtbl) { 506 fn GetRect( 507 rect: *mut D2D1_RECT_F, 508 ) -> (), 509 }} 510 RIDL!{#[uuid(0x2cd906a3, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)] 511 interface ID2D1RoundedRectangleGeometry(ID2D1RoundedRectangleGeometryVtbl): 512 ID2D1Geometry(ID2D1GeometryVtbl) { 513 fn GetRoundedRect( 514 roundedRect: *mut D2D1_ROUNDED_RECT, 515 ) -> (), 516 }} 517 RIDL!{#[uuid(0x2cd906a4, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)] 518 interface ID2D1EllipseGeometry(ID2D1EllipseGeometryVtbl): ID2D1Geometry(ID2D1GeometryVtbl) { 519 fn GetEllipse( 520 ellipse: *mut D2D1_ELLIPSE, 521 ) -> (), 522 }} 523 RIDL!{#[uuid(0x2cd906a6, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)] 524 interface ID2D1GeometryGroup(ID2D1GeometryGroupVtbl): ID2D1Geometry(ID2D1GeometryVtbl) { 525 fn GetFillMode() -> D2D1_FILL_MODE, 526 fn GetSourceGeometryCount() -> UINT32, 527 fn GetSourceGeometries( 528 geometries: *mut *mut ID2D1Geometry, 529 geometriesCount: UINT32, 530 ) -> (), 531 }} 532 RIDL!{#[uuid(0x2cd906bb, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)] 533 interface ID2D1TransformedGeometry(ID2D1TransformedGeometryVtbl): 534 ID2D1Geometry(ID2D1GeometryVtbl) { 535 fn GetSourceGeometry( 536 sourceGeometry: *mut *mut ID2D1Geometry, 537 ) -> (), 538 fn GetTransform( 539 transform: *mut D2D1_MATRIX_3X2_F, 540 ) -> (), 541 }} 542 RIDL!{#[uuid(0x2cd9069e, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)] 543 interface ID2D1SimplifiedGeometrySink(ID2D1SimplifiedGeometrySinkVtbl): IUnknown(IUnknownVtbl) { 544 fn SetFillMode( 545 fillMode: D2D1_FILL_MODE, 546 ) -> (), 547 fn SetSegmentFlags( 548 vertexFlags: D2D1_PATH_SEGMENT, 549 ) -> (), 550 fn BeginFigure( 551 startPoint: D2D1_POINT_2F, 552 figureBegin: D2D1_FIGURE_BEGIN, 553 ) -> (), 554 fn AddLines( 555 points: *const D2D1_POINT_2F, 556 pointsCount: UINT32, 557 ) -> (), 558 fn AddBeziers( 559 beziers: *const D2D1_BEZIER_SEGMENT, 560 beziersCount: UINT32, 561 ) -> (), 562 fn EndFigure( 563 figureEnd: D2D1_FIGURE_END, 564 ) -> (), 565 fn Close() -> HRESULT, 566 }} 567 RIDL!{#[uuid(0x2cd9069f, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)] 568 interface ID2D1GeometrySink(ID2D1GeometrySinkVtbl): 569 ID2D1SimplifiedGeometrySink(ID2D1SimplifiedGeometrySinkVtbl) { 570 fn AddLine( 571 point: D2D1_POINT_2F, 572 ) -> (), 573 fn AddBezier( 574 bezier: *const D2D1_BEZIER_SEGMENT, 575 ) -> (), 576 fn AddQuadraticBezier( 577 bezier: *const D2D1_QUADRATIC_BEZIER_SEGMENT, 578 ) -> (), 579 fn AddQuadraticBeziers( 580 beziers: *const D2D1_QUADRATIC_BEZIER_SEGMENT, 581 beziersCount: UINT32, 582 ) -> (), 583 fn AddArc( 584 arc: *const D2D1_ARC_SEGMENT, 585 ) -> (), 586 }} 587 RIDL!{#[uuid(0x2cd906c1, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)] 588 interface ID2D1TessellationSink(ID2D1TessellationSinkVtbl): IUnknown(IUnknownVtbl) { 589 fn AddTriangles( 590 triangles: *const D2D1_TRIANGLE, 591 triangleCount: UINT32, 592 ) -> (), 593 fn Close() -> HRESULT, 594 }} 595 RIDL!{#[uuid(0x2cd906a5, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)] 596 interface ID2D1PathGeometry(ID2D1PathGeometryVtbl): ID2D1Geometry(ID2D1GeometryVtbl) { 597 fn Open( 598 geometrySink: *mut *mut ID2D1GeometrySink, 599 ) -> HRESULT, 600 fn Stream( 601 geometrySink: *mut ID2D1GeometrySink, 602 ) -> HRESULT, 603 fn GetSegmentCount( 604 count: *mut UINT32, 605 ) -> HRESULT, 606 fn GetFigureCount( 607 count: *mut UINT32, 608 ) -> HRESULT, 609 }} 610 RIDL!{#[uuid(0x2cd906c2, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)] 611 interface ID2D1Mesh(ID2D1MeshVtbl): ID2D1Resource(ID2D1ResourceVtbl) { 612 fn Open( 613 tessellationSink: *mut *mut ID2D1TessellationSink, 614 ) -> HRESULT, 615 }} 616 RIDL!{#[uuid(0x2cd9069b, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)] 617 interface ID2D1Layer(ID2D1LayerVtbl): ID2D1Resource(ID2D1ResourceVtbl) { 618 #[fixme] fn GetSize() -> D2D1_SIZE_F, 619 }} 620 RIDL!{#[uuid(0x28506e39, 0xebf6, 0x46a1, 0xbb, 0x47, 0xfd, 0x85, 0x56, 0x5a, 0xb9, 0x57)] 621 interface ID2D1DrawingStateBlock(ID2D1DrawingStateBlockVtbl): ID2D1Resource(ID2D1ResourceVtbl) { 622 fn GetDescription( 623 stateDescription: *mut D2D1_DRAWING_STATE_DESCRIPTION, 624 ) -> (), 625 fn SetDescription( 626 stateDescription: *const D2D1_DRAWING_STATE_DESCRIPTION, 627 ) -> (), 628 fn SetTextRenderingParams( 629 textRenderingParams: *mut IDWriteRenderingParams, 630 ) -> (), 631 fn GetTextRenderingParams( 632 textRenderingParams: *mut *mut IDWriteRenderingParams, 633 ) -> (), 634 }} 635 RIDL!{#[uuid(0x2cd90694, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)] 636 interface ID2D1RenderTarget(ID2D1RenderTargetVtbl): ID2D1Resource(ID2D1ResourceVtbl) { 637 fn CreateBitmap( 638 size: D2D1_SIZE_U, 639 srcData: *const c_void, 640 pitch: UINT32, 641 bitmapProperties: *const D2D1_BITMAP_PROPERTIES, 642 bitmap: *mut *mut ID2D1Bitmap, 643 ) -> HRESULT, 644 fn CreateBitmapFromWicBitmap( 645 wicBitmapSource: *mut IWICBitmapSource, 646 bitmapProperties: *const D2D1_BITMAP_PROPERTIES, 647 bitmap: *mut *mut ID2D1Bitmap, 648 ) -> HRESULT, 649 fn CreateSharedBitmap( 650 riid: REFIID, 651 data: *const c_void, 652 bitmapProperties: *const D2D1_BITMAP_PROPERTIES, 653 bitmap: *mut *mut ID2D1Bitmap, 654 ) -> HRESULT, 655 fn CreateBitmapBrush( 656 bitmap: *mut ID2D1Bitmap, 657 bitmapBrushProperties: *const D2D1_BITMAP_BRUSH_PROPERTIES, 658 brushProperties: *const D2D1_BRUSH_PROPERTIES, 659 bitmapBrush: *mut *mut ID2D1BitmapBrush, 660 ) -> HRESULT, 661 fn CreateSolidColorBrush( 662 color: *const D2D1_COLOR_F, 663 brushProperties: *const D2D1_BRUSH_PROPERTIES, 664 solidColorBrush: *mut *mut ID2D1SolidColorBrush, 665 ) -> HRESULT, 666 fn CreateGradientStopCollection( 667 gradientStops: *const D2D1_GRADIENT_STOP, 668 gradientStopsCount: UINT32, 669 colorInterpolationGamma: D2D1_GAMMA, 670 extendMode: D2D1_EXTEND_MODE, 671 gradientStopCollection: *mut *mut ID2D1GradientStopCollection, 672 ) -> HRESULT, 673 fn CreateLinearGradientBrush( 674 linearGradientBrushProperties: *const D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES, 675 brushProperties: *const D2D1_BRUSH_PROPERTIES, 676 gradientStopCollection: *mut ID2D1GradientStopCollection, 677 linearGradientBrush: *mut *mut ID2D1LinearGradientBrush, 678 ) -> HRESULT, 679 fn CreateRadialGradientBrush( 680 radialGradientBrushProperties: *const D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES, 681 brushProperties: *const D2D1_BRUSH_PROPERTIES, 682 gradientStopCollection: *mut ID2D1GradientStopCollection, 683 radialGradientBrush: *mut *mut ID2D1RadialGradientBrush, 684 ) -> HRESULT, 685 fn CreateCompatibleRenderTarget( 686 desiredSize: *const D2D1_SIZE_F, 687 desiredPixelSize: *const D2D1_SIZE_U, 688 desiredFormat: *const D2D1_PIXEL_FORMAT, 689 options: D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS, 690 bitmapRenderTarget: *mut *mut ID2D1BitmapRenderTarget, 691 ) -> HRESULT, 692 fn CreateLayer( 693 size: *const D2D1_SIZE_F, 694 layer: *mut *mut ID2D1Layer, 695 ) -> HRESULT, 696 fn CreateMesh( 697 mesh: *mut *mut ID2D1Mesh, 698 ) -> HRESULT, 699 fn DrawLine( 700 point0: D2D1_POINT_2F, 701 point1: D2D1_POINT_2F, 702 brush: *mut ID2D1Brush, 703 strokeWidth: FLOAT, 704 strokeStype: *mut ID2D1StrokeStyle, 705 ) -> (), 706 fn DrawRectangle( 707 rect: *const D2D1_RECT_F, 708 brush: *mut ID2D1Brush, 709 strokeWidth: FLOAT, 710 strokeStyle: *mut ID2D1StrokeStyle, 711 ) -> (), 712 fn FillRectangle( 713 rect: *const D2D1_RECT_F, 714 brush: *mut ID2D1Brush, 715 ) -> (), 716 fn DrawRoundedRectangle( 717 roundedRect: *const D2D1_ROUNDED_RECT, 718 brush: *mut ID2D1Brush, 719 strokeWidth: FLOAT, 720 strokeStyle: *mut ID2D1StrokeStyle, 721 ) -> (), 722 fn FillRoundedRectangle( 723 roundedRect: *const D2D1_ROUNDED_RECT, 724 brush: *mut ID2D1Brush, 725 ) -> (), 726 fn DrawEllipse( 727 ellipse: *const D2D1_ELLIPSE, 728 brush: *mut ID2D1Brush, 729 strokeWidth: FLOAT, 730 strokeStyle: *mut ID2D1StrokeStyle, 731 ) -> (), 732 fn FillEllipse( 733 ellipse: *const D2D1_ELLIPSE, 734 brush: *mut ID2D1Brush, 735 ) -> (), 736 fn DrawGeometry( 737 geometry: *mut ID2D1Geometry, 738 brush: *mut ID2D1Brush, 739 strokeWidth: FLOAT, 740 strokeStyle: *mut ID2D1StrokeStyle, 741 ) -> (), 742 fn FillGeometry( 743 geometry: *mut ID2D1Geometry, 744 brush: *mut ID2D1Brush, 745 opacityBrush: *mut ID2D1Brush, 746 ) -> (), 747 fn FillMesh( 748 mesh: *mut ID2D1Mesh, 749 brush: *const ID2D1Brush, 750 ) -> (), 751 fn FillOpacityMask( 752 opacityMask: *mut ID2D1Bitmap, 753 brush: *mut ID2D1Brush, 754 content: D2D1_OPACITY_MASK_CONTENT, 755 destinationRectangle: *const D2D1_RECT_F, 756 sourceRectangle: *const D2D1_RECT_F, 757 ) -> (), 758 fn DrawBitmap( 759 bitmap: *mut ID2D1Bitmap, 760 destinationRectangle: *const D2D1_RECT_F, 761 opacity: FLOAT, 762 interpolationMode: D2D1_BITMAP_INTERPOLATION_MODE, 763 sourceRectangle: *const D2D1_RECT_F, 764 ) -> (), 765 fn DrawText( 766 string: *const WCHAR, 767 stringLength: UINT32, 768 textFormat: *mut IDWriteTextFormat, 769 layoutRect: *const D2D1_RECT_F, 770 defaultForegroundBrush: *mut ID2D1Brush, 771 options: D2D1_DRAW_TEXT_OPTIONS, 772 measuringMode: DWRITE_MEASURING_MODE, 773 ) -> (), 774 fn DrawTextLayout( 775 origin: D2D1_POINT_2F, 776 textLayout: *mut IDWriteTextLayout, 777 defaultForegroundBrush: *mut ID2D1Brush, 778 options: D2D1_DRAW_TEXT_OPTIONS, 779 ) -> (), 780 fn DrawGlyphRun( 781 baselineOrigin: D2D1_POINT_2F, 782 glyphRun: *const DWRITE_GLYPH_RUN, 783 foregroundBrush: *mut ID2D1Brush, 784 measuringMode: DWRITE_MEASURING_MODE, 785 ) -> (), 786 fn SetTransform( 787 transform: *const D2D1_MATRIX_3X2_F, 788 ) -> (), 789 fn GetTransform( 790 transform: *mut D2D1_MATRIX_3X2_F, 791 ) -> (), 792 fn SetAntialiasMode( 793 antialiasMode: D2D1_ANTIALIAS_MODE, 794 ) -> (), 795 fn GetAntialiasMode() -> D2D1_ANTIALIAS_MODE, 796 fn SetTextAntialiasMode( 797 textAntialiasMode: D2D1_TEXT_ANTIALIAS_MODE, 798 ) -> (), 799 fn GetTextAntialiasMode() -> D2D1_TEXT_ANTIALIAS_MODE, 800 fn SetTextRenderingParams( 801 textRenderingParams: *mut IDWriteRenderingParams, 802 ) -> (), 803 fn GetTextRenderingParams( 804 textRenderingParams: *mut *mut IDWriteRenderingParams, 805 ) -> (), 806 fn SetTags( 807 tag1: D2D1_TAG, 808 tag2: D2D1_TAG, 809 ) -> (), 810 fn GetTags( 811 tag1: *mut D2D1_TAG, 812 tag2: *mut D2D1_TAG, 813 ) -> (), 814 fn PushLayer( 815 layerParameters: *const D2D1_LAYER_PARAMETERS, 816 layer: *mut ID2D1Layer, 817 ) -> (), 818 fn PopLayer() -> (), 819 fn Flush( 820 tag1: *mut D2D1_TAG, 821 tag2: *mut D2D1_TAG, 822 ) -> HRESULT, 823 fn SaveDrawingState( 824 drawingStateBlock: *mut ID2D1DrawingStateBlock, 825 ) -> (), 826 fn RestoreDrawingState( 827 drawingStateBlock: *mut ID2D1DrawingStateBlock, 828 ) -> (), 829 fn PushAxisAlignedClip( 830 clipRect: *const D2D1_RECT_F, 831 antialiasMode: D2D1_ANTIALIAS_MODE, 832 ) -> (), 833 fn PopAxisAlignedClip() -> (), 834 fn Clear( 835 clearColor: *const D2D1_COLOR_F, 836 ) -> (), 837 fn BeginDraw() -> (), 838 fn EndDraw( 839 tag1: *mut D2D1_TAG, 840 tag2: *mut D2D1_TAG, 841 ) -> HRESULT, 842 #[fixme] fn GetPixelFormat() -> D2D1_PIXEL_FORMAT, 843 fn SetDpi( 844 dpiX: FLOAT, 845 dpiY: FLOAT, 846 ) -> (), 847 fn GetDpi( 848 dpiX: *mut FLOAT, 849 dpiY: *mut FLOAT, 850 ) -> (), 851 #[fixme] fn GetSize() -> D2D1_SIZE_F, 852 #[fixme] fn GetPixelSize() -> D2D1_SIZE_U, 853 fn GetMaximumBitmapSize() -> UINT32, 854 fn IsSupported( 855 renderTargetProperties: *const D2D1_RENDER_TARGET_PROPERTIES, 856 ) -> BOOL, 857 }} 858 RIDL!{#[uuid(0x2cd90695, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)] 859 interface ID2D1BitmapRenderTarget(ID2D1BitmapRenderTargetVtbl): 860 ID2D1RenderTarget(ID2D1RenderTargetVtbl) { 861 fn GetBitmap( 862 bitmap: *mut *mut ID2D1Bitmap, 863 ) -> HRESULT, 864 }} 865 RIDL!{#[uuid(0x2cd90698, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)] 866 interface ID2D1HwndRenderTarget(ID2D1HwndRenderTargetVtbl): 867 ID2D1RenderTarget(ID2D1RenderTargetVtbl) { 868 fn CheckWindowState() -> D2D1_WINDOW_STATE, 869 fn Resize( 870 pixelSize: *const D2D1_SIZE_U, 871 ) -> HRESULT, 872 fn GetHwnd() -> HWND, 873 }} 874 RIDL!{#[uuid(0xe0db51c3, 0x6f77, 0x4bae, 0xb3, 0xd5, 0xe4, 0x75, 0x09, 0xb3, 0x58, 0x38)] 875 interface ID2D1GdiInteropRenderTarget(ID2D1GdiInteropRenderTargetVtbl): IUnknown(IUnknownVtbl) { 876 fn GetDC( 877 mode: D2D1_DC_INITIALIZE_MODE, 878 hdc: *mut HDC, 879 ) -> HRESULT, 880 fn ReleaseDC( 881 update: *const RECT, 882 ) -> HRESULT, 883 }} 884 RIDL!{#[uuid(0x1c51bc64, 0xde61, 0x46fd, 0x98, 0x99, 0x63, 0xa5, 0xd8, 0xf0, 0x39, 0x50)] 885 interface ID2D1DCRenderTarget(ID2D1DCRenderTargetVtbl): ID2D1RenderTarget(ID2D1RenderTargetVtbl) { 886 fn BindDC( 887 hDC: HDC, 888 pSubRect: *const RECT, 889 ) -> HRESULT, 890 }} 891 RIDL!{#[uuid(0x06152247, 0x6f50, 0x465a, 0x92, 0x45, 0x11, 0x8b, 0xfd, 0x3b, 0x60, 0x07)] 892 interface ID2D1Factory(ID2D1FactoryVtbl): IUnknown(IUnknownVtbl) { 893 fn ReloadSystemMetrics() -> HRESULT, 894 fn GetDesktopDpi( 895 dpiX: *mut FLOAT, 896 dpiY: *mut FLOAT, 897 ) -> (), 898 fn CreateRectangleGeometry( 899 rectangle: *const D2D1_RECT_F, 900 rectangleGeometry: *mut *mut ID2D1RectangleGeometry, 901 ) -> HRESULT, 902 fn CreateRoundedRectangleGeometry( 903 roundedRectangle: *const D2D1_ROUNDED_RECT, 904 roundedRectangleGeometry: *mut *mut ID2D1RoundedRectangleGeometry, 905 ) -> HRESULT, 906 fn CreateEllipseGeometry( 907 ellipse: *const D2D1_ELLIPSE, 908 ellipseGeometry: *mut *mut ID2D1EllipseGeometry, 909 ) -> HRESULT, 910 fn CreateGeometryGroup( 911 fillMode: D2D1_FILL_MODE, 912 geometries: *mut *mut ID2D1Geometry, 913 geometriesCount: UINT32, 914 geometryGroup: *mut *mut ID2D1GeometryGroup, 915 ) -> HRESULT, 916 fn CreateTransformedGeometry( 917 sourceGeometry: *mut ID2D1Geometry, 918 transform: *const D2D1_MATRIX_3X2_F, 919 transformedGeometry: *mut *mut ID2D1TransformedGeometry, 920 ) -> HRESULT, 921 fn CreatePathGeometry( 922 pathGeometry: *mut *mut ID2D1PathGeometry, 923 ) -> HRESULT, 924 fn CreateStrokeStyle( 925 strokeStyleProperties: *const D2D1_STROKE_STYLE_PROPERTIES, 926 dashes: *const FLOAT, 927 dashesCount: UINT32, 928 strokeStyle: *mut *mut ID2D1StrokeStyle, 929 ) -> HRESULT, 930 fn CreateDrawingStateBlock( 931 drawingStateDescription: *const D2D1_DRAWING_STATE_DESCRIPTION, 932 textRenderingParams: *mut IDWriteRenderingParams, 933 drawingStateBlock: *mut *mut ID2D1DrawingStateBlock, 934 ) -> HRESULT, 935 fn CreateWicBitmapRenderTarget( 936 target: *mut IWICBitmap, 937 renderTargetProperties: *const D2D1_RENDER_TARGET_PROPERTIES, 938 renderTarget: *mut *mut ID2D1RenderTarget, 939 ) -> HRESULT, 940 fn CreateHwndRenderTarget( 941 renderTargetProperties: *const D2D1_RENDER_TARGET_PROPERTIES, 942 hwndRenderTargetProperties: *const D2D1_HWND_RENDER_TARGET_PROPERTIES, 943 hwndRenderTarget: *mut *mut ID2D1HwndRenderTarget, 944 ) -> HRESULT, 945 fn CreateDxgiSurfaceRenderTarget( 946 dxgiSurface: *mut IDXGISurface, 947 renderTargetProperties: *const D2D1_RENDER_TARGET_PROPERTIES, 948 renderTarget: *mut *mut ID2D1RenderTarget, 949 ) -> HRESULT, 950 fn CreateDCRenderTarget( 951 renderTargetProperties: *const D2D1_RENDER_TARGET_PROPERTIES, 952 dcRenderTarget: *mut *mut ID2D1DCRenderTarget, 953 ) -> HRESULT, 954 }} 955 extern "system" { D2D1CreateFactory( factoryType: D2D1_FACTORY_TYPE, riid: REFIID, pFactoryOptions: *const D2D1_FACTORY_OPTIONS, ppIFactory: *mut *mut c_void, ) -> HRESULT956 pub fn D2D1CreateFactory( 957 factoryType: D2D1_FACTORY_TYPE, 958 riid: REFIID, 959 pFactoryOptions: *const D2D1_FACTORY_OPTIONS, 960 ppIFactory: *mut *mut c_void, 961 ) -> HRESULT; D2D1MakeRotateMatrix( angle: FLOAT, center: D2D1_POINT_2F, matrix: *mut D2D1_MATRIX_3X2_F, )962 pub fn D2D1MakeRotateMatrix( 963 angle: FLOAT, 964 center: D2D1_POINT_2F, 965 matrix: *mut D2D1_MATRIX_3X2_F, 966 ); D2D1MakeSkewMatrix( angleX: FLOAT, angleY: FLOAT, center: D2D1_POINT_2F, matrix: *mut D2D1_MATRIX_3X2_F, )967 pub fn D2D1MakeSkewMatrix( 968 angleX: FLOAT, 969 angleY: FLOAT, 970 center: D2D1_POINT_2F, 971 matrix: *mut D2D1_MATRIX_3X2_F, 972 ); D2D1IsMatrixInvertible( matrix: *const D2D1_MATRIX_3X2_F, ) -> BOOL973 pub fn D2D1IsMatrixInvertible( 974 matrix: *const D2D1_MATRIX_3X2_F, 975 ) -> BOOL; D2D1InvertMatrix( matrix: *mut D2D1_MATRIX_3X2_F, ) -> BOOL976 pub fn D2D1InvertMatrix( 977 matrix: *mut D2D1_MATRIX_3X2_F, 978 ) -> BOOL; D2D1ComputeMaximumScaleFactor( matrix: *const D2D1_MATRIX_3X2_F, ) -> FLOAT979 pub fn D2D1ComputeMaximumScaleFactor( 980 matrix: *const D2D1_MATRIX_3X2_F, 981 ) -> FLOAT; 982 } 983