Commit 022d2df0 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

include: Add ID3DX10Font/ID3DX10Sprite definitions.

parent 3ea09b79
......@@ -18,8 +18,60 @@
#include "d3dx10.h"
DEFINE_GUID(IID_ID3DX10Font, 0xd79dbb70, 0x5f21, 0x4d36, 0xbb, 0xc2, 0xff, 0x52, 0x5c, 0x21, 0x3c, 0xdc);
DEFINE_GUID(IID_ID3DX10Sprite, 0xba0b762d, 0x8d28, 0x43ec, 0xb9, 0xdc, 0x2f, 0x84, 0x44, 0x3b, 0x06, 0x14);
DEFINE_GUID(IID_ID3DX10ThreadPump, 0xc93fecfa, 0x6967, 0x478a, 0xab, 0xbc, 0x40, 0x2d, 0x90, 0x62, 0x1f, 0xcb);
typedef enum _D3DX10_SPRITE_FLAG
{
D3DX10_SPRITE_SORT_TEXTURE = 0x01,
D3DX10_SPRITE_SORT_DEPTH_BACK_TO_FRONT = 0x02,
D3DX10_SPRITE_SORT_DEPTH_FRONT_TO_BACK = 0x04,
D3DX10_SPRITE_SAVE_STATE = 0x08,
D3DX10_SPRITE_ADDREF_TEXTURES = 0x10,
} D3DX10_SPRITE_FLAG;
typedef struct _D3DX10_SPRITE
{
D3DXMATRIX matWorld;
D3DXVECTOR2 TexCoord;
D3DXVECTOR2 TexSize;
D3DXCOLOR ColorModulate;
ID3D10ShaderResourceView *pTexture;
UINT TextureIndex;
} D3DX10_SPRITE;
typedef struct _D3DX10_FONT_DESCA
{
INT Height;
UINT Width;
UINT Weight;
UINT MipLevels;
BOOL Italic;
BYTE CharSet;
BYTE OutputPrecision;
BYTE Quality;
BYTE PitchAndFamily;
CHAR FaceName[LF_FACESIZE];
} D3DX10_FONT_DESCA, *LPD3DX10_FONT_DESCA;
typedef struct _D3DX10_FONT_DESCW
{
INT Height;
UINT Width;
UINT Weight;
UINT MipLevels;
BOOL Italic;
BYTE CharSet;
BYTE OutputPrecision;
BYTE Quality;
BYTE PitchAndFamily;
WCHAR FaceName[LF_FACESIZE];
} D3DX10_FONT_DESCW, *LPD3DX10_FONT_DESCW;
DECL_WINELIB_TYPE_AW(D3DX10_FONT_DESC)
DECL_WINELIB_TYPE_AW(LPD3DX10_FONT_DESC)
#define INTERFACE ID3DX10DataLoader
DECLARE_INTERFACE(ID3DX10DataLoader)
{
......@@ -106,6 +158,129 @@ DECLARE_INTERFACE_(ID3DX10ThreadPump, IUnknown)
#define ID3DX10ThreadPump_GetQueueStatus(p,a,b,c) (p)->GetQueueStatus(a,b,c)
#endif
#define INTERFACE ID3DX10Sprite
DECLARE_INTERFACE_(ID3DX10Sprite, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **out) PURE;
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
/*** ID3DX10Sprite methods ***/
STDMETHOD(Begin)(THIS_ UINT flags) PURE;
STDMETHOD(DrawSpritesBuffered)(THIS_ D3DX10_SPRITE *sprites, UINT count) PURE;
STDMETHOD(Flush)(THIS) PURE;
STDMETHOD(DrawSpritesImmediate)(THIS_ D3DX10_SPRITE *sprites,
UINT count, UINT size, UINT flags) PURE;
STDMETHOD(End)(THIS) PURE;
STDMETHOD(GetViewTransform)(THIS_ D3DXMATRIX *transform) PURE;
STDMETHOD(SetViewTransform)(THIS_ D3DXMATRIX *transform) PURE;
STDMETHOD(GetProjectionTransform)(THIS_ D3DXMATRIX *transform) PURE;
STDMETHOD(SetProjectionTransform)(THIS_ D3DXMATRIX *transform) PURE;
STDMETHOD(GetDevice)(THIS_ ID3D10Device **device) PURE;
};
#undef INTERFACE
#if !defined(__cplusplus) || defined(CINTERFACE)
/*** IUnknown methods ***/
#define ID3DX10Sprite_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define ID3DX10Sprite_AddRef(p) (p)->lpVtbl->AddRef(p)
#define ID3DX10Sprite_Release(p) (p)->lpVtbl->Release(p)
/*** ID3DX10Sprite methods ***/
#define ID3DX10Sprite_Begin(p,a) (p)->lpVtbl->Begin(p,a)
#define ID3DX10Sprite_DrawSpritesBuffered(p,a,b) (p)->lpVtbl->DrawSpritesBuffered(p,a,b)
#define ID3DX10Sprite_Flush(p) (p)->lpVtbl->Flush(p)
#define ID3DX10Sprite_DrawSpritesImmediate(p,a,b,c,d) (p)->lpVtbl->DrawSpritesImmediate(p,a,b,c,d)
#define ID3DX10Sprite_End(p) (p)->lpVtbl->End(p)
#define ID3DX10Sprite_GetViewTransform(p,a) (p)->lpVtbl->GetViewTransform(p,a)
#define ID3DX10Sprite_SetViewTransform(p,a) (p)->lpVtbl->SetViewTransform(p,a)
#define ID3DX10Sprite_GetProjectionTransform(p,a) (p)->lpVtbl->GetProjectionTransform(p,a)
#define ID3DX10Sprite_SetProjectionTransform(p,a) (p)->lpVtbl->SetProjectionTransform(p,a)
#define ID3DX10Sprite_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
#else
/*** IUnknown methods ***/
#define ID3DX10Sprite_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define ID3DX10Sprite_AddRef(p) (p)->AddRef()
#define ID3DX10Sprite_Release(p) (p)->Release()
/*** ID3DX10Sprite methods ***/
#define ID3DX10Sprite_Begin(p,a) (p)->Begin(a)
#define ID3DX10Sprite_DrawSpritesBuffered(p,a,b) (p)->DrawSpritesBuffered(a,b)
#define ID3DX10Sprite_Flush(p) (p)->Flush()
#define ID3DX10Sprite_DrawSpritesImmediate(p,a,b,c,d) (p)->DrawSpritesImmediate(a,b,c,d)
#define ID3DX10Sprite_End(p) (p)->End()
#define ID3DX10Sprite_GetViewTransform(p,a) (p)->GetViewTransform(a)
#define ID3DX10Sprite_SetViewTransform(p,a) (p)->SetViewTransform(a)
#define ID3DX10Sprite_GetProjectionTransform(p,a) (p)->GetProjectionTransform(a)
#define ID3DX10Sprite_SetProjectionTransform(p,a) (p)->SetProjectionTransform(a)
#define ID3DX10Sprite_GetDevice(p,a) (p)->GetDevice(a)
#endif
#define INTERFACE ID3DX10Font
DECLARE_INTERFACE_(ID3DX10Font, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID iid, void **out) PURE;
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
/*** ID3DX10Font methods ***/
STDMETHOD(GetDevice)(THIS_ ID3D10Device **device) PURE;
STDMETHOD(GetDescA)(THIS_ D3DX10_FONT_DESCA *desc) PURE;
STDMETHOD(GetDescW)(THIS_ D3DX10_FONT_DESCW *desc) PURE;
STDMETHOD_(BOOL, GetTextMetricsA)(THIS_ TEXTMETRICA *metrics) PURE;
STDMETHOD_(BOOL, GetTextMetricsW)(THIS_ TEXTMETRICW *metrics) PURE;
STDMETHOD_(HDC, GetDC)(THIS) PURE;
STDMETHOD(GetGlyphData)(THIS_ UINT glyph, ID3D10ShaderResourceView **texture,
RECT *blackbox, POINT *cellinc) PURE;
STDMETHOD(PreloadCharacters)(THIS_ UINT first, UINT last) PURE;
STDMETHOD(PreloadGlyphs)(THIS_ UINT first, UINT last) PURE;
STDMETHOD(PreloadTextA)(THIS_ const char *text, INT count) PURE;
STDMETHOD(PreloadTextW)(THIS_ const WCHAR *text, INT count) PURE;
STDMETHOD_(INT, DrawTextA)(THIS_ ID3DX10Sprite *sprite, const char *text,
INT count, RECT *rect, UINT format, D3DXCOLOR color) PURE;
STDMETHOD_(INT, DrawTextW)(THIS_ ID3DX10Sprite *sprite, const WCHAR *text,
INT count, RECT *rect, UINT format, D3DXCOLOR color) PURE;
};
#undef INTERFACE
#if !defined(__cplusplus) || defined(CINTERFACE)
/*** IUnknown methods ***/
#define ID3DX10Font_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define ID3DX10Font_AddRef(p) (p)->lpVtbl->AddRef(p)
#define ID3DX10Font_Release(p) (p)->lpVtbl->Release(p)
/*** ID3DX10Font methods ***/
#define ID3DX10Font_GetDevice(p,a) (p)->lpVtbl->Begin(p,a)
#define ID3DX10Font_GetDescA(p,a) (p)->lpVtbl->GetDescA(p,a)
#define ID3DX10Font_GetDescW(p,a) (p)->lpVtbl->GetDescW(p,a)
#define ID3DX10Font_GetTextMetricsA(p,a) (p)->lpVtbl->GetTextMetricsA(p,a)
#define ID3DX10Font_GetTextMetricsW(p,a) (p)->lpVtbl->GetTextMetricsW(p,a)
#define ID3DX10Font_GetDC(p) (p)->lpVtbl->GetDC(p)
#define ID3DX10Font_GetGlyphData(p,a,b,c,d) (p)->lpVtbl->GetGlyphData(p,a,b,c,d)
#define ID3DX10Font_PreloadCharacters(p,a,b) (p)->lpVtbl->PreloadCharacters(p,a,b)
#define ID3DX10Font_PreloadGlyphs(p,a,b) (p)->lpVtbl->PreloadGlyphs(p,a,b)
#define ID3DX10Font_PreloadTextA(p,a,b) (p)->lpVtbl->PreloadTextA(p,a,b)
#define ID3DX10Font_PreloadTextW(p,a,b) (p)->lpVtbl->PreloadTextW(p,a,b)
#define ID3DX10Font_DrawTextA(p,a,b,c,d,e,f) (p)->lpVtbl->DrawTextA(p,a,b,c,d,e,f)
#define ID3DX10Font_DrawTextW(p,a,b,c,d,e,f) (p)->lpVtbl->DrawTextW(p,a,b,c,d,e,f)
#else
/*** IUnknown methods ***/
#define ID3DX10Font_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define ID3DX10Font_AddRef(p) (p)->AddRef()
#define ID3DX10Font_Release(p) (p)->Release()
/*** ID3DX10Font methods ***/
#define ID3DX10Font_GetDevice(p,a) (p)->Begin(a)
#define ID3DX10Font_GetDescA(p,a) (p)->GetDescA(a)
#define ID3DX10Font_GetDescW(p,a) (p)->GetDescW(a)
#define ID3DX10Font_GetTextMetricsA(p,a) (p)->GetTextMetricsA(a)
#define ID3DX10Font_GetTextMetricsW(p,a) (p)->GetTextMetricsW(a)
#define ID3DX10Font_GetDC(p) (p)->GetDC()
#define ID3DX10Font_GetGlyphData(p,a,b,c,d) (p)->GetGlyphData(a,b,c,d)
#define ID3DX10Font_PreloadCharacters(p,a,b) (p)->PreloadCharacters(a,b)
#define ID3DX10Font_PreloadGlyphs(p,a,b) (p)->PreloadGlyphs(a,b)
#define ID3DX10Font_PreloadTextA(p,a,b) (p)->PreloadTextA(a,b)
#define ID3DX10Font_PreloadTextW(p,a,b) (p)->PreloadTextW(a,b)
#define ID3DX10Font_DrawTextA(p,a,b,c,d,e,f) (p)->DrawTextA(a,b,c,d,e,f)
#define ID3DX10Font_DrawTextW(p,a,b,c,d,e,f) (p)->DrawTextW(a,b,c,d,e,f)
#endif
HRESULT WINAPI D3DX10UnsetAllDeviceObjects(ID3D10Device *device);
HRESULT WINAPI D3DX10CreateDevice(IDXGIAdapter *adapter, D3D10_DRIVER_TYPE driver_type,
HMODULE swrast, unsigned int flags, ID3D10Device **device);
......
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