ReactOS 0.4.15-dev-8119-g4fb2fdb
dd.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * PURPOSE: Native DirectDraw implementation
5 * FILE: win32ss/reactx/ntddraw/dd.c
6 * PROGRAMER: Magnus Olsen (greatlord@reactos.org)
7 * REVISION HISTORY:
8 * 19/1-2006 Magnus Olsen
9 */
10
11#include <win32k.h>
12
13// #define NDEBUG
14#include <debug.h>
15
16/************************************************************************/
17/* NtGdiDdCreateSurface */
18/************************************************************************/
22 HANDLE *hSurface,
23 DDSURFACEDESC *puSurfaceDescription,
24 DD_SURFACE_GLOBAL *puSurfaceGlobalData,
25 DD_SURFACE_LOCAL *puSurfaceLocalData,
26 DD_SURFACE_MORE *puSurfaceMoreData,
27 PDD_CREATESURFACEDATA puCreateSurfaceData,
28 HANDLE *puhSurface)
29{
31
32 if (pfnDdCreateSurface == NULL)
33 {
34 DPRINT1("Warning: no pfnDdCreateSurface\n");
36 }
37
38 DPRINT("Calling dxg.sys pfnDdCreateSurface\n");
39 return pfnDdCreateSurface(hDirectDrawLocal,hSurface,puSurfaceDescription,puSurfaceGlobalData,
40 puSurfaceLocalData,puSurfaceMoreData,puCreateSurfaceData,puhSurface);
41}
42
43/************************************************************************/
44/* NtGdiDdWaitForVerticalBlank */
45/************************************************************************/
49 PDD_WAITFORVERTICALBLANKDATA puWaitForVerticalBlankData)
50{
52
53 if (pfnDdWaitForVerticalBlank == NULL)
54 {
55 DPRINT1("Warning: no pfnDdWaitForVerticalBlank\n");
57 }
58
59 DPRINT("Calling dxg.sys pfnDdWaitForVerticalBlank\n");
60 return pfnDdWaitForVerticalBlank(hDirectDraw, puWaitForVerticalBlankData);
61}
62
63/************************************************************************/
64/* NtGdiDdCanCreateSurface */
65/************************************************************************/
69 PDD_CANCREATESURFACEDATA puCanCreateSurfaceData)
70{
72
73 if (pfnDdCanCreateSurface == NULL)
74 {
75 DPRINT1("Warning: no pfnDdCanCreateSurface\n");
77 }
78
79 DPRINT("Calling dxg.sys pfnDdCanCreateSurface\n");
80
81 return pfnDdCanCreateSurface(hDirectDrawLocal,puCanCreateSurfaceData);
82}
83
84/************************************************************************/
85/* NtGdiDdGetScanLine */
86/************************************************************************/
89NtGdiDdGetScanLine(HANDLE hDirectDrawLocal,
90 PDD_GETSCANLINEDATA puGetScanLineData)
91{
93
94 if (pfnDdGetScanLine == NULL)
95 {
96 DPRINT1("Warning: no pfnDdGetScanLine\n");
98 }
99
100 DPRINT("Calling dxg.sys pfnDdGetScanLine\n");
101
102 return pfnDdGetScanLine(hDirectDrawLocal,puGetScanLineData);
103}
104
105
106/************************************************************************/
107/* This is not part of the ddsurface interface but it */
108/* deals with the surface */
109/************************************************************************/
110
111/************************************************************************/
112/* NtGdiDdCreateSurfaceEx */
113/************************************************************************/
114DWORD
117 HANDLE hSurface,
118 DWORD dwSurfaceHandle)
119{
121
122 if (pfnDdCreateSurfaceEx == NULL)
123 {
124 DPRINT1("Warning: no pfnDdCreateSurfaceEx\n");
126 }
127
128 DPRINT("Calling dxg.sys pfnDdCreateSurfaceEx\n");
129 return pfnDdCreateSurfaceEx(hDirectDraw,hSurface,dwSurfaceHandle);
130}
#define DPRINT1
Definition: precomp.h:8
#define DDHAL_DRIVER_NOTHANDLED
Definition: ddrawi.h:320
#define NULL
Definition: types.h:112
#define APIENTRY
Definition: api.h:79
#define DXG_INDEX_DxDdCanCreateSurface
Definition: dxg.h:22
#define DXG_INDEX_DxDdCreateSurface
Definition: dxg.h:27
#define DXG_INDEX_DxDdGetScanLine
Definition: dxg.h:49
#define DXG_INDEX_DxDdWaitForVerticalBlank
Definition: dxg.h:69
#define DXG_INDEX_DxDdCreateSurfaceEx
Definition: dxg.h:62
unsigned long DWORD
Definition: ntddk_ex.h:95
DWORD(APIENTRY * PGD_DDCANCREATESURFACE)(HANDLE hDirectDrawLocal, PDD_CANCREATESURFACEDATA puCanCreateSurfaceData)
Definition: intddraw.h:82
DWORD(APIENTRY * PGD_DDCREATESURFACE)(HANDLE, HANDLE *, DDSURFACEDESC *, DD_SURFACE_GLOBAL *, DD_SURFACE_LOCAL *, DD_SURFACE_MORE *, PDD_CREATESURFACEDATA, HANDLE *)
Definition: intddraw.h:80
DWORD(APIENTRY * PGD_DXDDCREATESURFACEEX)(HANDLE, HANDLE, DWORD)
Definition: intddraw.h:84
DWORD(APIENTRY * PGD_DXDDGETSCANLINE)(HANDLE, PDD_GETSCANLINEDATA)
Definition: intddraw.h:83
DWORD(APIENTRY * PGD_DXDDWAITFORVERTICALBLANK)(HANDLE, PDD_WAITFORVERTICALBLANKDATA)
Definition: intddraw.h:81
DWORD APIENTRY NtGdiDdCanCreateSurface(HANDLE hDirectDrawLocal, PDD_CANCREATESURFACEDATA puCanCreateSurfaceData)
Definition: dd.c:68
DWORD APIENTRY NtGdiDdGetScanLine(HANDLE hDirectDrawLocal, PDD_GETSCANLINEDATA puGetScanLineData)
Definition: dd.c:89
DWORD APIENTRY NtGdiDdCreateSurfaceEx(HANDLE hDirectDraw, HANDLE hSurface, DWORD dwSurfaceHandle)
Definition: dd.c:116
DWORD APIENTRY NtGdiDdWaitForVerticalBlank(HANDLE hDirectDraw, PDD_WAITFORVERTICALBLANKDATA puWaitForVerticalBlankData)
Definition: dd.c:48
DWORD APIENTRY NtGdiDdCreateSurface(HANDLE hDirectDrawLocal, HANDLE *hSurface, DDSURFACEDESC *puSurfaceDescription, DD_SURFACE_GLOBAL *puSurfaceGlobalData, DD_SURFACE_LOCAL *puSurfaceLocalData, DD_SURFACE_MORE *puSurfaceMoreData, PDD_CREATESURFACEDATA puCreateSurfaceData, HANDLE *puhSurface)
Definition: dd.c:21
#define DPRINT
Definition: sndvol32.h:73
DRVFN gpDxFuncs[DXG_INDEX_DxDdIoctl+1]
Definition: ddraw.c:24