ReactOS 0.4.16-dev-329-g9223134
ddrawgdi.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DdCreateDirectDrawObject   GdiEntry1
 
#define DdQueryDirectDrawObject   GdiEntry2
 
#define DdDeleteDirectDrawObject   GdiEntry3
 
#define DdCreateSurfaceObject   GdiEntry4
 
#define DdDeleteSurfaceObject   GdiEntry5
 
#define DdResetVisrgn   GdiEntry6
 
#define DdGetDC   GdiEntry7
 
#define DdReleaseDC   GdiEntry8
 
#define DdCreateDIBSection   GdiEntry9
 
#define DdReenableDirectDrawObject   GdiEntry10
 
#define DdAttachSurface   GdiEntry11
 
#define DdUnattachSurface   GdiEntry12
 
#define DdQueryDisplaySettingsUniqueness   GdiEntry13
 
#define DdGetDxHandle   GdiEntry14
 
#define DdSetGammaRamp   GdiEntry15
 
#define DdSwapTextureHandles   GdiEntry16
 
#define D3DHAL_CALLBACKS_DEFINED
 
#define D3DHAL_GLOBALDRIVERDATA_DEFINED
 

Typedefs

typedef struct _D3DHAL_CALLBACKS FARLPD3DHAL_CALLBACKS
 
typedef struct _D3DHAL_GLOBALDRIVERDATA FARLPD3DHAL_GLOBALDRIVERDATA
 

Functions

BOOL WINAPI DdCreateDirectDrawObject (LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal, HDC hdc)
 
BOOL WINAPI DdQueryDirectDrawObject (LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal, LPDDHALINFO pHalInfo, LPDDHAL_DDCALLBACKS pDDCallbacks, LPDDHAL_DDSURFACECALLBACKS pDDSurfaceCallbacks, LPDDHAL_DDPALETTECALLBACKS pDDPaletteCallbacks, LPD3DHAL_CALLBACKS pD3dCallbacks, LPD3DHAL_GLOBALDRIVERDATA pD3dDriverData, LPDDHAL_DDEXEBUFCALLBACKS pD3dBufferCallbacks, LPDDSURFACEDESC pD3dTextureFormats, LPDWORD pdwFourCC, LPVIDMEM pvmList)
 
BOOL WINAPI DdDeleteDirectDrawObject (LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal)
 
BOOL WINAPI DdCreateSurfaceObject (LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal, BOOL bPrimarySurface)
 
BOOL WINAPI DdDeleteSurfaceObject (LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal)
 
BOOL WINAPI DdResetVisrgn (LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal, HWND hWnd)
 
HDC WINAPI DdGetDC (LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal, LPPALETTEENTRY pColorTable)
 
BOOL WINAPI DdReleaseDC (LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal)
 
HBITMAP WINAPI DdCreateDIBSection (HDC hdc, CONST BITMAPINFO *pbmi, UINT iUsage, VOID **ppvBits, HANDLE hSectionApp, DWORD dwOffset)
 
BOOL WINAPI DdReenableDirectDrawObject (LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal, BOOL *pbNewMode)
 
BOOL WINAPI DdAttachSurface (LPDDRAWI_DDRAWSURFACE_LCL pSurfaceFrom, LPDDRAWI_DDRAWSURFACE_LCL pSurfaceTo)
 
VOID WINAPI DdUnattachSurface (LPDDRAWI_DDRAWSURFACE_LCL pSurface, LPDDRAWI_DDRAWSURFACE_LCL pSurfaceAttached)
 
ULONG WINAPI DdQueryDisplaySettingsUniqueness (VOID)
 
HANDLE WINAPI DdGetDxHandle (LPDDRAWI_DIRECTDRAW_LCL pDDraw, LPDDRAWI_DDRAWSURFACE_LCL pSurface, BOOL bRelease)
 
BOOL WINAPI DdSetGammaRamp (LPDDRAWI_DIRECTDRAW_LCL pDDraw, HDC hdc, LPVOID lpGammaRamp)
 
DWORD WINAPI DdSwapTextureHandles (LPDDRAWI_DIRECTDRAW_LCL pDDraw, LPDDRAWI_DDRAWSURFACE_LCL pDDSLcl1, LPDDRAWI_DDRAWSURFACE_LCL pDDSLcl2)
 

Macro Definition Documentation

◆ D3DHAL_CALLBACKS_DEFINED

#define D3DHAL_CALLBACKS_DEFINED

Definition at line 43 of file ddrawgdi.h.

◆ D3DHAL_GLOBALDRIVERDATA_DEFINED

#define D3DHAL_GLOBALDRIVERDATA_DEFINED

Definition at line 48 of file ddrawgdi.h.

◆ DdAttachSurface

#define DdAttachSurface   GdiEntry11

Definition at line 34 of file ddrawgdi.h.

◆ DdCreateDIBSection

#define DdCreateDIBSection   GdiEntry9

Definition at line 32 of file ddrawgdi.h.

◆ DdCreateDirectDrawObject

#define DdCreateDirectDrawObject   GdiEntry1

Definition at line 24 of file ddrawgdi.h.

◆ DdCreateSurfaceObject

#define DdCreateSurfaceObject   GdiEntry4

Definition at line 27 of file ddrawgdi.h.

◆ DdDeleteDirectDrawObject

#define DdDeleteDirectDrawObject   GdiEntry3

Definition at line 26 of file ddrawgdi.h.

◆ DdDeleteSurfaceObject

#define DdDeleteSurfaceObject   GdiEntry5

Definition at line 28 of file ddrawgdi.h.

◆ DdGetDC

#define DdGetDC   GdiEntry7

Definition at line 30 of file ddrawgdi.h.

◆ DdGetDxHandle

#define DdGetDxHandle   GdiEntry14

Definition at line 37 of file ddrawgdi.h.

◆ DdQueryDirectDrawObject

#define DdQueryDirectDrawObject   GdiEntry2

Definition at line 25 of file ddrawgdi.h.

◆ DdQueryDisplaySettingsUniqueness

#define DdQueryDisplaySettingsUniqueness   GdiEntry13

Definition at line 36 of file ddrawgdi.h.

◆ DdReenableDirectDrawObject

#define DdReenableDirectDrawObject   GdiEntry10

Definition at line 33 of file ddrawgdi.h.

◆ DdReleaseDC

#define DdReleaseDC   GdiEntry8

Definition at line 31 of file ddrawgdi.h.

◆ DdResetVisrgn

#define DdResetVisrgn   GdiEntry6

Definition at line 29 of file ddrawgdi.h.

◆ DdSetGammaRamp

#define DdSetGammaRamp   GdiEntry15

Definition at line 38 of file ddrawgdi.h.

◆ DdSwapTextureHandles

#define DdSwapTextureHandles   GdiEntry16

Definition at line 39 of file ddrawgdi.h.

◆ DdUnattachSurface

#define DdUnattachSurface   GdiEntry12

Definition at line 35 of file ddrawgdi.h.

Typedef Documentation

◆ LPD3DHAL_CALLBACKS

Definition at line 42 of file ddrawgdi.h.

◆ LPD3DHAL_GLOBALDRIVERDATA

Function Documentation

◆ DdAttachSurface()

BOOL WINAPI DdAttachSurface ( LPDDRAWI_DDRAWSURFACE_LCL  pSurfaceFrom,
LPDDRAWI_DDRAWSURFACE_LCL  pSurfaceTo 
)

Definition at line 1983 of file gdientry.c.

1985{
1986 /* Create Surface if it does not exits one */
1987 if (!pSurfaceFrom->hDDSurface)
1988 {
1989 if (!bDDCreateSurface(pSurfaceFrom, FALSE))
1990 {
1991 return FALSE;
1992 }
1993 }
1994
1995 /* Create Surface if it does not exits one */
1996 if (!pSurfaceTo->hDDSurface)
1997 {
1999 {
2000 return FALSE;
2001 }
2002 }
2003
2004 /* Call win32k */
2005 return NtGdiDdAttachSurface((HANDLE)pSurfaceFrom->hDDSurface,
2006 (HANDLE)pSurfaceTo->hDDSurface);
2007}
#define FALSE
Definition: types.h:117
BOOL WINAPI bDDCreateSurface(LPDDRAWI_DDRAWSURFACE_LCL pSurface, BOOL bComplete)
Definition: gdientry.c:1392
LPDDRAWI_DDRAWSURFACE_LCL pSurfaceTo
Definition: main.h:121
__kernel_entry W32KAPI BOOL APIENTRY NtGdiDdAttachSurface(_In_ HANDLE hSurfaceFrom, _In_ HANDLE hSurfaceTo)

◆ DdCreateDIBSection()

HBITMAP WINAPI DdCreateDIBSection ( HDC  hdc,
CONST BITMAPINFO pbmi,
UINT  iUsage,
VOID **  ppvBits,
HANDLE  hSectionApp,
DWORD  dwOffset 
)

Definition at line 1949 of file gdientry.c.

1955{
1957 return 0;
1958}
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:102
#define SetLastError(x)
Definition: compat.h:752

◆ DdCreateDirectDrawObject()

BOOL WINAPI DdCreateDirectDrawObject ( LPDDRAWI_DIRECTDRAW_GBL  pDirectDrawGlobal,
HDC  hdc 
)

Definition at line 1455 of file gdientry.c.

1457{
1458 BOOL Return = FALSE;
1459
1460 /* Check if the global hDC (hdc == 0) is being used */
1461 if (!hdc)
1462 {
1463 /* We'll only allow this if the global object doesn't exist yet */
1464 if (!ghDirectDraw)
1465 {
1466 /* Create the DC */
1467 if ((hdc = CreateDCW(L"Display", NULL, NULL, NULL)))
1468 {
1469 /* Create the DDraw Object */
1471
1472 /* Delete our DC */
1473 DeleteDC(hdc);
1474 }
1475 }
1476
1477 /* If we created the object, or had one ...*/
1478 if (ghDirectDraw)
1479 {
1480 /* Increase count and set success */
1481 gcDirectDraw++;
1482 Return = TRUE;
1483 }
1484
1485 /* Zero the handle */
1486 pDirectDrawGlobal->hDD = 0;
1487 }
1488 else
1489 {
1490 /* Using the per-process object, so create it */
1491 pDirectDrawGlobal->hDD = (ULONG_PTR)NtGdiDdCreateDirectDrawObject(hdc);
1492
1493 /* Set the return value */
1494 Return = pDirectDrawGlobal->hDD ? TRUE : FALSE;
1495 }
1496
1497 /* Return to caller */
1498 return Return;
1499}
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define ULONG_PTR
Definition: config.h:101
unsigned int BOOL
Definition: ntddk_ex.h:94
ULONG gcDirectDraw
Definition: gdientry.c:20
HANDLE ghDirectDraw
Definition: gdientry.c:19
HDC hdc
Definition: main.c:9
__kernel_entry W32KAPI HANDLE APIENTRY NtGdiDdCreateDirectDrawObject(_In_ HDC hdc)
#define L(x)
Definition: ntvdm.h:50
BOOL WINAPI DeleteDC(_In_ HDC)
HDC WINAPI CreateDCW(_In_opt_ LPCWSTR pszDriver, _In_opt_ LPCWSTR pszDevice, _In_opt_ LPCWSTR psz, _In_opt_ const DEVMODEW *pdmInit)

◆ DdCreateSurfaceObject()

BOOL WINAPI DdCreateSurfaceObject ( LPDDRAWI_DDRAWSURFACE_LCL  pSurfaceLocal,
BOOL  bPrimarySurface 
)

Definition at line 1873 of file gdientry.c.

1875{
1876 return bDDCreateSurface(pSurfaceLocal, TRUE);
1877}

◆ DdDeleteDirectDrawObject()

BOOL WINAPI DdDeleteDirectDrawObject ( LPDDRAWI_DIRECTDRAW_GBL  pDirectDrawGlobal)

Definition at line 1831 of file gdientry.c.

1832{
1833 BOOL Return = FALSE;
1834
1835 /* If this is the global object */
1836 if(pDirectDrawGlobal->hDD)
1837 {
1838 /* Free it */
1839 Return = NtGdiDdDeleteDirectDrawObject((HANDLE)pDirectDrawGlobal->hDD);
1840 if (Return)
1841 {
1842 pDirectDrawGlobal->hDD = 0;
1843 }
1844 }
1845 else if (ghDirectDraw)
1846 {
1847 /* Always success here */
1848 Return = TRUE;
1849
1850 /* Make sure this is the last instance */
1851 if (!(--gcDirectDraw))
1852 {
1853 /* Delete the object */
1855 if (Return)
1856 {
1857 ghDirectDraw = 0;
1858 }
1859 }
1860 }
1861
1862 /* Return */
1863 return Return;
1864}
__kernel_entry W32KAPI BOOL APIENTRY NtGdiDdDeleteDirectDrawObject(_In_ HANDLE hDirectDrawLocal)

◆ DdDeleteSurfaceObject()

BOOL WINAPI DdDeleteSurfaceObject ( LPDDRAWI_DDRAWSURFACE_LCL  pSurfaceLocal)

Definition at line 1887 of file gdientry.c.

1888{
1889 BOOL Return = FALSE;
1890
1891 /* Make sure there is one */
1892 if (pSurfaceLocal->hDDSurface)
1893 {
1894 /* Delete it */
1895 Return = NtGdiDdDeleteSurfaceObject((HANDLE)pSurfaceLocal->hDDSurface);
1896 pSurfaceLocal->hDDSurface = 0;
1897 }
1898
1899 return Return;
1900}
__kernel_entry W32KAPI BOOL APIENTRY NtGdiDdDeleteSurfaceObject(_In_ HANDLE hSurface)

◆ DdGetDC()

HDC WINAPI DdGetDC ( LPDDRAWI_DDRAWSURFACE_LCL  pSurfaceLocal,
LPPALETTEENTRY  pColorTable 
)

Definition at line 1923 of file gdientry.c.

1925{
1926 /* Call win32k directly */
1927 return NtGdiDdGetDC((HANDLE)pSurfaceLocal->hDDSurface, pColorTable);
1928}
__kernel_entry W32KAPI HDC APIENTRY NtGdiDdGetDC(_In_ HANDLE hSurface, _In_ PALETTEENTRY *puColorTable)

◆ DdGetDxHandle()

HANDLE WINAPI DdGetDxHandle ( LPDDRAWI_DIRECTDRAW_LCL  pDDraw,
LPDDRAWI_DDRAWSURFACE_LCL  pSurface,
BOOL  bRelease 
)

Definition at line 2043 of file gdientry.c.

2046{
2047 HANDLE hDD = NULL;
2048 HANDLE hSurface = NULL;
2049
2050 /* Check if we already have a surface */
2051 if (!pSurface)
2052 {
2053 /* We don't have one, use the DirectDraw Object handle instead */
2054 hDD = GetDdHandle(pDDraw->lpGbl->hDD);
2055 }
2056 else
2057 {
2058 hSurface = (HANDLE)pSurface->hDDSurface;
2059 }
2060
2061 /* Call the API */
2062 return (HANDLE)NtGdiDdGetDxHandle(hDD, hSurface, bRelease);
2063}
#define GetDdHandle(Handle)
Definition: gdientry.c:22
__kernel_entry W32KAPI HANDLE APIENTRY NtGdiDdGetDxHandle(_In_opt_ HANDLE hDirectDraw, _In_opt_ HANDLE hSurface, _In_ BOOL bRelease)
PVOID HANDLE
Definition: typedefs.h:73
_In_ DD_SURFACE_LOCAL * pSurface
Definition: winddi.h:3481

◆ DdQueryDirectDrawObject()

BOOL WINAPI DdQueryDirectDrawObject ( LPDDRAWI_DIRECTDRAW_GBL  pDirectDrawGlobal,
LPDDHALINFO  pHalInfo,
LPDDHAL_DDCALLBACKS  pDDCallbacks,
LPDDHAL_DDSURFACECALLBACKS  pDDSurfaceCallbacks,
LPDDHAL_DDPALETTECALLBACKS  pDDPaletteCallbacks,
LPD3DHAL_CALLBACKS  pD3dCallbacks,
LPD3DHAL_GLOBALDRIVERDATA  pD3dDriverData,
LPDDHAL_DDEXEBUFCALLBACKS  pD3dBufferCallbacks,
LPDDSURFACEDESC  pD3dTextureFormats,
LPDWORD  pdwFourCC,
LPVIDMEM  pvmList 
)

Definition at line 1508 of file gdientry.c.

1519{
1520 PVIDEOMEMORY VidMemList = NULL;
1521 DD_HALINFO HalInfo;
1522 D3DNTHAL_CALLBACKS D3dCallbacks;
1523 D3DNTHAL_GLOBALDRIVERDATA D3dDriverData;
1524 DD_D3DBUFCALLBACKS D3dBufferCallbacks;
1525 DWORD CallbackFlags[3];
1526 DWORD dwNumHeaps=0, FourCCs=0;
1527 DWORD Flags;
1528 BOOL retVal = TRUE;
1529
1530 /* Clear the structures */
1531 RtlZeroMemory(&HalInfo, sizeof(DD_HALINFO));
1532 RtlZeroMemory(&D3dCallbacks, sizeof(D3DNTHAL_CALLBACKS));
1533 RtlZeroMemory(&D3dDriverData, sizeof(D3DNTHAL_GLOBALDRIVERDATA));
1534 RtlZeroMemory(&D3dBufferCallbacks, sizeof(DD_D3DBUFCALLBACKS));
1535 RtlZeroMemory(CallbackFlags, sizeof(DWORD)*3);
1536
1537 /* Note : XP always alloc 24*sizeof(VIDEOMEMORY) of pvmlist so we change it to it */
1538 if ( (pvmList != NULL) &&
1539 (pHalInfo->vmiData.dwNumHeaps != 0) )
1540 {
1541 VidMemList = (PVIDEOMEMORY) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (sizeof(VIDEOMEMORY) * 24 ) * pHalInfo->vmiData.dwNumHeaps);
1542 }
1543
1544
1545 /* Do the query */
1546 if (!NtGdiDdQueryDirectDrawObject(GetDdHandle(pDirectDrawGlobal->hDD),
1547 &HalInfo,
1548 CallbackFlags,
1549 &D3dCallbacks,
1550 &D3dDriverData,
1551 &D3dBufferCallbacks,
1553 &dwNumHeaps,
1554 VidMemList,
1555 &FourCCs,
1556 pdwFourCC))
1557 {
1558 /* We failed, free the memory and return */
1559 retVal = FALSE;
1560 goto cleanup;
1561 }
1562
1563 /* Clear the incoming pointer */
1565
1566 /* Convert all the data */
1567 pHalInfo->dwSize = sizeof(DDHALINFO);
1568 pHalInfo->lpDDCallbacks = pDDCallbacks;
1571
1572 /* Check for NT5+ D3D Data */
1573 if ( (D3dCallbacks.dwSize != 0) &&
1574 (D3dDriverData.dwSize != 0) )
1575 {
1576 /* Write these down */
1579
1580 /* Check for Buffer Callbacks */
1581 if (D3dBufferCallbacks.dwSize)
1582 {
1583 /* Write this one too */
1585 }
1586 }
1587
1588 /* Continue converting the rest */
1590 pHalInfo->vmiData.dwDisplayWidth = HalInfo.vmiData.dwDisplayWidth;
1591 pHalInfo->vmiData.dwDisplayHeight = HalInfo.vmiData.dwDisplayHeight;
1592 pHalInfo->vmiData.lDisplayPitch = HalInfo.vmiData.lDisplayPitch;
1593 pHalInfo->vmiData.fpPrimary = 0;
1594
1595 RtlCopyMemory( &pHalInfo->vmiData.ddpfDisplay,
1596 &HalInfo.vmiData.ddpfDisplay,
1597 sizeof(DDPIXELFORMAT));
1598
1599 pHalInfo->vmiData.dwOffscreenAlign = HalInfo.vmiData.dwOffscreenAlign;
1600 pHalInfo->vmiData.dwOverlayAlign = HalInfo.vmiData.dwOverlayAlign;
1601 pHalInfo->vmiData.dwTextureAlign = HalInfo.vmiData.dwTextureAlign;
1602 pHalInfo->vmiData.dwZBufferAlign = HalInfo.vmiData.dwZBufferAlign;
1603 pHalInfo->vmiData.dwAlphaAlign = HalInfo.vmiData.dwAlphaAlign;
1604
1605 pHalInfo->vmiData.dwNumHeaps = dwNumHeaps;
1606 pHalInfo->vmiData.pvmList = pvmList;
1607
1608 RtlCopyMemory( &pHalInfo->ddCaps,
1609 &HalInfo.ddCaps,
1610 sizeof(DDCORECAPS ));
1611
1612 pHalInfo->ddCaps.dwNumFourCCCodes = FourCCs;
1613 pHalInfo->lpdwFourCC = pdwFourCC;
1614
1615 /* always force rope 0x1000 for hal it mean only source copy is supported */
1616 pHalInfo->ddCaps.dwRops[6] = 0x1000;
1617
1618 /* Set the HAL flags what ReactX got from the driver
1619 * Windows XP force setting DDHALINFO_GETDRIVERINFOSET if the driver does not set it
1620 * and ReactX doing same to keep compatible with drivers, but the driver are
1621 * force support DdGetDriverInfo acoriding MSDN but it seam some driver do not set
1622 * this flag even it is being supported. that is mean. It is small hack to keep
1623 * bad driver working, that trust this is always being setting by it self at end
1624 */
1625 pHalInfo->dwFlags = (HalInfo.dwFlags & ~DDHALINFO_GETDRIVERINFOSET) | DDHALINFO_GETDRIVERINFOSET;
1627
1628 /* Now check if we got any DD callbacks */
1629 if (pDDCallbacks)
1630 {
1631 /* Zero the structure */
1634
1635 /* Set the flags for this structure
1636 * Windows XP force setting DDHAL_CB32_CREATESURFACE if the driver does not set it
1637 * and ReactX doing same to keep compatible with drivers, but the driver are
1638 * force support pDDCallbacks acoriding MSDN but it seam some driver do not set
1639 * this flag even it is being supported. that is mean. It is small hack to keep
1640 * bad driver working, that trust this is always being setting by it self at end
1641 */
1642 Flags = (CallbackFlags[0] & ~DDHAL_CB32_CREATESURFACE) | DDHAL_CB32_CREATESURFACE;
1644
1645 /* Write the always-on functions */
1646 pDDCallbacks->CreateSurface = DdCreateSurface;
1647
1648 /* Now write the pointers, if applicable */
1650 {
1651 pDDCallbacks->WaitForVerticalBlank = DdWaitForVerticalBlank;
1652 }
1654 {
1655 pDDCallbacks->CanCreateSurface = DdCanCreateSurface;
1656 }
1658 {
1659 pDDCallbacks->GetScanLine = DdGetScanLine;
1660 }
1661 }
1662
1663 /* Check for DD Surface Callbacks */
1665 {
1666 /* Zero the structures */
1669
1670 /* Set the flags for this structure
1671 * Windows XP force setting DDHAL_SURFCB32_LOCK, DDHAL_SURFCB32_UNLOCK,
1672 * DDHAL_SURFCB32_SETCOLORKEY, DDHAL_SURFCB32_DESTROYSURFACE if the driver
1673 * does not set it and ReactX doing same to keep compatible with drivers,
1674 * but the driver are force support pDDSurfaceCallbacks acoriding MSDN but it seam
1675 * some driver do not set this flag even it is being supported. that is mean.
1676 * It is small hack to keep bad driver working, that trust this is always being
1677 * setting by it self at end
1678 */
1679
1680 Flags = (CallbackFlags[1] & ~(DDHAL_SURFCB32_LOCK | DDHAL_SURFCB32_UNLOCK |
1684
1686
1687 /* Write the always-on functions */
1689 pDDSurfaceCallbacks->Unlock = DdUnlock;
1690 pDDSurfaceCallbacks->SetColorKey = DdSetColorKey;
1691 pDDSurfaceCallbacks->DestroySurface = DdDestroySurface;
1692
1693 /* Write the optional ones */
1695 {
1697 }
1699 {
1701 }
1703 {
1704 pDDSurfaceCallbacks->GetBltStatus = DdGetBltStatus;
1705 }
1707 {
1708 pDDSurfaceCallbacks->GetFlipStatus = DdGetFlipStatus;
1709 }
1711 {
1712 pDDSurfaceCallbacks->UpdateOverlay = DdUpdateOverlay;
1713 }
1715 {
1716 pDDSurfaceCallbacks->SetOverlayPosition = DdSetOverlayPosition;
1717 }
1719 {
1720 pDDSurfaceCallbacks->AddAttachedSurface = DdAddAttachedSurface;
1721 }
1722 }
1723
1724 /* Check for DD Palette Callbacks, This interface are dead for user mode,
1725 * only what it can support are being report back.
1726 */
1728 {
1729 /* Zero the struct */
1731
1732 /* Write the header */
1734 pDDPaletteCallbacks->dwFlags = CallbackFlags[2];
1735 }
1736
1737 if (pD3dCallbacks)
1738 {
1739 /* Zero the struct */
1741
1742 /* Check if we have one */
1743 if (D3dCallbacks.dwSize)
1744 {
1745 /* Write the header */
1747
1748 /* Now check for each callback */
1749 if (D3dCallbacks.ContextCreate)
1750 {
1752 }
1753 if (D3dCallbacks.ContextDestroy)
1754 {
1756 }
1757 if (D3dCallbacks.ContextDestroyAll)
1758 {
1760 }
1761 }
1762 }
1763
1764 /* Check for D3D Driver Data */
1765 if (pD3dDriverData)
1766 {
1767 /* Copy the struct */
1768 RtlMoveMemory(pD3dDriverData, &D3dDriverData, sizeof(D3DHAL_GLOBALDRIVERDATA));
1769
1770 /* Write the pointer to the texture formats */
1771 pD3dDriverData->lpTextureFormats = pD3dTextureFormats;
1772 }
1773
1774 /* Check for D3D Buffer Callbacks */
1776 {
1777 /* Zero the struct */
1779
1780 if ( D3dBufferCallbacks.dwSize)
1781 {
1782 pD3dBufferCallbacks->dwSize = D3dBufferCallbacks.dwSize;
1783
1784 pD3dBufferCallbacks->dwFlags = D3dBufferCallbacks.dwFlags;
1785 if ( D3dBufferCallbacks.CanCreateD3DBuffer)
1786 {
1788 }
1789
1790 if (D3dBufferCallbacks.CreateD3DBuffer)
1791 {
1793 }
1794
1795 if ( D3dBufferCallbacks.DestroyD3DBuffer )
1796 {
1798 }
1799
1800 if ( D3dBufferCallbacks.LockD3DBuffer )
1801 {
1803 }
1804
1805 if ( D3dBufferCallbacks.UnlockD3DBuffer )
1806 {
1808 }
1809
1810 }
1811 }
1812
1813 /* FIXME VidMemList */
1814
1815cleanup:
1816 if (VidMemList)
1817 {
1818 HeapFree(GetProcessHeap(), 0, VidMemList);
1819 }
1820
1821 return retVal;
1822}
DWORD(PASCAL * LPD3DHAL_CONTEXTDESTROYALLCB)(LPD3DHAL_CONTEXTDESTROYALLDATA)
Definition: d3dhal.h:137
DWORD(PASCAL * LPD3DHAL_CONTEXTCREATECB)(LPD3DHAL_CONTEXTCREATEDATA)
Definition: d3dhal.h:135
DWORD(PASCAL * LPD3DHAL_CONTEXTDESTROYCB)(LPD3DHAL_CONTEXTDESTROYDATA)
Definition: d3dhal.h:136
DWORD(PASCAL * LPDDHALEXEBUFCB_DESTROYEXEBUF)(LPDDHAL_DESTROYSURFACEDATA)
Definition: ddrawi.h:424
DWORD(PASCAL * LPDDHALEXEBUFCB_UNLOCKEXEBUF)(LPDDHAL_UNLOCKDATA)
Definition: ddrawi.h:426
#define DDHAL_SURFCB32_DESTROYSURFACE
Definition: ddrawi.h:674
DWORD(PASCAL * LPDDHALEXEBUFCB_LOCKEXEBUF)(LPDDHAL_LOCKDATA)
Definition: ddrawi.h:425
#define DDHAL_SURFCB32_BLT
Definition: ddrawi.h:679
#define DDHAL_SURFCB32_GETFLIPSTATUS
Definition: ddrawi.h:683
#define DDHAL_SURFCB32_LOCK
Definition: ddrawi.h:677
#define DDHAL_CB32_GETSCANLINE
Definition: ddrawi.h:660
#define DDHAL_SURFCB32_GETBLTSTATUS
Definition: ddrawi.h:682
struct _DDHAL_DDEXEBUFCALLBACKS DDHAL_DDEXEBUFCALLBACKS
#define DDHAL_SURFCB32_UNLOCK
Definition: ddrawi.h:678
#define DDHAL_SURFCB32_SETOVERLAYPOSITION
Definition: ddrawi.h:685
#define DDHAL_CB32_CANCREATESURFACE
Definition: ddrawi.h:658
DWORD(PASCAL * LPDDHALEXEBUFCB_CREATEEXEBUF)(LPDDHAL_CREATESURFACEDATA)
Definition: ddrawi.h:423
#define DDHALINFO_GETDRIVERINFOSET
Definition: ddrawi.h:667
struct _DDHAL_DDSURFACECALLBACKS DDHAL_DDSURFACECALLBACKS
#define DDHAL_SURFCB32_ADDATTACHEDSURFACE
Definition: ddrawi.h:681
struct _DDHAL_DDCALLBACKS DDHAL_DDCALLBACKS
#define DDHAL_SURFCB32_SETCOLORKEY
Definition: ddrawi.h:680
#define DDHAL_SURFCB32_UPDATEOVERLAY
Definition: ddrawi.h:684
#define DDHAL_CB32_WAITFORVERTICALBLANK
Definition: ddrawi.h:657
#define DDHAL_SURFCB32_FLIP
Definition: ddrawi.h:675
struct _DDHAL_DDPALETTECALLBACKS DDHAL_DDPALETTECALLBACKS
struct _DDHALINFO DDHALINFO
#define DDHAL_CB32_CREATESURFACE
Definition: ddrawi.h:654
DWORD(PASCAL * LPDDHAL_GETDRIVERINFO)(LPDDHAL_GETDRIVERINFODATA)
Definition: ddrawi.h:593
DWORD(PASCAL * LPDDHALEXEBUFCB_CANCREATEEXEBUF)(LPDDHAL_CANCREATESURFACEDATA)
Definition: ddrawi.h:422
struct _VIDEOMEMORY * PVIDEOMEMORY
struct _VIDEOMEMORY VIDEOMEMORY
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
static void cleanup(void)
Definition: main.c:1335
unsigned long DWORD
Definition: ntddk_ex.h:95
DWORD WINAPI DdGetBltStatus(LPDDHAL_GETBLTSTATUSDATA GetBltStatus)
Definition: gdientry.c:163
BOOL WINAPI D3dContextCreate(LPD3DHAL_CONTEXTCREATEDATA pdcci)
Definition: gdientry.c:1234
DWORD WINAPI DdGetDriverInfo(LPDDHAL_GETDRIVERINFODATA pData)
Definition: gdientry.c:898
DWORD WINAPI DdAddAttachedSurface(LPDDHAL_ADDATTACHEDSURFACEDATA Attach)
Definition: gdientry.c:35
DWORD WINAPI DdUnlockD3D(LPDDHAL_UNLOCKDATA Unlock)
Definition: gdientry.c:1380
DWORD WINAPI DdUnlock(LPDDHAL_UNLOCKDATA Unlock)
Definition: gdientry.c:149
DWORD WINAPI DdUpdateOverlay(LPDDHAL_UPDATEOVERLAYDATA UpdateOverlay)
Definition: gdientry.c:191
DWORD WINAPI DdGetFlipStatus(LPDDHAL_GETFLIPSTATUSDATA GetFlipStatus)
Definition: gdientry.c:177
DWORD WINAPI DdBlt(LPDDHAL_BLTDATA Blt)
Definition: gdientry.c:50
DWORD WINAPI DdDestroyD3DBuffer(LPDDHAL_DESTROYSURFACEDATA pDestroySurface)
Definition: gdientry.c:1347
DWORD WINAPI DdLock(LPDDHAL_LOCKDATA Lock)
Definition: gdientry.c:133
DWORD WINAPI DdCanCreateD3DBuffer(LPDDHAL_CANCREATESURFACEDATA CanCreateD3DBuffer)
Definition: gdientry.c:1256
DWORD WINAPI DdFlip(LPDDHAL_FLIPDATA Flip)
Definition: gdientry.c:96
DWORD WINAPI DdDestroySurface(LPDDHAL_DESTROYSURFACEDATA pDestroySurface)
Definition: gdientry.c:71
DWORD WINAPI DdCreateSurface(LPDDHAL_CREATESURFACEDATA pCreateSurface)
Definition: gdientry.c:281
DWORD WINAPI DdSetOverlayPosition(LPDDHAL_SETOVERLAYPOSITIONDATA SetOverlayPosition)
Definition: gdientry.c:229
DWORD WINAPI DdGetScanLine(LPDDHAL_GETSCANLINEDATA pGetScanLine)
Definition: gdientry.c:566
DWORD WINAPI DdLockD3D(LPDDHAL_LOCKDATA Lock)
Definition: gdientry.c:1366
DWORD WINAPI DdSetColorKey(LPDDHAL_SETCOLORKEYDATA pSetColorKey)
Definition: gdientry.c:552
DWORD WINAPI DdCreateD3DBuffer(LPDDHAL_CREATESURFACEDATA pCreateSurface)
Definition: gdientry.c:1278
DWORD WINAPI DdWaitForVerticalBlank(LPDDHAL_WAITFORVERTICALBLANKDATA WaitForVerticalBlank)
Definition: gdientry.c:244
DWORD WINAPI DdCanCreateSurface(LPDDHAL_CANCREATESURFACEDATA CanCreateSurface)
Definition: gdientry.c:260
LPDDHALINFO LPDDHAL_DDCALLBACKS LPDDHAL_DDSURFACECALLBACKS LPDDHAL_DDPALETTECALLBACKS LPD3DHAL_CALLBACKS LPD3DHAL_GLOBALDRIVERDATA LPDDHAL_DDEXEBUFCALLBACKS pD3dBufferCallbacks
Definition: main.h:44
LPDDHALINFO LPDDHAL_DDCALLBACKS LPDDHAL_DDSURFACECALLBACKS LPDDHAL_DDPALETTECALLBACKS pDDPaletteCallbacks
Definition: main.h:41
LPDDHALINFO LPDDHAL_DDCALLBACKS LPDDHAL_DDSURFACECALLBACKS pDDSurfaceCallbacks
Definition: main.h:40
LPDDHALINFO LPDDHAL_DDCALLBACKS LPDDHAL_DDSURFACECALLBACKS LPDDHAL_DDPALETTECALLBACKS LPD3DHAL_CALLBACKS pD3dCallbacks
Definition: main.h:42
LPDDHALINFO LPDDHAL_DDCALLBACKS LPDDHAL_DDSURFACECALLBACKS LPDDHAL_DDPALETTECALLBACKS LPD3DHAL_CALLBACKS LPD3DHAL_GLOBALDRIVERDATA LPDDHAL_DDEXEBUFCALLBACKS LPDDSURFACEDESC pD3dTextureFormats
Definition: main.h:45
LPDDHALINFO LPDDHAL_DDCALLBACKS pDDCallbacks
Definition: main.h:39
LPDDHALINFO LPDDHAL_DDCALLBACKS LPDDHAL_DDSURFACECALLBACKS LPDDHAL_DDPALETTECALLBACKS LPD3DHAL_CALLBACKS LPD3DHAL_GLOBALDRIVERDATA pD3dDriverData
Definition: main.h:43
__kernel_entry W32KAPI BOOL APIENTRY NtGdiDdQueryDirectDrawObject(_In_ HANDLE hDirectDrawLocal, _Out_ PDD_HALINFO pHalInfo, _Out_writes_(3) DWORD *pCallBackFlags, _Out_opt_ LPD3DNTHAL_CALLBACKS puD3dCallbacks, _Out_opt_ LPD3DNTHAL_GLOBALDRIVERDATA puD3dDriverData, _Out_opt_ PDD_D3DBUFCALLBACKS puD3dBufferCallbacks, _Out_opt_ LPDDSURFACEDESC puD3dTextureFormats, _Out_ DWORD *puNumHeaps, _Out_opt_ VIDEOMEMORY *puvmList, _Out_ DWORD *puNumFourCC, _Out_opt_ DWORD *puFourCC)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiD3dContextDestroy(_In_ LPD3DNTHAL_CONTEXTDESTROYDATA pdcdd)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiD3dContextDestroyAll(_Out_ LPD3DNTHAL_CONTEXTDESTROYALLDATA pdcdad)
DWORD dwFlags
Definition: ddrawi.h:619
LPDDHAL_DDEXEBUFCALLBACKS lpDDExeBufCallbacks
Definition: ddrawi.h:625
ULONG_PTR lpD3DGlobalDriverData
Definition: ddrawi.h:623
LPDDHAL_DDPALETTECALLBACKS lpDDPaletteCallbacks
Definition: ddrawi.h:610
VIDMEMINFO vmiData
Definition: ddrawi.h:611
DWORD dwSize
Definition: ddrawi.h:607
LPDDHAL_DDSURFACECALLBACKS lpDDSurfaceCallbacks
Definition: ddrawi.h:609
ULONG_PTR lpD3DHALCallbacks
Definition: ddrawi.h:624
DWORD dwRops[DD_ROP_SPACE]
Definition: ddrawint.h:1087
DWORD dwFlags
Definition: ddrawint.h:1128
DDNTCORECAPS ddCaps
Definition: ddrawint.h:1126
VIDEOMEMORYINFO vmiData
Definition: ddrawint.h:1125
DWORD dwOffscreenAlign
Definition: ddrawint.h:117
DWORD dwZBufferAlign
Definition: ddrawint.h:120
DWORD dwDisplayHeight
Definition: ddrawint.h:114
DWORD dwDisplayWidth
Definition: ddrawint.h:113
DWORD dwOverlayAlign
Definition: ddrawint.h:118
LONG lDisplayPitch
Definition: ddrawint.h:115
DWORD dwTextureAlign
Definition: ddrawint.h:119
DWORD dwAlphaAlign
Definition: ddrawint.h:121
DDPIXELFORMAT ddpfDisplay
Definition: ddrawint.h:116
DWORD dwFlags
Definition: ddrawi.h:217
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
#define RtlMoveMemory(Destination, Source, Length)
Definition: typedefs.h:264
_Out_ DD_HALINFO _Out_ DWORD _Out_ VIDEOMEMORY _Out_ DWORD _Out_ DWORD * pdwFourCC
Definition: winddi.h:4230
_Out_ DD_HALINFO * pHalInfo
Definition: winddi.h:4226
_Out_ DD_HALINFO _Out_ DWORD _Out_ VIDEOMEMORY * pvmList
Definition: winddi.h:4228
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170

◆ DdQueryDisplaySettingsUniqueness()

ULONG WINAPI DdQueryDisplaySettingsUniqueness ( VOID  )

Definition at line 2031 of file gdientry.c.

2032{
2034}
PGDI_SHARED_HANDLE_TABLE GdiSharedHandleTable
Definition: misc.c:34

◆ DdReenableDirectDrawObject()

BOOL WINAPI DdReenableDirectDrawObject ( LPDDRAWI_DIRECTDRAW_GBL  pDirectDrawGlobal,
BOOL pbNewMode 
)

Definition at line 1967 of file gdientry.c.

1969{
1970 /* Call win32k directly */
1971 return NtGdiDdReenableDirectDrawObject(GetDdHandle(pDirectDrawGlobal->hDD),
1972 pbNewMode);
1973}
__kernel_entry W32KAPI BOOL APIENTRY NtGdiDdReenableDirectDrawObject(_In_ HANDLE hDirectDrawLocal, _Inout_ BOOL *pubNewMode)

◆ DdReleaseDC()

BOOL WINAPI DdReleaseDC ( LPDDRAWI_DDRAWSURFACE_LCL  pSurfaceLocal)

Definition at line 1937 of file gdientry.c.

1938{
1939 /* Call win32k directly */
1940 return NtGdiDdReleaseDC((HANDLE) pSurfaceLocal->hDDSurface);
1941}
__kernel_entry W32KAPI BOOL APIENTRY NtGdiDdReleaseDC(_In_ HANDLE hSurface)

◆ DdResetVisrgn()

BOOL WINAPI DdResetVisrgn ( LPDDRAWI_DDRAWSURFACE_LCL  pSurfaceLocal,
HWND  hWnd 
)

Definition at line 1909 of file gdientry.c.

1911{
1912 /* Call win32k directly */
1913 return NtGdiDdResetVisrgn((HANDLE) pSurfaceLocal->hDDSurface, hWnd);
1914}
HWND hWnd
Definition: settings.c:17
__kernel_entry W32KAPI BOOL APIENTRY NtGdiDdResetVisrgn(_In_ HANDLE hSurface, _In_ HWND hwnd)

◆ DdSetGammaRamp()

BOOL WINAPI DdSetGammaRamp ( LPDDRAWI_DIRECTDRAW_LCL  pDDraw,
HDC  hdc,
LPVOID  lpGammaRamp 
)

Definition at line 2072 of file gdientry.c.

2075{
2076 /* Call win32k directly */
2077 return NtGdiDdSetGammaRamp(GetDdHandle(pDDraw->lpGbl->hDD),
2078 hdc,
2079 lpGammaRamp);
2080}
__kernel_entry W32KAPI BOOL APIENTRY NtGdiDdSetGammaRamp(_In_ HANDLE hDirectDraw, _In_ HDC hdc, _In_reads_bytes_(sizeof(GAMMARAMP)) LPVOID lpGammaRamp)

◆ DdSwapTextureHandles()

DWORD WINAPI DdSwapTextureHandles ( LPDDRAWI_DIRECTDRAW_LCL  pDDraw,
LPDDRAWI_DDRAWSURFACE_LCL  pDDSLcl1,
LPDDRAWI_DDRAWSURFACE_LCL  pDDSLcl2 
)

Definition at line 222 of file historic.c.

225{
226 /* Note Windows 2000/XP/VISTA always returns success */
227 return TRUE;
228}

◆ DdUnattachSurface()

VOID WINAPI DdUnattachSurface ( LPDDRAWI_DDRAWSURFACE_LCL  pSurface,
LPDDRAWI_DDRAWSURFACE_LCL  pSurfaceAttached 
)

Definition at line 2016 of file gdientry.c.

2018{
2019 /* Call win32k */
2021 (HANDLE)pSurfaceAttached->hDDSurface);
2022}
__kernel_entry W32KAPI NTSTATUS APIENTRY NtGdiDdUnattachSurface(_In_ HANDLE hSurface, _In_ HANDLE hSurfaceAttached)