gdi32: Move ntgdi functions to Unix library.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2021-09-29 14:09:21 +02:00 committed by Alexandre Julliard
parent ca7998faff
commit 6857cb5695
33 changed files with 1667 additions and 91 deletions

View File

@ -18,6 +18,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include <stdarg.h>
#include <limits.h>
#include <math.h>

View File

@ -19,6 +19,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>

View File

@ -18,6 +18,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include <stdarg.h>
#include <string.h>
@ -140,7 +144,7 @@ void free_brush_pattern( struct brush_pattern *pattern )
HeapFree( GetProcessHeap(), 0, pattern->info );
}
BOOL get_brush_bitmap_info( HBRUSH handle, BITMAPINFO *info, void *bits, UINT *usage )
BOOL CDECL get_brush_bitmap_info( HBRUSH handle, BITMAPINFO *info, void *bits, UINT *usage )
{
BRUSHOBJ *brush;
BOOL ret = FALSE;

View File

@ -18,6 +18,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include <stdarg.h>
#include <stdlib.h>
#include "windef.h"

View File

@ -18,6 +18,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include <assert.h>
#include <stdarg.h>
#include <stdlib.h>
@ -1255,7 +1259,7 @@ DWORD WINAPI NtGdiSetLayout( HDC hdc, LONG wox, DWORD layout )
/**********************************************************************
* get_icm_profile (win32u.@)
*/
BOOL get_icm_profile( HDC hdc, BOOL allow_default, DWORD *size, WCHAR *filename )
BOOL CDECL get_icm_profile( HDC hdc, BOOL allow_default, DWORD *size, WCHAR *filename )
{
PHYSDEV physdev;
DC *dc;

View File

@ -59,6 +59,10 @@
Search for "Bitmap Structures" in MSDN
*/
#if 0
#pragma makedep unix
#endif
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>

View File

@ -18,6 +18,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include <assert.h>
#include "ntgdi_private.h"

View File

@ -18,6 +18,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include <assert.h>
#include "ntgdi_private.h"
@ -608,7 +612,7 @@ static struct opengl_funcs * CDECL dibdrv_wine_get_wgl_driver( PHYSDEV dev, UINT
ERR( "version mismatch, opengl32 wants %u but dibdrv has %u\n", version, WINE_WGL_DRIVER_VERSION );
return NULL;
}
if (!osmesa_funcs && __wine_init_unix_lib( gdi32_module, DLL_PROCESS_ATTACH, NULL, &osmesa_funcs ))
if (!osmesa_funcs && !(osmesa_funcs = init_opengl_lib()))
{
static int warned;
if (!warned++) ERR( "OSMesa not available, no OpenGL bitmap support\n" );

View File

@ -299,3 +299,5 @@ struct osmesa_funcs
BOOL (CDECL *make_current)( struct wgl_context *context, void *bits,
int width, int height, int bpp, int stride );
};
extern const struct osmesa_funcs *init_opengl_lib(void) DECLSPEC_HIDDEN;

View File

@ -18,6 +18,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include <assert.h>
#include "ntgdi_private.h"
#include "dibdrv.h"

View File

@ -18,6 +18,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include <assert.h>
#include <stdlib.h>

View File

@ -211,18 +211,17 @@ static const struct osmesa_funcs osmesa_funcs =
osmesa_make_current
};
NTSTATUS init_opengl_lib( HMODULE module, DWORD reason, const void *ptr_in, void *ptr_out )
const struct osmesa_funcs *init_opengl_lib(void)
{
if (!init_opengl()) return STATUS_DLL_NOT_FOUND;
*(const struct osmesa_funcs **)ptr_out = &osmesa_funcs;
return STATUS_SUCCESS;
if (!init_opengl()) return NULL;
return &osmesa_funcs;
}
#else /* SONAME_LIBOSMESA */
NTSTATUS init_opengl_lib( HMODULE module, DWORD reason, const void *ptr_in, void *ptr_out )
const struct osmesa_funcs *init_opengl_lib(void)
{
return STATUS_DLL_NOT_FOUND;
return NULL;
}
#endif /* SONAME_LIBOSMESA */

View File

@ -18,6 +18,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include <assert.h>
#include "ntgdi_private.h"

View File

@ -19,6 +19,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include <assert.h>
#include <stdarg.h>
#include <string.h>
@ -84,16 +88,12 @@ const struct gdi_dc_funcs *get_display_driver(void)
return driver_funcs;
}
/***********************************************************************
* __wine_set_display_driver (win32u.@)
*/
void CDECL __wine_set_display_driver( HMODULE module )
void CDECL set_display_driver( void *proc )
{
const struct gdi_dc_funcs * (CDECL *wine_get_gdi_driver)( unsigned int );
const struct gdi_dc_funcs * (CDECL *wine_get_gdi_driver)( unsigned int ) = proc;
const struct gdi_dc_funcs *funcs = NULL;
wine_get_gdi_driver = (void *)GetProcAddress( module, "wine_get_gdi_driver" );
if (wine_get_gdi_driver) funcs = wine_get_gdi_driver( WINE_GDI_DRIVER_VERSION );
funcs = wine_get_gdi_driver( WINE_GDI_DRIVER_VERSION );
if (!funcs)
{
ERR( "Could not create graphics driver\n" );

View File

@ -19,6 +19,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include "ntgdi_private.h"
@ -263,7 +267,7 @@ static BOOL CDECL EMFDRV_Ellipse( PHYSDEV dev, INT left, INT top, INT right, INT
return TRUE;
}
static BOOL EMFDRV_Rectangle( PHYSDEV dev, INT left, INT top, INT right, INT bottom )
static BOOL CDECL EMFDRV_Rectangle( PHYSDEV dev, INT left, INT top, INT right, INT bottom )
{
DC *dc = get_physdev_dc( dev );
RECTL bounds;

View File

@ -20,6 +20,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include <limits.h>
#include <stdarg.h>
#include <stdlib.h>
@ -1195,11 +1199,11 @@ static struct gdi_font_face *create_face( struct gdi_font_family *family, const
return NULL;
}
static int CDECL add_gdi_face( const WCHAR *family_name, const WCHAR *second_name,
const WCHAR *style, const WCHAR *fullname, const WCHAR *file,
void *data_ptr, SIZE_T data_size, UINT index, FONTSIGNATURE fs,
DWORD ntmflags, DWORD version, DWORD flags,
const struct bitmap_font_size *size )
int add_gdi_face( const WCHAR *family_name, const WCHAR *second_name,
const WCHAR *style, const WCHAR *fullname, const WCHAR *file,
void *data_ptr, SIZE_T data_size, UINT index, FONTSIGNATURE fs,
DWORD ntmflags, DWORD version, DWORD flags,
const struct bitmap_font_size *size )
{
struct gdi_font_face *face;
struct gdi_font_family *family;
@ -5784,7 +5788,7 @@ DWORD WINAPI NtGdiGetGlyphOutline( HDC hdc, UINT ch, UINT format, GLYPHMETRICS *
}
BOOL get_file_outline_text_metric( const WCHAR *path, OUTLINETEXTMETRICW *otm )
BOOL CDECL get_file_outline_text_metric( const WCHAR *path, OUTLINETEXTMETRICW *otm )
{
struct gdi_font *font = NULL;
@ -6203,8 +6207,6 @@ static void load_registry_fonts(void)
NtClose( hkey );
}
static const struct font_callback_funcs callback_funcs = { add_gdi_face };
/***********************************************************************
* font_init
*/
@ -6230,7 +6232,7 @@ UINT font_init(void)
if (!dpi) return 96;
update_codepage( dpi );
if (__wine_init_unix_lib( gdi32_module, DLL_PROCESS_ATTACH, &callback_funcs, &font_funcs ))
if (!(font_funcs = init_freetype_lib()))
return dpi;
load_system_bitmap_fonts();

View File

@ -282,8 +282,6 @@ static inline FT_Face get_ft_face( struct gdi_font *font )
return ((struct font_private_data *)font->private)->ft_face;
}
static const struct font_callback_funcs *callback_funcs;
struct font_mapping
{
struct list entry;
@ -1355,9 +1353,9 @@ static int add_unix_face( const char *unix_name, const WCHAR *file, void *data_p
if (!HIWORD( flags )) flags |= ADDFONT_AA_FLAGS( default_aa_flags );
ret = callback_funcs->add_gdi_face( unix_face->family_name, unix_face->second_name, unix_face->style_name, unix_face->full_name,
file, data_ptr, data_size, face_index, unix_face->fs, unix_face->ntm_flags,
unix_face->font_version, flags, unix_face->scalable ? NULL : &unix_face->size );
ret = add_gdi_face( unix_face->family_name, unix_face->second_name, unix_face->style_name, unix_face->full_name,
file, data_ptr, data_size, face_index, unix_face->fs, unix_face->ntm_flags,
unix_face->font_version, flags, unix_face->scalable ? NULL : &unix_face->size );
TRACE("fsCsb = %08x %08x/%08x %08x %08x %08x\n", unix_face->fs.fsCsb[0], unix_face->fs.fsCsb[1],
unix_face->fs.fsUsb[0], unix_face->fs.fsUsb[1], unix_face->fs.fsUsb[2], unix_face->fs.fsUsb[3]);
@ -4316,31 +4314,21 @@ static const struct font_backend_funcs font_funcs =
freetype_destroy_font
};
static NTSTATUS init_freetype_lib( HMODULE module, DWORD reason, const void *ptr_in, void *ptr_out )
const struct font_backend_funcs *init_freetype_lib(void)
{
callback_funcs = ptr_in;
if (!init_freetype()) return STATUS_DLL_NOT_FOUND;
if (!init_freetype()) return NULL;
#ifdef SONAME_LIBFONTCONFIG
init_fontconfig();
#endif
NtQueryDefaultLocale( FALSE, &system_lcid );
*(const struct font_backend_funcs **)ptr_out = &font_funcs;
return STATUS_SUCCESS;
return &font_funcs;
}
#else /* HAVE_FREETYPE */
static NTSTATUS init_freetype_lib( HMODULE module, DWORD reason, const void *ptr_in, void *ptr_out )
const struct font_backend_funcs *init_freetype_lib(void)
{
return STATUS_DLL_NOT_FOUND;
return NULL;
}
#endif /* HAVE_FREETYPE */
NTSTATUS CDECL __wine_init_unix_lib( HMODULE module, DWORD reason, const void *ptr_in, void *ptr_out )
{
if (reason != DLL_PROCESS_ATTACH) return STATUS_SUCCESS;
if (ptr_in) return init_freetype_lib( module, reason, ptr_in, ptr_out );
else return init_opengl_lib( module, reason, ptr_in, ptr_out );
}

View File

@ -279,12 +279,12 @@ extern BOOL EMFDC_WidenPath( DC_ATTR *dc_attr ) DECLSPEC_HIDDEN;
extern HENHMETAFILE EMF_Create_HENHMETAFILE( ENHMETAHEADER *emh, DWORD filesize,
BOOL on_disk ) DECLSPEC_HIDDEN;
extern BOOL get_brush_bitmap_info( HBRUSH handle, BITMAPINFO *info, void *bits,
UINT *usage ) DECLSPEC_HIDDEN;
extern BOOL get_icm_profile( HDC hdc, BOOL allow_default, DWORD *size,
WCHAR *filename ) DECLSPEC_HIDDEN;
extern BOOL get_file_outline_text_metric( const WCHAR *path, OUTLINETEXTMETRICW *otm ) DECLSPEC_HIDDEN;
extern BOOL CDECL get_brush_bitmap_info( HBRUSH handle, BITMAPINFO *info, void *bits,
UINT *usage ) DECLSPEC_HIDDEN;
extern BOOL CDECL get_icm_profile( HDC hdc, BOOL allow_default, DWORD *size,
WCHAR *filename ) DECLSPEC_HIDDEN;
extern BOOL CDECL get_file_outline_text_metric( const WCHAR *path,
OUTLINETEXTMETRICW *otm ) DECLSPEC_HIDDEN;
static inline int get_dib_stride( int width, int bpp )
{

View File

@ -18,6 +18,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include <assert.h>
#include <stdlib.h>
#include <stdarg.h>
@ -42,9 +46,10 @@ static GDI_SHARED_MEMORY gdi_shared;
static GDI_HANDLE_ENTRY *next_free;
static GDI_HANDLE_ENTRY *next_unused = gdi_shared.Handles + FIRST_GDI_HANDLE;
static LONG debug_count;
HMODULE gdi32_module = 0;
SYSTEM_BASIC_INFORMATION system_info;
const struct user_callbacks *user_callbacks = NULL;
static inline HGDIOBJ entry_to_handle( GDI_HANDLE_ENTRY *entry )
{
unsigned int idx = entry - gdi_shared.Handles;
@ -696,26 +701,6 @@ static void init_stock_objects( unsigned int dpi )
}
}
/***********************************************************************
* DllMain
*
* GDI initialization.
*/
BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
{
unsigned int dpi;
if (reason != DLL_PROCESS_ATTACH) return TRUE;
gdi32_module = inst;
DisableThreadLibraryCalls( inst );
NtQuerySystemInformation( SystemBasicInformation, &system_info, sizeof(system_info), NULL );
set_gdi_shared();
dpi = font_init();
init_stock_objects( dpi );
return TRUE;
}
static const char *gdi_obj_type( unsigned type )
{
@ -830,6 +815,12 @@ DWORD get_gdi_object_type( HGDIOBJ obj )
return entry ? entry->ExtType << NTGDI_HANDLE_TYPE_SHIFT : 0;
}
void set_gdi_client_ptr( HGDIOBJ obj, void *ptr )
{
GDI_HANDLE_ENTRY *entry = handle_entry( obj );
if (entry) entry->UserPointer = (UINT_PTR)ptr;
}
/***********************************************************************
* get_any_obj_ptr
*
@ -1081,3 +1072,207 @@ BOOL WINAPI NtGdiSetColorAdjustment( HDC hdc, const COLORADJUSTMENT *ca )
FIXME( "stub\n" );
return FALSE;
}
static struct unix_funcs unix_funcs =
{
NtGdiAbortDoc,
NtGdiAbortPath,
NtGdiAddFontMemResourceEx,
NtGdiAddFontResourceW,
NtGdiAlphaBlend,
NtGdiAngleArc,
NtGdiArcInternal,
NtGdiBeginPath,
NtGdiBitBlt,
NtGdiCloseFigure,
NtGdiCombineRgn,
NtGdiComputeXformCoefficients,
NtGdiCreateBitmap,
NtGdiCreateClientObj,
NtGdiCreateCompatibleBitmap,
NtGdiCreateCompatibleDC,
NtGdiCreateDIBBrush,
NtGdiCreateDIBSection,
NtGdiCreateDIBitmapInternal,
NtGdiCreateEllipticRgn,
NtGdiCreateHalftonePalette,
NtGdiCreateHatchBrushInternal,
NtGdiCreateMetafileDC,
NtGdiCreatePaletteInternal,
NtGdiCreatePatternBrushInternal,
NtGdiCreatePen,
NtGdiCreateRectRgn,
NtGdiCreateRoundRectRgn,
NtGdiCreateSolidBrush,
NtGdiDdDDICheckVidPnExclusiveOwnership,
NtGdiDdDDICloseAdapter,
NtGdiDdDDICreateDCFromMemory,
NtGdiDdDDICreateDevice,
NtGdiDdDDIDestroyDCFromMemory,
NtGdiDdDDIDestroyDevice,
NtGdiDdDDIEscape,
NtGdiDdDDIOpenAdapterFromDeviceName,
NtGdiDdDDIOpenAdapterFromHdc,
NtGdiDdDDIOpenAdapterFromLuid,
NtGdiDdDDIQueryStatistics,
NtGdiDdDDISetQueuedLimit,
NtGdiDdDDISetVidPnSourceOwner,
NtGdiDeleteClientObj,
NtGdiDeleteObjectApp,
NtGdiDescribePixelFormat,
NtGdiDoPalette,
NtGdiDrawStream,
NtGdiEllipse,
NtGdiEndDoc,
NtGdiEndPath,
NtGdiEndPage,
NtGdiEnumFonts,
NtGdiEqualRgn,
NtGdiExcludeClipRect,
NtGdiExtCreatePen,
NtGdiExtEscape,
NtGdiExtFloodFill,
NtGdiExtTextOutW,
NtGdiExtCreateRegion,
NtGdiExtGetObjectW,
NtGdiExtSelectClipRgn,
NtGdiFillPath,
NtGdiFillRgn,
NtGdiFlattenPath,
NtGdiFontIsLinked,
NtGdiFlush,
NtGdiFrameRgn,
NtGdiGetAndSetDCDword,
NtGdiGetAppClipBox,
NtGdiGetBitmapBits,
NtGdiGetBitmapDimension,
NtGdiGetBoundsRect,
NtGdiGetCharABCWidthsW,
NtGdiGetCharWidthW,
NtGdiGetCharWidthInfo,
NtGdiGetColorAdjustment,
NtGdiGetDCObject,
NtGdiGetDIBitsInternal,
NtGdiGetDeviceCaps,
NtGdiGetDeviceGammaRamp,
NtGdiGetFontData,
NtGdiGetFontFileData,
NtGdiGetFontFileInfo,
NtGdiGetFontUnicodeRanges,
NtGdiGetGlyphIndicesW,
NtGdiGetGlyphOutline,
NtGdiGetKerningPairs,
NtGdiGetNearestColor,
NtGdiGetNearestPaletteIndex,
NtGdiGetOutlineTextMetricsInternalW,
NtGdiGetPath,
NtGdiGetPixel,
NtGdiGetRandomRgn,
NtGdiGetRasterizerCaps,
NtGdiGetRealizationInfo,
NtGdiGetRegionData,
NtGdiGetRgnBox,
NtGdiGetSpoolMessage,
NtGdiGetSystemPaletteUse,
NtGdiGetTextCharsetInfo,
NtGdiGetTextExtentExW,
NtGdiGetTextFaceW,
NtGdiGetTextMetricsW,
NtGdiGetTransform,
NtGdiGradientFill,
NtGdiHfontCreate,
NtGdiInitSpool,
NtGdiIntersectClipRect,
NtGdiInvertRgn,
NtGdiLineTo,
NtGdiMaskBlt,
NtGdiModifyWorldTransform,
NtGdiMoveTo,
NtGdiOffsetClipRgn,
NtGdiOffsetRgn,
NtGdiOpenDCW,
NtGdiPatBlt,
NtGdiPathToRegion,
NtGdiPlgBlt,
NtGdiPolyDraw,
NtGdiPolyPolyDraw,
NtGdiPtInRegion,
NtGdiPtVisible,
NtGdiRectInRegion,
NtGdiRectVisible,
NtGdiRectangle,
NtGdiRemoveFontMemResourceEx,
NtGdiRemoveFontResourceW,
NtGdiResetDC,
NtGdiResizePalette,
NtGdiRestoreDC,
NtGdiRoundRect,
NtGdiSaveDC,
NtGdiScaleViewportExtEx,
NtGdiScaleWindowExtEx,
NtGdiSelectBitmap,
NtGdiSelectBrush,
NtGdiSelectClipPath,
NtGdiSelectFont,
NtGdiSelectPen,
NtGdiSetBitmapBits,
NtGdiSetBitmapDimension,
NtGdiSetBrushOrg,
NtGdiSetBoundsRect,
NtGdiSetColorAdjustment,
NtGdiSetDIBitsToDeviceInternal,
NtGdiSetDeviceGammaRamp,
NtGdiSetLayout,
NtGdiSetMagicColors,
NtGdiSetMetaRgn,
NtGdiSetPixel,
NtGdiSetPixelFormat,
NtGdiSetRectRgn,
NtGdiSetSystemPaletteUse,
NtGdiSetTextJustification,
NtGdiSetVirtualResolution,
NtGdiStartDoc,
NtGdiStartPage,
NtGdiStretchBlt,
NtGdiStretchDIBitsInternal,
NtGdiStrokeAndFillPath,
NtGdiStrokePath,
NtGdiSwapBuffers,
NtGdiTransparentBlt,
NtGdiTransformPoints,
NtGdiUnrealizeObject,
NtGdiUpdateColors,
NtGdiWidenPath,
GDIRealizePalette,
GDISelectPalette,
GetDCHook,
MirrorRgn,
SetDCHook,
SetDIBits,
SetHookFlags,
get_brush_bitmap_info,
get_file_outline_text_metric,
get_icm_profile,
__wine_get_vulkan_driver,
__wine_get_wgl_driver,
__wine_make_gdi_object_system,
set_display_driver,
__wine_set_visible_region,
};
NTSTATUS CDECL __wine_init_unix_lib( HMODULE module, DWORD reason, const void *ptr_in, void *ptr_out )
{
unsigned int dpi;
if (reason != DLL_PROCESS_ATTACH) return 0;
NtQuerySystemInformation( SystemBasicInformation, &system_info, sizeof(system_info), NULL );
set_gdi_shared();
dpi = font_init();
init_stock_objects( dpi );
user_callbacks = ptr_in;
*(struct unix_funcs **)ptr_out = &unix_funcs;
return 0;
}

View File

@ -18,6 +18,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include <stdarg.h>
#include "windef.h"

View File

@ -211,14 +211,13 @@ extern UINT set_dib_dc_color_table( HDC hdc, UINT startpos, UINT entries,
const RGBQUAD *colors ) DECLSPEC_HIDDEN;
extern void dibdrv_set_window_surface( DC *dc, struct window_surface *surface ) DECLSPEC_HIDDEN;
extern NTSTATUS init_opengl_lib( HMODULE module, DWORD reason, const void *ptr_in, void *ptr_out ) DECLSPEC_HIDDEN;
/* driver.c */
extern const struct gdi_dc_funcs null_driver DECLSPEC_HIDDEN;
extern const struct gdi_dc_funcs dib_driver DECLSPEC_HIDDEN;
extern const struct gdi_dc_funcs path_driver DECLSPEC_HIDDEN;
extern const struct gdi_dc_funcs font_driver DECLSPEC_HIDDEN;
extern const struct gdi_dc_funcs *get_display_driver(void) DECLSPEC_HIDDEN;
extern void CDECL set_display_driver( void *proc ) DECLSPEC_HIDDEN;
/* font.c */
@ -328,17 +327,14 @@ struct font_backend_funcs
void (CDECL *destroy_font)( struct gdi_font *font );
};
struct font_callback_funcs
{
int (CDECL *add_gdi_face)( const WCHAR *family_name, const WCHAR *second_name,
const WCHAR *style, const WCHAR *fullname, const WCHAR *file,
void *data_ptr, SIZE_T data_size, UINT index, FONTSIGNATURE fs,
DWORD ntmflags, DWORD version, DWORD flags,
const struct bitmap_font_size *size );
};
extern int add_gdi_face( const WCHAR *family_name, const WCHAR *second_name,
const WCHAR *style, const WCHAR *fullname, const WCHAR *file,
void *data_ptr, SIZE_T data_size, UINT index, FONTSIGNATURE fs,
DWORD ntmflags, DWORD version, DWORD flags,
const struct bitmap_font_size *size ) DECLSPEC_HIDDEN;
extern UINT font_init(void) DECLSPEC_HIDDEN;
extern UINT get_acp(void) DECLSPEC_HIDDEN;
extern const struct font_backend_funcs *init_freetype_lib(void) DECLSPEC_HIDDEN;
/* opentype.c */
@ -647,7 +643,6 @@ extern void CDECL free_heap_bits( struct gdi_image_bits *bits ) DECLSPEC_HIDDEN;
void set_gdi_client_ptr( HGDIOBJ handle, void *ptr ) DECLSPEC_HIDDEN;
extern HMODULE gdi32_module DECLSPEC_HIDDEN;
extern SYSTEM_BASIC_INFORMATION system_info DECLSPEC_HIDDEN;
extern const struct user_callbacks *user_callbacks DECLSPEC_HIDDEN;

View File

@ -30,6 +30,7 @@
#include "initguid.h"
#include "devguid.h"
#include "setupapi.h"
#include "win32u_private.h"
#include "wine/rbtree.h"
#include "wine/debug.h"
@ -41,6 +42,8 @@ DEFINE_DEVPROPKEY(DEVPROPKEY_GPU_LUID, 0x60b193cb, 0x5276, 0x4d0f, 0x96, 0xfc, 0
#define FIRST_GDI_HANDLE 32
HMODULE gdi32_module;
struct hdc_list
{
HDC hdc;
@ -129,6 +132,21 @@ HGDIOBJ get_full_gdi_handle( HGDIOBJ obj )
return entry ? entry_to_handle( entry ) : 0;
}
/***********************************************************************
* DllMain
*
* GDI initialization.
*/
BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
{
if (reason != DLL_PROCESS_ATTACH) return TRUE;
DisableThreadLibraryCalls( inst );
gdi32_module = inst;
wrappers_init();
return TRUE;
}
/***********************************************************************
* GetObjectType (GDI32.@)
*/

View File

@ -20,6 +20,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>

View File

@ -23,6 +23,10 @@
* Information in the "Undocumented Windows" is incorrect.
*/
#if 0
#pragma makedep unix
#endif
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>

View File

@ -21,6 +21,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include <assert.h>
#include <math.h>
#include <stdarg.h>

View File

@ -18,6 +18,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>

View File

@ -21,6 +21,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include <stdarg.h>
#include "windef.h"

View File

@ -94,6 +94,10 @@ SOFTWARE.
* the y-x-banding that's so nice to have...
*/
#if 0
#pragma makedep unix
#endif
#include <assert.h>
#include <stdarg.h>
#include <stdlib.h>

View File

@ -2,6 +2,10 @@
/* generated from https://www.unicode.org/Public/14.0.0/ucd/UCD.zip:VerticalOrientation.txt */
/* DO NOT EDIT!! */
#if 0
#pragma makedep unix
#endif
#include "windef.h"
const unsigned short DECLSPEC_HIDDEN vertical_orientation_table[1248] =

View File

@ -18,6 +18,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include "ntgdi_private.h"
/***********************************************************************

View File

@ -38,6 +38,273 @@ struct user_callbacks
HWND (WINAPI *pWindowFromDC)( HDC );
};
struct unix_funcs
{
/* win32u functions */
INT (WINAPI *pNtGdiAbortDoc)( HDC hdc );
BOOL (WINAPI *pNtGdiAbortPath)( HDC hdc );
HANDLE (WINAPI *pNtGdiAddFontMemResourceEx)( void *ptr, DWORD size, void *dv, ULONG dv_size,
DWORD *count );
INT (WINAPI *pNtGdiAddFontResourceW)( const WCHAR *str, ULONG size, ULONG files, DWORD flags,
DWORD tid, void *dv );
BOOL (WINAPI *pNtGdiAlphaBlend)( HDC hdc_dst, int x_dst, int y_dst, int width_dst, int height_dst,
HDC hdc_src, int x_src, int y_src, int width_src, int height_src,
BLENDFUNCTION blend_function, HANDLE xform );
BOOL (WINAPI *pNtGdiAngleArc)( HDC hdc, INT x, INT y, DWORD radius, FLOAT start_angle,
FLOAT sweep_angle );
BOOL (WINAPI *pNtGdiArcInternal)( UINT type, HDC hdc, INT left, INT top, INT right, INT bottom,
INT xstart, INT ystart, INT xend, INT yend );
BOOL (WINAPI *pNtGdiBeginPath)( HDC hdc );
BOOL (WINAPI *pNtGdiBitBlt)( HDC hdc_dst, INT x_dst, INT y_dst, INT width, INT height, HDC hdc_src,
INT x_src, INT y_src, DWORD rop, DWORD bk_color, FLONG fl );
BOOL (WINAPI *pNtGdiCloseFigure)( HDC hdc );
INT (WINAPI *pNtGdiCombineRgn)( HRGN dest, HRGN src1, HRGN src2, INT mode );
BOOL (WINAPI *pNtGdiComputeXformCoefficients)( HDC hdc );
HBITMAP (WINAPI *pNtGdiCreateBitmap)( INT width, INT height, UINT planes,
UINT bpp, const void *bits );
HANDLE (WINAPI *pNtGdiCreateClientObj)( ULONG type );
HBITMAP (WINAPI *pNtGdiCreateCompatibleBitmap)( HDC hdc, INT width, INT height );
HDC (WINAPI *pNtGdiCreateCompatibleDC)( HDC hdc );
HBRUSH (WINAPI *pNtGdiCreateDIBBrush)( const void *data, UINT coloruse, UINT size,
BOOL is_8x8, BOOL pen, const void *client );
HBITMAP (WINAPI *pNtGdiCreateDIBSection)( HDC hdc, HANDLE section, DWORD offset, const BITMAPINFO *bmi,
UINT usage, UINT header_size, ULONG flags,
ULONG_PTR color_space, void **bits );
HBITMAP (WINAPI *pNtGdiCreateDIBitmapInternal)( HDC hdc, INT width, INT height, DWORD init,
const void *bits, const BITMAPINFO *data,
UINT coloruse, UINT max_info, UINT max_bits,
ULONG flags, HANDLE xform );
HRGN (WINAPI *pNtGdiCreateEllipticRgn)( INT left, INT top, INT right, INT bottom );
HPALETTE (WINAPI *pNtGdiCreateHalftonePalette)( HDC hdc );
HBRUSH (WINAPI *pNtGdiCreateHatchBrushInternal)( INT style, COLORREF color, BOOL pen );
HDC (WINAPI *pNtGdiCreateMetafileDC)( HDC hdc );
HPALETTE (WINAPI *pNtGdiCreatePaletteInternal)( const LOGPALETTE *palette, UINT count );
HBRUSH (WINAPI *pNtGdiCreatePatternBrushInternal)( HBITMAP hbitmap, BOOL pen, BOOL is_8x8 );
HPEN (WINAPI *pNtGdiCreatePen)( INT style, INT width, COLORREF color, HBRUSH brush );
HRGN (WINAPI *pNtGdiCreateRectRgn)( INT left, INT top, INT right, INT bottom );
HRGN (WINAPI *pNtGdiCreateRoundRectRgn)( INT left, INT top, INT right, INT bottom,
INT ellipse_width, INT ellipse_height );
HBRUSH (WINAPI *pNtGdiCreateSolidBrush)( COLORREF color, HBRUSH brush );
NTSTATUS (WINAPI *pNtGdiDdDDICheckVidPnExclusiveOwnership)( const D3DKMT_CHECKVIDPNEXCLUSIVEOWNERSHIP *desc );
NTSTATUS (WINAPI *pNtGdiDdDDICloseAdapter)( const D3DKMT_CLOSEADAPTER *desc );
NTSTATUS (WINAPI *pNtGdiDdDDICreateDCFromMemory)( D3DKMT_CREATEDCFROMMEMORY *desc );
NTSTATUS (WINAPI *pNtGdiDdDDICreateDevice)( D3DKMT_CREATEDEVICE *desc );
NTSTATUS (WINAPI *pNtGdiDdDDIDestroyDCFromMemory)( const D3DKMT_DESTROYDCFROMMEMORY *desc );
NTSTATUS (WINAPI *pNtGdiDdDDIDestroyDevice)( const D3DKMT_DESTROYDEVICE *desc );
NTSTATUS (WINAPI *pNtGdiDdDDIEscape)( const D3DKMT_ESCAPE *desc );
NTSTATUS (WINAPI *pNtGdiDdDDIOpenAdapterFromDeviceName)( D3DKMT_OPENADAPTERFROMDEVICENAME *desc );
NTSTATUS (WINAPI *pNtGdiDdDDIOpenAdapterFromHdc)( D3DKMT_OPENADAPTERFROMHDC *desc );
NTSTATUS (WINAPI *pNtGdiDdDDIOpenAdapterFromLuid)( D3DKMT_OPENADAPTERFROMLUID *desc );
NTSTATUS (WINAPI *pNtGdiDdDDIQueryStatistics)( D3DKMT_QUERYSTATISTICS *stats );
NTSTATUS (WINAPI *pNtGdiDdDDISetQueuedLimit)( D3DKMT_SETQUEUEDLIMIT *desc );
NTSTATUS (WINAPI *pNtGdiDdDDISetVidPnSourceOwner)( const D3DKMT_SETVIDPNSOURCEOWNER *desc );
BOOL (WINAPI *pNtGdiDeleteClientObj)( HGDIOBJ obj );
BOOL (WINAPI *pNtGdiDeleteObjectApp)( HGDIOBJ obj );
INT (WINAPI *pNtGdiDescribePixelFormat)( HDC hdc, INT format, UINT size,
PIXELFORMATDESCRIPTOR *descr );
LONG (WINAPI *pNtGdiDoPalette)( HGDIOBJ handle, WORD start, WORD count, void *entries,
DWORD func, BOOL inbound );
BOOL (WINAPI *pNtGdiDrawStream)( HDC hdc, ULONG in, void *pvin );
BOOL (WINAPI *pNtGdiEllipse)( HDC hdc, INT left, INT top, INT right, INT bottom );
INT (WINAPI *pNtGdiEndDoc)(HDC hdc);
BOOL (WINAPI *pNtGdiEndPath)( HDC hdc );
INT (WINAPI *pNtGdiEndPage)( HDC hdc );
BOOL (WINAPI *pNtGdiEnumFonts)( HDC hdc, ULONG type, ULONG win32_compat, ULONG face_name_len,
const WCHAR *face_name, ULONG charset, ULONG *count, void *buf );
BOOL (WINAPI *pNtGdiEqualRgn)( HRGN hrgn1, HRGN hrgn2 );
INT (WINAPI *pNtGdiExcludeClipRect)( HDC hdc, INT left, INT top, INT right, INT bottom );
HPEN (WINAPI *pNtGdiExtCreatePen)( DWORD style, DWORD width, ULONG brush_style, ULONG color,
ULONG_PTR client_hatch, ULONG_PTR hatch, DWORD style_count,
const DWORD *style_bits, ULONG dib_size, BOOL old_style,
HBRUSH brush );
INT (WINAPI *pNtGdiExtEscape)( HDC hdc, WCHAR *driver, INT driver_id, INT escape, INT input_size,
const char *input, INT output_size, char *output );
BOOL (WINAPI *pNtGdiExtFloodFill)( HDC hdc, INT x, INT y, COLORREF color, UINT type );
BOOL (WINAPI *pNtGdiExtTextOutW)( HDC hdc, INT x, INT y, UINT flags, const RECT *rect,
const WCHAR *str, UINT count, const INT *dx, DWORD cp );
HRGN (WINAPI *pNtGdiExtCreateRegion)( const XFORM *xform, DWORD count, const RGNDATA *data );
INT (WINAPI *pNtGdiExtGetObjectW)( HGDIOBJ handle, INT count, void *buffer );
INT (WINAPI *pNtGdiExtSelectClipRgn)( HDC hdc, HRGN region, INT mode );
BOOL (WINAPI *pNtGdiFillPath)( HDC hdc );
BOOL (WINAPI *pNtGdiFillRgn)( HDC hdc, HRGN hrgn, HBRUSH hbrush );
BOOL (WINAPI *pNtGdiFlattenPath)( HDC hdc );
BOOL (WINAPI *pNtGdiFontIsLinked)( HDC hdc );
BOOL (WINAPI *pNtGdiFlush)(void);
BOOL (WINAPI *pNtGdiFrameRgn)( HDC hdc, HRGN hrgn, HBRUSH brush, INT width, INT height );
BOOL (WINAPI *pNtGdiGetAndSetDCDword)( HDC hdc, UINT method, DWORD value, DWORD *result );
INT (WINAPI *pNtGdiGetAppClipBox)( HDC hdc, RECT *rect );
LONG (WINAPI *pNtGdiGetBitmapBits)( HBITMAP bitmap, LONG count, void *bits );
BOOL (WINAPI *pNtGdiGetBitmapDimension)( HBITMAP bitmap, SIZE *size );
UINT (WINAPI *pNtGdiGetBoundsRect)( HDC hdc, RECT *rect, UINT flags );
BOOL (WINAPI *pNtGdiGetCharABCWidthsW)( HDC hdc, UINT first, UINT last, WCHAR *chars,
ULONG flags, void *buffer );
BOOL (WINAPI *pNtGdiGetCharWidthW)( HDC hdc, UINT first_char, UINT last_char, WCHAR *chars,
ULONG flags, void *buffer );
BOOL (WINAPI *pNtGdiGetCharWidthInfo)( HDC hdc, struct char_width_info *info );
BOOL (WINAPI *pNtGdiGetColorAdjustment)( HDC hdc, COLORADJUSTMENT *ca );
HANDLE (WINAPI *pNtGdiGetDCObject)( HDC hdc, UINT type );
INT (WINAPI *pNtGdiGetDIBitsInternal)( HDC hdc, HBITMAP hbitmap, UINT startscan, UINT lines,
void *bits, BITMAPINFO *info, UINT coloruse,
UINT max_bits, UINT max_info );
INT (WINAPI *pNtGdiGetDeviceCaps)( HDC hdc, INT cap );
BOOL (WINAPI *pNtGdiGetDeviceGammaRamp)( HDC hdc, void *ptr );
DWORD (WINAPI *pNtGdiGetFontData)( HDC hdc, DWORD table, DWORD offset, void *buffer, DWORD length );
BOOL (WINAPI *pNtGdiGetFontFileData)( DWORD instance_id, DWORD file_index, UINT64 *offset,
void *buff, DWORD buff_size );
BOOL (WINAPI *pNtGdiGetFontFileInfo)( DWORD instance_id, DWORD file_index, struct font_fileinfo *info,
SIZE_T size, SIZE_T *needed );
DWORD (WINAPI *pNtGdiGetFontUnicodeRanges)( HDC hdc, GLYPHSET *lpgs );
DWORD (WINAPI *pNtGdiGetGlyphIndicesW)( HDC hdc, const WCHAR *str, INT count,
WORD *indices, DWORD flags );
DWORD (WINAPI *pNtGdiGetGlyphOutline)( HDC hdc, UINT ch, UINT format, GLYPHMETRICS *metrics,
DWORD size, void *buffer, const MAT2 *mat2,
BOOL ignore_rotation );
DWORD (WINAPI *pNtGdiGetKerningPairs)( HDC hdc, DWORD count, KERNINGPAIR *kern_pair );
COLORREF (WINAPI *pNtGdiGetNearestColor)( HDC hdc, COLORREF color );
UINT (WINAPI *pNtGdiGetNearestPaletteIndex)( HPALETTE hpalette, COLORREF color );
UINT (WINAPI *pNtGdiGetOutlineTextMetricsInternalW)( HDC hdc, UINT cbData,
OUTLINETEXTMETRICW *otm, ULONG opts );
INT (WINAPI *pNtGdiGetPath)( HDC hdc, POINT *points, BYTE *types, INT size );
COLORREF (WINAPI *pNtGdiGetPixel)( HDC hdc, INT x, INT y );
INT (WINAPI *pNtGdiGetRandomRgn)( HDC hdc, HRGN region, INT code );
BOOL (WINAPI *pNtGdiGetRasterizerCaps)( RASTERIZER_STATUS *status, UINT size );
BOOL (WINAPI *pNtGdiGetRealizationInfo)( HDC hdc, struct font_realization_info *info );
DWORD (WINAPI *pNtGdiGetRegionData)( HRGN hrgn, DWORD count, RGNDATA *data );
INT (WINAPI *pNtGdiGetRgnBox)( HRGN hrgn, RECT *rect );
DWORD (WINAPI *pNtGdiGetSpoolMessage)( void *ptr1, DWORD data2, void *ptr3, DWORD data4 );
UINT (WINAPI *pNtGdiGetSystemPaletteUse)( HDC hdc );
UINT (WINAPI *pNtGdiGetTextCharsetInfo)( HDC hdc, FONTSIGNATURE *fs, DWORD flags );
BOOL (WINAPI *pNtGdiGetTextExtentExW)( HDC hdc, const WCHAR *str, INT count, INT max_ext,
INT *nfit, INT *dxs, SIZE *size, UINT flags );
INT (WINAPI *pNtGdiGetTextFaceW)( HDC hdc, INT count, WCHAR *name, BOOL alias_name );
BOOL (WINAPI *pNtGdiGetTextMetricsW)( HDC hdc, TEXTMETRICW *metrics, ULONG flags );
BOOL (WINAPI *pNtGdiGetTransform)( HDC hdc, DWORD which, XFORM *xform );
BOOL (WINAPI *pNtGdiGradientFill)( HDC hdc, TRIVERTEX *vert_array, ULONG nvert,
void *grad_array, ULONG ngrad, ULONG mode );
HFONT (WINAPI *pNtGdiHfontCreate)( const ENUMLOGFONTEXDVW *enumex, ULONG unk2, ULONG unk3,
ULONG unk4, void *data );
DWORD (WINAPI *pNtGdiInitSpool)(void);
INT (WINAPI *pNtGdiIntersectClipRect)( HDC hdc, INT left, INT top, INT right, INT bottom );
BOOL (WINAPI *pNtGdiInvertRgn)( HDC hdc, HRGN hrgn );
BOOL (WINAPI *pNtGdiLineTo)( HDC hdc, INT x, INT y );
BOOL (WINAPI *pNtGdiMaskBlt)( HDC hdc, INT x_dst, INT y_dst, INT width_dst, INT height_dst,
HDC hdc_src, INT x_src, INT y_src, HBITMAP mask,
INT x_mask, INT y_mask, DWORD rop, DWORD bk_color );
BOOL (WINAPI *pNtGdiModifyWorldTransform)( HDC hdc, const XFORM *xform, DWORD mode );
BOOL (WINAPI *pNtGdiMoveTo)( HDC hdc, INT x, INT y, POINT *pt );
INT (WINAPI *pNtGdiOffsetClipRgn)( HDC hdc, INT x, INT y );
INT (WINAPI *pNtGdiOffsetRgn)( HRGN hrgn, INT x, INT y );
HDC (WINAPI *pNtGdiOpenDCW)( UNICODE_STRING *device, const DEVMODEW *devmode,
UNICODE_STRING *output, ULONG type, BOOL is_display,
HANDLE hspool, DRIVER_INFO_2W *driver_info, void *pdev );
BOOL (WINAPI *pNtGdiPatBlt)( HDC hdc, INT left, INT top, INT width, INT height, DWORD rop );
HRGN (WINAPI *pNtGdiPathToRegion)( HDC hdc );
BOOL (WINAPI *pNtGdiPlgBlt)( HDC hdc, const POINT *point, HDC hdc_src, INT x_src, INT y_src,
INT width, INT height, HBITMAP mask, INT x_mask, INT y_mask,
DWORD bk_color );
BOOL (WINAPI *pNtGdiPolyDraw)(HDC hdc, const POINT *points, const BYTE *types, DWORD count );
ULONG (WINAPI *pNtGdiPolyPolyDraw)( HDC hdc, const POINT *points, const UINT *counts,
DWORD count, UINT function );
BOOL (WINAPI *pNtGdiPtInRegion)( HRGN hrgn, INT x, INT y );
BOOL (WINAPI *pNtGdiPtVisible)( HDC hdc, INT x, INT y );
BOOL (WINAPI *pNtGdiRectInRegion)( HRGN hrgn, const RECT *rect );
BOOL (WINAPI *pNtGdiRectVisible)( HDC hdc, const RECT *rect );
BOOL (WINAPI *pNtGdiRectangle)( HDC hdc, INT left, INT top, INT right, INT bottom );
BOOL (WINAPI *pNtGdiRemoveFontMemResourceEx)( HANDLE handle );
BOOL (WINAPI *pNtGdiRemoveFontResourceW)( const WCHAR *str, ULONG size, ULONG files,
DWORD flags, DWORD tid, void *dv );
BOOL (WINAPI *pNtGdiResetDC)( HDC hdc, const DEVMODEW *devmode, BOOL *banding,
DRIVER_INFO_2W *driver_info, void *dev );
BOOL (WINAPI *pNtGdiResizePalette)( HPALETTE palette, UINT count );
BOOL (WINAPI *pNtGdiRestoreDC)( HDC hdc, INT level );
BOOL (WINAPI *pNtGdiRoundRect)( HDC hdc, INT left, INT top, INT right,
INT bottom, INT ell_width, INT ell_height );
INT (WINAPI *pNtGdiSaveDC)( HDC hdc );
BOOL (WINAPI *pNtGdiScaleViewportExtEx)( HDC hdc, INT x_num, INT x_denom,
INT y_num, INT y_denom, SIZE *size );
BOOL (WINAPI *pNtGdiScaleWindowExtEx)( HDC hdc, INT x_num, INT x_denom,
INT y_num, INT y_denom, SIZE *size );
HGDIOBJ (WINAPI *pNtGdiSelectBitmap)( HDC hdc, HGDIOBJ handle );
HGDIOBJ (WINAPI *pNtGdiSelectBrush)( HDC hdc, HGDIOBJ handle );
BOOL (WINAPI *pNtGdiSelectClipPath)( HDC hdc, INT mode );
HGDIOBJ (WINAPI *pNtGdiSelectFont)( HDC hdc, HGDIOBJ handle );
HGDIOBJ (WINAPI *pNtGdiSelectPen)( HDC hdc, HGDIOBJ handle );
LONG (WINAPI *pNtGdiSetBitmapBits)( HBITMAP hbitmap, LONG count, const void *bits );
BOOL (WINAPI *pNtGdiSetBitmapDimension)( HBITMAP hbitmap, INT x, INT y, SIZE *prev_size );
BOOL (WINAPI *pNtGdiSetBrushOrg)( HDC hdc, INT x, INT y, POINT *prev_org );
UINT (WINAPI *pNtGdiSetBoundsRect)( HDC hdc, const RECT *rect, UINT flags );
BOOL (WINAPI *pNtGdiSetColorAdjustment)( HDC hdc, const COLORADJUSTMENT *ca );
INT (WINAPI *pNtGdiSetDIBitsToDeviceInternal)( HDC hdc, INT x_dst, INT y_dst, DWORD cx,
DWORD cy, INT x_src, INT y_src, UINT startscan,
UINT lines, const void *bits, const BITMAPINFO *bmi,
UINT coloruse, UINT max_bits, UINT max_info,
BOOL xform_coords, HANDLE xform );
BOOL (WINAPI *pNtGdiSetDeviceGammaRamp)( HDC hdc, void *ptr );
DWORD (WINAPI *pNtGdiSetLayout)( HDC hdc, LONG wox, DWORD layout );
BOOL (WINAPI *pNtGdiSetMagicColors)( HDC hdc, DWORD magic, ULONG index );
INT (WINAPI *pNtGdiSetMetaRgn)( HDC hdc );
COLORREF (WINAPI *pNtGdiSetPixel)( HDC hdc, INT x, INT y, COLORREF color );
BOOL (WINAPI *pNtGdiSetPixelFormat)( HDC hdc, INT format );
BOOL (WINAPI *pNtGdiSetRectRgn)( HRGN hrgn, INT left, INT top, INT right, INT bottom );
UINT (WINAPI *pNtGdiSetSystemPaletteUse)( HDC hdc, UINT use );
BOOL (WINAPI *pNtGdiSetTextJustification)( HDC hdc, INT extra, INT breaks );
BOOL (WINAPI *pNtGdiSetVirtualResolution)( HDC hdc, DWORD horz_res, DWORD vert_res,
DWORD horz_size, DWORD vert_size );
INT (WINAPI *pNtGdiStartDoc)( HDC hdc, const DOCINFOW *doc, BOOL *banding, INT job );
INT (WINAPI *pNtGdiStartPage)( HDC hdc );
BOOL (WINAPI *pNtGdiStretchBlt)( HDC hdc, INT x_dst, INT y_dst, INT width_dst, INT height_dst,
HDC hdc_src, INT x_src, INT y_src, INT width_src, INT height_src,
DWORD rop, COLORREF bk_color );
INT (WINAPI *pNtGdiStretchDIBitsInternal)( HDC hdc, INT x_dst, INT y_dst, INT width_dst,
INT height_dst, INT x_src, INT y_src, INT width_src,
INT height_src, const void *bits, const BITMAPINFO *bmi,
UINT coloruse, DWORD rop, UINT max_info, UINT max_bits,
HANDLE xform );
BOOL (WINAPI *pNtGdiStrokeAndFillPath)( HDC hdc );
BOOL (WINAPI *pNtGdiStrokePath)( HDC hdc );
BOOL (WINAPI *pNtGdiSwapBuffers)( HDC hdc );
BOOL (WINAPI *pNtGdiTransparentBlt)( HDC hdc, int x_dst, int y_dst, int width_dst, int height_dst,
HDC hdc_src, int x_src, int y_src, int width_src, int height_src,
UINT color );
BOOL (WINAPI *pNtGdiTransformPoints)( HDC hdc, const POINT *points_in, POINT *points_out,
INT count, UINT mode );
BOOL (WINAPI *pNtGdiUnrealizeObject)( HGDIOBJ obj );
BOOL (WINAPI *pNtGdiUpdateColors)( HDC hdc );
BOOL (WINAPI *pNtGdiWidenPath)( HDC hdc );
/* Wine-specific functions */
UINT (WINAPI *pGDIRealizePalette)( HDC hdc );
HPALETTE (WINAPI *pGDISelectPalette)( HDC hdc, HPALETTE hpal, WORD bkg );
DWORD_PTR (WINAPI *pGetDCHook)( HDC hdc, DCHOOKPROC *proc );
BOOL (WINAPI *pMirrorRgn)( HWND hwnd, HRGN hrgn );
BOOL (WINAPI *pSetDCHook)( HDC hdc, DCHOOKPROC proc, DWORD_PTR data );
INT (WINAPI *pSetDIBits)( HDC hdc, HBITMAP hbitmap, UINT startscan,
UINT lines, const void *bits, const BITMAPINFO *info,
UINT coloruse );
WORD (WINAPI *pSetHookFlags)( HDC hdc, WORD flags );
BOOL (CDECL *get_brush_bitmap_info)( HBRUSH handle, BITMAPINFO *info, void *bits, UINT *usage );
BOOL (CDECL *get_file_outline_text_metric)( const WCHAR *path, OUTLINETEXTMETRICW *otm );
BOOL (CDECL *get_icm_profile)( HDC hdc, BOOL allow_default, DWORD *size, WCHAR *filename );
const struct vulkan_funcs * (CDECL *get_vulkan_driver)( HDC hdc, UINT version );
struct opengl_funcs * (CDECL *get_wgl_driver)( HDC hdc, UINT version );
void (CDECL *make_gdi_object_system)( HGDIOBJ handle, BOOL set );
void (CDECL *set_display_driver)( void *proc );
void (CDECL *set_visible_region)( HDC hdc, HRGN hrgn, const RECT *vis_rect, const RECT *device_rect,
struct window_surface *surface );
};
UINT WINAPI GDIRealizePalette( HDC hdc );
HPALETTE WINAPI GDISelectPalette( HDC hdc, HPALETTE hpal, WORD wBkg );
extern BOOL CDECL get_brush_bitmap_info( HBRUSH handle, BITMAPINFO *info, void *bits,
UINT *usage ) DECLSPEC_HIDDEN;
extern BOOL CDECL get_icm_profile( HDC hdc, BOOL allow_default, DWORD *size,
WCHAR *filename ) DECLSPEC_HIDDEN;
extern BOOL CDECL get_file_outline_text_metric( const WCHAR *path, OUTLINETEXTMETRICW *otm );
BOOL wrappers_init(void) DECLSPEC_HIDDEN;
static inline WCHAR *win32u_wcsrchr( const WCHAR *str, WCHAR ch )
{
WCHAR *ret = NULL;
@ -128,4 +395,10 @@ static inline LONG win32u_wcstol( LPCWSTR s, LPWSTR *end, INT base )
#define wcsrchr(s,c) win32u_wcsrchr(s,c)
#define wcstol(s,e,b) win32u_wcstol(s,e,b)
#define HeapAlloc RtlAllocateHeap
#define HeapFree RtlFreeHeap
#define HeapReAlloc RtlReAllocateHeap
#define EnterCriticalSection RtlEnterCriticalSection
#define LeaveCriticalSection RtlLeaveCriticalSection
#endif /* __WINE_WIN32U_PRIVATE */

File diff suppressed because it is too large Load Diff

View File

@ -1757,9 +1757,9 @@ sub dump_arabic_shaping($)
################################################################
# dump the Vertical Orientation table
sub dump_vertical($)
sub dump_vertical($$)
{
my $filename = shift;
my ($filename, $unix) = @_;
my @vertical_table;
my $INPUT = open_data_file( $UNIDATA, "VerticalOrientation.txt" );
@ -1797,6 +1797,12 @@ sub dump_vertical($)
print OUTPUT "/* Unicode Vertical Orientation */\n";
print OUTPUT "/* generated from $UNIDATA:VerticalOrientation.txt */\n";
print OUTPUT "/* DO NOT EDIT!! */\n\n";
if ($unix)
{
print OUTPUT "#if 0\n";
print OUTPUT "#pragma makedep unix\n";
print OUTPUT "#endif\n\n";
}
print OUTPUT "#include \"windef.h\"\n\n";
dump_two_level_mapping( "vertical_orientation_table", $vertical_types{'R'}, 16, @vertical_table );
@ -2822,8 +2828,8 @@ dump_linebreak( "dlls/gdi32/uniscribe/linebreak.c" );
dump_linebreak( "dlls/dwrite/linebreak.c" );
dump_scripts( "dlls/dwrite/scripts" );
dump_indic( "dlls/gdi32/uniscribe/indicsyllable.c" );
dump_vertical( "dlls/gdi32/vertical.c" );
dump_vertical( "dlls/wineps.drv/vertical.c" );
dump_vertical( "dlls/gdi32/vertical.c", 1 );
dump_vertical( "dlls/wineps.drv/vertical.c", 0 );
dump_intl_nls("nls/l_intl.nls");
dump_norm_table( "nls/normnfc.nls" );
dump_norm_table( "nls/normnfd.nls" );