winedos: Merge all of winedos back into krnl386.
[wine/multimedia.git] / include / d3drmobj.h
blob7878b7a8c23a89f16eab0bfda46027f55456e130
1 /*
2 * Copyright (C) 2008 Vijay Kiran Kamuju
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __D3DRMOBJ_H__
20 #define __D3DRMOBJ_H__
22 #include <objbase.h>
23 #define VIRTUAL
24 #include <d3drmdef.h>
25 #include <d3d.h>
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
31 /*****************************************************************************
32 * Predeclare the interfaces
35 DEFINE_GUID(IID_IDirect3DRMObject, 0xeb16cb00, 0xd271, 0x11ce, 0xac, 0x48, 0x00, 0x00, 0xc0, 0x38, 0x25, 0xa1);
36 DEFINE_GUID(IID_IDirect3DRMVisual, 0xeb16cb04, 0xd271, 0x11ce, 0xac, 0x48, 0x00, 0x00, 0xc0, 0x38, 0x25, 0xa1);
38 typedef struct IDirect3DRMObject *LPDIRECT3DRMOBJECT, **LPLPDIRECT3DRMOBJECT;
39 typedef struct IDirect3DRMDevice *LPDIRECT3DRMDEVICE, **LPLPDIRECT3DRMDEVICE;
40 typedef struct IDirect3DRMViewport *LPDIRECT3DRMVIEWPORT, **LPLPDIRECT3DRMVIEWPORT;
41 typedef struct IDirect3DRMFrame *LPDIRECT3DRMFRAME, **LPLPDIRECT3DRMFRAME;
42 typedef struct IDirect3DRMVisual *LPDIRECT3DRMVISUAL, **LPLPDIRECT3DRMVISUAL;
43 typedef struct IDirect3DRMMesh *LPDIRECT3DRMMESH, **LPLPDIRECT3DRMMESH;
44 typedef struct IDirect3DRMMeshBuilder *LPDIRECT3DRMMESHBUILDER, **LPLPDIRECT3DRMMESHBUILDER;
45 typedef struct IDirect3DRMFace *LPDIRECT3DRMFACE, **LPLPDIRECT3DRMFACE;
46 typedef struct IDirect3DRMLight *LPDIRECT3DRMLIGHT, **LPLPDIRECT3DRMLIGHT;
47 typedef struct IDirect3DRMTexture *LPDIRECT3DRMTEXTURE, **LPLPDIRECT3DRMTEXTURE;
48 typedef struct IDirect3DRMWrap *LPDIRECT3DRMWRAP, **LPLPDIRECT3DRMWRAP;
49 typedef struct IDirect3DRMMaterial *LPDIRECT3DRMMATERIAL, **LPLPDIRECT3DRMMATERIAL;
50 typedef struct IDirect3DRMAnimation *LPDIRECT3DRMANIMATION, **LPLPDIRECT3DRMANIMATION;
51 typedef struct IDirect3DRMAnimationSet *LPDIRECT3DRMANIMATIONSET, **LPLPDIRECT3DRMANIMATIONSET;
52 typedef struct IDirect3DRMUserVisual *LPDIRECT3DRMUSERVISUAL, **LPLPDIRECT3DRMUSERVISUAL;
53 typedef struct IDirect3DRMDeviceArray *LPDIRECT3DRMDEVICEARRAY, **LPLPDIRECT3DRMDEVICEARRAY;
55 /* ********************************************************************
56 Types and structures
57 ******************************************************************** */
59 typedef void (__cdecl *D3DRMOBJECTCALLBACK)(LPDIRECT3DRMOBJECT obj, LPVOID arg);
60 typedef int (__cdecl *D3DRMUSERVISUALCALLBACK)(LPDIRECT3DRMUSERVISUAL obj, LPVOID arg,
61 D3DRMUSERVISUALREASON reason, LPDIRECT3DRMDEVICE dev, LPDIRECT3DRMVIEWPORT view);
62 typedef HRESULT (__cdecl *D3DRMLOADTEXTURECALLBACK)(char *tex_name, void *arg, LPDIRECT3DRMTEXTURE *);
63 typedef void (__cdecl *D3DRMLOADCALLBACK)(LPDIRECT3DRMOBJECT object, REFIID objectguid, LPVOID arg);
65 typedef struct _D3DRMPICKDESC
67 ULONG ulFaceIdx;
68 LONG lGroupIdx;
69 D3DVECTOR vPosition;
70 } D3DRMPICKDESC, *LPD3DRMPICKDESC;
72 typedef struct _D3DRMPICKDESC2
74 ULONG ulFaceIdx;
75 LONG lGroupIdx;
76 D3DVECTOR vPosition;
77 D3DVALUE tu;
78 D3DVALUE tv;
79 D3DVECTOR dvNormal;
80 D3DCOLOR dcColor;
81 } D3DRMPICKDESC2, *LPD3DRMPICKDESC2;
83 /*****************************************************************************
84 * IDirect3DRMObject interface
86 #ifdef WINE_NO_UNICODE_MACROS
87 #undef GetClassName
88 #endif
89 #define INTERFACE IDirect3DRMObject
90 DECLARE_INTERFACE_(IDirect3DRMObject,IUnknown)
92 /*** IUnknown methods ***/
93 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
94 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
95 STDMETHOD_(ULONG,Release)(THIS) PURE;
96 /*** IDirect3DRMObject methods ***/
97 STDMETHOD(Clone)(THIS_ LPUNKNOWN pUnkOuter, REFIID riid, LPVOID *ppvObj) PURE;
98 STDMETHOD(AddDestroyCallback)(THIS_ D3DRMOBJECTCALLBACK, LPVOID argument) PURE;
99 STDMETHOD(DeleteDestroyCallback)(THIS_ D3DRMOBJECTCALLBACK, LPVOID argument) PURE;
100 STDMETHOD(SetAppData)(THIS_ DWORD data) PURE;
101 STDMETHOD_(DWORD, GetAppData)(THIS) PURE;
102 STDMETHOD(SetName)(THIS_ LPCSTR) PURE;
103 STDMETHOD(GetName)(THIS_ LPDWORD lpdwSize, LPSTR lpName) PURE;
104 STDMETHOD(GetClassName)(THIS_ LPDWORD lpdwSize, LPSTR lpName) PURE;
106 #undef INTERFACE
108 #if !defined(__cplusplus) || defined(CINTERFACE)
109 /*** IUnknown methods ***/
110 #define IDirect3DRMObject_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
111 #define IDirect3DRMObject_AddRef(p) (p)->lpVtbl->AddRef(p)
112 #define IDirect3DRMObject_Release(p) (p)->lpVtbl->Release(p)
113 /*** IDirect3DRMObject methods ***/
114 #define IDirect3DRMObject_Clone(p,a,b,c) (p)->lpVtbl->Clone(p,a,b,c)
115 #define IDirect3DRMObject_AddDestroyCallback(p,a,b) (p)->lpVtbl->AddDestroyCallback(p,a,b)
116 #define IDirect3DRMObject_DeleteDestroyCallback(p,a,b) (p)->lpVtbl->DeleteDestroyCallback(p,a,b)
117 #define IDirect3DRMObject_SetAppData(p,a) (p)->lpVtbl->SetAppData(p,a)
118 #define IDirect3DRMObject_GetAppData(p) (p)->lpVtbl->GetAppData(p)
119 #define IDirect3DRMObject_SetName(p,a) (p)->lpVtbl->SetName(p,a)
120 #define IDirect3DRMObject_GetName(p,a,b) (p)->lpVtbl->GetName(p,a,b)
121 #define IDirect3DRMObject_GetClassName(p,a,b) (p)->lpVtbl->GetClassName(p,a,b)
122 #else
123 /*** IUnknown methods ***/
124 #define IDirect3DRMObject_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
125 #define IDirect3DRMObject_AddRef(p) (p)->AddRef()
126 #define IDirect3DRMObject_Release(p) (p)->Release()
127 /*** IDirect3DRMObject methods ***/
128 #define IDirect3DRMObject_Clone(p,a,b,c) (p)->Clone(a,b,c)
129 #define IDirect3DRMObject_AddDestroyCallback(p,a,b) (p)->AddDestroyCallback(a,b)
130 #define IDirect3DRMObject_DeleteDestroyCallback(p,a,b) (p)->DeleteDestroyCallback(a,b)
131 #define IDirect3DRMObject_SetAppData(p,a) (p)->SetAppData(a)
132 #define IDirect3DRMObject_GetAppData(p) (p)->GetAppData()
133 #define IDirect3DRMObject_SetName(p,a) (p)->SetName(a)
134 #define IDirect3DRMObject_GetName(p,a,b) (p)->GetName(a,b)
135 #define IDirect3DRMObject_GetClassName(p,a,b) (p)->GetClassName(a,b)
136 #endif
138 /*****************************************************************************
139 * IDirect3DRMVisual interface
141 #define INTERFACE IDirect3DRMVisual
142 DECLARE_INTERFACE_(IDirect3DRMVisual,IDirect3DRMObject)
144 /*** IUnknown methods ***/
145 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
146 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
147 STDMETHOD_(ULONG,Release)(THIS) PURE;
148 /*** IDirect3DRMObject methods ***/
149 STDMETHOD(Clone)(THIS_ LPUNKNOWN pUnkOuter, REFIID riid, LPVOID *ppvObj) PURE;
150 STDMETHOD(AddDestroyCallback)(THIS_ D3DRMOBJECTCALLBACK, LPVOID argument) PURE;
151 STDMETHOD(DeleteDestroyCallback)(THIS_ D3DRMOBJECTCALLBACK, LPVOID argument) PURE;
152 STDMETHOD(SetAppData)(THIS_ DWORD data) PURE;
153 STDMETHOD_(DWORD, GetAppData)(THIS) PURE;
154 STDMETHOD(SetName)(THIS_ LPCSTR) PURE;
155 STDMETHOD(GetName)(THIS_ LPDWORD lpdwSize, LPSTR lpName) PURE;
156 STDMETHOD(GetClassName)(THIS_ LPDWORD lpdwSize, LPSTR lpName) PURE;
158 #undef INTERFACE
160 #if !defined(__cplusplus) || defined(CINTERFACE)
161 /*** IUnknown methods ***/
162 #define IDirect3DRMVisual_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
163 #define IDirect3DRMVisual_AddRef(p) (p)->lpVtbl->AddRef(p)
164 #define IDirect3DRMVisual_Release(p) (p)->lpVtbl->Release(p)
165 /*** IDirect3DRMObject methods ***/
166 #define IDirect3DRMVisual_Clone(p,a,b,c) (p)->lpVtbl->Clone(p,a,b,c)
167 #define IDirect3DRMVisual_AddDestroyCallback(p,a,b) (p)->lpVtbl->AddDestroyCallback(p,a,b)
168 #define IDirect3DRMVisual_DeleteDestroyCallback(p,a,b) (p)->lpVtbl->DeleteDestroyCallback(p,a,b)
169 #define IDirect3DRMVisual_SetAppData(p,a) (p)->lpVtbl->SetAppData(p,a)
170 #define IDirect3DRMVisual_GetAppData(p) (p)->lpVtbl->GetAppData(p)
171 #define IDirect3DRMVisual_SetName(p,a) (p)->lpVtbl->SetName(p,a)
172 #define IDirect3DRMVisual_GetName(p,a,b) (p)->lpVtbl->GetName(p,a,b)
173 #define IDirect3DRMVisual_GetClassName(p,a,b) (p)->lpVtbl->GetClassName(p,a,b)
174 #else
175 /*** IUnknown methods ***/
176 #define IDirect3DRMVisual_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
177 #define IDirect3DRMVisual_AddRef(p) (p)->AddRef()
178 #define IDirect3DRMVisual_Release(p) (p)->Release()
179 /*** IDirect3DRMObject methods ***/
180 #define IDirect3DRMVisual_Clone(p,a,b,c) (p)->Clone(a,b,c)
181 #define IDirect3DRMVisual_AddDestroyCallback(p,a,b) (p)->AddDestroyCallback(a,b)
182 #define IDirect3DRMVisual_DeleteDestroyCallback(p,a,b) (p)->DeleteDestroyCallback(a,b)
183 #define IDirect3DRMVisual_SetAppData(p,a) (p)->SetAppData(a)
184 #define IDirect3DRMVisual_GetAppData(p) (p)->GetAppData()
185 #define IDirect3DRMVisual_SetName(p,a) (p)->SetName(a)
186 #define IDirect3DRMVisual_GetName(p,a,b) (p)->GetName(a,b)
187 #define IDirect3DRMVisual_GetClassName(p,a,b) (p)->GetClassName(a,b)
188 #endif
190 #ifdef __cplusplus
192 #endif
194 #endif /* __D3DRMOBJ_H__ */