From a9804765e442063be37338933b9c40e3e3d01aac Mon Sep 17 00:00:00 2001 From: Sanketh Menda Date: Thu, 2 Feb 2023 12:29:03 -0500 Subject: [PATCH 4/7] dwrite_3.h: rename GetGlyphImageFormats_ to GetGlyphImageFormats Wine's WIDL currently doesn't support overloading functions, so till that is fixed patch dwrite_3.h to rename GlyphImageFormats_ to GetGlyphImageFormats. --- mingw-w64-headers/include/dwrite_3.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/mingw-w64-headers/include/dwrite_3.h b/mingw-w64-headers/include/dwrite_3.h index 0cd8ad6..e22513c 100644 --- a/mingw-w64-headers/include/dwrite_3.h +++ b/mingw-w64-headers/include/dwrite_3.h @@ -8697,7 +8697,7 @@ DEFINE_GUID(IID_IDWriteFontFace4, 0x27f2a904, 0x4eb8, 0x441d, 0x96,0x78, 0x05,0x MIDL_INTERFACE("27f2a904-4eb8-441d-9678-0563f53e3e2f") IDWriteFontFace4 : public IDWriteFontFace3 { - virtual HRESULT STDMETHODCALLTYPE GetGlyphImageFormats_( + virtual HRESULT STDMETHODCALLTYPE GetGlyphImageFormats( UINT16 glyph, UINT32 ppem_first, UINT32 ppem_last, @@ -8997,7 +8997,7 @@ typedef struct IDWriteFontFace4Vtbl { WINBOOL *are_local); /*** IDWriteFontFace4 methods ***/ - HRESULT (STDMETHODCALLTYPE *GetGlyphImageFormats_)( + HRESULT (STDMETHODCALLTYPE *GetGlyphImageFormats)( IDWriteFontFace4 *This, UINT16 glyph, UINT32 ppem_first, @@ -9078,7 +9078,7 @@ interface IDWriteFontFace4 { #define IDWriteFontFace4_AreCharactersLocal(This,characters,count,enqueue_if_not,are_local) (This)->lpVtbl->AreCharactersLocal(This,characters,count,enqueue_if_not,are_local) #define IDWriteFontFace4_AreGlyphsLocal(This,glyphs,count,enqueue_if_not,are_local) (This)->lpVtbl->AreGlyphsLocal(This,glyphs,count,enqueue_if_not,are_local) /*** IDWriteFontFace4 methods ***/ -#define IDWriteFontFace4_GetGlyphImageFormats_(This,glyph,ppem_first,ppem_last,formats) (This)->lpVtbl->GetGlyphImageFormats_(This,glyph,ppem_first,ppem_last,formats) +#define IDWriteFontFace4_GetGlyphImageFormats(This,glyph,ppem_first,ppem_last,formats) (This)->lpVtbl->GetGlyphImageFormats(This,glyph,ppem_first,ppem_last,formats) #define IDWriteFontFace4_GetGlyphImageFormats(This) (This)->lpVtbl->GetGlyphImageFormats(This) #define IDWriteFontFace4_GetGlyphImageData(This,glyph,ppem,format,data,context) (This)->lpVtbl->GetGlyphImageData(This,glyph,ppem,format,data,context) #define IDWriteFontFace4_ReleaseGlyphImageData(This,context) (This)->lpVtbl->ReleaseGlyphImageData(This,context) @@ -9221,8 +9221,8 @@ static inline HRESULT IDWriteFontFace4_AreGlyphsLocal(IDWriteFontFace4* T return This->lpVtbl->AreGlyphsLocal(This,glyphs,count,enqueue_if_not,are_local); } /*** IDWriteFontFace4 methods ***/ -static inline HRESULT IDWriteFontFace4_GetGlyphImageFormats_(IDWriteFontFace4* This,UINT16 glyph,UINT32 ppem_first,UINT32 ppem_last,DWRITE_GLYPH_IMAGE_FORMATS *formats) { - return This->lpVtbl->GetGlyphImageFormats_(This,glyph,ppem_first,ppem_last,formats); +static inline HRESULT IDWriteFontFace4_GetGlyphImageFormats(IDWriteFontFace4* This,UINT16 glyph,UINT32 ppem_first,UINT32 ppem_last,DWRITE_GLYPH_IMAGE_FORMATS *formats) { + return This->lpVtbl->GetGlyphImageFormats(This,glyph,ppem_first,ppem_last,formats); } static inline DWRITE_GLYPH_IMAGE_FORMATS IDWriteFontFace4_GetGlyphImageFormats(IDWriteFontFace4* This) { return This->lpVtbl->GetGlyphImageFormats(This); @@ -9549,7 +9549,7 @@ typedef struct IDWriteFontFace5Vtbl { WINBOOL *are_local); /*** IDWriteFontFace4 methods ***/ - HRESULT (STDMETHODCALLTYPE *GetGlyphImageFormats_)( + HRESULT (STDMETHODCALLTYPE *GetGlyphImageFormats)( IDWriteFontFace5 *This, UINT16 glyph, UINT32 ppem_first, @@ -9650,7 +9650,7 @@ interface IDWriteFontFace5 { #define IDWriteFontFace5_AreCharactersLocal(This,characters,count,enqueue_if_not,are_local) (This)->lpVtbl->AreCharactersLocal(This,characters,count,enqueue_if_not,are_local) #define IDWriteFontFace5_AreGlyphsLocal(This,glyphs,count,enqueue_if_not,are_local) (This)->lpVtbl->AreGlyphsLocal(This,glyphs,count,enqueue_if_not,are_local) /*** IDWriteFontFace4 methods ***/ -#define IDWriteFontFace5_GetGlyphImageFormats_(This,glyph,ppem_first,ppem_last,formats) (This)->lpVtbl->GetGlyphImageFormats_(This,glyph,ppem_first,ppem_last,formats) +#define IDWriteFontFace5_GetGlyphImageFormats(This,glyph,ppem_first,ppem_last,formats) (This)->lpVtbl->GetGlyphImageFormats(This,glyph,ppem_first,ppem_last,formats) #define IDWriteFontFace5_GetGlyphImageFormats(This) (This)->lpVtbl->GetGlyphImageFormats(This) #define IDWriteFontFace5_GetGlyphImageData(This,glyph,ppem,format,data,context) (This)->lpVtbl->GetGlyphImageData(This,glyph,ppem,format,data,context) #define IDWriteFontFace5_ReleaseGlyphImageData(This,context) (This)->lpVtbl->ReleaseGlyphImageData(This,context) @@ -9799,8 +9799,8 @@ static inline HRESULT IDWriteFontFace5_AreGlyphsLocal(IDWriteFontFace5* T return This->lpVtbl->AreGlyphsLocal(This,glyphs,count,enqueue_if_not,are_local); } /*** IDWriteFontFace4 methods ***/ -static inline HRESULT IDWriteFontFace5_GetGlyphImageFormats_(IDWriteFontFace5* This,UINT16 glyph,UINT32 ppem_first,UINT32 ppem_last,DWRITE_GLYPH_IMAGE_FORMATS *formats) { - return This->lpVtbl->GetGlyphImageFormats_(This,glyph,ppem_first,ppem_last,formats); +static inline HRESULT IDWriteFontFace5_GetGlyphImageFormats(IDWriteFontFace5* This,UINT16 glyph,UINT32 ppem_first,UINT32 ppem_last,DWRITE_GLYPH_IMAGE_FORMATS *formats) { + return This->lpVtbl->GetGlyphImageFormats(This,glyph,ppem_first,ppem_last,formats); } static inline DWRITE_GLYPH_IMAGE_FORMATS IDWriteFontFace5_GetGlyphImageFormats(IDWriteFontFace5* This) { return This->lpVtbl->GetGlyphImageFormats(This); @@ -10452,8 +10452,24 @@ IDWritePaintReader : public IUnknown D2D_RECT_F *clip_box, DWRITE_PAINT_ATTRIBUTES *glyph_attributes = 0) = 0; + HRESULT SetCurrentGlyph( + UINT32 glyph_index, + DWRITE_PAINT_ELEMENT* paint_element, + D2D_RECT_F* clip_box, + DWRITE_PAINT_ATTRIBUTES* glyph_attributes = nullptr + ) + { + return SetCurrentGlyph( + glyph_index, + paint_element, + sizeof(DWRITE_PAINT_ELEMENT), + clip_box, + glyph_attributes + ); + } + virtual HRESULT STDMETHODCALLTYPE SetTextColor( - const DWRITE_COLOR_F *text_color) = 0; + DWRITE_COLOR_F const& text_color) = 0; virtual HRESULT STDMETHODCALLTYPE SetColorPaletteIndex( UINT32 color_palette_index) = 0; @@ -10464,11 +10480,11 @@ IDWritePaintReader : public IUnknown virtual HRESULT STDMETHODCALLTYPE MoveToFirstChild( DWRITE_PAINT_ELEMENT *paint_element, - UINT32 struct_size) = 0; + UINT32 struct_size = sizeof(DWRITE_PAINT_ELEMENT)) = 0; virtual HRESULT STDMETHODCALLTYPE MoveToNextSibling( DWRITE_PAINT_ELEMENT *paint_element, - UINT32 struct_size) = 0; + UINT32 struct_size = sizeof(DWRITE_PAINT_ELEMENT)) = 0; virtual HRESULT STDMETHODCALLTYPE MoveToParent( ) = 0;