Commit 6857cb56 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

gdi32: Move ntgdi functions to Unix library.

parent ca7998fa
......@@ -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>
......
......@@ -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>
......
......@@ -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;
......
......@@ -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"
......
......@@ -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;
......
......@@ -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>
......
......@@ -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"
......
......@@ -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" );
......
......@@ -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;
......@@ -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"
......
......@@ -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>
......
......@@ -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 */
......@@ -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"
......
......@@ -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" );
......
......@@ -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;
......
......@@ -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();
......
......@@ -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 );
}
......@@ -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 )
{
......
......@@ -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;
}
......@@ -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"
......
......@@ -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;
......
......@@ -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;
......@@ -130,6 +133,21 @@ HGDIOBJ get_full_gdi_handle( HGDIOBJ obj )
}
/***********************************************************************
* 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.@)
*/
DWORD WINAPI GetObjectType( HGDIOBJ handle )
......
......@@ -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>
......
......@@ -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>
......
......@@ -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>
......
......@@ -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>
......
......@@ -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"
......
......@@ -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>
......
......@@ -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] =
......
......@@ -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"
/***********************************************************************
......
......@@ -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" );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment