Moved mode setting out of .spec file into Makefile.
[wine/gsoc_dplay.git] / dlls / ddraw / dsurface / main.h
blob5615095d5d00b0f4244fc8fb92fe22cb40a05e86
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 "ddraw_private.h"
24 /* Support for IDirectDrawSurface7::Set/Get/FreePrivateData. I don't think
25 * anybody uses it for much so a good implementation is optional. */
26 typedef struct PrivateData
28 struct PrivateData* next;
29 struct PrivateData* prev;
31 GUID tag;
32 DWORD flags; /* DDSPD_* */
33 DWORD uniqueness_value;
35 union
37 LPVOID data;
38 LPUNKNOWN object;
39 } ptr;
41 DWORD size;
42 } PrivateData;
44 extern ICOM_VTABLE(IDirectDrawGammaControl) DDRAW_IDDGC_VTable;
46 /* Non-interface functions */
47 HRESULT
48 Main_DirectDrawSurface_Construct(IDirectDrawSurfaceImpl* This,
49 IDirectDrawImpl* pDD,
50 const DDSURFACEDESC2* pDDSD);
51 void Main_DirectDrawSurface_ForceDestroy(IDirectDrawSurfaceImpl* This);
53 void
54 Main_DirectDrawSurface_final_release(IDirectDrawSurfaceImpl* This);
55 HRESULT
56 Main_DirectDrawSurface_late_allocate(IDirectDrawSurfaceImpl* This);
57 BOOL
58 Main_DirectDrawSurface_attach(IDirectDrawSurfaceImpl *This,
59 IDirectDrawSurfaceImpl *to);
60 BOOL Main_DirectDrawSurface_detach(IDirectDrawSurfaceImpl *This);
61 void
62 Main_DirectDrawSurface_lock_update(IDirectDrawSurfaceImpl* This,
63 LPCRECT pRect, DWORD dwFlags);
64 void
65 Main_DirectDrawSurface_unlock_update(IDirectDrawSurfaceImpl* This,
66 LPCRECT pRect);
67 void
68 Main_DirectDrawSurface_lose_surface(IDirectDrawSurfaceImpl* This);
69 void
70 Main_DirectDrawSurface_set_palette(IDirectDrawSurfaceImpl* This,
71 IDirectDrawPaletteImpl* pal);
72 void
73 Main_DirectDrawSurface_update_palette(IDirectDrawSurfaceImpl* This,
74 IDirectDrawPaletteImpl* pal,
75 DWORD dwStart, DWORD dwCount,
76 LPPALETTEENTRY palent);
77 HWND
78 Main_DirectDrawSurface_get_display_window(IDirectDrawSurfaceImpl* This);
80 HRESULT
81 Main_DirectDrawSurface_get_gamma_ramp(IDirectDrawSurfaceImpl* This,
82 DWORD dwFlags,
83 LPDDGAMMARAMP lpGammaRamp);
84 HRESULT
85 Main_DirectDrawSurface_set_gamma_ramp(IDirectDrawSurfaceImpl* This,
86 DWORD dwFlags,
87 LPDDGAMMARAMP lpGammaRamp);
89 BOOL Main_DirectDrawSurface_flip_data(IDirectDrawSurfaceImpl* front,
90 IDirectDrawSurfaceImpl* back,
91 DWORD dwFlags);
93 #define CHECK_LOST(This) \
94 do { \
95 if (This->lost) return DDERR_SURFACELOST; \
96 } while (0)
98 #define CHECK_TEXTURE(This) \
99 do { \
100 if (!(This->surface_desc.ddsCaps.dwCaps2 \
101 & DDSCAPS2_TEXTUREMANAGE)) \
102 return DDERR_INVALIDOBJECT; \
103 } while (0)
105 #define LOCK_OBJECT(This) do { } while (0)
106 #define UNLOCK_OBJECT(This) do { } while (0)
108 /* IDirectDrawSurface7 (partial) implementation */
109 ULONG WINAPI
110 Main_DirectDrawSurface_AddRef(LPDIRECTDRAWSURFACE7 iface);
111 ULONG WINAPI
112 Main_DirectDrawSurface_Release(LPDIRECTDRAWSURFACE7 iface);
113 HRESULT WINAPI
114 Main_DirectDrawSurface_QueryInterface(LPDIRECTDRAWSURFACE7 iface, REFIID riid,
115 LPVOID* ppObj);
116 HRESULT WINAPI
117 Main_DirectDrawSurface_AddAttachedSurface(LPDIRECTDRAWSURFACE7 iface,
118 LPDIRECTDRAWSURFACE7 pAttach);
119 HRESULT WINAPI
120 Main_DirectDrawSurface_AddOverlayDirtyRect(LPDIRECTDRAWSURFACE7 iface,
121 LPRECT pRect);
122 HRESULT WINAPI
123 Main_DirectDrawSurface_BltBatch(LPDIRECTDRAWSURFACE7 iface,
124 LPDDBLTBATCH pBatch, DWORD dwCount,
125 DWORD dwFlags);
126 HRESULT WINAPI
127 Main_DirectDrawSurface_ChangeUniquenessValue(LPDIRECTDRAWSURFACE7 iface);
128 HRESULT WINAPI
129 Main_DirectDrawSurface_DeleteAttachedSurface(LPDIRECTDRAWSURFACE7 iface,
130 DWORD dwFlags,
131 LPDIRECTDRAWSURFACE7 pAttach);
132 HRESULT WINAPI
133 Main_DirectDrawSurface_EnumAttachedSurfaces(LPDIRECTDRAWSURFACE7 iface,
134 LPVOID context,
135 LPDDENUMSURFACESCALLBACK7 cb);
136 HRESULT WINAPI
137 Main_DirectDrawSurface_EnumOverlayZOrders(LPDIRECTDRAWSURFACE7 iface,
138 DWORD dwFlags, LPVOID context,
139 LPDDENUMSURFACESCALLBACK7 cb);
140 HRESULT WINAPI
141 Main_DirectDrawSurface_Flip(LPDIRECTDRAWSURFACE7 iface,
142 LPDIRECTDRAWSURFACE7 override, DWORD dwFlags);
143 HRESULT WINAPI
144 Main_DirectDrawSurface_FreePrivateData(LPDIRECTDRAWSURFACE7 iface,
145 REFGUID tag);
146 HRESULT WINAPI
147 Main_DirectDrawSurface_GetAttachedSurface(LPDIRECTDRAWSURFACE7 iface,
148 LPDDSCAPS2 pCaps,
149 LPDIRECTDRAWSURFACE7* ppSurface);
150 HRESULT WINAPI
151 Main_DirectDrawSurface_GetBltStatus(LPDIRECTDRAWSURFACE7 iface,
152 DWORD dwFlags);
153 HRESULT WINAPI
154 Main_DirectDrawSurface_GetCaps(LPDIRECTDRAWSURFACE7 iface,
155 LPDDSCAPS2 pCaps);
156 HRESULT WINAPI
157 Main_DirectDrawSurface_GetClipper(LPDIRECTDRAWSURFACE7 iface,
158 LPDIRECTDRAWCLIPPER* ppClipper);
159 HRESULT WINAPI
160 Main_DirectDrawSurface_GetColorKey(LPDIRECTDRAWSURFACE7 iface,
161 DWORD dwFlags, LPDDCOLORKEY pCKey);
162 HRESULT WINAPI
163 Main_DirectDrawSurface_GetDC(LPDIRECTDRAWSURFACE7 iface, HDC *phDC);
164 HRESULT WINAPI
165 Main_DirectDrawSurface_GetDDInterface(LPDIRECTDRAWSURFACE7 iface,
166 LPVOID* pDD);
167 HRESULT WINAPI
168 Main_DirectDrawSurface_GetFlipStatus(LPDIRECTDRAWSURFACE7 iface,
169 DWORD dwFlags);
170 HRESULT WINAPI
171 Main_DirectDrawSurface_GetLOD(LPDIRECTDRAWSURFACE7 iface,
172 LPDWORD pdwMaxLOD);
173 HRESULT WINAPI
174 Main_DirectDrawSurface_GetOverlayPosition(LPDIRECTDRAWSURFACE7 iface,
175 LPLONG pX, LPLONG pY);
176 HRESULT WINAPI
177 Main_DirectDrawSurface_GetPalette(LPDIRECTDRAWSURFACE7 iface,
178 LPDIRECTDRAWPALETTE* ppPalette);
179 HRESULT WINAPI
180 Main_DirectDrawSurface_GetPixelFormat(LPDIRECTDRAWSURFACE7 iface,
181 LPDDPIXELFORMAT pDDPixelFormat);
182 HRESULT WINAPI
183 Main_DirectDrawSurface_GetPriority(LPDIRECTDRAWSURFACE7 iface,
184 LPDWORD pdwPriority);
185 HRESULT WINAPI
186 Main_DirectDrawSurface_GetPrivateData(LPDIRECTDRAWSURFACE7 iface, REFGUID tag,
187 LPVOID pBuffer, LPDWORD pcbBufferSize);
188 HRESULT WINAPI
189 Main_DirectDrawSurface_GetSurfaceDesc(LPDIRECTDRAWSURFACE7 iface,
190 LPDDSURFACEDESC2 pDDSD);
191 HRESULT WINAPI
192 Main_DirectDrawSurface_GetUniquenessValue(LPDIRECTDRAWSURFACE7 iface,
193 LPDWORD pValue);
194 HRESULT WINAPI
195 Main_DirectDrawSurface_Initialize(LPDIRECTDRAWSURFACE7 iface,
196 LPDIRECTDRAW pDD, LPDDSURFACEDESC2 pDDSD);
197 HRESULT WINAPI
198 Main_DirectDrawSurface_IsLost(LPDIRECTDRAWSURFACE7 iface);
199 HRESULT WINAPI
200 Main_DirectDrawSurface_Lock(LPDIRECTDRAWSURFACE7 iface, LPRECT prect,
201 LPDDSURFACEDESC2 pDDSD, DWORD flags, HANDLE h);
202 HRESULT WINAPI
203 Main_DirectDrawSurface_PageLock(LPDIRECTDRAWSURFACE7 iface, DWORD dwFlags);
204 HRESULT WINAPI
205 Main_DirectDrawSurface_PageUnlock(LPDIRECTDRAWSURFACE7 iface, DWORD dwFlags);
206 HRESULT WINAPI
207 Main_DirectDrawSurface_ReleaseDC(LPDIRECTDRAWSURFACE7 iface, HDC hDC);
208 HRESULT WINAPI
209 Main_DirectDrawSurface_SetClipper(LPDIRECTDRAWSURFACE7 iface,
210 LPDIRECTDRAWCLIPPER pDDClipper);
211 HRESULT WINAPI
212 Main_DirectDrawSurface_SetColorKey(LPDIRECTDRAWSURFACE7 iface,
213 DWORD dwFlags, LPDDCOLORKEY pCKey);
214 HRESULT WINAPI
215 Main_DirectDrawSurface_SetLOD(LPDIRECTDRAWSURFACE7 iface, DWORD dwMaxLOD);
216 HRESULT WINAPI
217 Main_DirectDrawSurface_SetOverlayPosition(LPDIRECTDRAWSURFACE7 iface,
218 LONG X, LONG Y);
219 HRESULT WINAPI
220 Main_DirectDrawSurface_SetPalette(LPDIRECTDRAWSURFACE7 iface,
221 LPDIRECTDRAWPALETTE pPalette);
222 HRESULT WINAPI
223 Main_DirectDrawSurface_SetPriority(LPDIRECTDRAWSURFACE7 iface,
224 DWORD dwPriority);
225 HRESULT WINAPI
226 Main_DirectDrawSurface_SetPrivateData(LPDIRECTDRAWSURFACE7 iface,
227 REFGUID tag, LPVOID pData,
228 DWORD cbSize, DWORD dwFlags);
229 HRESULT WINAPI
230 Main_DirectDrawSurface_Unlock(LPDIRECTDRAWSURFACE7 iface, LPRECT pRect);
231 HRESULT WINAPI
232 Main_DirectDrawSurface_UpdateOverlay(LPDIRECTDRAWSURFACE7 iface,
233 LPRECT pSrcRect,
234 LPDIRECTDRAWSURFACE7 pDstSurface,
235 LPRECT pDstRect, DWORD dwFlags,
236 LPDDOVERLAYFX pFX);
237 HRESULT WINAPI
238 Main_DirectDrawSurface_UpdateOverlayDisplay(LPDIRECTDRAWSURFACE7 iface,
239 DWORD dwFlags);
240 HRESULT WINAPI
241 Main_DirectDrawSurface_UpdateOverlayZOrder(LPDIRECTDRAWSURFACE7 iface,
242 DWORD dwFlags,
243 LPDIRECTDRAWSURFACE7 pDDSRef);
245 #endif