File: mingw-dwrite_3.patch

package info (click to toggle)
firefox 146.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 4,653,260 kB
  • sloc: cpp: 7,587,892; javascript: 6,509,455; ansic: 3,755,295; python: 1,410,813; xml: 629,201; asm: 438,677; java: 186,096; sh: 62,697; makefile: 18,086; objc: 13,087; perl: 12,811; yacc: 4,583; cs: 3,846; pascal: 3,448; lex: 1,720; ruby: 1,003; php: 436; lisp: 258; awk: 247; sql: 66; sed: 54; csh: 10; exp: 6
file content (124 lines) | stat: -rw-r--r-- 7,198 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
From a9804765e442063be37338933b9c40e3e3d01aac Mon Sep 17 00:00:00 2001
From: Sanketh Menda <me@snkth.com>
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;