xref: /reactos/win32ss/reactx/ntddraw/mocomp.c (revision c2c66aff)
1 /*
2  * COPYRIGHT:        See COPYING in the top level directory
3  * PROJECT:          ReactOS kernel
4  * PURPOSE:          Native DirectDraw implementation
5  * FILE:             win32ss/reactx/ntddraw/mocomp.c
6  * PROGRAMER:        Magnus Olsen (magnus@greatlord.com)
7  * REVISION HISTORY:
8  *       19/1-2006   Magnus Olsen
9  */
10 
11 
12 #include <win32k.h>
13 #include <debug.h>
14 
15 /************************************************************************/
16 /* NtGdiDdBeginMoCompFrame                                              */
17 /************************************************************************/
18 DWORD
19 APIENTRY
20 NtGdiDdBeginMoCompFrame(HANDLE hMoComp,
21                         PDD_BEGINMOCOMPFRAMEDATA puBeginFrameData)
22 {
23     PGD_DDBEGINMOCOMPFRAME pfnDdBeginMoCompFrame = (PGD_DDBEGINMOCOMPFRAME)gpDxFuncs[DXG_INDEX_DxDdBeginMoCompFrame].pfn;
24 
25     if (pfnDdBeginMoCompFrame == NULL)
26     {
27         DPRINT1("Warning: no pfnDdBeginMoCompFrame");
28         return DDHAL_DRIVER_NOTHANDLED;
29     }
30 
31     DPRINT1("Calling dxg.sys DdBeginMoCompFrame");
32     return pfnDdBeginMoCompFrame(hMoComp,puBeginFrameData);
33 }
34 
35 /************************************************************************/
36 /* NtGdiDdCreateMoComp                                                  */
37 /************************************************************************/
38 HANDLE
39 APIENTRY
40 NtGdiDdCreateMoComp(HANDLE hDirectDraw, PDD_CREATEMOCOMPDATA puCreateMoCompData)
41 {
42     PGD_DXDDCREATEMOCOMP pfnDdCreateMoComp = (PGD_DXDDCREATEMOCOMP)gpDxFuncs[DXG_INDEX_DxDdCreateMoComp].pfn;
43 
44     if (pfnDdCreateMoComp == NULL)
45     {
46         DPRINT1("Warning: no pfnDdCreateMoComp");
47         return DDHAL_DRIVER_NOTHANDLED;
48     }
49 
50     DPRINT1("Calling dxg.sys DdCreateMoComp");
51     return pfnDdCreateMoComp(hDirectDraw, puCreateMoCompData);
52 }
53 
54 /************************************************************************/
55 /* NtGdiDdDestroyMoComp                                                 */
56 /************************************************************************/
57 DWORD
58 APIENTRY
59 NtGdiDdDestroyMoComp(HANDLE hMoComp,
60                      PDD_DESTROYMOCOMPDATA puBeginFrameData)
61 {
62     PGD_DXDDDESTROYMOCOMP pfnDxDdDestroyMoComp = (PGD_DXDDDESTROYMOCOMP)gpDxFuncs[DXG_INDEX_DxDdDestroyMoComp].pfn;
63 
64     if (pfnDxDdDestroyMoComp == NULL)
65     {
66         DPRINT1("Warning: no pfnDxDdDestroyMoComp");
67         return DDHAL_DRIVER_NOTHANDLED;
68     }
69 
70     DPRINT1("Calling dxg.sys DxDdDestroyMoComp");
71     return pfnDxDdDestroyMoComp(hMoComp, puBeginFrameData);
72 }
73 
74 /************************************************************************/
75 /* NtGdiDdEndMoCompFrame                                                */
76 /************************************************************************/
77 DWORD
78 APIENTRY
79 NtGdiDdEndMoCompFrame(HANDLE hMoComp,
80                       PDD_ENDMOCOMPFRAMEDATA puEndFrameData)
81 {
82     PGD_DXDDENDMOCOMPFRAME pfnDdEndMoCompFrame = (PGD_DXDDENDMOCOMPFRAME)gpDxFuncs[DXG_INDEX_DxDdEndMoCompFrame].pfn;
83 
84     if (pfnDdEndMoCompFrame == NULL)
85     {
86         DPRINT1("Warning: no pfnDdEndMoCompFrame");
87         return DDHAL_DRIVER_NOTHANDLED;
88     }
89 
90     DPRINT1("Calling dxg.sys pfnDdEndMoCompFrame");
91     return pfnDdEndMoCompFrame(hMoComp, puEndFrameData);
92 }
93 
94 /************************************************************************/
95 /* NtGdiDdGetInternalMoCompInfo                                         */
96 /************************************************************************/
97 DWORD
98 APIENTRY
99 NtGdiDdGetInternalMoCompInfo(HANDLE hDirectDraw,
100                              PDD_GETINTERNALMOCOMPDATA puGetInternalData)
101 {
102     PGD_DXDDGETINTERNALMOCOMPINFO pfnDdGetInternalMoCompInfo = (PGD_DXDDGETINTERNALMOCOMPINFO)gpDxFuncs[DXG_INDEX_DxDdGetInternalMoCompInfo].pfn;
103 
104     if (pfnDdGetInternalMoCompInfo == NULL)
105     {
106         DPRINT1("Warning: no pfnDdGetInternalMoCompInfo");
107         return DDHAL_DRIVER_NOTHANDLED;
108     }
109 
110     DPRINT1("Calling dxg.sys pfnDdGetInternalMoCompInfo");
111     return pfnDdGetInternalMoCompInfo(hDirectDraw, puGetInternalData);
112 }
113 
114 
115 /************************************************************************/
116 /* NtGdiDdGetMoCompBuffInfo                                             */
117 /************************************************************************/
118 DWORD
119 APIENTRY
120 NtGdiDdGetMoCompBuffInfo(HANDLE hDirectDraw,
121                          PDD_GETMOCOMPCOMPBUFFDATA puGetBuffData)
122 {
123     PGD_DXDDGETMOCOMPBUFFINFO pfnDdGetMoCompBuffInfo = (PGD_DXDDGETMOCOMPBUFFINFO)gpDxFuncs[DXG_INDEX_DxDdGetMoCompBuffInfo].pfn;
124 
125     if (pfnDdGetMoCompBuffInfo == NULL)
126     {
127         DPRINT1("Warning: no pfnDdGetMoCompBuffInfo");
128         return DDHAL_DRIVER_NOTHANDLED;
129     }
130 
131     DPRINT1("Calling dxg.sys pfnDdGetMoCompBuffInfo");
132     return pfnDdGetMoCompBuffInfo(hDirectDraw, puGetBuffData);
133 }
134 
135 /************************************************************************/
136 /* NtGdiDdGetMoCompFormats                                              */
137 /************************************************************************/
138 DWORD
139 APIENTRY
140 NtGdiDdGetMoCompFormats(HANDLE hDirectDraw,
141                         PDD_GETMOCOMPFORMATSDATA puGetMoCompFormatsData)
142 {
143     PGD_DXDDGETMOCOMPFORMATS pfnDdGetMoCompFormats = (PGD_DXDDGETMOCOMPFORMATS)gpDxFuncs[DXG_INDEX_DxDdGetMoCompFormats].pfn;
144 
145     if (pfnDdGetMoCompFormats == NULL)
146     {
147         DPRINT1("Warning: no pfnDdGetMoCompFormats");
148         return DDHAL_DRIVER_NOTHANDLED;
149     }
150 
151     DPRINT1("Calling dxg.sys pfnDdGetMoCompFormats");
152     return pfnDdGetMoCompFormats(hDirectDraw, puGetMoCompFormatsData);
153 }
154 
155 
156 /************************************************************************/
157 /* NtGdiDdGetMoCompGuids                                                */
158 /************************************************************************/
159 DWORD
160 APIENTRY
161 NtGdiDdGetMoCompGuids(HANDLE hDirectDraw,
162                       PDD_GETMOCOMPGUIDSDATA puGetMoCompGuidsData)
163 {
164     PGD_DXDDGETMOCOMPGUIDS pfnDdGetMoCompGuids = (PGD_DXDDGETMOCOMPGUIDS)gpDxFuncs[DXG_INDEX_DxDdGetMoCompGuids].pfn;
165 
166     if (pfnDdGetMoCompGuids == NULL)
167     {
168         DPRINT1("Warning: no pfnDdGetMoCompGuids");
169         return DDHAL_DRIVER_NOTHANDLED;
170     }
171 
172     DPRINT1("Calling dxg.sys pfnDdGetMoCompGuids");
173     return pfnDdGetMoCompGuids(hDirectDraw, puGetMoCompGuidsData);
174 }
175 
176 
177 
178 /************************************************************************/
179 /* NtGdiDdQueryMoCompStatus                                             */
180 /************************************************************************/
181 DWORD
182 APIENTRY
183 NtGdiDdQueryMoCompStatus(HANDLE hMoComp,
184                          PDD_QUERYMOCOMPSTATUSDATA puQueryMoCompStatusData)
185 {
186     PGD_DXDDQUERYMOCOMPSTATUS pfnDdQueryMoCompStatus = (PGD_DXDDQUERYMOCOMPSTATUS)gpDxFuncs[DXG_INDEX_DxDdQueryMoCompStatus].pfn;
187 
188     if (pfnDdQueryMoCompStatus == NULL)
189     {
190         DPRINT1("Warning: no pfnDdQueryMoCompStatus");
191         return DDHAL_DRIVER_NOTHANDLED;
192     }
193 
194     DPRINT1("Calling dxg.sys pfnDdQueryMoCompStatus");
195     return pfnDdQueryMoCompStatus(hMoComp, puQueryMoCompStatusData);
196 }
197 
198 
199 /************************************************************************/
200 /* NtGdiDdRenderMoComp                                                  */
201 /************************************************************************/
202 DWORD
203 APIENTRY
204 NtGdiDdRenderMoComp(HANDLE hMoComp,
205                     PDD_RENDERMOCOMPDATA puRenderMoCompData)
206 {
207     PGD_DXDDRENDERMOCOMP pfnDdRenderMoComp = (PGD_DXDDRENDERMOCOMP)gpDxFuncs[DXG_INDEX_DxDdRenderMoComp].pfn;
208 
209     if (pfnDdRenderMoComp == NULL)
210     {
211         DPRINT1("Warning: no pfnDdRenderMoComp");
212         return DDHAL_DRIVER_NOTHANDLED;
213     }
214 
215     DPRINT1("Calling dxg.sys pfnDdRenderMoComp");
216     return pfnDdRenderMoComp(hMoComp, puRenderMoCompData);
217 }
218 
219