Henri Verbeet hverbeet@codeweavers.com writes:
@@ -1128,6 +1105,21 @@ DECLARE_INTERFACE_(IDirect3DDevice8,IUnknown) #define IDirect3DDevice8_DeletePatch(p,a) (p)->DeletePatch(a) #endif
+#ifndef __WINESRC__ +typedef struct IDirect3D8 *LPDIRECT3D8; +typedef struct IDirect3DDevice8 *LPDIRECT3DDEVICE8; +typedef struct IDirect3DResource8 *LPDIRECT3DRESOURCE8, *PDIRECT3DRESOURCE8; +typedef struct IDirect3DVertexBuffer8 *LPDIRECT3DVERTEXBUFFER8, *PDIRECT3DVERTEXBUFFER8; +typedef struct IDirect3DVolume8 *LPDIRECT3DVOLUME8, *PDIRECT3DVOLUME8; +typedef struct IDirect3DSwapChain8 *LPDIRECT3DSWAPCHAIN8, *PDIRECT3DSWAPCHAIN8; +typedef struct IDirect3DSurface8 *LPDIRECT3DSURFACE8, *PDIRECT3DSURFACE8; +typedef struct IDirect3DIndexBuffer8 *LPDIRECT3DINDEXBUFFER8, *PDIRECT3DINDEXBUFFER8; +typedef struct IDirect3DBaseTexture8 *LPDIRECT3DBASETEXTURE8, *PDIRECT3DBASETEXTURE8; +typedef struct IDirect3DTexture8 *LPDIRECT3DTEXTURE8, *PDIRECT3DTEXTURE8; +typedef struct IDirect3DCubeTexture8 *LPDIRECT3DCUBETEXTURE8, *PDIRECT3DCUBETEXTURE8; +typedef struct IDirect3DVolumeTexture8 *LPDIRECT3DVOLUMETEXTURE8, *PDIRECT3DVOLUMETEXTURE8; +#endif
I don't think we want to do that sort of thing, otherwise we'll end up with ifdef __WINESRC__ all over the standard headers. If we really want to disable interface typedefs this should be done in a generic way, preferably when generating headers from idl.
On 30 October 2012 10:41, Alexandre Julliard julliard@winehq.org wrote:
I don't think we want to do that sort of thing, otherwise we'll end up with ifdef __WINESRC__ all over the standard headers. If we really want to disable interface typedefs this should be done in a generic way, preferably when generating headers from idl.
We can certainly generate some more d3d headers from idl, and we probably should anyway, but I'm not sure how that's going to make the mechanism any more generic. I suppose we could do something like "DECL_WINELIB_TYPE(struct IDirect3D8, *LPDIRECT3D8);", if that's much better.
Henri Verbeet hverbeet@gmail.com writes:
We can certainly generate some more d3d headers from idl, and we probably should anyway, but I'm not sure how that's going to make the mechanism any more generic. I suppose we could do something like "DECL_WINELIB_TYPE(struct IDirect3D8, *LPDIRECT3D8);", if that's much better.
That would be better for headers written by hand, yes. But I'm not sure we want to add that at this point, since the goal should be to generate all interfaces from idl.
On 10/30/12 12:01, Alexandre Julliard wrote:
Henri Verbeet hverbeet@gmail.com writes:
We can certainly generate some more d3d headers from idl, and we probably should anyway, but I'm not sure how that's going to make the mechanism any more generic. I suppose we could do something like "DECL_WINELIB_TYPE(struct IDirect3D8, *LPDIRECT3D8);", if that's much better.
That would be better for headers written by hand, yes. But I'm not sure we want to add that at this point, since the goal should be to generate all interfaces from idl.
It's unrelated to original problem here, but please keep in mind that other work on widl should also be done before switching to IDL files. Currently IDL-generated files are not really compatible with MSVC non-IDL-generated COM headers because widl adds some stuff like default includes. We probably need some way (command like arg or some tricky argument in IDL file) to instruct widl to generate pure headers. This may not be a big deal for Wine (and we ignored it for dwrite.h), but that's more important for mingw-w64 and they use our d3dx* headers (among others).
Jacek