Commit 5963483f authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Remove COM from the palette.

parent fe3cfb3e
...@@ -426,8 +426,7 @@ struct IDirectDrawPaletteImpl ...@@ -426,8 +426,7 @@ struct IDirectDrawPaletteImpl
const IDirectDrawPaletteVtbl *lpVtbl; const IDirectDrawPaletteVtbl *lpVtbl;
LONG ref; LONG ref;
/* WineD3D uplink */ struct wined3d_palette *wineD3DPalette;
IWineD3DPalette *wineD3DPalette;
/* IDirectDrawPalette fields */ /* IDirectDrawPalette fields */
IUnknown *ifaceToRelease; IUnknown *ifaceToRelease;
......
...@@ -98,7 +98,7 @@ IDirectDrawPaletteImpl_Release(IDirectDrawPalette *iface) ...@@ -98,7 +98,7 @@ IDirectDrawPaletteImpl_Release(IDirectDrawPalette *iface)
if (ref == 0) if (ref == 0)
{ {
EnterCriticalSection(&ddraw_cs); EnterCriticalSection(&ddraw_cs);
IWineD3DPalette_Release(This->wineD3DPalette); wined3d_palette_decref(This->wineD3DPalette);
if(This->ifaceToRelease) if(This->ifaceToRelease)
{ {
IUnknown_Release(This->ifaceToRelease); IUnknown_Release(This->ifaceToRelease);
...@@ -156,14 +156,14 @@ IDirectDrawPaletteImpl_GetCaps(IDirectDrawPalette *iface, ...@@ -156,14 +156,14 @@ IDirectDrawPaletteImpl_GetCaps(IDirectDrawPalette *iface,
DWORD *Caps) DWORD *Caps)
{ {
IDirectDrawPaletteImpl *This = (IDirectDrawPaletteImpl *)iface; IDirectDrawPaletteImpl *This = (IDirectDrawPaletteImpl *)iface;
HRESULT hr;
TRACE("iface %p, caps %p.\n", iface, Caps); TRACE("iface %p, caps %p.\n", iface, Caps);
EnterCriticalSection(&ddraw_cs); EnterCriticalSection(&ddraw_cs);
hr = IWineD3DPalette_GetCaps(This->wineD3DPalette, Caps); *Caps = wined3d_palette_get_flags(This->wineD3DPalette);
LeaveCriticalSection(&ddraw_cs); LeaveCriticalSection(&ddraw_cs);
return hr;
return D3D_OK;
} }
/***************************************************************************** /*****************************************************************************
...@@ -201,7 +201,7 @@ IDirectDrawPaletteImpl_SetEntries(IDirectDrawPalette *iface, ...@@ -201,7 +201,7 @@ IDirectDrawPaletteImpl_SetEntries(IDirectDrawPalette *iface,
return DDERR_INVALIDPARAMS; return DDERR_INVALIDPARAMS;
EnterCriticalSection(&ddraw_cs); EnterCriticalSection(&ddraw_cs);
hr = IWineD3DPalette_SetEntries(This->wineD3DPalette, Flags, Start, Count, PalEnt); hr = wined3d_palette_set_entries(This->wineD3DPalette, Flags, Start, Count, PalEnt);
LeaveCriticalSection(&ddraw_cs); LeaveCriticalSection(&ddraw_cs);
return hr; return hr;
} }
...@@ -240,7 +240,7 @@ IDirectDrawPaletteImpl_GetEntries(IDirectDrawPalette *iface, ...@@ -240,7 +240,7 @@ IDirectDrawPaletteImpl_GetEntries(IDirectDrawPalette *iface,
return DDERR_INVALIDPARAMS; return DDERR_INVALIDPARAMS;
EnterCriticalSection(&ddraw_cs); EnterCriticalSection(&ddraw_cs);
hr = IWineD3DPalette_GetEntries(This->wineD3DPalette, Flags, Start, Count, PalEnt); hr = wined3d_palette_get_entries(This->wineD3DPalette, Flags, Start, Count, PalEnt);
LeaveCriticalSection(&ddraw_cs); LeaveCriticalSection(&ddraw_cs);
return hr; return hr;
} }
......
...@@ -2717,7 +2717,7 @@ static HRESULT WINAPI ddraw_surface3_SetSurfaceDesc(IDirectDrawSurface3 *iface, ...@@ -2717,7 +2717,7 @@ static HRESULT WINAPI ddraw_surface3_SetSurfaceDesc(IDirectDrawSurface3 *iface,
static HRESULT WINAPI ddraw_surface7_GetPalette(IDirectDrawSurface7 *iface, IDirectDrawPalette **Pal) static HRESULT WINAPI ddraw_surface7_GetPalette(IDirectDrawSurface7 *iface, IDirectDrawPalette **Pal)
{ {
IDirectDrawSurfaceImpl *This = (IDirectDrawSurfaceImpl *)iface; IDirectDrawSurfaceImpl *This = (IDirectDrawSurfaceImpl *)iface;
IWineD3DPalette *wPal; struct wined3d_palette *wined3d_palette;
HRESULT hr; HRESULT hr;
TRACE("iface %p, palette %p.\n", iface, Pal); TRACE("iface %p, palette %p.\n", iface, Pal);
...@@ -2726,16 +2726,16 @@ static HRESULT WINAPI ddraw_surface7_GetPalette(IDirectDrawSurface7 *iface, IDir ...@@ -2726,16 +2726,16 @@ static HRESULT WINAPI ddraw_surface7_GetPalette(IDirectDrawSurface7 *iface, IDir
return DDERR_INVALIDPARAMS; return DDERR_INVALIDPARAMS;
EnterCriticalSection(&ddraw_cs); EnterCriticalSection(&ddraw_cs);
hr = IWineD3DSurface_GetPalette(This->WineD3DSurface, &wPal); hr = IWineD3DSurface_GetPalette(This->WineD3DSurface, &wined3d_palette);
if(hr != DD_OK) if (FAILED(hr))
{ {
LeaveCriticalSection(&ddraw_cs); LeaveCriticalSection(&ddraw_cs);
return hr; return hr;
} }
if(wPal) if (wined3d_palette)
{ {
*Pal = IWineD3DPalette_GetParent(wPal); *Pal = wined3d_palette_get_parent(wined3d_palette);
IDirectDrawPalette_AddRef(*Pal); IDirectDrawPalette_AddRef(*Pal);
} }
else else
...@@ -3227,7 +3227,7 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu ...@@ -3227,7 +3227,7 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
for (;;) for (;;)
{ {
IWineD3DPalette *wined3d_dst_pal, *wined3d_src_pal; struct wined3d_palette *wined3d_dst_pal, *wined3d_src_pal;
IDirectDrawPalette *dst_pal = NULL, *src_pal = NULL; IDirectDrawPalette *dst_pal = NULL, *src_pal = NULL;
DDSURFACEDESC *src_desc, *dst_desc; DDSURFACEDESC *src_desc, *dst_desc;
...@@ -3245,7 +3245,8 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu ...@@ -3245,7 +3245,8 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
LeaveCriticalSection(&ddraw_cs); LeaveCriticalSection(&ddraw_cs);
return D3DERR_TEXTURE_LOAD_FAILED; return D3DERR_TEXTURE_LOAD_FAILED;
} }
if (wined3d_dst_pal) dst_pal = IWineD3DPalette_GetParent(wined3d_dst_pal); if (wined3d_dst_pal)
dst_pal = wined3d_palette_get_parent(wined3d_dst_pal);
hr = IWineD3DSurface_GetPalette(src_surface->WineD3DSurface, &wined3d_src_pal); hr = IWineD3DSurface_GetPalette(src_surface->WineD3DSurface, &wined3d_src_pal);
if (FAILED(hr)) if (FAILED(hr))
...@@ -3254,7 +3255,8 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu ...@@ -3254,7 +3255,8 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
LeaveCriticalSection(&ddraw_cs); LeaveCriticalSection(&ddraw_cs);
return D3DERR_TEXTURE_LOAD_FAILED; return D3DERR_TEXTURE_LOAD_FAILED;
} }
if (wined3d_src_pal) src_pal = IWineD3DPalette_GetParent(wined3d_src_pal); if (wined3d_src_pal)
src_pal = wined3d_palette_get_parent(wined3d_src_pal);
if (src_pal) if (src_pal)
{ {
......
...@@ -30,51 +30,31 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d); ...@@ -30,51 +30,31 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d);
#define SIZE_BITS (WINEDDPCAPS_1BIT | WINEDDPCAPS_2BIT | WINEDDPCAPS_4BIT | WINEDDPCAPS_8BIT) #define SIZE_BITS (WINEDDPCAPS_1BIT | WINEDDPCAPS_2BIT | WINEDDPCAPS_4BIT | WINEDDPCAPS_8BIT)
static HRESULT WINAPI IWineD3DPaletteImpl_QueryInterface(IWineD3DPalette *iface, REFIID riid, void **object) ULONG CDECL wined3d_palette_incref(struct wined3d_palette *palette)
{ {
TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object); ULONG refcount = InterlockedIncrement(&palette->ref);
if (IsEqualGUID(riid, &IID_IWineD3DPalette) TRACE("%p increasing refcount to %u.\n", palette, refcount);
|| IsEqualGUID(riid, &IID_IWineD3DBase)
|| IsEqualGUID(riid, &IID_IUnknown))
{
IUnknown_AddRef(iface);
*object = iface;
return S_OK;
}
WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
*object = NULL;
return E_NOINTERFACE;
}
static ULONG WINAPI IWineD3DPaletteImpl_AddRef(IWineD3DPalette *iface) { return refcount;
IWineD3DPaletteImpl *This = (IWineD3DPaletteImpl *)iface;
ULONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p)->() incrementing from %u.\n", This, ref - 1);
return ref;
} }
static ULONG WINAPI IWineD3DPaletteImpl_Release(IWineD3DPalette *iface) { ULONG CDECL wined3d_palette_decref(struct wined3d_palette *palette)
IWineD3DPaletteImpl *This = (IWineD3DPaletteImpl *)iface; {
ULONG ref = InterlockedDecrement(&This->ref); ULONG refcount = InterlockedDecrement(&palette->ref);
TRACE("(%p)->() decrementing from %u.\n", This, ref + 1); TRACE("%p decreasing refcount to %u.\n", palette, refcount);
if (!ref) { if (!refcount)
DeleteObject(This->hpal); {
HeapFree(GetProcessHeap(), 0, This); DeleteObject(palette->hpal);
return 0; HeapFree(GetProcessHeap(), 0, palette);
} }
return ref; return refcount;
} }
/* Not called from the vtable */ static WORD wined3d_palette_size(DWORD flags)
static WORD IWineD3DPaletteImpl_Size(DWORD flags)
{ {
switch (flags & SIZE_BITS) switch (flags & SIZE_BITS)
{ {
...@@ -88,85 +68,75 @@ static WORD IWineD3DPaletteImpl_Size(DWORD flags) ...@@ -88,85 +68,75 @@ static WORD IWineD3DPaletteImpl_Size(DWORD flags)
} }
} }
static HRESULT WINAPI IWineD3DPaletteImpl_GetEntries(IWineD3DPalette *iface, HRESULT CDECL wined3d_palette_get_entries(const struct wined3d_palette *palette,
DWORD flags, DWORD Start, DWORD Count, PALETTEENTRY *PalEnt) DWORD flags, DWORD start, DWORD count, PALETTEENTRY *entries)
{ {
IWineD3DPaletteImpl *This = (IWineD3DPaletteImpl *)iface; TRACE("palette %p, flags %#x, start %u, count %u, entries %p.\n",
palette, flags, start, count, entries);
TRACE("iface %p, flags %#x, start %u, count %u, entries %p.\n",
iface, flags, Start, Count, PalEnt);
if (flags) return WINED3DERR_INVALIDCALL; /* unchecked */ if (flags) return WINED3DERR_INVALIDCALL; /* unchecked */
if (Start + Count > IWineD3DPaletteImpl_Size(This->flags)) if (start + count > wined3d_palette_size(palette->flags))
return WINED3DERR_INVALIDCALL; return WINED3DERR_INVALIDCALL;
if (This->flags & WINEDDPCAPS_8BITENTRIES) if (palette->flags & WINEDDPCAPS_8BITENTRIES)
{ {
BYTE *entry = (BYTE *)entries;
unsigned int i; unsigned int i;
LPBYTE entry = (LPBYTE)PalEnt;
for (i=Start; i < Count+Start; i++) for (i = start; i < count + start; ++i)
*entry++ = This->palents[i].peRed; *entry++ = palette->palents[i].peRed;
} }
else else
memcpy(PalEnt, This->palents+Start, Count * sizeof(PALETTEENTRY)); memcpy(entries, palette->palents + start, count * sizeof(*entries));
return WINED3D_OK; return WINED3D_OK;
} }
static HRESULT WINAPI IWineD3DPaletteImpl_SetEntries(IWineD3DPalette *iface, HRESULT CDECL wined3d_palette_set_entries(struct wined3d_palette *palette,
DWORD flags, DWORD Start, DWORD Count, const PALETTEENTRY *PalEnt) DWORD flags, DWORD start, DWORD count, const PALETTEENTRY *entries)
{ {
IWineD3DPaletteImpl *This = (IWineD3DPaletteImpl *)iface;
IWineD3DResourceImpl *res; IWineD3DResourceImpl *res;
TRACE("iface %p, flags %#x, start %u, count %u, entries %p.\n", TRACE("palette %p, flags %#x, start %u, count %u, entries %p.\n",
iface, flags, Start, Count, PalEnt); palette, flags, start, count, entries);
TRACE("Palette flags: %#x.\n", This->flags); TRACE("Palette flags: %#x.\n", palette->flags);
if (This->flags & WINEDDPCAPS_8BITENTRIES) if (palette->flags & WINEDDPCAPS_8BITENTRIES)
{ {
const BYTE *entry = (const BYTE *)entries;
unsigned int i; unsigned int i;
const BYTE* entry = (const BYTE*)PalEnt;
for (i=Start; i < Count+Start; i++) for (i = start; i < count + start; ++i)
This->palents[i].peRed = *entry++; palette->palents[i].peRed = *entry++;
} }
else { else
memcpy(This->palents+Start, PalEnt, Count * sizeof(PALETTEENTRY)); {
memcpy(palette->palents + start, entries, count * sizeof(*palette->palents));
/* When WINEDDCAPS_ALLOW256 isn't set we need to override entry 0 with black and 255 with white */ /* When WINEDDCAPS_ALLOW256 isn't set we need to override entry 0 with black and 255 with white */
if (!(This->flags & WINEDDPCAPS_ALLOW256)) if (!(palette->flags & WINEDDPCAPS_ALLOW256))
{ {
TRACE("WINEDDPCAPS_ALLOW256 set, overriding palette entry 0 with black and 255 with white\n"); TRACE("WINEDDPCAPS_ALLOW256 set, overriding palette entry 0 with black and 255 with white\n");
This->palents[0].peRed = 0; palette->palents[0].peRed = 0;
This->palents[0].peGreen = 0; palette->palents[0].peGreen = 0;
This->palents[0].peBlue = 0; palette->palents[0].peBlue = 0;
This->palents[255].peRed = 255; palette->palents[255].peRed = 255;
This->palents[255].peGreen = 255; palette->palents[255].peGreen = 255;
This->palents[255].peBlue = 255; palette->palents[255].peBlue = 255;
} }
if (This->hpal) if (palette->hpal)
SetPaletteEntries(This->hpal, Start, Count, This->palents+Start); SetPaletteEntries(palette->hpal, start, count, palette->palents + start);
} }
#if 0
/* Now, if we are in 'depth conversion mode', update the screen palette */
/* FIXME: we need to update the image or we won't get palette fading. */
if (This->ddraw->d->palette_convert)
This->ddraw->d->palette_convert(palent,This->screen_palents,start,count);
#endif
/* If the palette is attached to the render target, update all render targets */ /* If the palette is attached to the render target, update all render targets */
LIST_FOR_EACH_ENTRY(res, &palette->device->resources, IWineD3DResourceImpl, resource.resource_list_entry)
LIST_FOR_EACH_ENTRY(res, &This->device->resources, IWineD3DResourceImpl, resource.resource_list_entry)
{ {
if (IWineD3DResource_GetType((IWineD3DResource *)res) == WINED3DRTYPE_SURFACE) if (IWineD3DResource_GetType((IWineD3DResource *)res) == WINED3DRTYPE_SURFACE)
{ {
IWineD3DSurfaceImpl *surface = (IWineD3DSurfaceImpl *)res; IWineD3DSurfaceImpl *surface = (IWineD3DSurfaceImpl *)res;
if (surface->palette == This) if (surface->palette == palette)
surface->surface_ops->surface_realize_palette(surface); surface->surface_ops->surface_realize_palette(surface);
} }
} }
...@@ -174,46 +144,31 @@ static HRESULT WINAPI IWineD3DPaletteImpl_SetEntries(IWineD3DPalette *iface, ...@@ -174,46 +144,31 @@ static HRESULT WINAPI IWineD3DPaletteImpl_SetEntries(IWineD3DPalette *iface,
return WINED3D_OK; return WINED3D_OK;
} }
static HRESULT WINAPI IWineD3DPaletteImpl_GetCaps(IWineD3DPalette *iface, DWORD *Caps) { DWORD CDECL wined3d_palette_get_flags(const struct wined3d_palette *palette)
IWineD3DPaletteImpl *This = (IWineD3DPaletteImpl *)iface; {
TRACE("(%p)->(%p)\n", This, Caps); TRACE("palette %p.\n", palette);
*Caps = This->flags; return palette->flags;
return WINED3D_OK;
} }
static void * WINAPI IWineD3DPaletteImpl_GetParent(IWineD3DPalette *iface) void * CDECL wined3d_palette_get_parent(const struct wined3d_palette *palette)
{ {
TRACE("iface %p.\n", iface); TRACE("palette %p.\n", palette);
return ((IWineD3DPaletteImpl *)iface)->parent; return palette->parent;
} }
static const IWineD3DPaletteVtbl IWineD3DPalette_Vtbl =
{
/*** IUnknown ***/
IWineD3DPaletteImpl_QueryInterface,
IWineD3DPaletteImpl_AddRef,
IWineD3DPaletteImpl_Release,
/*** IWineD3DPalette ***/
IWineD3DPaletteImpl_GetParent,
IWineD3DPaletteImpl_GetEntries,
IWineD3DPaletteImpl_GetCaps,
IWineD3DPaletteImpl_SetEntries
};
HRESULT wined3d_palette_init(IWineD3DPaletteImpl *palette, IWineD3DDeviceImpl *device, HRESULT wined3d_palette_init(IWineD3DPaletteImpl *palette, IWineD3DDeviceImpl *device,
DWORD flags, const PALETTEENTRY *entries, void *parent) DWORD flags, const PALETTEENTRY *entries, void *parent)
{ {
HRESULT hr; HRESULT hr;
palette->lpVtbl = &IWineD3DPalette_Vtbl;
palette->ref = 1; palette->ref = 1;
palette->parent = parent; palette->parent = parent;
palette->device = device; palette->device = device;
palette->flags = flags; palette->flags = flags;
palette->palNumEntries = IWineD3DPaletteImpl_Size(flags); palette->palNumEntries = wined3d_palette_size(flags);
palette->hpal = CreatePalette((const LOGPALETTE *)&palette->palVersion); palette->hpal = CreatePalette((const LOGPALETTE *)&palette->palVersion);
if (!palette->hpal) if (!palette->hpal)
{ {
...@@ -221,7 +176,7 @@ HRESULT wined3d_palette_init(IWineD3DPaletteImpl *palette, IWineD3DDeviceImpl *d ...@@ -221,7 +176,7 @@ HRESULT wined3d_palette_init(IWineD3DPaletteImpl *palette, IWineD3DDeviceImpl *d
return E_FAIL; return E_FAIL;
} }
hr = IWineD3DPalette_SetEntries((IWineD3DPalette *)palette, 0, 0, IWineD3DPaletteImpl_Size(flags), entries); hr = wined3d_palette_set_entries(palette, 0, 0, wined3d_palette_size(flags), entries);
if (FAILED(hr)) if (FAILED(hr))
{ {
WARN("Failed to set palette entries, hr %#x.\n", hr); WARN("Failed to set palette entries, hr %#x.\n", hr);
......
...@@ -22,6 +22,13 @@ ...@@ -22,6 +22,13 @@
@ cdecl wined3d_device_create(ptr long long ptr long ptr ptr) @ cdecl wined3d_device_create(ptr long long ptr long ptr ptr)
@ cdecl wined3d_palette_decref(ptr)
@ cdecl wined3d_palette_get_entries(ptr long long long ptr)
@ cdecl wined3d_palette_get_flags(ptr)
@ cdecl wined3d_palette_get_parent(ptr)
@ cdecl wined3d_palette_incref(ptr)
@ cdecl wined3d_palette_set_entries(ptr long long long ptr)
@ cdecl wined3d_stateblock_apply(ptr) @ cdecl wined3d_stateblock_apply(ptr)
@ cdecl wined3d_stateblock_capture(ptr) @ cdecl wined3d_stateblock_capture(ptr)
@ cdecl wined3d_stateblock_decref(ptr) @ cdecl wined3d_stateblock_decref(ptr)
......
...@@ -53,12 +53,13 @@ ...@@ -53,12 +53,13 @@
#define WINED3D_QUIRK_FBO_TEX_UPDATE 0x00000020 #define WINED3D_QUIRK_FBO_TEX_UPDATE 0x00000020
typedef struct IWineD3DSurfaceImpl IWineD3DSurfaceImpl; typedef struct IWineD3DSurfaceImpl IWineD3DSurfaceImpl;
typedef struct IWineD3DPaletteImpl IWineD3DPaletteImpl;
typedef struct IWineD3DDeviceImpl IWineD3DDeviceImpl; typedef struct IWineD3DDeviceImpl IWineD3DDeviceImpl;
typedef struct IWineD3DSwapChainImpl IWineD3DSwapChainImpl; typedef struct IWineD3DSwapChainImpl IWineD3DSwapChainImpl;
struct IWineD3DBaseShaderImpl; struct IWineD3DBaseShaderImpl;
struct IWineD3DBaseTextureImpl; struct IWineD3DBaseTextureImpl;
struct IWineD3DResourceImpl; struct IWineD3DResourceImpl;
typedef struct wined3d_palette IWineD3DPaletteImpl;
typedef struct wined3d_palette IWineD3DPalette;
/* Texture format fixups */ /* Texture format fixups */
...@@ -2941,18 +2942,12 @@ static const float srgb_pow = 0.41666f; ...@@ -2941,18 +2942,12 @@ static const float srgb_pow = 0.41666f;
static const float srgb_mul_high = 1.055f; static const float srgb_mul_high = 1.055f;
static const float srgb_sub_high = 0.055f; static const float srgb_sub_high = 0.055f;
/***************************************************************************** struct wined3d_palette
* IWineD3DPalette implementation structure {
*/ LONG ref;
struct IWineD3DPaletteImpl {
/* IUnknown parts */
const IWineD3DPaletteVtbl *lpVtbl;
LONG ref;
void *parent; void *parent;
IWineD3DDeviceImpl *device; IWineD3DDeviceImpl *device;
/* IWineD3DPalette */
HPALETTE hpal; HPALETTE hpal;
WORD palVersion; /*| */ WORD palVersion; /*| */
WORD palNumEntries; /*| LOGPALETTE */ WORD palNumEntries; /*| LOGPALETTE */
......
...@@ -2111,6 +2111,7 @@ interface IWineD3DVolume; ...@@ -2111,6 +2111,7 @@ interface IWineD3DVolume;
interface IWineD3DSwapChain; interface IWineD3DSwapChain;
interface IWineD3DDevice; interface IWineD3DDevice;
struct wined3d; struct wined3d;
struct wined3d_palette;
struct wined3d_stateblock; struct wined3d_stateblock;
struct wined3d_vertex_declaration; struct wined3d_vertex_declaration;
...@@ -2237,30 +2238,6 @@ interface IWineD3DRendertargetView : IWineD3DBase ...@@ -2237,30 +2238,6 @@ interface IWineD3DRendertargetView : IWineD3DBase
[ [
object, object,
local, local,
uuid(f756720c-32b9-4439-b5a3-1d6c97037d9e)
]
interface IWineD3DPalette : IWineD3DBase
{
HRESULT GetEntries(
[in] DWORD flags,
[in] DWORD start,
[in] DWORD count,
[out] PALETTEENTRY *entries
);
HRESULT GetCaps(
[out] DWORD *caps
);
HRESULT SetEntries(
[in] DWORD flags,
[in] DWORD start,
[in] DWORD count,
[in] const PALETTEENTRY *entries
);
}
[
object,
local,
uuid(8f2bceb1-d338-488c-ab7f-0ec980bf5d2d) uuid(8f2bceb1-d338-488c-ab7f-0ec980bf5d2d)
] ]
interface IWineD3DClipper : IUnknown interface IWineD3DClipper : IUnknown
...@@ -2339,10 +2316,10 @@ interface IWineD3DSurface : IWineD3DResource ...@@ -2339,10 +2316,10 @@ interface IWineD3DSurface : IWineD3DResource
[in] DWORD trans [in] DWORD trans
); );
HRESULT GetPalette( HRESULT GetPalette(
[out] IWineD3DPalette **palette [out] struct wined3d_palette **palette
); );
HRESULT SetPalette( HRESULT SetPalette(
[in] IWineD3DPalette *palette [in] struct wined3d_palette *palette
); );
HRESULT SetColorKey( HRESULT SetColorKey(
[in] DWORD flags, [in] DWORD flags,
...@@ -2800,7 +2777,7 @@ interface IWineD3DDevice : IUnknown ...@@ -2800,7 +2777,7 @@ interface IWineD3DDevice : IUnknown
[in] DWORD flags, [in] DWORD flags,
[in] const PALETTEENTRY *palette_entry, [in] const PALETTEENTRY *palette_entry,
[in] void *parent, [in] void *parent,
[out] IWineD3DPalette **palette [out] struct wined3d_palette **palette
); );
HRESULT Init3D( HRESULT Init3D(
[in] WINED3DPRESENT_PARAMETERS *present_parameters [in] WINED3DPRESENT_PARAMETERS *present_parameters
...@@ -3298,6 +3275,15 @@ HRESULT __cdecl wined3d_device_create(struct wined3d *wined3d, UINT adapter_idx, ...@@ -3298,6 +3275,15 @@ HRESULT __cdecl wined3d_device_create(struct wined3d *wined3d, UINT adapter_idx,
WINED3DDEVTYPE device_type, HWND focus_window, DWORD behaviour_flags, WINED3DDEVTYPE device_type, HWND focus_window, DWORD behaviour_flags,
IWineD3DDeviceParent *device_parent, IWineD3DDevice **device); IWineD3DDeviceParent *device_parent, IWineD3DDevice **device);
ULONG __cdecl wined3d_palette_decref(struct wined3d_palette *palette);
HRESULT __cdecl wined3d_palette_get_entries(const struct wined3d_palette *palette,
DWORD flags, DWORD start, DWORD count, PALETTEENTRY *entries);
DWORD __cdecl wined3d_palette_get_flags(const struct wined3d_palette *palette);
void * __cdecl wined3d_palette_get_parent(const struct wined3d_palette *palette);
ULONG __cdecl wined3d_palette_incref(struct wined3d_palette *palette);
HRESULT __cdecl wined3d_palette_set_entries(struct wined3d_palette *palette,
DWORD flags, DWORD start, DWORD count, const PALETTEENTRY *entries);
HRESULT __cdecl wined3d_stateblock_apply(const struct wined3d_stateblock *stateblock); HRESULT __cdecl wined3d_stateblock_apply(const struct wined3d_stateblock *stateblock);
HRESULT __cdecl wined3d_stateblock_capture(struct wined3d_stateblock *stateblock); HRESULT __cdecl wined3d_stateblock_capture(struct wined3d_stateblock *stateblock);
ULONG __cdecl wined3d_stateblock_decref(struct wined3d_stateblock *stateblock); ULONG __cdecl wined3d_stateblock_decref(struct wined3d_stateblock *stateblock);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment