ReactOS  0.4.14-dev-1112-g2b067d6
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 #include <debug.h>
13 
14 /************************************************************************/
15 /* NtGdiDdCreateSurface */
16 /************************************************************************/
17 DWORD
19 NtGdiDdCreateSurface(HANDLE hDirectDrawLocal,
20  HANDLE *hSurface,
21  DDSURFACEDESC *puSurfaceDescription,
22  DD_SURFACE_GLOBAL *puSurfaceGlobalData,
23  DD_SURFACE_LOCAL *puSurfaceLocalData,
24  DD_SURFACE_MORE *puSurfaceMoreData,
25  PDD_CREATESURFACEDATA puCreateSurfaceData,
26  HANDLE *puhSurface)
27 {
29 
30  if (pfnDdCreateSurface == NULL)
31  {
32  DPRINT1("Warning: no pfnDdCreateSurface\n");
34  }
35 
36  DPRINT1("Calling dxg.sys pfnDdCreateSurface\n");
37  return pfnDdCreateSurface(hDirectDrawLocal,hSurface,puSurfaceDescription,puSurfaceGlobalData,
38  puSurfaceLocalData,puSurfaceMoreData,puCreateSurfaceData,puhSurface);
39 }
40 
41 /************************************************************************/
42 /* NtGdiDdWaitForVerticalBlank */
43 /************************************************************************/
44 DWORD
47  PDD_WAITFORVERTICALBLANKDATA puWaitForVerticalBlankData)
48 {
50 
51  if (pfnDdWaitForVerticalBlank == NULL)
52  {
53  DPRINT1("Warning: no pfnDdWaitForVerticalBlank\n");
55  }
56 
57  DPRINT1("Calling dxg.sys pfnDdWaitForVerticalBlank\n");
58  return pfnDdWaitForVerticalBlank(hDirectDraw, puWaitForVerticalBlankData);
59 }
60 
61 /************************************************************************/
62 /* NtGdiDdCanCreateSurface */
63 /************************************************************************/
64 DWORD
67  PDD_CANCREATESURFACEDATA puCanCreateSurfaceData)
68 {
70 
71  if (pfnDdCanCreateSurface == NULL)
72  {
73  DPRINT1("Warning: no pfnDdCanCreateSurface\n");
75  }
76 
77  DPRINT1("Calling dxg.sys DdCanCreateSurface\n");
78 
79  return pfnDdCanCreateSurface(hDirectDrawLocal,puCanCreateSurfaceData);
80 }
81 
82 /************************************************************************/
83 /* NtGdiDdGetScanLine */
84 /************************************************************************/
85 DWORD
86 APIENTRY
87 NtGdiDdGetScanLine(HANDLE hDirectDrawLocal,
88  PDD_GETSCANLINEDATA puGetScanLineData)
89 {
91 
92  if (pfnDdGetScanLine == NULL)
93  {
94  DPRINT1("Warning: no pfnDdGetScanLine\n");
96  }
97 
98  DPRINT1("Calling dxg.sys pfnDdGetScanLine\n");
99 
100  return pfnDdGetScanLine(hDirectDrawLocal,puGetScanLineData);
101 }
102 
103 
104 /************************************************************************/
105 /* This is not part of the ddsurface interface but it */
106 /* deals with the surface */
107 /************************************************************************/
108 
109 /************************************************************************/
110 /* NtGdiDdCreateSurfaceEx */
111 /************************************************************************/
112 DWORD
113 APIENTRY
115  HANDLE hSurface,
116  DWORD dwSurfaceHandle)
117 {
119 
120  if (pfnDdCreateSurfaceEx == NULL)
121  {
122  DPRINT1("Warning: no pfnDdCreateSurfaceEx\n");
124  }
125 
126  DPRINT1("Calling dxg.sys pfnDdCreateSurfaceEx\n");
127  return pfnDdCreateSurfaceEx(hDirectDraw,hSurface,dwSurfaceHandle);
128 
129 }
130 
DWORD APIENTRY NtGdiDdWaitForVerticalBlank(HANDLE hDirectDraw, PDD_WAITFORVERTICALBLANKDATA puWaitForVerticalBlankData)
Definition: dd.c:46
#define DXG_INDEX_DxDdCreateSurface
Definition: dxg.h:27
DWORD(APIENTRY * PGD_DDCANCREATESURFACE)(HANDLE hDirectDrawLocal, PDD_CANCREATESURFACEDATA puCanCreateSurfaceData)
Definition: intddraw.h:83
#define DDHAL_DRIVER_NOTHANDLED
Definition: ddrawi.h:320
#define DXG_INDEX_DxDdCanCreateSurface
Definition: dxg.h:22
#define DXG_INDEX_DxDdWaitForVerticalBlank
Definition: dxg.h:69
DWORD APIENTRY NtGdiDdCreateSurfaceEx(HANDLE hDirectDraw, HANDLE hSurface, DWORD dwSurfaceHandle)
Definition: dd.c:114
DWORD(APIENTRY * PGD_DXDDGETSCANLINE)(HANDLE, PDD_GETSCANLINEDATA)
Definition: intddraw.h:84
smooth NULL
Definition: ftsmooth.c:416
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:19
unsigned long DWORD
Definition: ntddk_ex.h:95
DWORD APIENTRY NtGdiDdGetScanLine(HANDLE hDirectDrawLocal, PDD_GETSCANLINEDATA puGetScanLineData)
Definition: dd.c:87
DWORD(APIENTRY * PGD_DXDDCREATESURFACEEX)(HANDLE, HANDLE, DWORD)
Definition: intddraw.h:85
DRVFN gpDxFuncs[DXG_INDEX_DxDdIoctl+1]
Definition: ddraw.c:23
#define DXG_INDEX_DxDdGetScanLine
Definition: dxg.h:49
#define DXG_INDEX_DxDdCreateSurfaceEx
Definition: dxg.h:62
DWORD APIENTRY NtGdiDdCanCreateSurface(HANDLE hDirectDrawLocal, PDD_CANCREATESURFACEDATA puCanCreateSurfaceData)
Definition: dd.c:66
DWORD(APIENTRY * PGD_DXDDWAITFORVERTICALBLANK)(HANDLE, PDD_WAITFORVERTICALBLANKDATA)
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:81
#define DPRINT1
Definition: precomp.h:8
#define APIENTRY
Definition: api.h:79