reactos/win32ss/gdi/ntgdi/device.c
Oleg Dubinskiy 31139c253f
[WIN32SS][NTDDRAW][NTGDI] Implement some DxEng* callbacks (#3638)
Implement the following DxEng* functions:
- DxEngAltLockSurface
- DxEngDeleteSurface
- DxEngReferenceHdev
- DxEngSelectBitmap
- DxEngSetBitmapOwner
- DxEngUnreferenceHdev

Update their prototypes and call the appropriate win32k functions
inside them, since they are already implemented. Also get rid of
now unused IntGdi(Un)ReferencePdev, whose were called only by dxeng,
and whose are not used anymore. In Windows, DxEng(Un)ReferenceHdev calls
PDEVOBJ_vReferencePDEV and PDEVOBJ_vDeferencePDEV directly (those
correspond to our PDEVOBJ_vReference and PDEVOBJ_vRelease accordingly).

Required by MS DirectDraw stack (ddraw.dll & dxg.sys). CORE-17561
2022-06-01 00:58:35 +03:00

59 lines
1.1 KiB
C

/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* PURPOSE: Functions for creation and destruction of DCs
* FILE: win32ss/gdi/ntgdi/device.c
* PROGRAMER: Timo Kreuzer (timo.kreuzer@rectos.org)
*/
#include <win32k.h>
#define NDEBUG
#include <debug.h>
PDC defaultDCstate = NULL;
BOOL FASTCALL
IntCreatePrimarySurface(VOID)
{
/* Create surface */
PDEVOBJ_pSurface(gpmdev->ppdevGlobal);
DPRINT("IntCreatePrimarySurface, ppdevGlobal=%p, ppdevGlobal->pSurface = %p\n",
gpmdev->ppdevGlobal, gpmdev->ppdevGlobal->pSurface);
// Init Primary Displays Device Capabilities.
PDEVOBJ_vGetDeviceCaps(gpmdev->ppdevGlobal, &GdiHandleTable->DevCaps);
return TRUE;
}
VOID FASTCALL
IntDestroyPrimarySurface(VOID)
{
UNIMPLEMENTED;
}
PPDEVOBJ FASTCALL
IntEnumHDev(VOID)
{
// I guess we will soon have more than one primary surface.
// This will do for now.
return gpmdev->ppdevGlobal;
}
INT
APIENTRY
NtGdiDrawEscape(
IN HDC hdc,
IN INT iEsc,
IN INT cjIn,
IN OPTIONAL LPSTR pjIn)
{
UNIMPLEMENTED;
return 0;
}