gdi32: Export the DC hook functions as 32-bit functions.
This commit is contained in:
parent
543909958f
commit
50dea38178
|
@ -163,22 +163,23 @@ INT WINAPI ExtSelectClipRgn( HDC hdc, HRGN hrgn, INT fnMode )
|
|||
}
|
||||
|
||||
/***********************************************************************
|
||||
* SelectVisRgn (GDI.105)
|
||||
* SelectVisRgn (GDI32.@)
|
||||
*
|
||||
* Note: not exported on Windows, only the 16-bit version is exported.
|
||||
*/
|
||||
INT16 WINAPI SelectVisRgn16( HDC16 hdc16, HRGN16 hrgn )
|
||||
INT WINAPI SelectVisRgn( HDC hdc, HRGN hrgn )
|
||||
{
|
||||
int retval;
|
||||
HDC hdc = HDC_32( hdc16 );
|
||||
DC * dc;
|
||||
|
||||
if (!hrgn) return ERROR;
|
||||
if (!(dc = get_dc_ptr( hdc ))) return ERROR;
|
||||
|
||||
TRACE("%p %04x\n", hdc, hrgn );
|
||||
TRACE("%p %p\n", hdc, hrgn );
|
||||
|
||||
dc->dirty = 0;
|
||||
|
||||
retval = CombineRgn( dc->hVisRgn, HRGN_32(hrgn), 0, RGN_COPY );
|
||||
retval = CombineRgn( dc->hVisRgn, hrgn, 0, RGN_COPY );
|
||||
CLIPPING_UpdateGCRegion( dc );
|
||||
release_dc_ptr( dc );
|
||||
return retval;
|
||||
|
|
|
@ -1395,6 +1395,24 @@ BOOL WINAPI SetDCHook( HDC hdc, DCHOOKPROC hookProc, DWORD_PTR dwHookData )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetDCHook (GDI32.@)
|
||||
*
|
||||
* Note: this doesn't exist in Win32, we add it here because user32 needs it.
|
||||
*/
|
||||
DWORD_PTR WINAPI GetDCHook( HDC hdc, DCHOOKPROC *proc )
|
||||
{
|
||||
DC *dc = get_dc_ptr( hdc );
|
||||
DWORD_PTR ret;
|
||||
|
||||
if (!dc) return 0;
|
||||
if (proc) *proc = dc->hookThunk;
|
||||
ret = dc->dwHookData;
|
||||
release_dc_ptr( dc );
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/* relay function to call the 16-bit DC hook proc */
|
||||
static BOOL WINAPI call_dc_hook16( HDC hdc, WORD code, DWORD_PTR data, LPARAM lParam )
|
||||
{
|
||||
|
@ -1454,11 +1472,12 @@ DWORD WINAPI GetDCHook16( HDC16 hdc16, FARPROC16 *phookProc )
|
|||
|
||||
|
||||
/***********************************************************************
|
||||
* SetHookFlags (GDI.192)
|
||||
* SetHookFlags (GDI32.@)
|
||||
*
|
||||
* Note: this doesn't exist in Win32, we add it here because user32 needs it.
|
||||
*/
|
||||
WORD WINAPI SetHookFlags16(HDC16 hdc16, WORD flags)
|
||||
WORD WINAPI SetHookFlags( HDC hdc, WORD flags )
|
||||
{
|
||||
HDC hdc = HDC_32( hdc16 );
|
||||
DC *dc = get_dc_obj( hdc ); /* not get_dc_ptr, this needs to work from any thread */
|
||||
LONG ret = 0;
|
||||
|
||||
|
|
|
@ -1346,6 +1346,15 @@ BOOL16 WINAPI PtVisible16( HDC16 hdc, INT16 x, INT16 y )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* SelectVisRgn (GDI.105)
|
||||
*/
|
||||
INT16 WINAPI SelectVisRgn16( HDC16 hdc, HRGN16 hrgn )
|
||||
{
|
||||
return SelectVisRgn( HDC_32(hdc), HRGN_32(hrgn) );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* SetBitmapBits (GDI.106)
|
||||
*/
|
||||
|
@ -1566,6 +1575,15 @@ void WINAPI PlayMetaFileRecord16( HDC16 hdc, HANDLETABLE16 *ht, METARECORD *mr,
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* SetHookFlags (GDI.192)
|
||||
*/
|
||||
WORD WINAPI SetHookFlags16( HDC16 hdc, WORD flags )
|
||||
{
|
||||
return SetHookFlags( HDC_32(hdc), flags );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* SetBoundsRect (GDI.193)
|
||||
*/
|
||||
|
|
|
@ -515,10 +515,11 @@
|
|||
@ stdcall CloseJob16(long)
|
||||
@ stdcall DrvGetPrinterData16(str str ptr ptr long ptr)
|
||||
@ stdcall DrvSetPrinterData16(str str long ptr long)
|
||||
@ stdcall GetDCHook(long ptr)
|
||||
@ stdcall OpenJob16(str str long)
|
||||
@ stdcall SelectVisRgn16(long long)
|
||||
@ stdcall SelectVisRgn(long long)
|
||||
@ stdcall SetDCHook(long ptr long)
|
||||
@ stdcall SetHookFlags16(long long)
|
||||
@ stdcall SetHookFlags(long long)
|
||||
@ stdcall WriteSpool16(long ptr long)
|
||||
|
||||
################################################################
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winerror.h"
|
||||
#include "wownt32.h"
|
||||
#include "winreg.h"
|
||||
#include "psdrv.h"
|
||||
#include "winspool.h"
|
||||
|
@ -406,7 +405,7 @@ HDC PSDRV_ResetDC( PSDRV_PDEVICE *physDev, const DEVMODEW *lpInitData )
|
|||
HeapFree(PSDRV_Heap, 0, devmodeA);
|
||||
PSDRV_UpdateDevCaps(physDev);
|
||||
hrgn = CreateRectRgn(0, 0, physDev->horzRes, physDev->vertRes);
|
||||
SelectVisRgn16(HDC_16(physDev->hdc), HRGN_16(hrgn));
|
||||
SelectVisRgn( physDev->hdc, hrgn );
|
||||
DeleteObject(hrgn);
|
||||
}
|
||||
return physDev->hdc;
|
||||
|
|
|
@ -27,10 +27,7 @@
|
|||
#include "win.h"
|
||||
#include "windef.h"
|
||||
#include "wingdi.h"
|
||||
#include "wownt32.h"
|
||||
#include "x11drv.h"
|
||||
#include "wine/winbase16.h"
|
||||
#include "wine/wingdi16.h"
|
||||
#include "wine/server.h"
|
||||
#include "wine/list.h"
|
||||
#include "wine/debug.h"
|
||||
|
@ -170,7 +167,7 @@ static void update_visible_region( struct dce *dce )
|
|||
OffsetRgn( vis_rgn,
|
||||
-(escape.drawable_rect.left + escape.dc_rect.left),
|
||||
-(escape.drawable_rect.top + escape.dc_rect.top) );
|
||||
SelectVisRgn16( HDC_16(dce->hdc), HRGN_16(vis_rgn) );
|
||||
SelectVisRgn( dce->hdc, vis_rgn );
|
||||
DeleteObject( vis_rgn );
|
||||
}
|
||||
|
||||
|
@ -214,7 +211,7 @@ static void delete_clip_rgn( struct dce *dce )
|
|||
dce->clip_rgn = 0;
|
||||
|
||||
/* make it dirty so that the vis rgn gets recomputed next time */
|
||||
SetHookFlags16( HDC_16(dce->hdc), DCHF_INVALIDATEVISRGN );
|
||||
SetHookFlags( dce->hdc, DCHF_INVALIDATEVISRGN );
|
||||
}
|
||||
|
||||
|
||||
|
@ -317,7 +314,7 @@ void alloc_window_dce( struct x11drv_win_data *data )
|
|||
if (win_style & WS_CLIPCHILDREN) dce->flags |= DCX_CLIPCHILDREN;
|
||||
if (win_style & WS_CLIPSIBLINGS) dce->flags |= DCX_CLIPSIBLINGS;
|
||||
}
|
||||
SetHookFlags16( HDC_16(dce->hdc), DCHF_INVALIDATEVISRGN );
|
||||
SetHookFlags( dce->hdc, DCHF_INVALIDATEVISRGN );
|
||||
|
||||
EnterCriticalSection( &dce_section );
|
||||
list_add_tail( &dce_list, &dce->entry );
|
||||
|
@ -427,7 +424,7 @@ void invalidate_dce( HWND hwnd, const RECT *rect )
|
|||
/* Set dirty bits in the hDC and DCE structs */
|
||||
|
||||
TRACE("\tfixed up %p dce [%p]\n", dce, dce->hwnd);
|
||||
SetHookFlags16( HDC_16(dce->hdc), DCHF_INVALIDATEVISRGN );
|
||||
SetHookFlags( dce->hdc, DCHF_INVALIDATEVISRGN );
|
||||
}
|
||||
}
|
||||
} /* dce list */
|
||||
|
@ -561,7 +558,7 @@ HDC X11DRV_GetDCEx( HWND hwnd, HRGN hrgnClip, DWORD flags )
|
|||
dce->hwnd = hwnd;
|
||||
dce->flags = (dce->flags & ~clip_flags) | (flags & clip_flags);
|
||||
|
||||
if (SetHookFlags16( HDC_16(dce->hdc), DCHF_VALIDATEVISRGN ))
|
||||
if (SetHookFlags( dce->hdc, DCHF_VALIDATEVISRGN ))
|
||||
bUpdateVisRgn = TRUE; /* DC was dirty */
|
||||
|
||||
if (bUpdateVisRgn) update_visible_region( dce );
|
||||
|
|
|
@ -269,7 +269,6 @@ typedef struct
|
|||
FONTSIGNATURE ntmFontSig;
|
||||
} NEWTEXTMETRICEX16,*LPNEWTEXTMETRICEX16;
|
||||
|
||||
typedef BOOL (CALLBACK *DCHOOKPROC)(HDC,WORD,DWORD_PTR,LPARAM);
|
||||
typedef INT16 (CALLBACK *FONTENUMPROC16)(SEGPTR,SEGPTR,UINT16,LPARAM);
|
||||
typedef VOID (CALLBACK *LINEDDAPROC16)(INT16,INT16,LPARAM);
|
||||
typedef INT16 (CALLBACK *GOBJENUMPROC16)(SEGPTR,LPARAM);
|
||||
|
@ -343,13 +342,6 @@ struct PATH_INFO {
|
|||
DWORD BkColor;
|
||||
};
|
||||
|
||||
/* DC hook codes */
|
||||
#define DCHC_INVALIDVISRGN 0x0001
|
||||
#define DCHC_DELETEDC 0x0002
|
||||
|
||||
#define DCHF_INVALIDATEVISRGN 0x0001
|
||||
#define DCHF_VALIDATEVISRGN 0x0002
|
||||
|
||||
/* RenderMode */
|
||||
#define RENDERMODE_NO_DISPLAY 0
|
||||
#define RENDERMODE_OPEN 1
|
||||
|
@ -577,7 +569,6 @@ COLORREF WINAPI SetBkColor16(HDC16,COLORREF);
|
|||
INT16 WINAPI SetBkMode16(HDC16,INT16);
|
||||
UINT16 WINAPI SetBoundsRect16(HDC16,const RECT16*,UINT16);
|
||||
DWORD WINAPI SetBrushOrg16(HDC16,INT16,INT16);
|
||||
BOOL WINAPI SetDCHook(HDC,DCHOOKPROC,DWORD_PTR);
|
||||
BOOL16 WINAPI SetDCHook16(HDC16,FARPROC16,DWORD);
|
||||
DWORD WINAPI SetDCOrg16(HDC16,INT16,INT16);
|
||||
VOID WINAPI SetDCState16(HDC16,HDC16);
|
||||
|
|
|
@ -3725,6 +3725,22 @@ WINGDIAPI BOOL WINAPI wglSwapLayerBuffers(HDC,UINT);
|
|||
WINGDIAPI BOOL WINAPI wglUseFontBitmaps(HDC,DWORD,DWORD,DWORD);
|
||||
WINGDIAPI BOOL WINAPI wglUseFontOutlines(HDC,DWORD,DWORD,DWORD,FLOAT,FLOAT,INT,LPGLYPHMETRICSFLOAT);
|
||||
|
||||
#ifdef __WINESRC__
|
||||
/* the DC hook support is only exported on Win16, the 32-bit version is a Wine extension */
|
||||
|
||||
#define DCHC_INVALIDVISRGN 0x0001
|
||||
#define DCHC_DELETEDC 0x0002
|
||||
#define DCHF_INVALIDATEVISRGN 0x0001
|
||||
#define DCHF_VALIDATEVISRGN 0x0002
|
||||
|
||||
typedef BOOL (CALLBACK *DCHOOKPROC)(HDC,WORD,DWORD_PTR,LPARAM);
|
||||
|
||||
WINGDIAPI DWORD_PTR WINAPI GetDCHook(HDC,DCHOOKPROC*);
|
||||
WINGDIAPI BOOL WINAPI SetDCHook(HDC,DCHOOKPROC,DWORD_PTR);
|
||||
WINGDIAPI WORD WINAPI SetHookFlags(HDC,WORD);
|
||||
WINGDIAPI INT WINAPI SelectVisRgn(HDC,HRGN);
|
||||
#endif /* __WINESRC__ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue