Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/gdi32/bitblt.c | 2 +- dlls/gdi32/dibdrv/dc.c | 2 +- dlls/gdi32/gdi_private.h | 2 +- dlls/wineps.drv/bitmap.c | 2 +- dlls/winex11.drv/bitblt.c | 4 ++-- include/wine/gdi_driver.h | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/dlls/gdi32/bitblt.c b/dlls/gdi32/bitblt.c index d46d7bada49..f3b866057eb 100644 --- a/dlls/gdi32/bitblt.c +++ b/dlls/gdi32/bitblt.c @@ -163,7 +163,7 @@ static BOOL get_vis_rectangles( DC *dc_dst, struct bitblt_coords *dst, return intersect_vis_rectangles( dst, src ); }
-void free_heap_bits( struct gdi_image_bits *bits ) +void CDECL free_heap_bits( struct gdi_image_bits *bits ) { HeapFree( GetProcessHeap(), 0, bits->ptr ); } diff --git a/dlls/gdi32/dibdrv/dc.c b/dlls/gdi32/dibdrv/dc.c index f818aa02286..727f3837e33 100644 --- a/dlls/gdi32/dibdrv/dc.c +++ b/dlls/gdi32/dibdrv/dc.c @@ -565,7 +565,7 @@ static inline void unlock_surface( struct windrv_physdev *dev ) if (GetTickCount() - dev->start_ticks > FLUSH_PERIOD) dev->surface->funcs->flush( dev->surface ); }
-static void unlock_bits_surface( struct gdi_image_bits *bits ) +static void CDECL unlock_bits_surface( struct gdi_image_bits *bits ) { struct window_surface *surface = bits->param; surface->funcs->unlock( surface ); diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h index 6b2502c4586..4bb46619666 100644 --- a/dlls/gdi32/gdi_private.h +++ b/dlls/gdi32/gdi_private.h @@ -620,7 +620,7 @@ static inline void copy_bitmapinfo( BITMAPINFO *dst, const BITMAPINFO *src ) memcpy( dst, src, get_dib_info_size( src, DIB_RGB_COLORS )); }
-extern void free_heap_bits( struct gdi_image_bits *bits ) DECLSPEC_HIDDEN; +extern void CDECL free_heap_bits( struct gdi_image_bits *bits ) DECLSPEC_HIDDEN;
extern HMODULE gdi32_module DECLSPEC_HIDDEN;
diff --git a/dlls/wineps.drv/bitmap.c b/dlls/wineps.drv/bitmap.c index 1a98f162702..bafc86e9a24 100644 --- a/dlls/wineps.drv/bitmap.c +++ b/dlls/wineps.drv/bitmap.c @@ -148,7 +148,7 @@ static inline DWORD max_ascii85_size(DWORD size) return (size + 3) / 4 * 5; }
-static void free_heap_bits( struct gdi_image_bits *bits ) +static void CDECL free_heap_bits( struct gdi_image_bits *bits ) { HeapFree( GetProcessHeap(), 0, bits->ptr ); } diff --git a/dlls/winex11.drv/bitblt.c b/dlls/winex11.drv/bitblt.c index b530ba7ba62..46e52612a21 100644 --- a/dlls/winex11.drv/bitblt.c +++ b/dlls/winex11.drv/bitblt.c @@ -914,12 +914,12 @@ BOOL CDECL X11DRV_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst, }
-static void free_heap_bits( struct gdi_image_bits *bits ) +static void CDECL free_heap_bits( struct gdi_image_bits *bits ) { HeapFree( GetProcessHeap(), 0, bits->ptr ); }
-static void free_ximage_bits( struct gdi_image_bits *bits ) +static void CDECL free_ximage_bits( struct gdi_image_bits *bits ) { XFree( bits->ptr ); } diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h index 971618e19ac..0bd169c653b 100644 --- a/include/wine/gdi_driver.h +++ b/include/wine/gdi_driver.h @@ -54,7 +54,7 @@ struct gdi_image_bits { void *ptr; /* pointer to the bits */ BOOL is_copy; /* whether this is a copy of the bits that can be modified */ - void (*free)(struct gdi_image_bits *); /* callback for freeing the bits */ + void (CDECL *free)(struct gdi_image_bits *); /* callback for freeing the bits */ void *param; /* extra parameter for callback private use */ };
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/gdi.exe16/gdi.c | 14 +++++++------- dlls/user32/win.c | 14 +++++++------- dlls/wineandroid.drv/window.c | 14 +++++++------- dlls/winemac.drv/surface.c | 16 ++++++++-------- dlls/winex11.drv/bitblt.c | 14 +++++++------- include/wine/gdi_driver.h | 14 +++++++------- 6 files changed, 43 insertions(+), 43 deletions(-)
diff --git a/dlls/gdi.exe16/gdi.c b/dlls/gdi.exe16/gdi.c index 006dd839473..9afa4532fde 100644 --- a/dlls/gdi.exe16/gdi.c +++ b/dlls/gdi.exe16/gdi.c @@ -449,7 +449,7 @@ static struct dib_window_surface *get_dib_surface( struct window_surface *surfac /*********************************************************************** * dib_surface_lock */ -static void dib_surface_lock( struct window_surface *window_surface ) +static void CDECL dib_surface_lock( struct window_surface *window_surface ) { /* nothing to do */ } @@ -457,7 +457,7 @@ static void dib_surface_lock( struct window_surface *window_surface ) /*********************************************************************** * dib_surface_unlock */ -static void dib_surface_unlock( struct window_surface *window_surface ) +static void CDECL dib_surface_unlock( struct window_surface *window_surface ) { /* nothing to do */ } @@ -465,7 +465,7 @@ static void dib_surface_unlock( struct window_surface *window_surface ) /*********************************************************************** * dib_surface_get_bitmap_info */ -static void *dib_surface_get_bitmap_info( struct window_surface *window_surface, BITMAPINFO *info ) +static void *CDECL dib_surface_get_bitmap_info( struct window_surface *window_surface, BITMAPINFO *info ) { struct dib_window_surface *surface = get_dib_surface( window_surface );
@@ -476,7 +476,7 @@ static void *dib_surface_get_bitmap_info( struct window_surface *window_surface, /*********************************************************************** * dib_surface_get_bounds */ -static RECT *dib_surface_get_bounds( struct window_surface *window_surface ) +static RECT *CDECL dib_surface_get_bounds( struct window_surface *window_surface ) { struct dib_window_surface *surface = get_dib_surface( window_surface );
@@ -486,7 +486,7 @@ static RECT *dib_surface_get_bounds( struct window_surface *window_surface ) /*********************************************************************** * dib_surface_set_region */ -static void dib_surface_set_region( struct window_surface *window_surface, HRGN region ) +static void CDECL dib_surface_set_region( struct window_surface *window_surface, HRGN region ) { /* nothing to do */ } @@ -494,7 +494,7 @@ static void dib_surface_set_region( struct window_surface *window_surface, HRGN /*********************************************************************** * dib_surface_flush */ -static void dib_surface_flush( struct window_surface *window_surface ) +static void CDECL dib_surface_flush( struct window_surface *window_surface ) { /* nothing to do */ } @@ -502,7 +502,7 @@ static void dib_surface_flush( struct window_surface *window_surface ) /*********************************************************************** * dib_surface_destroy */ -static void dib_surface_destroy( struct window_surface *window_surface ) +static void CDECL dib_surface_destroy( struct window_surface *window_surface ) { struct dib_window_surface *surface = get_dib_surface( window_surface );
diff --git a/dlls/user32/win.c b/dlls/user32/win.c index 49cebe99790..43ab932bed6 100644 --- a/dlls/user32/win.c +++ b/dlls/user32/win.c @@ -531,17 +531,17 @@ BOOL is_desktop_window( HWND hwnd ) * Dummy window surface for windows that shouldn't get painted. */
-static void dummy_surface_lock( struct window_surface *window_surface ) +static void CDECL dummy_surface_lock( struct window_surface *window_surface ) { /* nothing to do */ }
-static void dummy_surface_unlock( struct window_surface *window_surface ) +static void CDECL dummy_surface_unlock( struct window_surface *window_surface ) { /* nothing to do */ }
-static void *dummy_surface_get_bitmap_info( struct window_surface *window_surface, BITMAPINFO *info ) +static void *CDECL dummy_surface_get_bitmap_info( struct window_surface *window_surface, BITMAPINFO *info ) { static DWORD dummy_data;
@@ -559,23 +559,23 @@ static void *dummy_surface_get_bitmap_info( struct window_surface *window_surfac return &dummy_data; }
-static RECT *dummy_surface_get_bounds( struct window_surface *window_surface ) +static RECT *CDECL dummy_surface_get_bounds( struct window_surface *window_surface ) { static RECT dummy_bounds; return &dummy_bounds; }
-static void dummy_surface_set_region( struct window_surface *window_surface, HRGN region ) +static void CDECL dummy_surface_set_region( struct window_surface *window_surface, HRGN region ) { /* nothing to do */ }
-static void dummy_surface_flush( struct window_surface *window_surface ) +static void CDECL dummy_surface_flush( struct window_surface *window_surface ) { /* nothing to do */ }
-static void dummy_surface_destroy( struct window_surface *window_surface ) +static void CDECL dummy_surface_destroy( struct window_surface *window_surface ) { /* nothing to do */ } diff --git a/dlls/wineandroid.drv/window.c b/dlls/wineandroid.drv/window.c index eb05aaf2832..79bc471a984 100644 --- a/dlls/wineandroid.drv/window.c +++ b/dlls/wineandroid.drv/window.c @@ -656,7 +656,7 @@ static void apply_line_region( DWORD *dst, int width, int x, int y, const RECT * /*********************************************************************** * android_surface_lock */ -static void android_surface_lock( struct window_surface *window_surface ) +static void CDECL android_surface_lock( struct window_surface *window_surface ) { struct android_window_surface *surface = get_android_surface( window_surface );
@@ -666,7 +666,7 @@ static void android_surface_lock( struct window_surface *window_surface ) /*********************************************************************** * android_surface_unlock */ -static void android_surface_unlock( struct window_surface *window_surface ) +static void CDECL android_surface_unlock( struct window_surface *window_surface ) { struct android_window_surface *surface = get_android_surface( window_surface );
@@ -676,7 +676,7 @@ static void android_surface_unlock( struct window_surface *window_surface ) /*********************************************************************** * android_surface_get_bitmap_info */ -static void *android_surface_get_bitmap_info( struct window_surface *window_surface, BITMAPINFO *info ) +static void *CDECL android_surface_get_bitmap_info( struct window_surface *window_surface, BITMAPINFO *info ) { struct android_window_surface *surface = get_android_surface( window_surface );
@@ -687,7 +687,7 @@ static void *android_surface_get_bitmap_info( struct window_surface *window_surf /*********************************************************************** * android_surface_get_bounds */ -static RECT *android_surface_get_bounds( struct window_surface *window_surface ) +static RECT *CDECL android_surface_get_bounds( struct window_surface *window_surface ) { struct android_window_surface *surface = get_android_surface( window_surface );
@@ -697,7 +697,7 @@ static RECT *android_surface_get_bounds( struct window_surface *window_surface ) /*********************************************************************** * android_surface_set_region */ -static void android_surface_set_region( struct window_surface *window_surface, HRGN region ) +static void CDECL android_surface_set_region( struct window_surface *window_surface, HRGN region ) { struct android_window_surface *surface = get_android_surface( window_surface );
@@ -721,7 +721,7 @@ static void android_surface_set_region( struct window_surface *window_surface, H /*********************************************************************** * android_surface_flush */ -static void android_surface_flush( struct window_surface *window_surface ) +static void CDECL android_surface_flush( struct window_surface *window_surface ) { struct android_window_surface *surface = get_android_surface( window_surface ); ANativeWindow_Buffer buffer; @@ -804,7 +804,7 @@ static void android_surface_flush( struct window_surface *window_surface ) /*********************************************************************** * android_surface_destroy */ -static void android_surface_destroy( struct window_surface *window_surface ) +static void CDECL android_surface_destroy( struct window_surface *window_surface ) { struct android_window_surface *surface = get_android_surface( window_surface );
diff --git a/dlls/winemac.drv/surface.c b/dlls/winemac.drv/surface.c index 85ff56c9578..7be1b6850e0 100644 --- a/dlls/winemac.drv/surface.c +++ b/dlls/winemac.drv/surface.c @@ -96,7 +96,7 @@ static void update_blit_data(struct macdrv_window_surface *surface) /*********************************************************************** * macdrv_surface_lock */ -static void macdrv_surface_lock(struct window_surface *window_surface) +static void CDECL macdrv_surface_lock(struct window_surface *window_surface) { struct macdrv_window_surface *surface = get_mac_surface(window_surface);
@@ -106,7 +106,7 @@ static void macdrv_surface_lock(struct window_surface *window_surface) /*********************************************************************** * macdrv_surface_unlock */ -static void macdrv_surface_unlock(struct window_surface *window_surface) +static void CDECL macdrv_surface_unlock(struct window_surface *window_surface) { struct macdrv_window_surface *surface = get_mac_surface(window_surface);
@@ -116,8 +116,8 @@ static void macdrv_surface_unlock(struct window_surface *window_surface) /*********************************************************************** * macdrv_surface_get_bitmap_info */ -static void *macdrv_surface_get_bitmap_info(struct window_surface *window_surface, - BITMAPINFO *info) +static void *CDECL macdrv_surface_get_bitmap_info(struct window_surface *window_surface, + BITMAPINFO *info) { struct macdrv_window_surface *surface = get_mac_surface(window_surface);
@@ -128,7 +128,7 @@ static void *macdrv_surface_get_bitmap_info(struct window_surface *window_surfac /*********************************************************************** * macdrv_surface_get_bounds */ -static RECT *macdrv_surface_get_bounds(struct window_surface *window_surface) +static RECT *CDECL macdrv_surface_get_bounds(struct window_surface *window_surface) { struct macdrv_window_surface *surface = get_mac_surface(window_surface);
@@ -138,7 +138,7 @@ static RECT *macdrv_surface_get_bounds(struct window_surface *window_surface) /*********************************************************************** * macdrv_surface_set_region */ -static void macdrv_surface_set_region(struct window_surface *window_surface, HRGN region) +static void CDECL macdrv_surface_set_region(struct window_surface *window_surface, HRGN region) { struct macdrv_window_surface *surface = get_mac_surface(window_surface);
@@ -164,7 +164,7 @@ static void macdrv_surface_set_region(struct window_surface *window_surface, HRG /*********************************************************************** * macdrv_surface_flush */ -static void macdrv_surface_flush(struct window_surface *window_surface) +static void CDECL macdrv_surface_flush(struct window_surface *window_surface) { struct macdrv_window_surface *surface = get_mac_surface(window_surface); CGRect rect; @@ -200,7 +200,7 @@ static void macdrv_surface_flush(struct window_surface *window_surface) /*********************************************************************** * macdrv_surface_destroy */ -static void macdrv_surface_destroy(struct window_surface *window_surface) +static void CDECL macdrv_surface_destroy(struct window_surface *window_surface) { struct macdrv_window_surface *surface = get_mac_surface(window_surface);
diff --git a/dlls/winex11.drv/bitblt.c b/dlls/winex11.drv/bitblt.c index 46e52612a21..fad183b0b01 100644 --- a/dlls/winex11.drv/bitblt.c +++ b/dlls/winex11.drv/bitblt.c @@ -1817,7 +1817,7 @@ failed: /*********************************************************************** * x11drv_surface_lock */ -static void x11drv_surface_lock( struct window_surface *window_surface ) +static void CDECL x11drv_surface_lock( struct window_surface *window_surface ) { struct x11drv_window_surface *surface = get_x11_surface( window_surface );
@@ -1827,7 +1827,7 @@ static void x11drv_surface_lock( struct window_surface *window_surface ) /*********************************************************************** * x11drv_surface_unlock */ -static void x11drv_surface_unlock( struct window_surface *window_surface ) +static void CDECL x11drv_surface_unlock( struct window_surface *window_surface ) { struct x11drv_window_surface *surface = get_x11_surface( window_surface );
@@ -1837,7 +1837,7 @@ static void x11drv_surface_unlock( struct window_surface *window_surface ) /*********************************************************************** * x11drv_surface_get_bitmap_info */ -static void *x11drv_surface_get_bitmap_info( struct window_surface *window_surface, BITMAPINFO *info ) +static void *CDECL x11drv_surface_get_bitmap_info( struct window_surface *window_surface, BITMAPINFO *info ) { struct x11drv_window_surface *surface = get_x11_surface( window_surface );
@@ -1848,7 +1848,7 @@ static void *x11drv_surface_get_bitmap_info( struct window_surface *window_surfa /*********************************************************************** * x11drv_surface_get_bounds */ -static RECT *x11drv_surface_get_bounds( struct window_surface *window_surface ) +static RECT *CDECL x11drv_surface_get_bounds( struct window_surface *window_surface ) { struct x11drv_window_surface *surface = get_x11_surface( window_surface );
@@ -1858,7 +1858,7 @@ static RECT *x11drv_surface_get_bounds( struct window_surface *window_surface ) /*********************************************************************** * x11drv_surface_set_region */ -static void x11drv_surface_set_region( struct window_surface *window_surface, HRGN region ) +static void CDECL x11drv_surface_set_region( struct window_surface *window_surface, HRGN region ) { RGNDATA *data; struct x11drv_window_surface *surface = get_x11_surface( window_surface ); @@ -1889,7 +1889,7 @@ static void x11drv_surface_set_region( struct window_surface *window_surface, HR /*********************************************************************** * x11drv_surface_flush */ -static void x11drv_surface_flush( struct window_surface *window_surface ) +static void CDECL x11drv_surface_flush( struct window_surface *window_surface ) { struct x11drv_window_surface *surface = get_x11_surface( window_surface ); unsigned char *src = surface->bits; @@ -1956,7 +1956,7 @@ static void x11drv_surface_flush( struct window_surface *window_surface ) /*********************************************************************** * x11drv_surface_destroy */ -static void x11drv_surface_destroy( struct window_surface *window_surface ) +static void CDECL x11drv_surface_destroy( struct window_surface *window_surface ) { struct x11drv_window_surface *surface = get_x11_surface( window_surface );
diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h index 0bd169c653b..124bb41f7d9 100644 --- a/include/wine/gdi_driver.h +++ b/include/wine/gdi_driver.h @@ -236,13 +236,13 @@ struct window_surface;
struct window_surface_funcs { - void (*lock)( struct window_surface *surface ); - void (*unlock)( struct window_surface *surface ); - void* (*get_info)( struct window_surface *surface, BITMAPINFO *info ); - RECT* (*get_bounds)( struct window_surface *surface ); - void (*set_region)( struct window_surface *surface, HRGN region ); - void (*flush)( struct window_surface *surface ); - void (*destroy)( struct window_surface *surface ); + void (CDECL *lock)( struct window_surface *surface ); + void (CDECL *unlock)( struct window_surface *surface ); + void* (CDECL *get_info)( struct window_surface *surface, BITMAPINFO *info ); + RECT* (CDECL *get_bounds)( struct window_surface *surface ); + void (CDECL *set_region)( struct window_surface *surface, HRGN region ); + void (CDECL *flush)( struct window_surface *surface ); + void (CDECL *destroy)( struct window_surface *surface ); };
struct window_surface
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=74912
Your paranoid android.
=== debiant (32 bit report) ===
user32: monitor: Timeout msg: Timeout resource: Timeout scroll: Timeout static: Timeout sysparams: Timeout text: Timeout uitools: Timeout win: Timeout winstation: Timeout
=== debiant (32 bit Chinese:China report) ===
user32: input.c:2485: Test failed: 4: Unexpected cursor movement input.c:2485: Test failed: 5: Unexpected cursor movement input.c:2485: Test failed: 6: Unexpected cursor movement input.c:2485: Test failed: 7: Unexpected cursor movement input.c:2485: Test failed: 8: Unexpected cursor movement input.c:2206: Test failed: 9: foreground process expected WM_MOUSEMOVE message input.c:2485: Test failed: 9: Unexpected cursor movement input.c:2206: Test failed: 10: foreground process expected WM_MOUSEMOVE message input.c:2485: Test failed: 10: Unexpected cursor movement input.c:2206: Test failed: 11: foreground process expected WM_MOUSEMOVE message input.c:2485: Test failed: 11: Unexpected cursor movement input.c:2206input.c: Test failed: :122485: foreground process expected WM_MOUSEMOVE message : Test failed: 12: Unexpected cursor movement input.c:2485: Test failed: 13: Unexpected cursor movement input.c:2485: Test failed: 14: Unexpected cursor movement input.c:2485: Test failed: 15: Unexpected cursor movement input.c:2485: Test failed: 16: Unexpected cursor movement monitor: Timeout msg: Timeout
=== debiant (32 bit WoW report) ===
user32: monitor: Timeout msg: Timeout resource: Timeout scroll: Timeout static: Timeout sysparams: Timeout text: Timeout uitools: Timeout win: Timeout winstation: Timeout
=== debiant (build log) ===
0024:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded. 0024:err:winediag:nodrv_CreateWindow The explorer process failed to start. Task: WineTest did not produce the wow64 report
Signed-off-by: Rémi Bernon rbernon@codeweavers.com ---
This could also be done by using a PE freetype dependency, but in addition to the build time requirements, it may not be what we actually want.
For instance, native freetype using native fontconfig benefit from the system fonts configuration, whereas Win32 freetype and fontconfig will be more isolated from the system.
I couldn't build the macOS part of the code, so I'm not sure if it works but it's probably just a matter of adding a few more things to the gdi32 internal interface.
configure.ac | 1 + dlls/gdi32/Makefile.in | 8 +- dlls/gdi32/driver.c | 20 ++++ dlls/gdi32/gdi32.spec | 12 ++- dlls/gdi32/gdi_private.h | 115 ++------------------ dlls/gdi32/resource.h | 1 + dlls/winefreetype/Makefile.in | 12 +++ dlls/{gdi32 => winefreetype}/freetype.c | 82 +++++++------- dlls/{gdi32 => winefreetype}/vertical.c | 0 dlls/winefreetype/winefreetype.spec | 8 ++ include/wine/gdi_font.h | 135 ++++++++++++++++++++++++ 11 files changed, 239 insertions(+), 155 deletions(-) create mode 100644 dlls/winefreetype/Makefile.in rename dlls/{gdi32 => winefreetype}/freetype.c (99%) rename dlls/{gdi32 => winefreetype}/vertical.c (100%) create mode 100644 dlls/winefreetype/winefreetype.spec create mode 100644 include/wine/gdi_font.h
diff --git a/configure.ac b/configure.ac index d5964223204..d53b770aa51 100644 --- a/configure.ac +++ b/configure.ac @@ -3822,6 +3822,7 @@ WINE_CONFIG_MAKEFILE(dlls/winecoreaudio.drv) WINE_CONFIG_MAKEFILE(dlls/winecrt0) WINE_CONFIG_MAKEFILE(dlls/wined3d) WINE_CONFIG_MAKEFILE(dlls/winegstreamer) +WINE_CONFIG_MAKEFILE(dlls/winefreetype) WINE_CONFIG_MAKEFILE(dlls/winehid.sys) WINE_CONFIG_MAKEFILE(dlls/winejoystick.drv) WINE_CONFIG_MAKEFILE(dlls/winemac.drv) diff --git a/dlls/gdi32/Makefile.in b/dlls/gdi32/Makefile.in index 32b2e6959c1..54506255657 100644 --- a/dlls/gdi32/Makefile.in +++ b/dlls/gdi32/Makefile.in @@ -1,9 +1,7 @@ EXTRADEFS = -D_GDI32_ MODULE = gdi32.dll IMPORTLIB = gdi32 -IMPORTS = advapi32 -EXTRAINCL = $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) -EXTRALIBS = $(CARBON_LIBS) $(APPKIT_LIBS) +IMPORTS = advapi32 winefreetype DELAYIMPORTS = usp10 setupapi
C_SRCS = \ @@ -29,7 +27,6 @@ C_SRCS = \ enhmfdrv/init.c \ enhmfdrv/objects.c \ font.c \ - freetype.c \ gdiobj.c \ icm.c \ mapping.c \ @@ -47,9 +44,6 @@ C_SRCS = \ pen.c \ printdrv.c \ region.c \ - vertical.c \ vulkan.c
RC_SRCS = gdi32.rc - -freetype_EXTRADEFS = -DWINE_FONT_DIR="`$(MAKEDEP) -R ${datadir}/wine ${fontdir}`" diff --git a/dlls/gdi32/driver.c b/dlls/gdi32/driver.c index 39812b5ca0a..4b53b23e790 100644 --- a/dlls/gdi32/driver.c +++ b/dlls/gdi32/driver.c @@ -1586,3 +1586,23 @@ NTSTATUS WINAPI D3DKMTCheckVidPnExclusiveOwnership( const D3DKMT_CHECKVIDPNEXCLU
return get_display_driver()->pD3DKMTCheckVidPnExclusiveOwnership( desc ); } + +WINAPI void __wine_gdi_check_not_lock(void) +{ + GDI_CheckNotLock(); +} + +WINAPI DC *__wine_gdi_get_physdev_dc( PHYSDEV dev ) +{ + return get_physdev_dc( dev ); +} + +WINAPI DWORD __wine_gdi_get_dpi(void) +{ + return get_dpi(); +} + +WINAPI void __wine_gdi_set_font_driver(const struct gdi_dc_funcs *ptr) +{ + font_driver = ptr; +} diff --git a/dlls/gdi32/gdi32.spec b/dlls/gdi32/gdi32.spec index 725afebb8eb..610a9a714c0 100644 --- a/dlls/gdi32/gdi32.spec +++ b/dlls/gdi32/gdi32.spec @@ -289,8 +289,8 @@ @ stdcall GetEnhMetaFileW(wstr) # @ stub GetFontAssocStatus @ stdcall GetFontData(long long long ptr long) -@ stdcall GetFontFileData(long long int64 ptr long) -@ stdcall GetFontFileInfo(long long ptr long ptr) +@ stdcall GetFontFileData(long long int64 ptr long) winefreetype.GetFontFileData +@ stdcall GetFontFileInfo(long long ptr long ptr) winefreetype.GetFontFileInfo @ stdcall GetFontLanguageInfo(long) @ stdcall GetFontRealizationInfo(long ptr) @ stub GetFontResourceInfo @@ -332,7 +332,7 @@ @ stdcall GetPolyFillMode(long) @ stdcall GetROP2(long) @ stdcall GetRandomRgn(long long long) -@ stdcall GetRasterizerCaps(ptr long) +@ stdcall GetRasterizerCaps(ptr long) winefreetype.GetRasterizerCaps @ stdcall GetRegionData(long long ptr) @ stdcall GetRelAbs(long long) @ stdcall GetRgnBox(long ptr) @@ -536,3 +536,9 @@
# Vulkan @ cdecl __wine_get_vulkan_driver(long long) + +# freetype.drv +@ stdcall __wine_gdi_check_not_lock() +@ stdcall __wine_gdi_get_physdev_dc(ptr) +@ stdcall __wine_gdi_get_dpi() +@ stdcall __wine_gdi_set_font_driver(ptr) diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h index 4bb46619666..8601423eaf1 100644 --- a/dlls/gdi32/gdi_private.h +++ b/dlls/gdi32/gdi_private.h @@ -29,6 +29,7 @@ #include "winbase.h" #include "wingdi.h" #include "wine/gdi_driver.h" +#include "wine/gdi_font.h"
/* Metafile defines */ #define META_EOF 0x0000 @@ -48,6 +49,8 @@ typedef struct { /* extra stock object: default 1x1 bitmap for memory DCs */ #define DEFAULT_BITMAP (STOCK_LAST+1)
+struct font_fileinfo; + struct gdi_obj_funcs { HGDIOBJ (*pSelectObject)( HGDIOBJ handle, HDC hdc ); @@ -57,92 +60,10 @@ struct gdi_obj_funcs BOOL (*pDeleteObject)( HGDIOBJ handle ); };
-typedef struct tagDC -{ - HDC hSelf; /* Handle to this DC */ - struct gdi_physdev nulldrv; /* physdev for the null driver */ - PHYSDEV physDev; /* current top of the physdev stack */ - DWORD thread; /* thread owning the DC */ - LONG refcount; /* thread refcount */ - LONG dirty; /* dirty flag */ - LONG disabled; /* get_dc_ptr() will return NULL. Controlled by DCHF_(DISABLE|ENABLE)DC */ - INT saveLevel; - struct tagDC *saved_dc; - DWORD_PTR dwHookData; - DCHOOKPROC hookProc; /* DC hook */ - BOOL bounds_enabled:1; /* bounds tracking is enabled */ - BOOL path_open:1; /* path is currently open (only for saved DCs) */ - - POINT wnd_org; /* Window origin */ - SIZE wnd_ext; /* Window extent */ - POINT vport_org; /* Viewport origin */ - SIZE vport_ext; /* Viewport extent */ - SIZE virtual_res; /* Initially HORZRES,VERTRES. Changed by SetVirtualResolution */ - SIZE virtual_size; /* Initially HORZSIZE,VERTSIZE. Changed by SetVirtualResolution */ - RECT vis_rect; /* visible rectangle in screen coords */ - RECT device_rect; /* rectangle for the whole device */ - int pixel_format; /* pixel format (for memory DCs) */ - UINT aa_flags; /* anti-aliasing flags to pass to GetGlyphOutline for current font */ - FLOAT miterLimit; - - int flags; - DWORD layout; - HRGN hClipRgn; /* Clip region */ - HRGN hMetaRgn; /* Meta region */ - HRGN hVisRgn; /* Visible region */ - HRGN region; /* Total DC region (intersection of clip and visible) */ - HPEN hPen; - HBRUSH hBrush; - HFONT hFont; - HBITMAP hBitmap; - HPALETTE hPalette; - - struct gdi_path *path; - - struct font_gamma_ramp *font_gamma_ramp; - - UINT font_code_page; - WORD ROPmode; - WORD polyFillMode; - WORD stretchBltMode; - WORD relAbsMode; - WORD backgroundMode; - COLORREF backgroundColor; - COLORREF textColor; - COLORREF dcBrushColor; - COLORREF dcPenColor; - POINT brush_org; - - DWORD mapperFlags; /* Font mapper flags */ - WORD textAlign; /* Text alignment from SetTextAlign() */ - INT charExtra; /* Spacing from SetTextCharacterExtra() */ - INT breakExtra; /* breakTotalExtra / breakCount */ - INT breakRem; /* breakTotalExtra % breakCount */ - INT MapMode; - INT GraphicsMode; /* Graphics mode */ - ABORTPROC pAbortProc; /* AbortProc for Printing */ - POINT cur_pos; /* Current position */ - INT ArcDirection; - XFORM xformWorld2Wnd; /* World-to-window transformation */ - XFORM xformWorld2Vport; /* World-to-viewport transformation */ - XFORM xformVport2World; /* Inverse of the above transformation */ - BOOL vport2WorldValid; /* Is xformVport2World valid? */ - RECT bounds; /* Current bounding rect */ -} DC; - /* Certain functions will do no further processing if the driver returns this. Used by mfdrv for example. */ #define GDI_NO_MORE_WORK 2
-/* Rounds a floating point number to integer. The world-to-viewport - * transformation process is done in floating point internally. This function - * is then used to round these coordinates to integer values. - */ -static inline INT GDI_ROUND(double val) -{ - return (int)floor(val + 0.5); -} - #define GET_DC_PHYSDEV(dc,func) \ get_physdev_entry_point( (dc)->physDev, FIELD_OFFSET(struct gdi_dc_funcs,func))
@@ -282,31 +203,11 @@ struct font_gamma_ramp
/* freetype.c */
-/* Undocumented structure filled in by GetFontRealizationInfo */ -struct font_realization_info -{ - DWORD size; /* could be 16 or 24 */ - DWORD flags; /* 1 for bitmap fonts, 3 for scalable fonts */ - DWORD cache_num; /* keeps incrementing - num of fonts that have been created allowing for caching?? */ - DWORD instance_id; /* identifies a realized font instance */ - DWORD unk; /* unknown */ - WORD face_index; /* face index in case of font collections */ - WORD simulations; /* 0 bit - bold simulation, 1 bit - oblique simulation */ -}; - -/* Undocumented structure filled in by GetCharWidthInfo */ -struct char_width_info -{ - INT lsb; /* minimum left side bearing */ - INT rsb; /* minimum right side bearing */ - INT unk; /* unknown */ -}; - -extern INT WineEngAddFontResourceEx(LPCWSTR, DWORD, PVOID) DECLSPEC_HIDDEN; -extern HANDLE WineEngAddFontMemResourceEx(PVOID, DWORD, PVOID, LPDWORD) DECLSPEC_HIDDEN; -extern BOOL WineEngCreateScalableFontResource(DWORD, LPCWSTR, LPCWSTR, LPCWSTR) DECLSPEC_HIDDEN; -extern BOOL WineEngInit(void) DECLSPEC_HIDDEN; -extern BOOL WineEngRemoveFontResourceEx(LPCWSTR, DWORD, PVOID) DECLSPEC_HIDDEN; +extern BOOL WINAPI WineEngInit(void) DECLSPEC_HIDDEN; +extern INT WINAPI WineEngAddFontResourceEx(LPCWSTR, DWORD, PVOID) DECLSPEC_HIDDEN; +extern HANDLE WINAPI WineEngAddFontMemResourceEx(PVOID, DWORD, PVOID, LPDWORD) DECLSPEC_HIDDEN; +extern BOOL WINAPI WineEngCreateScalableFontResource(DWORD, LPCWSTR, LPCWSTR, LPCWSTR) DECLSPEC_HIDDEN; +extern BOOL WINAPI WineEngRemoveFontResourceEx(LPCWSTR, DWORD, PVOID) DECLSPEC_HIDDEN;
/* gdiobj.c */ extern HGDIOBJ alloc_gdi_handle( void *obj, WORD type, const struct gdi_obj_funcs *funcs ) DECLSPEC_HIDDEN; diff --git a/dlls/gdi32/resource.h b/dlls/gdi32/resource.h index b9a0eb66735..2fd878a2568 100644 --- a/dlls/gdi32/resource.h +++ b/dlls/gdi32/resource.h @@ -19,6 +19,7 @@ #include <windef.h>
/* these are in the order of the fsCsb[0] bits */ +/* a few are also duplicated in freetype.c */ #define IDS_FIRST_SCRIPT 16 #define IDS_WESTERN (IDS_FIRST_SCRIPT + 0) #define IDS_CENTRAL_EUROPEAN (IDS_FIRST_SCRIPT + 1) diff --git a/dlls/winefreetype/Makefile.in b/dlls/winefreetype/Makefile.in new file mode 100644 index 00000000000..4b8a24ffb5d --- /dev/null +++ b/dlls/winefreetype/Makefile.in @@ -0,0 +1,12 @@ +MODULE = winefreetype.dll +IMPORTLIB = winefreetype +IMPORTS = gdi32 advapi32 +EXTRADEFS = -D_GDI32_ +EXTRAINCL = $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) +EXTRALIBS = $(CARBON_LIBS) $(APPKIT_LIBS) + +C_SRCS = \ + freetype.c \ + vertical.c + +freetype_EXTRADEFS = -DWINE_FONT_DIR="`$(MAKEDEP) -R ${datadir}/wine ${fontdir}`" diff --git a/dlls/gdi32/freetype.c b/dlls/winefreetype/freetype.c similarity index 99% rename from dlls/gdi32/freetype.c rename to dlls/winefreetype/freetype.c index f82a8c1641f..b4956219c35 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/winefreetype/freetype.c @@ -99,12 +99,15 @@ #include "winerror.h" #include "winreg.h" #include "wingdi.h" -#include "gdi_private.h" +#include "wine/gdi_font.h" #include "wine/unicode.h" #include "wine/debug.h" #include "wine/list.h"
-#include "resource.h" +/* from gdi32 resource.h */ +#define IDS_FIRST_SCRIPT 16 +#define IDS_OEM_DOS (IDS_FIRST_SCRIPT + 32) +#define IDS_OTHER (IDS_FIRST_SCRIPT + 33)
WINE_DEFAULT_DEBUG_CHANNEL(font);
@@ -3316,12 +3319,12 @@ static void delete_external_font_keys(void) * WineEngAddFontResourceEx * */ -INT WineEngAddFontResourceEx(LPCWSTR file, DWORD flags, PVOID pdv) +INT WINAPI WineEngAddFontResourceEx(LPCWSTR file, DWORD flags, PVOID pdv) { WCHAR path[MAX_PATH]; INT ret = 0;
- GDI_CheckNotLock(); + __wine_gdi_check_not_lock();
if (ft_handle) /* do it only if we have freetype up and running */ { @@ -3353,9 +3356,9 @@ INT WineEngAddFontResourceEx(LPCWSTR file, DWORD flags, PVOID pdv) * WineEngAddFontMemResourceEx * */ -HANDLE WineEngAddFontMemResourceEx(PVOID pbFont, DWORD cbFont, PVOID pdv, DWORD *pcFonts) +HANDLE WINAPI WineEngAddFontMemResourceEx(PVOID pbFont, DWORD cbFont, PVOID pdv, DWORD *pcFonts) { - GDI_CheckNotLock(); + __wine_gdi_check_not_lock();
if (ft_handle) /* do it only if we have freetype up and running */ { @@ -3389,12 +3392,12 @@ HANDLE WineEngAddFontMemResourceEx(PVOID pbFont, DWORD cbFont, PVOID pdv, DWORD * WineEngRemoveFontResourceEx * */ -BOOL WineEngRemoveFontResourceEx(LPCWSTR file, DWORD flags, PVOID pdv) +BOOL WINAPI WineEngRemoveFontResourceEx(LPCWSTR file, DWORD flags, PVOID pdv) { WCHAR path[MAX_PATH]; INT ret = 0;
- GDI_CheckNotLock(); + __wine_gdi_check_not_lock();
if (ft_handle) /* do it only if we have freetype up and running */ { @@ -3704,8 +3707,8 @@ static BOOL create_fot( const WCHAR *resource, const WCHAR *font_file, const str * WineEngCreateScalableFontResource * */ -BOOL WineEngCreateScalableFontResource( DWORD hidden, LPCWSTR resource, - LPCWSTR font_file, LPCWSTR font_path ) +BOOL WINAPI WineEngCreateScalableFontResource( DWORD hidden, LPCWSTR resource, + LPCWSTR font_file, LPCWSTR font_path ) { char *unix_name = get_ttf_file_name( font_file, font_path ); struct fontdir fontdir; @@ -4048,7 +4051,7 @@ static void update_font_info(void) DWORD screen_dpi, font_dpi = 0; BOOL done = FALSE;
- screen_dpi = get_dpi(); + screen_dpi = __wine_gdi_get_dpi(); if (!screen_dpi) screen_dpi = 96;
if (RegCreateKeyExA(HKEY_CURRENT_USER, "Software\Wine\Fonts", 0, NULL, 0, KEY_ALL_ACCESS, NULL, &hkey, NULL) != ERROR_SUCCESS) @@ -4225,7 +4228,7 @@ static BOOL init_freetype(void) pFT_Property_Set( library, "truetype", "interpreter-version", &interpreter_version ); }
- font_driver = &freetype_funcs; + __wine_gdi_set_font_driver(&freetype_funcs); return TRUE;
sym_not_found: @@ -4401,7 +4404,7 @@ static void reorder_font_list(void) * * Initialize FreeType library and create a list of available faces */ -BOOL WineEngInit(void) +BOOL WINAPI WineEngInit(void) { HKEY hkey; DWORD disposition; @@ -5548,7 +5551,7 @@ static HFONT CDECL freetype_SelectFont( PHYSDEV dev, HFONT hfont, UINT *aa_flags CHARSETINFO csi; FMAT2 dcmat; FontSubst *psub = NULL; - DC *dc = get_physdev_dc( dev ); + DC *dc = __wine_gdi_get_physdev_dc( dev ); const SYSTEM_LINKS *font_link;
if (!hfont) /* notification that the font has been changed by another driver */ @@ -5598,7 +5601,7 @@ static HFONT CDECL freetype_SelectFont( PHYSDEV dev, HFONT hfont, UINT *aa_flags TRACE("DC transform %f %f %f %f\n", dcmat.eM11, dcmat.eM12, dcmat.eM21, dcmat.eM22);
- GDI_CheckNotLock(); + __wine_gdi_check_not_lock(); EnterCriticalSection( &freetype_cs );
/* check the cache first */ @@ -6018,13 +6021,15 @@ static INT load_script_name( UINT id, WCHAR buffer[LF_FACESIZE] ) HRSRC rsrc; HGLOBAL hMem; WCHAR *p; - int i; + int i = 0; + HMODULE gdi32_module = GetModuleHandleA("gdi32.dll");
+ if (!gdi32_module) goto done; id += IDS_FIRST_SCRIPT; rsrc = FindResourceW( gdi32_module, (LPCWSTR)(ULONG_PTR)((id >> 4) + 1), (LPCWSTR)6 /*RT_STRING*/ ); - if (!rsrc) return 0; + if (!rsrc) goto done; hMem = LoadResource( gdi32_module, rsrc ); - if (!hMem) return 0; + if (!hMem) goto done;
p = LockResource( hMem ); id &= 0x000f; @@ -6033,6 +6038,9 @@ static INT load_script_name( UINT id, WCHAR buffer[LF_FACESIZE] ) i = min(LF_FACESIZE - 1, *p); memcpy(buffer, p + 1, i * sizeof(WCHAR)); buffer[i] = 0; + +done: + if (gdi32_module) CloseHandle(gdi32_module); return i; }
@@ -6313,7 +6321,7 @@ static BOOL CDECL freetype_EnumFonts( PHYSDEV dev, LPLOGFONTW plf, FONTENUMPROCW
create_enum_charset_list(plf->lfCharSet, &enum_charsets);
- GDI_CheckNotLock(); + __wine_gdi_check_not_lock(); EnterCriticalSection( &freetype_cs ); if(plf->lfFaceName[0]) { WCHAR *face_name = plf->lfFaceName; @@ -6630,7 +6638,7 @@ static DWORD CDECL freetype_GetGlyphIndices( PHYSDEV dev, LPCWSTR lpstr, INT cou got_default = TRUE; }
- GDI_CheckNotLock(); + __wine_gdi_check_not_lock(); EnterCriticalSection( &freetype_cs );
for(i = 0; i < count; i++) @@ -8279,7 +8287,7 @@ static DWORD CDECL freetype_GetGlyphOutline( PHYSDEV dev, UINT glyph, UINT forma return dev->funcs->pGetGlyphOutline( dev, glyph, format, lpgm, buflen, buf, lpmat ); }
- GDI_CheckNotLock(); + __wine_gdi_check_not_lock(); EnterCriticalSection( &freetype_cs ); ret = get_glyph_outline( physdev->font, glyph, format, lpgm, &abc, buflen, buf, lpmat ); LeaveCriticalSection( &freetype_cs ); @@ -8300,7 +8308,7 @@ static BOOL CDECL freetype_GetTextMetrics( PHYSDEV dev, TEXTMETRICW *metrics ) return dev->funcs->pGetTextMetrics( dev, metrics ); }
- GDI_CheckNotLock(); + __wine_gdi_check_not_lock(); EnterCriticalSection( &freetype_cs ); ret = get_text_metrics( physdev->font, metrics ); LeaveCriticalSection( &freetype_cs ); @@ -8325,7 +8333,7 @@ static UINT CDECL freetype_GetOutlineTextMetrics( PHYSDEV dev, UINT cbSize, OUTL
if (!FT_IS_SCALABLE( physdev->font->ft_face )) return 0;
- GDI_CheckNotLock(); + __wine_gdi_check_not_lock(); EnterCriticalSection( &freetype_cs );
if (physdev->font->potm || get_outline_text_metrics( physdev->font )) @@ -8450,7 +8458,7 @@ static BOOL CDECL freetype_GetCharWidth( PHYSDEV dev, UINT firstChar, UINT lastC
TRACE("%p, %d, %d, %p\n", physdev->font, firstChar, lastChar, buffer);
- GDI_CheckNotLock(); + __wine_gdi_check_not_lock(); EnterCriticalSection( &freetype_cs ); for(c = firstChar; c <= lastChar; c++) { if (get_glyph_outline( physdev->font, c, GGO_METRICS, &gm, &abc, 0, NULL, &identity ) == GDI_ERROR) @@ -8514,7 +8522,7 @@ static BOOL CDECL freetype_GetCharABCWidths( PHYSDEV dev, UINT firstChar, UINT l
TRACE("%p, %d, %d, %p\n", physdev->font, firstChar, lastChar, buffer);
- GDI_CheckNotLock(); + __wine_gdi_check_not_lock(); EnterCriticalSection( &freetype_cs );
for(c = firstChar; c <= lastChar; c++, buffer++) @@ -8543,7 +8551,7 @@ static BOOL CDECL freetype_GetCharABCWidthsI( PHYSDEV dev, UINT firstChar, UINT if(!FT_HAS_HORIZONTAL(physdev->font->ft_face)) return FALSE;
- GDI_CheckNotLock(); + __wine_gdi_check_not_lock(); EnterCriticalSection( &freetype_cs );
for(c = 0; c < count; c++, buffer++) @@ -8573,7 +8581,7 @@ static BOOL CDECL freetype_GetTextExtentExPoint( PHYSDEV dev, LPCWSTR wstr, INT
TRACE("%p, %s, %d\n", physdev->font, debugstr_wn(wstr, count), count);
- GDI_CheckNotLock(); + __wine_gdi_check_not_lock(); EnterCriticalSection( &freetype_cs );
for (idx = pos = 0; idx < count; idx++) @@ -8606,7 +8614,7 @@ static BOOL CDECL freetype_GetTextExtentExPointI( PHYSDEV dev, const WORD *indic
TRACE("%p, %p, %d\n", physdev->font, indices, count);
- GDI_CheckNotLock(); + __wine_gdi_check_not_lock(); EnterCriticalSection( &freetype_cs );
for (idx = pos = 0; idx < count; idx++) @@ -8782,7 +8790,7 @@ static BOOL CDECL freetype_FontIsLinked( PHYSDEV dev ) return dev->funcs->pFontIsLinked( dev ); }
- GDI_CheckNotLock(); + __wine_gdi_check_not_lock(); EnterCriticalSection( &freetype_cs ); ret = !list_empty(&physdev->font->child_fonts); LeaveCriticalSection( &freetype_cs ); @@ -9011,7 +9019,7 @@ static DWORD CDECL freetype_GetKerningPairs( PHYSDEV dev, DWORD cPairs, KERNINGP return dev->funcs->pGetKerningPairs( dev, cPairs, kern_pair ); }
- GDI_CheckNotLock(); + __wine_gdi_check_not_lock(); EnterCriticalSection( &freetype_cs ); if (font->total_kern_pairs != (DWORD)-1) { @@ -9290,35 +9298,33 @@ static const struct gdi_dc_funcs freetype_funcs =
#else /* HAVE_FREETYPE */
-struct font_fileinfo; - /*************************************************************************/
-BOOL WineEngInit(void) +BOOL WINAPI WineEngInit(void) { return FALSE; }
-INT WineEngAddFontResourceEx(LPCWSTR file, DWORD flags, PVOID pdv) +INT WINAPI WineEngAddFontResourceEx(LPCWSTR file, DWORD flags, PVOID pdv) { FIXME("(%s, %x, %p): stub\n", debugstr_w(file), flags, pdv); return 1; }
-INT WineEngRemoveFontResourceEx(LPCWSTR file, DWORD flags, PVOID pdv) +INT WINAPI WineEngRemoveFontResourceEx(LPCWSTR file, DWORD flags, PVOID pdv) { FIXME("(%s, %x, %p): stub\n", debugstr_w(file), flags, pdv); return TRUE; }
-HANDLE WineEngAddFontMemResourceEx(PVOID pbFont, DWORD cbFont, PVOID pdv, DWORD *pcFonts) +HANDLE WINAPI WineEngAddFontMemResourceEx(PVOID pbFont, DWORD cbFont, PVOID pdv, DWORD *pcFonts) { FIXME("(%p, %u, %p, %p): stub\n", pbFont, cbFont, pdv, pcFonts); return NULL; }
-BOOL WineEngCreateScalableFontResource( DWORD hidden, LPCWSTR resource, - LPCWSTR font_file, LPCWSTR font_path ) +BOOL WINAPI WineEngCreateScalableFontResource( DWORD hidden, LPCWSTR resource, + LPCWSTR font_file, LPCWSTR font_path ) { FIXME("stub\n"); return FALSE; diff --git a/dlls/gdi32/vertical.c b/dlls/winefreetype/vertical.c similarity index 100% rename from dlls/gdi32/vertical.c rename to dlls/winefreetype/vertical.c diff --git a/dlls/winefreetype/winefreetype.spec b/dlls/winefreetype/winefreetype.spec new file mode 100644 index 00000000000..970365b965d --- /dev/null +++ b/dlls/winefreetype/winefreetype.spec @@ -0,0 +1,8 @@ +@ stdcall WineEngInit() +@ stdcall WineEngAddFontResourceEx(ptr long ptr) +@ stdcall WineEngRemoveFontResourceEx(ptr long ptr) +@ stdcall WineEngAddFontMemResourceEx(ptr long ptr ptr) +@ stdcall WineEngCreateScalableFontResource(long ptr ptr ptr) +@ stdcall GetRasterizerCaps(ptr long) +@ stdcall GetFontFileData(long long int64 ptr long) +@ stdcall GetFontFileInfo(long long ptr long ptr) diff --git a/include/wine/gdi_font.h b/include/wine/gdi_font.h new file mode 100644 index 00000000000..035241094f2 --- /dev/null +++ b/include/wine/gdi_font.h @@ -0,0 +1,135 @@ +/* + * Definitions for Wine GDI freetype interface + * + * Copyright 2020 Rémi Bernon for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __WINE_WINE_GDI_FONT_H +#define __WINE_WINE_GDI_FONT_H + +#include <math.h> + +#include "wine/gdi_driver.h" + +typedef struct tagDC +{ + HDC hSelf; /* Handle to this DC */ + struct gdi_physdev nulldrv; /* physdev for the null driver */ + PHYSDEV physDev; /* current top of the physdev stack */ + DWORD thread; /* thread owning the DC */ + LONG refcount; /* thread refcount */ + LONG dirty; /* dirty flag */ + LONG disabled; /* get_dc_ptr() will return NULL. Controlled by DCHF_(DISABLE|ENABLE)DC */ + INT saveLevel; + struct tagDC *saved_dc; + DWORD_PTR dwHookData; + DCHOOKPROC hookProc; /* DC hook */ + BOOL bounds_enabled:1; /* bounds tracking is enabled */ + BOOL path_open:1; /* path is currently open (only for saved DCs) */ + + POINT wnd_org; /* Window origin */ + SIZE wnd_ext; /* Window extent */ + POINT vport_org; /* Viewport origin */ + SIZE vport_ext; /* Viewport extent */ + SIZE virtual_res; /* Initially HORZRES,VERTRES. Changed by SetVirtualResolution */ + SIZE virtual_size; /* Initially HORZSIZE,VERTSIZE. Changed by SetVirtualResolution */ + RECT vis_rect; /* visible rectangle in screen coords */ + RECT device_rect; /* rectangle for the whole device */ + int pixel_format; /* pixel format (for memory DCs) */ + UINT aa_flags; /* anti-aliasing flags to pass to GetGlyphOutline for current font */ + FLOAT miterLimit; + + int flags; + DWORD layout; + HRGN hClipRgn; /* Clip region */ + HRGN hMetaRgn; /* Meta region */ + HRGN hVisRgn; /* Visible region */ + HRGN region; /* Total DC region (intersection of clip and visible) */ + HPEN hPen; + HBRUSH hBrush; + HFONT hFont; + HBITMAP hBitmap; + HPALETTE hPalette; + + struct gdi_path *path; + + struct font_gamma_ramp *font_gamma_ramp; + + UINT font_code_page; + WORD ROPmode; + WORD polyFillMode; + WORD stretchBltMode; + WORD relAbsMode; + WORD backgroundMode; + COLORREF backgroundColor; + COLORREF textColor; + COLORREF dcBrushColor; + COLORREF dcPenColor; + POINT brush_org; + + DWORD mapperFlags; /* Font mapper flags */ + WORD textAlign; /* Text alignment from SetTextAlign() */ + INT charExtra; /* Spacing from SetTextCharacterExtra() */ + INT breakExtra; /* breakTotalExtra / breakCount */ + INT breakRem; /* breakTotalExtra % breakCount */ + INT MapMode; + INT GraphicsMode; /* Graphics mode */ + ABORTPROC pAbortProc; /* AbortProc for Printing */ + POINT cur_pos; /* Current position */ + INT ArcDirection; + XFORM xformWorld2Wnd; /* World-to-window transformation */ + XFORM xformWorld2Vport; /* World-to-viewport transformation */ + XFORM xformVport2World; /* Inverse of the above transformation */ + BOOL vport2WorldValid; /* Is xformVport2World valid? */ + RECT bounds; /* Current bounding rect */ +} DC; + +/* Undocumented structure filled in by GetFontRealizationInfo */ +struct font_realization_info +{ + DWORD size; /* could be 16 or 24 */ + DWORD flags; /* 1 for bitmap fonts, 3 for scalable fonts */ + DWORD cache_num; /* keeps incrementing - num of fonts that have been created allowing for caching?? */ + DWORD instance_id; /* identifies a realized font instance */ + DWORD unk; /* unknown */ + WORD face_index; /* face index in case of font collections */ + WORD simulations; /* 0 bit - bold simulation, 1 bit - oblique simulation */ +}; + +/* Undocumented structure filled in by GetCharWidthInfo */ +struct char_width_info +{ + INT lsb; /* minimum left side bearing */ + INT rsb; /* minimum right side bearing */ + INT unk; /* unknown */ +}; + +/* Rounds a floating point number to integer. The world-to-viewport + * transformation process is done in floating point internally. This function + * is then used to round these coordinates to integer values. + */ +static inline INT GDI_ROUND(double val) +{ + return (int)floor(val + 0.5); +} + +extern WINAPI void __wine_gdi_check_not_lock(void) DECLSPEC_HIDDEN; +extern WINAPI DC *__wine_gdi_get_physdev_dc( PHYSDEV dev ) DECLSPEC_HIDDEN; +extern WINAPI DWORD __wine_gdi_get_dpi(void) DECLSPEC_HIDDEN; +extern WINAPI void __wine_gdi_set_font_driver(const struct gdi_dc_funcs *) DECLSPEC_HIDDEN; + +#endif /* __WINE_WINE_GDI_FONT_H */
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=74913
Your paranoid android.
=== debiant (32 bit report) ===
user32: monitor: Timeout msg: Timeout resource: Timeout scroll: Timeout static: Timeout sysparams: Timeout text: Timeout uitools: Timeout win: Timeout winstation: Timeout
=== debiant (32 bit Chinese:China report) ===
user32: input.c:2485: Test failed: 4: Unexpected cursor movement input.c:2485: Test failed: 5: Unexpected cursor movement input.c:2485: Test failed: 6: Unexpected cursor movement input.c:2485: Test failed: 7: Unexpected cursor movement input.c:2485: Test failed: 8: Unexpected cursor movement input.c:2206: Test failed: 9: foreground process expected WM_MOUSEMOVE message input.c:2485: Test failed: 9: Unexpected cursor movement input.c:2206: Test failed: 10: foreground process expected WM_MOUSEMOVE message input.c:2485: Test failed: 10: Unexpected cursor movement input.c:2206: Test failed: 11: foreground process expected WM_MOUSEMOVE message input.c:2485: Test failed: 11: Unexpected cursor movement input.c:2206: Test failed: 12: foreground process expected WM_MOUSEMOVE message input.c:2485: Test failed: 12: Unexpected cursor movement input.c:2485: Test failed: 13: Unexpected cursor movement input.c:2485: Test failed: 14: Unexpected cursor movement input.c:2485: Test failed: 15: Unexpected cursor movement input.c:2485: Test failed: 16: Unexpected cursor movement monitor: Timeout msg: Timeout
=== debiant (32 bit WoW report) ===
user32: monitor: Timeout msg: Timeout resource: Timeout scroll: Timeout static: Timeout sysparams: Timeout text: Timeout uitools: Timeout win: Timeout winstation: Timeout
=== debiant (build log) ===
0024:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded. 0024:err:winediag:nodrv_CreateWindow The explorer process failed to start. Task: WineTest did not produce the wow64 report
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/gdi32/Makefile.in | 1 + dlls/gdi32/bidi.c | 2 -- dlls/gdi32/bitblt.c | 2 -- dlls/gdi32/brush.c | 2 -- dlls/gdi32/dc.c | 8 +++----- dlls/gdi32/dib.c | 2 -- dlls/gdi32/dibdrv/graphics.c | 7 +++---- dlls/gdi32/dibdrv/opengl.c | 3 --- dlls/gdi32/driver.c | 24 ++++++++++-------------- dlls/gdi32/enhmetafile.c | 3 --- dlls/gdi32/enhmfdrv/graphics.c | 3 --- dlls/gdi32/font.c | 12 ++++-------- dlls/gdi32/gdiobj.c | 2 -- dlls/gdi32/icm.c | 3 --- dlls/gdi32/metafile.c | 2 -- dlls/gdi32/opengl.c | 3 --- dlls/gdi32/painting.c | 3 --- dlls/gdi32/path.c | 3 --- dlls/gdi32/pen.c | 2 -- dlls/gdi32/vulkan.c | 3 --- 20 files changed, 21 insertions(+), 69 deletions(-)
diff --git a/dlls/gdi32/Makefile.in b/dlls/gdi32/Makefile.in index 54506255657..4a85aa7b8ff 100644 --- a/dlls/gdi32/Makefile.in +++ b/dlls/gdi32/Makefile.in @@ -3,6 +3,7 @@ MODULE = gdi32.dll IMPORTLIB = gdi32 IMPORTS = advapi32 winefreetype DELAYIMPORTS = usp10 setupapi +EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \ bidi.c \ diff --git a/dlls/gdi32/bidi.c b/dlls/gdi32/bidi.c index 1b2dca774c7..18971026395 100644 --- a/dlls/gdi32/bidi.c +++ b/dlls/gdi32/bidi.c @@ -41,8 +41,6 @@ * has been modified. */
-#include "config.h" - #include <stdarg.h> #include "windef.h" #include "winbase.h" diff --git a/dlls/gdi32/bitblt.c b/dlls/gdi32/bitblt.c index f3b866057eb..c32dc32db5a 100644 --- a/dlls/gdi32/bitblt.c +++ b/dlls/gdi32/bitblt.c @@ -18,8 +18,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-#include "config.h" - #include <stdarg.h> #include <limits.h> #include <math.h> diff --git a/dlls/gdi32/brush.c b/dlls/gdi32/brush.c index 7d13649305d..517f8c17e22 100644 --- a/dlls/gdi32/brush.c +++ b/dlls/gdi32/brush.c @@ -18,8 +18,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-#include "config.h" - #include <stdarg.h> #include <string.h>
diff --git a/dlls/gdi32/dc.c b/dlls/gdi32/dc.c index c24b96e2750..74da1fe5661 100644 --- a/dlls/gdi32/dc.c +++ b/dlls/gdi32/dc.c @@ -18,8 +18,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-#include "config.h" - #include <assert.h> #include <stdarg.h> #include <stdlib.h> @@ -28,10 +26,10 @@ #include "winbase.h" #include "wingdi.h" #include "winreg.h" +#include "winnls.h" #include "winternl.h" #include "winerror.h" #include "gdi_private.h" -#include "wine/unicode.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(dc); @@ -642,7 +640,7 @@ HDC WINAPI CreateDCW( LPCWSTR driver, LPCWSTR device, LPCWSTR output, ERR( "no device found for %s\n", debugstr_w(device) ); return 0; } - strcpyW(buf, driver); + wcscpy(buf, driver); }
if (!(funcs = DRIVER_load_driver( buf ))) @@ -702,7 +700,7 @@ HDC WINAPI CreateDCA( LPCSTR driver, LPCSTR device, LPCSTR output, if (initData) { /* don't convert initData for DISPLAY driver, it's not used */ - if (!driverW.Buffer || strcmpiW( driverW.Buffer, displayW )) + if (!driverW.Buffer || wcsicmp( driverW.Buffer, displayW )) initDataW = GdiConvertToDevmodeW(initData); }
diff --git a/dlls/gdi32/dib.c b/dlls/gdi32/dib.c index 3d267ba89c9..10a7a957973 100644 --- a/dlls/gdi32/dib.c +++ b/dlls/gdi32/dib.c @@ -59,8 +59,6 @@ Search for "Bitmap Structures" in MSDN */
-#include "config.h" - #include <stdarg.h> #include <stdlib.h> #include <string.h> diff --git a/dlls/gdi32/dibdrv/graphics.c b/dlls/gdi32/dibdrv/graphics.c index ad2b01d23cf..150ce0f1268 100644 --- a/dlls/gdi32/dibdrv/graphics.c +++ b/dlls/gdi32/dibdrv/graphics.c @@ -22,7 +22,6 @@ #include "gdi_private.h" #include "dibdrv.h"
-#include "wine/unicode.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(dib); @@ -535,9 +534,9 @@ static DWORD font_cache_hash( struct cached_font *font ) two_chars = *ptr; pwc = (WCHAR *)&two_chars; if (!*pwc) break; - *pwc = toupperW(*pwc); + *pwc = towupper(*pwc); pwc++; - *pwc = toupperW(*pwc); + *pwc = towupper(*pwc); hash ^= two_chars; if (!*pwc) break; } @@ -550,7 +549,7 @@ static int font_cache_cmp( const struct cached_font *p1, const struct cached_fon if (!ret) ret = p1->aa_flags - p2->aa_flags; if (!ret) ret = memcmp( &p1->xform, &p2->xform, sizeof(p1->xform) ); if (!ret) ret = memcmp( &p1->lf, &p2->lf, FIELD_OFFSET( LOGFONTW, lfFaceName )); - if (!ret) ret = strcmpiW( p1->lf.lfFaceName, p2->lf.lfFaceName ); + if (!ret) ret = wcsicmp( p1->lf.lfFaceName, p2->lf.lfFaceName ); return ret; }
diff --git a/dlls/gdi32/dibdrv/opengl.c b/dlls/gdi32/dibdrv/opengl.c index 5242e646e58..490693459c5 100644 --- a/dlls/gdi32/dibdrv/opengl.c +++ b/dlls/gdi32/dibdrv/opengl.c @@ -18,9 +18,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-#include "config.h" -#include "wine/port.h" - #include "gdi_private.h" #include "dibdrv.h"
diff --git a/dlls/gdi32/driver.c b/dlls/gdi32/driver.c index 4b53b23e790..c5a7ab62bc9 100644 --- a/dlls/gdi32/driver.c +++ b/dlls/gdi32/driver.c @@ -19,9 +19,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-#include "config.h" -#include "wine/port.h" - #include <assert.h> #include <stdarg.h> #include <string.h> @@ -42,7 +39,6 @@ #include "ddk/d3dkmthk.h"
#include "gdi_private.h" -#include "wine/unicode.h" #include "wine/list.h" #include "wine/debug.h" #include "wine/heap.h" @@ -148,17 +144,17 @@ static BOOL is_display_device( LPCWSTR name ) static const WCHAR display_deviceW[] = {'\','\','.','\','D','I','S','P','L','A','Y'}; const WCHAR *p = name;
- if (strncmpiW( name, display_deviceW, sizeof(display_deviceW) / sizeof(WCHAR) )) + if (wcsncmp( name, display_deviceW, sizeof(display_deviceW) / sizeof(WCHAR) )) return FALSE;
p += sizeof(display_deviceW) / sizeof(WCHAR);
- if (!isdigitW( *p++ )) + if (!iswdigit( *p++ )) return FALSE;
for (; *p; p++) { - if (!isdigitW( *p )) + if (!iswdigit( *p )) return FALSE; }
@@ -190,7 +186,7 @@ const struct gdi_dc_funcs *DRIVER_load_driver( LPCWSTR name ) static const WCHAR displayW[] = { 'd','i','s','p','l','a','y',0 };
/* display driver is a special case */ - if (!strcmpiW( name, displayW ) || is_display_device( name )) return get_display_driver(); + if (!wcsicmp( name, displayW ) || is_display_device( name )) return get_display_driver();
if ((module = GetModuleHandleW( name ))) { @@ -544,7 +540,7 @@ static INT CDECL nulldrv_GetTextFace( PHYSDEV dev, INT size, LPWSTR name )
if (GetObjectW( dc->hFont, sizeof(font), &font )) { - ret = strlenW( font.lfFaceName ) + 1; + ret = wcslen( font.lfFaceName ) + 1; if (name) { lstrcpynW( name, font.lfFaceName, size ); @@ -943,7 +939,7 @@ BOOL DRIVER_GetDriverName( LPCWSTR device, LPWSTR driver, DWORD size ) WCHAR *p;
/* display is a special case */ - if (!strcmpiW( device, displayW ) || + if (!wcsicmp( device, displayW ) || is_display_device( device )) { lstrcpynW( driver, displayW, size ); @@ -955,7 +951,7 @@ BOOL DRIVER_GetDriverName( LPCWSTR device, LPWSTR driver, DWORD size ) WARN("Unable to find %s in [devices] section of win.ini\n", debugstr_w(device)); return FALSE; } - p = strchrW(driver, ','); + p = wcschr(driver, ','); if(!p) { WARN("%s entry in [devices] section of win.ini is malformed.\n", debugstr_w(device)); @@ -1396,10 +1392,10 @@ NTSTATUS WINAPI D3DKMTOpenAdapterFromGdiDisplayName( D3DKMT_OPENADAPTERFROMGDIDI return STATUS_UNSUCCESSFUL;
TRACE("DeviceName: %s\n", wine_dbgstr_w( desc->DeviceName )); - if (strncmpiW( desc->DeviceName, displayW, ARRAY_SIZE(displayW) )) + if (wcsncmp( desc->DeviceName, displayW, ARRAY_SIZE(displayW) )) return STATUS_UNSUCCESSFUL;
- index = strtolW( desc->DeviceName + ARRAY_SIZE(displayW), &end, 10 ) - 1; + index = wcstol( desc->DeviceName + ARRAY_SIZE(displayW), &end, 10 ) - 1; if (*end) return STATUS_UNSUCCESSFUL;
@@ -1411,7 +1407,7 @@ NTSTATUS WINAPI D3DKMTOpenAdapterFromGdiDisplayName( D3DKMT_OPENADAPTERFROMGDIDI mutex = get_display_device_init_mutex();
size = sizeof( bufferW ); - sprintfW( key_nameW, video_value_fmtW, index ); + swprintf( key_nameW, MAX_PATH, video_value_fmtW, index ); if (RegGetValueW( HKEY_LOCAL_MACHINE, video_keyW, key_nameW, RRF_RT_REG_SZ, NULL, bufferW, &size )) goto done;
diff --git a/dlls/gdi32/enhmetafile.c b/dlls/gdi32/enhmetafile.c index fc3389ff23f..e4107682fb1 100644 --- a/dlls/gdi32/enhmetafile.c +++ b/dlls/gdi32/enhmetafile.c @@ -31,9 +31,6 @@ * */
-#include "config.h" -#include "wine/port.h" - #include <stdarg.h> #include <stdlib.h> #include <string.h> diff --git a/dlls/gdi32/enhmfdrv/graphics.c b/dlls/gdi32/enhmfdrv/graphics.c index ed4254096a4..148030cea3b 100644 --- a/dlls/gdi32/enhmfdrv/graphics.c +++ b/dlls/gdi32/enhmfdrv/graphics.c @@ -18,9 +18,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-#include "config.h" -#include "wine/port.h" - #include <stdarg.h> #include <stdlib.h> #include <string.h> diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c index 8788426a2c2..3777267e90c 100644 --- a/dlls/gdi32/font.c +++ b/dlls/gdi32/font.c @@ -20,9 +20,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-#include "config.h" -#include "wine/port.h" - #include <limits.h> #include <stdarg.h> #include <stdlib.h> @@ -37,7 +34,6 @@ #include "gdi_private.h" #include "wine/exception.h" #include "wine/heap.h" -#include "wine/unicode.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(font); @@ -272,7 +268,7 @@ static DWORD get_key_value( HKEY key, const WCHAR *name, DWORD *value ) if (!err) { if (type == REG_DWORD) memcpy( value, buf, sizeof(*value) ); - else *value = atoiW( buf ); + else *value = _wtoi( buf ); } return err; } @@ -656,17 +652,17 @@ static DWORD get_associated_charset_info(void)
data_len = sizeof(dataW); if (!RegQueryValueExW(hkey, ansiW, NULL, &type, (LPBYTE)dataW, &data_len) && - type == REG_SZ && !strcmpiW(dataW, yesW)) + type == REG_SZ && !wcsicmp(dataW, yesW)) associated_charset |= ASSOC_CHARSET_ANSI;
data_len = sizeof(dataW); if (!RegQueryValueExW(hkey, oemW, NULL, &type, (LPBYTE)dataW, &data_len) && - type == REG_SZ && !strcmpiW(dataW, yesW)) + type == REG_SZ && !wcsicmp(dataW, yesW)) associated_charset |= ASSOC_CHARSET_OEM;
data_len = sizeof(dataW); if (!RegQueryValueExW(hkey, symbolW, NULL, &type, (LPBYTE)dataW, &data_len) && - type == REG_SZ && !strcmpiW(dataW, yesW)) + type == REG_SZ && !wcsicmp(dataW, yesW)) associated_charset |= ASSOC_CHARSET_SYMBOL;
RegCloseKey(hkey); diff --git a/dlls/gdi32/gdiobj.c b/dlls/gdi32/gdiobj.c index 083a5045692..e204079baf7 100644 --- a/dlls/gdi32/gdiobj.c +++ b/dlls/gdi32/gdiobj.c @@ -18,8 +18,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-#include "config.h" - #include <assert.h> #include <stdlib.h> #include <stdarg.h> diff --git a/dlls/gdi32/icm.c b/dlls/gdi32/icm.c index 9d0e2f61aaa..d0a42a55531 100644 --- a/dlls/gdi32/icm.c +++ b/dlls/gdi32/icm.c @@ -19,8 +19,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-#include "config.h" - #include <stdarg.h> #include <string.h>
@@ -33,7 +31,6 @@ #include "gdi_private.h"
#include "wine/debug.h" -#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(icm);
diff --git a/dlls/gdi32/metafile.c b/dlls/gdi32/metafile.c index 28ad53cf57b..1c831ef83ef 100644 --- a/dlls/gdi32/metafile.c +++ b/dlls/gdi32/metafile.c @@ -45,8 +45,6 @@ * HDMD - 14/4/1999 */
-#include "config.h" - #include <stdarg.h> #include <string.h> #include <fcntl.h> diff --git a/dlls/gdi32/opengl.c b/dlls/gdi32/opengl.c index 578737994ab..57cdf8dd26b 100644 --- a/dlls/gdi32/opengl.c +++ b/dlls/gdi32/opengl.c @@ -20,9 +20,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-#include "config.h" -#include "wine/port.h" - #include <stdarg.h> #include <string.h> #include <stdlib.h> diff --git a/dlls/gdi32/painting.c b/dlls/gdi32/painting.c index 81937b8bbb4..96f4a1ede64 100644 --- a/dlls/gdi32/painting.c +++ b/dlls/gdi32/painting.c @@ -20,9 +20,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-#include "config.h" -#include "wine/port.h" - #include <stdarg.h> #include <string.h> #include <stdlib.h> diff --git a/dlls/gdi32/path.c b/dlls/gdi32/path.c index 8ecf9bf8e69..ea412610b7f 100644 --- a/dlls/gdi32/path.c +++ b/dlls/gdi32/path.c @@ -21,9 +21,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-#include "config.h" -#include "wine/port.h" - #include <assert.h> #include <math.h> #include <stdarg.h> diff --git a/dlls/gdi32/pen.c b/dlls/gdi32/pen.c index fa789e4cf91..fbac882a9c7 100644 --- a/dlls/gdi32/pen.c +++ b/dlls/gdi32/pen.c @@ -18,8 +18,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-#include "config.h" - #include <stdarg.h> #include <stdlib.h> #include <string.h> diff --git a/dlls/gdi32/vulkan.c b/dlls/gdi32/vulkan.c index 16548a51a55..25ac7b65d25 100644 --- a/dlls/gdi32/vulkan.c +++ b/dlls/gdi32/vulkan.c @@ -18,9 +18,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-#include "config.h" -#include "wine/port.h" - #include "gdi_private.h"
/***********************************************************************
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=74914
Your paranoid android.
=== debiant (32 bit report) ===
gdi32: dc.c:675: Test failed: expected ret2 > 0, got 0 dc.c:690: Test failed: expected desc.nSize == sizeof(descr), got 0
user32: monitor: Timeout msg: Timeout resource: Timeout scroll: Timeout static: Timeout sysparams: Timeout text: Timeout uitools: Timeout win: Timeout winstation: Timeout
=== debiant (32 bit Chinese:China report) ===
gdi32: dc.c:675: Test failed: expected ret2 > 0, got 0 dc.c:690: Test failed: expected desc.nSize == sizeof(descr), got 0
user32: input.c:2485: Test failed: 4: Unexpected cursor movement input.c:2485: Test failed: 5: Unexpected cursor movement input.c:2485: Test failed: 6: Unexpected cursor movement input.c:2485: Test failed: 7: Unexpected cursor movement input.c:2485: Test failed: 8: Unexpected cursor movement input.c:2206: Test failed: 9: foreground process expected WM_MOUSEMOVE message input.c:2485: Test failed: 9: Unexpected cursor movement input.c:2206: Test failed: 10: foreground process expected WM_MOUSEMOVE message input.c:2485: Test failed: 10: Unexpected cursor movement input.c:2206: Test failed: 11: foreground process expected WM_MOUSEMOVE message input.c:2485: Test failed: 11: Unexpected cursor movement input.c:2206: Test failed: 12: foreground process expected WM_MOUSEMOVE message input.c:2485: Test failed: 12: Unexpected cursor movement input.c:2485: Test failed: 13: Unexpected cursor movement input.c:2485: Test failed: 14: Unexpected cursor movement input.c:2485: Test failed: 15: Unexpected cursor movement input.c:2485: Test failed: 16: Unexpected cursor movement monitor: Timeout msg: Timeout
=== debiant (32 bit WoW report) ===
gdi32: dc.c:675: Test failed: expected ret2 > 0, got 0 dc.c:690: Test failed: expected desc.nSize == sizeof(descr), got 0
user32: monitor: Timeout msg: Timeout resource: Timeout scroll: Timeout static: Timeout sysparams: Timeout text: Timeout uitools: Timeout win: Timeout winstation: Timeout
=== debiant (64 bit WoW report) ===
gdi32: dc.c:675: Test failed: expected ret2 > 0, got 0 dc.c:690: Test failed: expected desc.nSize == sizeof(descr), got 0
user32: input.c:2485: Test failed: 4: Unexpected cursor movement input.c:2485: Test failed: 5: Unexpected cursor movement input.c:2485: Test failed: 6: Unexpected cursor movement input.c:2485: Test failed: 7: Unexpected cursor movement input.c:2485: Test failed: 8: Unexpected cursor movement input.c:2206: Test failed: 9: foreground process expected WM_MOUSEMOVE message input.c:2485: Test failed: 9: Unexpected cursor movement input.c:2206: Test failed: 10: foreground process expected WM_MOUSEMOVE message input.c:2485: Test failed: 10: Unexpected cursor movement input.c:2206: Test failed: 11: foreground process expected WM_MOUSEMOVE message input.c:2485: Test failed: 11: Unexpected cursor movement input.c:2206: Test failed: 12: foreground process expected WM_MOUSEMOVE message input.c:2485: Test failed: 12: Unexpected cursor movement input.c:2485: Test failed: 13: Unexpected cursor movement input.c:2485: Test failed: 14: Unexpected cursor movement input.c:2485: Test failed: 15: Unexpected cursor movement input.c:2485: Test failed: 16: Unexpected cursor movement monitor: Timeout msg: Timeout
This is required by several Call of Duty games that are calling this directly after loading gdi32.dll from disk. The DLL has to be PE first, then this stub has to succeed.
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/gdi32/gdi32.spec | 2 +- dlls/gdi32/gdiobj.c | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/dlls/gdi32/gdi32.spec b/dlls/gdi32/gdi32.spec index 610a9a714c0..90200914012 100644 --- a/dlls/gdi32/gdi32.spec +++ b/dlls/gdi32/gdi32.spec @@ -182,7 +182,7 @@ @ stub GdiDeleteLocalObject # @ stub GdiDeleteSpoolFileHandle @ stdcall GdiDescribePixelFormat(long long long ptr) -@ stub GdiDllInitialize +@ stdcall GdiDllInitialize(ptr long ptr) @ stdcall GdiDrawStream(long long ptr) # @ stub GdiEndDocEMF # @ stub GdiEndPageEMF diff --git a/dlls/gdi32/gdiobj.c b/dlls/gdi32/gdiobj.c index e204079baf7..8f850b09fab 100644 --- a/dlls/gdi32/gdiobj.c +++ b/dlls/gdi32/gdiobj.c @@ -734,6 +734,15 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved ) return TRUE; }
+ +/* Stub entry point, some games (CoD: Black Ops 3) call it directly. */ +BOOL WINAPI GdiDllInitialize( HINSTANCE inst, DWORD reason, LPVOID reserved ) +{ + FIXME("stub\n"); + return TRUE; +} + + static const char *gdi_obj_type( unsigned type ) { switch ( type )
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=74915
Your paranoid android.
=== debiant (32 bit report) ===
gdi32: dc.c:675: Test failed: expected ret2 > 0, got 0 dc.c:690: Test failed: expected desc.nSize == sizeof(descr), got 0
user32: monitor: Timeout msg: Timeout resource: Timeout scroll: Timeout static: Timeout sysparams: Timeout text: Timeout uitools: Timeout win: Timeout
=== debiant (32 bit Chinese:China report) ===
gdi32: dc.c:675: Test failed: expected ret2 > 0, got 0 dc.c:690: Test failed: expected desc.nSize == sizeof(descr), got 0
user32: input.c:2485: Test failed: 4: Unexpected cursor movement input.c:2485: Test failed: 5: Unexpected cursor movement input.c:2485: Test failed: 6: Unexpected cursor movement input.c:2485: Test failed: 7: Unexpected cursor movement input.c:2485: Test failed: 8: Unexpected cursor movement input.c:2206: Test failed: 9: foreground process expected WM_MOUSEMOVE message input.c:2485: Test failed: 9: Unexpected cursor movement input.c:2206: Test failed: 10: foreground process expected WM_MOUSEMOVE message input.c:2485: Test failed: 10: Unexpected cursor movement input.c:2206: Test failed: 11: foreground process expected WM_MOUSEMOVE message input.c:2485: Test failed: 11: Unexpected cursor movement input.c:2206input.c: Test failed: :122485: foreground process expected WM_MOUSEMOVE message : Test failed: 12: Unexpected cursor movement input.c:2485: Test failed: 13: Unexpected cursor movement input.c:2485: Test failed: 14: Unexpected cursor movement input.c:2485: Test failed: 15: Unexpected cursor movement input.c:2485: Test failed: 16: Unexpected cursor movement monitor: Timeout msg: Timeout
=== debiant (32 bit WoW report) ===
gdi32: dc.c:675: Test failed: expected ret2 > 0, got 0 dc.c:690: Test failed: expected desc.nSize == sizeof(descr), got 0
user32: monitor: Timeout msg: Timeout resource: Timeout scroll: Timeout static: Timeout sysparams: Timeout text: Timeout uitools: Timeout win: Timeout
=== debiant (64 bit WoW report) ===
gdi32: dc.c:675: Test failed: expected ret2 > 0, got 0 dc.c:690: Test failed: expected desc.nSize == sizeof(descr), got 0
user32: input.c:2485: Test failed: 4: Unexpected cursor movement input.c:2485: Test failed: 5: Unexpected cursor movement input.c:2485: Test failed: 6: Unexpected cursor movement input.c:2485: Test failed: 7: Unexpected cursor movement input.c:2485: Test failed: 8: Unexpected cursor movement input.c:2206: Test failed: 9: foreground process expected WM_MOUSEMOVE message input.c:2485: Test failed: 9: Unexpected cursor movement input.c:2206: Test failed: 10: foreground process expected WM_MOUSEMOVE message input.c:2485: Test failed: 10: Unexpected cursor movement input.c:2206: Test failed: 11: foreground process expected WM_MOUSEMOVE message input.c:2485: Test failed: 11: Unexpected cursor movement input.c:2206: Test failed: 12: foreground process expected WM_MOUSEMOVE message input.c:2485: Test failed: 12: Unexpected cursor movement input.c:2485: Test failed: 13: Unexpected cursor movement input.c:2485: Test failed: 14: Unexpected cursor movement input.c:2485: Test failed: 15: Unexpected cursor movement input.c:2485: Test failed: 16: Unexpected cursor movement monitor: Timeout msg: Timeout