Implement NtAccessCheck.
[wine/gsoc-2012-control.git] / dlls / ddraw / dsurface / main.h
blob07d3b887175834d50342dd1b44ce00eca576f18d
1 /*
2 * Copyright 2000-2001 TransGaming Technologies Inc.
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #ifndef DDRAW_DSURFACE_MAIN_H_INCLUDED
20 #define DDRAW_DSURFACE_MAIN_H_INCLUDED
22 #include <stdarg.h>
24 #include "windef.h"
25 #include "winbase.h"
26 #include "ddraw_private.h"
28 /* Support for IDirectDrawSurface7::Set/Get/FreePrivateData. I don't think
29 * anybody uses it for much so a good implementation is optional. */
30 typedef struct PrivateData
32 struct PrivateData* next;
33 struct PrivateData* prev;
35 GUID tag;
36 DWORD flags; /* DDSPD_* */
37 DWORD uniqueness_value;
39 union
41 LPVOID data;
42 LPUNKNOWN object;
43 } ptr;
45 DWORD size;
46 } PrivateData;
48 extern IDirectDrawGammaControlVtbl DDRAW_IDDGC_VTable;
50 /* Non-interface functions */
51 HRESULT
52 Main_DirectDrawSurface_Construct(IDirectDrawSurfaceImpl* This,
53 IDirectDrawImpl* pDD,
54 const DDSURFACEDESC2* pDDSD);
55 void Main_DirectDrawSurface_ForceDestroy(IDirectDrawSurfaceImpl* This);
57 void
58 Main_DirectDrawSurface_final_release(IDirectDrawSurfaceImpl* This);
59 HRESULT
60 Main_DirectDrawSurface_late_allocate(IDirectDrawSurfaceImpl* This);
61 BOOL
62 Main_DirectDrawSurface_attach(IDirectDrawSurfaceImpl *This,
63 IDirectDrawSurfaceImpl *to);
64 BOOL Main_DirectDrawSurface_detach(IDirectDrawSurfaceImpl *This);
65 void
66 Main_DirectDrawSurface_lock_update(IDirectDrawSurfaceImpl* This,
67 LPCRECT pRect, DWORD dwFlags);
68 void
69 Main_DirectDrawSurface_unlock_update(IDirectDrawSurfaceImpl* This,
70 LPCRECT pRect);
71 void
72 Main_DirectDrawSurface_lose_surface(IDirectDrawSurfaceImpl* This);
73 void
74 Main_DirectDrawSurface_set_palette(IDirectDrawSurfaceImpl* This,
75 IDirectDrawPaletteImpl* pal);
76 void
77 Main_DirectDrawSurface_update_palette(IDirectDrawSurfaceImpl* This,
78 IDirectDrawPaletteImpl* pal,
79 DWORD dwStart, DWORD dwCount,
80 LPPALETTEENTRY palent);
81 HWND
82 Main_DirectDrawSurface_get_display_window(IDirectDrawSurfaceImpl* This);
84 HRESULT
85 Main_DirectDrawSurface_get_gamma_ramp(IDirectDrawSurfaceImpl* This,
86 DWORD dwFlags,
87 LPDDGAMMARAMP lpGammaRamp);
88 HRESULT
89 Main_DirectDrawSurface_set_gamma_ramp(IDirectDrawSurfaceImpl* This,
90 DWORD dwFlags,
91 LPDDGAMMARAMP lpGammaRamp);
93 BOOL Main_DirectDrawSurface_flip_data(IDirectDrawSurfaceImpl* front,
94 IDirectDrawSurfaceImpl* back,
95 DWORD dwFlags);
97 #define CHECK_LOST(This) \
98 do { \
99 if (This->lost) return DDERR_SURFACELOST; \
100 } while (0)
102 #define CHECK_TEXTURE(This) \
103 do { \
104 if (!(This->surface_desc.ddsCaps.dwCaps2 \
105 & DDSCAPS2_TEXTUREMANAGE)) \
106 return DDERR_INVALIDOBJECT; \
107 } while (0)
109 #define LOCK_OBJECT(This) do { } while (0)
110 #define UNLOCK_OBJECT(This) do { } while (0)
112 /* IDirectDrawSurface7 (partial) implementation */
113 ULONG WINAPI
114 Main_DirectDrawSurface_AddRef(LPDIRECTDRAWSURFACE7 iface);
115 ULONG WINAPI
116 Main_DirectDrawSurface_Release(LPDIRECTDRAWSURFACE7 iface);
117 HRESULT WINAPI
118 Main_DirectDrawSurface_QueryInterface(LPDIRECTDRAWSURFACE7 iface, REFIID riid,
119 LPVOID* ppObj);
120 HRESULT WINAPI
121 Main_DirectDrawSurface_AddAttachedSurface(LPDIRECTDRAWSURFACE7 iface,
122 LPDIRECTDRAWSURFACE7 pAttach);
123 HRESULT WINAPI
124 Main_DirectDrawSurface_AddOverlayDirtyRect(LPDIRECTDRAWSURFACE7 iface,
125 LPRECT pRect);
126 HRESULT WINAPI
127 Main_DirectDrawSurface_BltBatch(LPDIRECTDRAWSURFACE7 iface,
128 LPDDBLTBATCH pBatch, DWORD dwCount,
129 DWORD dwFlags);
130 HRESULT WINAPI
131 Main_DirectDrawSurface_ChangeUniquenessValue(LPDIRECTDRAWSURFACE7 iface);
132 HRESULT WINAPI
133 Main_DirectDrawSurface_DeleteAttachedSurface(LPDIRECTDRAWSURFACE7 iface,
134 DWORD dwFlags,
135 LPDIRECTDRAWSURFACE7 pAttach);
136 HRESULT WINAPI
137 Main_DirectDrawSurface_EnumAttachedSurfaces(LPDIRECTDRAWSURFACE7 iface,
138 LPVOID context,
139 LPDDENUMSURFACESCALLBACK7 cb);
140 HRESULT WINAPI
141 Main_DirectDrawSurface_EnumOverlayZOrders(LPDIRECTDRAWSURFACE7 iface,
142 DWORD dwFlags, LPVOID context,
143 LPDDENUMSURFACESCALLBACK7 cb);
144 HRESULT WINAPI
145 Main_DirectDrawSurface_Flip(LPDIRECTDRAWSURFACE7 iface,
146 LPDIRECTDRAWSURFACE7 override, DWORD dwFlags);
147 HRESULT WINAPI
148 Main_DirectDrawSurface_FreePrivateData(LPDIRECTDRAWSURFACE7 iface,
149 REFGUID tag);
150 HRESULT WINAPI
151 Main_DirectDrawSurface_GetAttachedSurface(LPDIRECTDRAWSURFACE7 iface,
152 LPDDSCAPS2 pCaps,
153 LPDIRECTDRAWSURFACE7* ppSurface);
154 HRESULT WINAPI
155 Main_DirectDrawSurface_GetBltStatus(LPDIRECTDRAWSURFACE7 iface,
156 DWORD dwFlags);
157 HRESULT WINAPI
158 Main_DirectDrawSurface_GetCaps(LPDIRECTDRAWSURFACE7 iface,
159 LPDDSCAPS2 pCaps);
160 HRESULT WINAPI
161 Main_DirectDrawSurface_GetClipper(LPDIRECTDRAWSURFACE7 iface,
162 LPDIRECTDRAWCLIPPER* ppClipper);
163 HRESULT WINAPI
164 Main_DirectDrawSurface_GetColorKey(LPDIRECTDRAWSURFACE7 iface,
165 DWORD dwFlags, LPDDCOLORKEY pCKey);
166 HRESULT WINAPI
167 Main_DirectDrawSurface_GetDC(LPDIRECTDRAWSURFACE7 iface, HDC *phDC);
168 HRESULT WINAPI
169 Main_DirectDrawSurface_GetDDInterface(LPDIRECTDRAWSURFACE7 iface,
170 LPVOID* pDD);
171 HRESULT WINAPI
172 Main_DirectDrawSurface_GetFlipStatus(LPDIRECTDRAWSURFACE7 iface,
173 DWORD dwFlags);
174 HRESULT WINAPI
175 Main_DirectDrawSurface_GetLOD(LPDIRECTDRAWSURFACE7 iface,
176 LPDWORD pdwMaxLOD);
177 HRESULT WINAPI
178 Main_DirectDrawSurface_GetOverlayPosition(LPDIRECTDRAWSURFACE7 iface,
179 LPLONG pX, LPLONG pY);
180 HRESULT WINAPI
181 Main_DirectDrawSurface_GetPalette(LPDIRECTDRAWSURFACE7 iface,
182 LPDIRECTDRAWPALETTE* ppPalette);
183 HRESULT WINAPI
184 Main_DirectDrawSurface_GetPixelFormat(LPDIRECTDRAWSURFACE7 iface,
185 LPDDPIXELFORMAT pDDPixelFormat);
186 HRESULT WINAPI
187 Main_DirectDrawSurface_GetPriority(LPDIRECTDRAWSURFACE7 iface,
188 LPDWORD pdwPriority);
189 HRESULT WINAPI
190 Main_DirectDrawSurface_GetPrivateData(LPDIRECTDRAWSURFACE7 iface, REFGUID tag,
191 LPVOID pBuffer, LPDWORD pcbBufferSize);
192 HRESULT WINAPI
193 Main_DirectDrawSurface_GetSurfaceDesc(LPDIRECTDRAWSURFACE7 iface,
194 LPDDSURFACEDESC2 pDDSD);
195 HRESULT WINAPI
196 Main_DirectDrawSurface_GetUniquenessValue(LPDIRECTDRAWSURFACE7 iface,
197 LPDWORD pValue);
198 HRESULT WINAPI
199 Main_DirectDrawSurface_Initialize(LPDIRECTDRAWSURFACE7 iface,
200 LPDIRECTDRAW pDD, LPDDSURFACEDESC2 pDDSD);
201 HRESULT WINAPI
202 Main_DirectDrawSurface_IsLost(LPDIRECTDRAWSURFACE7 iface);
203 HRESULT WINAPI
204 Main_DirectDrawSurface_Lock(LPDIRECTDRAWSURFACE7 iface, LPRECT prect,
205 LPDDSURFACEDESC2 pDDSD, DWORD flags, HANDLE h);
206 HRESULT WINAPI
207 Main_DirectDrawSurface_PageLock(LPDIRECTDRAWSURFACE7 iface, DWORD dwFlags);
208 HRESULT WINAPI
209 Main_DirectDrawSurface_PageUnlock(LPDIRECTDRAWSURFACE7 iface, DWORD dwFlags);
210 HRESULT WINAPI
211 Main_DirectDrawSurface_ReleaseDC(LPDIRECTDRAWSURFACE7 iface, HDC hDC);
212 HRESULT WINAPI
213 Main_DirectDrawSurface_SetClipper(LPDIRECTDRAWSURFACE7 iface,
214 LPDIRECTDRAWCLIPPER pDDClipper);
215 HRESULT WINAPI
216 Main_DirectDrawSurface_SetColorKey(LPDIRECTDRAWSURFACE7 iface,
217 DWORD dwFlags, LPDDCOLORKEY pCKey);
218 HRESULT WINAPI
219 Main_DirectDrawSurface_SetLOD(LPDIRECTDRAWSURFACE7 iface, DWORD dwMaxLOD);
220 HRESULT WINAPI
221 Main_DirectDrawSurface_SetOverlayPosition(LPDIRECTDRAWSURFACE7 iface,
222 LONG X, LONG Y);
223 HRESULT WINAPI
224 Main_DirectDrawSurface_SetPalette(LPDIRECTDRAWSURFACE7 iface,
225 LPDIRECTDRAWPALETTE pPalette);
226 HRESULT WINAPI
227 Main_DirectDrawSurface_SetPriority(LPDIRECTDRAWSURFACE7 iface,
228 DWORD dwPriority);
229 HRESULT WINAPI
230 Main_DirectDrawSurface_SetPrivateData(LPDIRECTDRAWSURFACE7 iface,
231 REFGUID tag, LPVOID pData,
232 DWORD cbSize, DWORD dwFlags);
233 HRESULT WINAPI
234 Main_DirectDrawSurface_Unlock(LPDIRECTDRAWSURFACE7 iface, LPRECT pRect);
235 HRESULT WINAPI
236 Main_DirectDrawSurface_UpdateOverlay(LPDIRECTDRAWSURFACE7 iface,
237 LPRECT pSrcRect,
238 LPDIRECTDRAWSURFACE7 pDstSurface,
239 LPRECT pDstRect, DWORD dwFlags,
240 LPDDOVERLAYFX pFX);
241 HRESULT WINAPI
242 Main_DirectDrawSurface_UpdateOverlayDisplay(LPDIRECTDRAWSURFACE7 iface,
243 DWORD dwFlags);
244 HRESULT WINAPI
245 Main_DirectDrawSurface_UpdateOverlayZOrder(LPDIRECTDRAWSURFACE7 iface,
246 DWORD dwFlags,
247 LPDIRECTDRAWSURFACE7 pDDSRef);
249 #endif