endif (DirectX_D3DX9_FOUND)
# d3d10.dll
- if (DirectX_D3D10_FOUND)
- include_directories (${DirectX_D3D10_INCLUDE_DIR})
- add_custom_command (
- OUTPUT d3d10.cpp
- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/d3d10misc.py > ${CMAKE_CURRENT_BINARY_DIR}/d3d10.cpp
- DEPENDS d3d10misc.py windows.py base.py
- )
- add_library (d3d10 SHARED d3d10.def d3d10.cpp log.cpp os_win32.cpp)
- set_target_properties (d3d10 PROPERTIES PREFIX "")
- endif (DirectX_D3D10_FOUND)
+ #if (DirectX_D3D10_FOUND)
+ # include_directories (${DirectX_D3D10_INCLUDE_DIR})
+ # add_custom_command (
+ # OUTPUT d3d10.cpp
+ # COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/d3d10misc.py > ${CMAKE_CURRENT_BINARY_DIR}/d3d10.cpp
+ # DEPENDS d3d10misc.py windows.py base.py
+ # )
+ # add_library (d3d10 SHARED d3d10.def d3d10.cpp log.cpp os_win32.cpp)
+ # set_target_properties (d3d10 PROPERTIES PREFIX "")
+ #endif (DirectX_D3D10_FOUND)
# opengl32.dll
add_custom_command (
def dump(self, instance):
print ' if(%s) {' % instance
print ' Log::BeginPointer("%s", (const void *)%s);' % (self.type, instance)
- try:
- self.type.dump("*" + instance)
- except NotImplementedError:
- pass
+ self.type.dump("*" + instance)
print ' Log::EndPointer();'
print ' }'
print ' else'
pass
+def FunctionPointer(type, name, args, **kwargs):
+ # XXX
+ return Opaque(name)
+
+
class Interface(Type):
def __init__(self, name, base=None):
self.base = base
self.methods = []
+ def dump(self, instance):
+ print ' Log::LiteralOpaque((const void *)%s);' % instance
+
def itermethods(self):
if self.base is not None:
for method in self.base.itermethods():
PDIRECT3DVOLUME8 = WrapPointer(IDirect3DVolume8)
IDirect3D8.methods += [
- Method(HRESULT, "RegisterSoftwareDevice", [(Pointer(Void), "pInitializeFunction")]),
+ Method(HRESULT, "RegisterSoftwareDevice", [(OpaquePointer(Void), "pInitializeFunction")]),
Method(UINT, "GetAdapterCount", []),
Method(HRESULT, "GetAdapterIdentifier", [(UINT, "Adapter"), (DWORD, "Flags"), Out(Pointer(D3DADAPTER_IDENTIFIER8), "pIdentifier")]),
Method(UINT, "GetAdapterModeCount", [(UINT, "Adapter")]),
Method(HRESULT, "GetTextureStageState", [(DWORD, "Stage"), (D3DTEXTURESTAGESTATETYPE, "Type"), Out(Pointer(DWORD), "pValue")]),
Method(HRESULT, "SetTextureStageState", [(DWORD, "Stage"), (D3DTEXTURESTAGESTATETYPE, "Type"), (DWORD, "Value")]),
Method(HRESULT, "ValidateDevice", [Out(Pointer(DWORD), "pNumPasses")]),
- Method(HRESULT, "GetInfo", [(DWORD, "DevInfoID"), Out(Pointer(Void), "pDevInfoStruct"), (DWORD, "DevInfoStructSize")]),
+ Method(HRESULT, "GetInfo", [(DWORD, "DevInfoID"), Out(OpaquePointer(Void), "pDevInfoStruct"), (DWORD, "DevInfoStructSize")]),
Method(HRESULT, "SetPaletteEntries", [(UINT, "PaletteNumber"), (ConstPointer(PALETTEENTRY), "pEntries")]),
Method(HRESULT, "GetPaletteEntries", [(UINT, "PaletteNumber"), Out(Pointer(PALETTEENTRY), "pEntries")]),
Method(HRESULT, "SetCurrentTexturePalette", [(UINT, "PaletteNumber")]),
Method(HRESULT, "GetCurrentTexturePalette", [Out(Pointer(UINT), "PaletteNumber")]),
Method(HRESULT, "DrawPrimitive", [(D3DPRIMITIVETYPE, "PrimitiveType"), (UINT, "StartVertex"), (UINT, "PrimitiveCount")]),
Method(HRESULT, "DrawIndexedPrimitive", [(D3DPRIMITIVETYPE, "PrimitiveType"), (UINT, "minIndex"), (UINT, "NumVertices"), (UINT, "startIndex"), (UINT, "primCount")]),
- Method(HRESULT, "DrawPrimitiveUP", [(D3DPRIMITIVETYPE, "PrimitiveType"), (UINT, "PrimitiveCount"), (ConstPointer(Void), "pVertexStreamZeroData"), (UINT, "VertexStreamZeroStride")]),
- Method(HRESULT, "DrawIndexedPrimitiveUP", [(D3DPRIMITIVETYPE, "PrimitiveType"), (UINT, "MinVertexIndex"), (UINT, "NumVertexIndices"), (UINT, "PrimitiveCount"), (ConstPointer(Void), "pIndexData"), (D3DFORMAT, "IndexDataFormat"), (ConstPointer(Void), "pVertexStreamZeroData"), (UINT, "VertexStreamZeroStride")]),
+ Method(HRESULT, "DrawPrimitiveUP", [(D3DPRIMITIVETYPE, "PrimitiveType"), (UINT, "PrimitiveCount"), (OpaquePointer(Const(Void)), "pVertexStreamZeroData"), (UINT, "VertexStreamZeroStride")]),
+ Method(HRESULT, "DrawIndexedPrimitiveUP", [(D3DPRIMITIVETYPE, "PrimitiveType"), (UINT, "MinVertexIndex"), (UINT, "NumVertexIndices"), (UINT, "PrimitiveCount"), (OpaquePointer(Const(Void)), "pIndexData"), (D3DFORMAT, "IndexDataFormat"), (OpaquePointer(Const(Void)), "pVertexStreamZeroData"), (UINT, "VertexStreamZeroStride")]),
Method(HRESULT, "ProcessVertices", [(UINT, "SrcStartIndex"), (UINT, "DestIndex"), (UINT, "VertexCount"), (PDIRECT3DVERTEXBUFFER8, "pDestBuffer"), (DWORD, "Flags")]),
Method(HRESULT, "CreateVertexShader", [(ConstPointer(DWORD), "pDeclaration"), (ConstPointer(DWORD), "pFunction"), Out(Pointer(DWORD), "pHandle"), (DWORD, "Usage")]),
Method(HRESULT, "SetVertexShader", [(DWORD, "Handle")]),
Method(HRESULT, "GetVertexShader", [Out(Pointer(DWORD), "pHandle")]),
Method(HRESULT, "DeleteVertexShader", [(DWORD, "Handle")]),
- Method(HRESULT, "SetVertexShaderConstant", [(DWORD, "Register"), (ConstPointer(Void), "pConstantData"), (DWORD, "ConstantCount")]),
- Method(HRESULT, "GetVertexShaderConstant", [(DWORD, "Register"), Out(Pointer(Void), "pConstantData"), (DWORD, "ConstantCount")]),
- Method(HRESULT, "GetVertexShaderDeclaration", [(DWORD, "Handle"), Out(Pointer(Void), "pData"), Out(Pointer(DWORD), "pSizeOfData")]),
- Method(HRESULT, "GetVertexShaderFunction", [(DWORD, "Handle"), Out(Pointer(Void), "pData"), Out(Pointer(DWORD), "pSizeOfData")]),
+ Method(HRESULT, "SetVertexShaderConstant", [(DWORD, "Register"), (OpaquePointer(Const(Void)), "pConstantData"), (DWORD, "ConstantCount")]),
+ Method(HRESULT, "GetVertexShaderConstant", [(DWORD, "Register"), Out(OpaquePointer(Void), "pConstantData"), (DWORD, "ConstantCount")]),
+ Method(HRESULT, "GetVertexShaderDeclaration", [(DWORD, "Handle"), Out(OpaquePointer(Void), "pData"), Out(Pointer(DWORD), "pSizeOfData")]),
+ Method(HRESULT, "GetVertexShaderFunction", [(DWORD, "Handle"), Out(OpaquePointer(Void), "pData"), Out(Pointer(DWORD), "pSizeOfData")]),
Method(HRESULT, "SetStreamSource", [(UINT, "StreamNumber"), (PDIRECT3DVERTEXBUFFER8, "pStreamData"), (UINT, "Stride")]),
Method(HRESULT, "GetStreamSource", [(UINT, "StreamNumber"), Out(Pointer(PDIRECT3DVERTEXBUFFER8), "ppStreamData"), Out(Pointer(UINT), "pStride")]),
Method(HRESULT, "SetIndices", [(PDIRECT3DINDEXBUFFER8, "pIndexData"), (UINT, "BaseVertexIndex")]),
Method(HRESULT, "SetPixelShader", [(DWORD, "Handle")]),
Method(HRESULT, "GetPixelShader", [Out(Pointer(DWORD), "pHandle")]),
Method(HRESULT, "DeletePixelShader", [(DWORD, "Handle")]),
- Method(HRESULT, "SetPixelShaderConstant", [(DWORD, "Register"), (ConstPointer(Void), "pConstantData"), (DWORD, "ConstantCount")]),
- Method(HRESULT, "GetPixelShaderConstant", [(DWORD, "Register"), Out(Pointer(Void), "pConstantData"), (DWORD, "ConstantCount")]),
- Method(HRESULT, "GetPixelShaderFunction", [(DWORD, "Handle"), Out(Pointer(Void), "pData"), Out(Pointer(DWORD), "pSizeOfData")]),
+ Method(HRESULT, "SetPixelShaderConstant", [(DWORD, "Register"), (OpaquePointer(Const(Void)), "pConstantData"), (DWORD, "ConstantCount")]),
+ Method(HRESULT, "GetPixelShaderConstant", [(DWORD, "Register"), Out(OpaquePointer(Void), "pConstantData"), (DWORD, "ConstantCount")]),
+ Method(HRESULT, "GetPixelShaderFunction", [(DWORD, "Handle"), Out(OpaquePointer(Void), "pData"), Out(Pointer(DWORD), "pSizeOfData")]),
Method(HRESULT, "DrawRectPatch", [(UINT, "Handle"), (ConstPointer(Float), "pNumSegs"), (ConstPointer(D3DRECTPATCH_INFO), "pRectPatchInfo")]),
Method(HRESULT, "DrawTriPatch", [(UINT, "Handle"), (ConstPointer(Float), "pNumSegs"), (ConstPointer(D3DTRIPATCH_INFO), "pTriPatchInfo")]),
Method(HRESULT, "DeletePatch", [(UINT, "Handle")]),
IDirect3DResource8.methods += [
Method(HRESULT, "GetDevice", [Out(Pointer(PDIRECT3DDEVICE8), "ppDevice")]),
- Method(HRESULT, "SetPrivateData", [(REFGUID, "refguid"), (ConstPointer(Void), "pData"), (DWORD, "SizeOfData"), (DWORD, "Flags")]),
- Method(HRESULT, "GetPrivateData", [(REFGUID, "refguid"), Out(Pointer(Void), "pData"), Out(Pointer(DWORD), "pSizeOfData")]),
+ Method(HRESULT, "SetPrivateData", [(REFGUID, "refguid"), (OpaquePointer(Const(Void)), "pData"), (DWORD, "SizeOfData"), (DWORD, "Flags")]),
+ Method(HRESULT, "GetPrivateData", [(REFGUID, "refguid"), Out(OpaquePointer(Void), "pData"), Out(Pointer(DWORD), "pSizeOfData")]),
Method(HRESULT, "FreePrivateData", [(REFGUID, "refguid")]),
Method(DWORD, "SetPriority", [(DWORD, "PriorityNew")]),
Method(DWORD, "GetPriority", []),
IDirect3DSurface8.methods += [
Method(HRESULT, "GetDevice", [Out(Pointer(PDIRECT3DDEVICE8), "ppDevice")]),
- Method(HRESULT, "SetPrivateData", [(REFGUID, "refguid"), (ConstPointer(Void), "pData"), (DWORD, "SizeOfData"), (DWORD, "Flags")]),
- Method(HRESULT, "GetPrivateData", [(REFGUID, "refguid"), Out(Pointer(Void), "pData"), Out(Pointer(DWORD), "pSizeOfData")]),
+ Method(HRESULT, "SetPrivateData", [(REFGUID, "refguid"), (OpaquePointer(Const(Void)), "pData"), (DWORD, "SizeOfData"), (DWORD, "Flags")]),
+ Method(HRESULT, "GetPrivateData", [(REFGUID, "refguid"), Out(OpaquePointer(Void), "pData"), Out(Pointer(DWORD), "pSizeOfData")]),
Method(HRESULT, "FreePrivateData", [(REFGUID, "refguid")]),
- Method(HRESULT, "GetContainer", [(REFIID, "riid"), Out(Pointer(Pointer(Void)), "ppContainer")]),
+ Method(HRESULT, "GetContainer", [(REFIID, "riid"), Out(Pointer(OpaquePointer(Void)), "ppContainer")]),
Method(HRESULT, "GetDesc", [Out(Pointer(D3DSURFACE_DESC), "pDesc")]),
Method(HRESULT, "LockRect", [Out(Pointer(D3DLOCKED_RECT), "pLockedRect"), (ConstPointer(RECT), "pRect"), (DWORD, "Flags")]),
Method(HRESULT, "UnlockRect", []),
IDirect3DVolume8.methods += [
Method(HRESULT, "GetDevice", [Out(Pointer(PDIRECT3DDEVICE8), "ppDevice")]),
- Method(HRESULT, "SetPrivateData", [(REFGUID, "refguid"), (ConstPointer(Void), "pData"), (DWORD, "SizeOfData"), (DWORD, "Flags")]),
- Method(HRESULT, "GetPrivateData", [(REFGUID, "refguid"), Out(Pointer(Void), "pData"), Out(Pointer(DWORD), "pSizeOfData")]),
+ Method(HRESULT, "SetPrivateData", [(REFGUID, "refguid"), (OpaquePointer(Const(Void)), "pData"), (DWORD, "SizeOfData"), (DWORD, "Flags")]),
+ Method(HRESULT, "GetPrivateData", [(REFGUID, "refguid"), Out(OpaquePointer(Void), "pData"), Out(Pointer(DWORD), "pSizeOfData")]),
Method(HRESULT, "FreePrivateData", [(REFGUID, "refguid")]),
- Method(HRESULT, "GetContainer", [(REFIID, "riid"), Out(Pointer(Pointer(Void)), "ppContainer")]),
+ Method(HRESULT, "GetContainer", [(REFIID, "riid"), Out(Pointer(OpaquePointer(Void)), "ppContainer")]),
Method(HRESULT, "GetDesc", [Out(Pointer(D3DVOLUME_DESC), "pDesc")]),
Method(HRESULT, "LockBox", [Out(Pointer(D3DLOCKED_BOX), "pLockedVolume"), (ConstPointer(D3DBOX), "pBox"), (DWORD, "Flags")]),
Method(HRESULT, "UnlockBox", []),
PDIRECT3DSWAPCHAIN9EX = WrapPointer(IDirect3DSwapChain9Ex)
IDirect3D9.methods += [
- Method(HRESULT, "RegisterSoftwareDevice", [(Pointer(Void), "pInitializeFunction")]),
+ Method(HRESULT, "RegisterSoftwareDevice", [(OpaquePointer(Void), "pInitializeFunction")]),
Method(UINT, "GetAdapterCount", []),
Method(HRESULT, "GetAdapterIdentifier", [(UINT, "Adapter"), (DWORD, "Flags"), Out(Pointer(D3DADAPTER_IDENTIFIER9), "pIdentifier")]),
Method(UINT, "GetAdapterModeCount", [(UINT, "Adapter"), (D3DFORMAT, "Format")]),
Method(Float, "GetNPatchMode", []),
Method(HRESULT, "DrawPrimitive", [(D3DPRIMITIVETYPE, "PrimitiveType"), (UINT, "StartVertex"), (UINT, "PrimitiveCount")]),
Method(HRESULT, "DrawIndexedPrimitive", [(D3DPRIMITIVETYPE, "PrimitiveType"), (INT, "BaseVertexIndex"), (UINT, "MinVertexIndex"), (UINT, "NumVertices"), (UINT, "startIndex"), (UINT, "primCount")]),
- Method(HRESULT, "DrawPrimitiveUP", [(D3DPRIMITIVETYPE, "PrimitiveType"), (UINT, "PrimitiveCount"), (ConstPointer(Void), "pVertexStreamZeroData"), (UINT, "VertexStreamZeroStride")]),
- Method(HRESULT, "DrawIndexedPrimitiveUP", [(D3DPRIMITIVETYPE, "PrimitiveType"), (UINT, "MinVertexIndex"), (UINT, "NumVertices"), (UINT, "PrimitiveCount"), (ConstPointer(Void), "pIndexData"), (D3DFORMAT, "IndexDataFormat"), (ConstPointer(Void), "pVertexStreamZeroData"), (UINT, "VertexStreamZeroStride")]),
+ Method(HRESULT, "DrawPrimitiveUP", [(D3DPRIMITIVETYPE, "PrimitiveType"), (UINT, "PrimitiveCount"), (OpaquePointer(Const(Void)), "pVertexStreamZeroData"), (UINT, "VertexStreamZeroStride")]),
+ Method(HRESULT, "DrawIndexedPrimitiveUP", [(D3DPRIMITIVETYPE, "PrimitiveType"), (UINT, "MinVertexIndex"), (UINT, "NumVertices"), (UINT, "PrimitiveCount"), (OpaquePointer(Const(Void)), "pIndexData"), (D3DFORMAT, "IndexDataFormat"), (OpaquePointer(Const(Void)), "pVertexStreamZeroData"), (UINT, "VertexStreamZeroStride")]),
Method(HRESULT, "ProcessVertices", [(UINT, "SrcStartIndex"), (UINT, "DestIndex"), (UINT, "VertexCount"), (PDIRECT3DVERTEXBUFFER9, "pDestBuffer"), (PDIRECT3DVERTEXDECLARATION9, "pVertexDecl"), (DWORD, "Flags")]),
Method(HRESULT, "CreateVertexDeclaration", [(ConstPointer(D3DVERTEXELEMENT9), "pVertexElements"), Out(Pointer(PDIRECT3DVERTEXDECLARATION9), "ppDecl")]),
Method(HRESULT, "SetVertexDeclaration", [(PDIRECT3DVERTEXDECLARATION9, "pDecl")]),
IDirect3DResource9.methods += [
Method(HRESULT, "GetDevice", [Out(Pointer(PDIRECT3DDEVICE9), "ppDevice")]),
- Method(HRESULT, "SetPrivateData", [(REFGUID, "refguid"), (ConstPointer(Void), "pData"), (DWORD, "SizeOfData"), (DWORD, "Flags")]),
- Method(HRESULT, "GetPrivateData", [(REFGUID, "refguid"), Out(Pointer(Void), "pData"), Out(Pointer(DWORD), "pSizeOfData")]),
+ Method(HRESULT, "SetPrivateData", [(REFGUID, "refguid"), (OpaquePointer(Const(Void)), "pData"), (DWORD, "SizeOfData"), (DWORD, "Flags")]),
+ Method(HRESULT, "GetPrivateData", [(REFGUID, "refguid"), Out(OpaquePointer(Void), "pData"), Out(Pointer(DWORD), "pSizeOfData")]),
Method(HRESULT, "FreePrivateData", [(REFGUID, "refguid")]),
Method(DWORD, "SetPriority", [(DWORD, "PriorityNew")]),
Method(DWORD, "GetPriority", []),
IDirect3DVertexShader9.methods += [
Method(HRESULT, "GetDevice", [Out(Pointer(PDIRECT3DDEVICE9), "ppDevice")]),
- Method(HRESULT, "GetFunction", [Out(Pointer(Void), "pData"), Out(Pointer(UINT), "pSizeOfData")]),
+ Method(HRESULT, "GetFunction", [Out(OpaquePointer(Void), "pData"), Out(Pointer(UINT), "pSizeOfData")]),
]
IDirect3DPixelShader9.methods += [
Method(HRESULT, "GetDevice", [Out(Pointer(PDIRECT3DDEVICE9), "ppDevice")]),
- Method(HRESULT, "GetFunction", [Out(Pointer(Void), "pData"), Out(Pointer(UINT), "pSizeOfData")]),
+ Method(HRESULT, "GetFunction", [Out(OpaquePointer(Void), "pData"), Out(Pointer(UINT), "pSizeOfData")]),
]
IDirect3DBaseTexture9.methods += [
]
IDirect3DVertexBuffer9.methods += [
- Method(HRESULT, "Lock", [(UINT, "OffsetToLock"), (UINT, "SizeToLock"), Out(Pointer(Pointer(Void)), "ppbData"), (DWORD, "Flags")]),
+ Method(HRESULT, "Lock", [(UINT, "OffsetToLock"), (UINT, "SizeToLock"), Out(Pointer(OpaquePointer(Void)), "ppbData"), (DWORD, "Flags")]),
Method(HRESULT, "Unlock", []),
Method(HRESULT, "GetDesc", [Out(Pointer(D3DVERTEXBUFFER_DESC), "pDesc")]),
]
IDirect3DIndexBuffer9.methods += [
- Method(HRESULT, "Lock", [(UINT, "OffsetToLock"), (UINT, "SizeToLock"), Out(Pointer(Pointer(Void)), "ppbData"), (DWORD, "Flags")]),
+ Method(HRESULT, "Lock", [(UINT, "OffsetToLock"), (UINT, "SizeToLock"), Out(Pointer(OpaquePointer(Void)), "ppbData"), (DWORD, "Flags")]),
Method(HRESULT, "Unlock", []),
Method(HRESULT, "GetDesc", [Out(Pointer(D3DINDEXBUFFER_DESC), "pDesc")]),
]
IDirect3DSurface9.methods += [
- Method(HRESULT, "GetContainer", [(REFIID, "riid"), Out(Pointer(Pointer(Void)), "ppContainer")]),
+ Method(HRESULT, "GetContainer", [(REFIID, "riid"), Out(Pointer(OpaquePointer(Void)), "ppContainer")]),
Method(HRESULT, "GetDesc", [Out(Pointer(D3DSURFACE_DESC), "pDesc")]),
Method(HRESULT, "LockRect", [Out(Pointer(D3DLOCKED_RECT), "pLockedRect"), (ConstPointer(RECT), "pRect"), (DWORD, "Flags")]),
Method(HRESULT, "UnlockRect", []),
IDirect3DVolume9.methods += [
Method(HRESULT, "GetDevice", [Out(Pointer(PDIRECT3DDEVICE9), "ppDevice")]),
- Method(HRESULT, "SetPrivateData", [(REFGUID, "refguid"), (ConstPointer(Void), "pData"), (DWORD, "SizeOfData"), (DWORD, "Flags")]),
- Method(HRESULT, "GetPrivateData", [(REFGUID, "refguid"), Out(Pointer(Void), "pData"), Out(Pointer(DWORD), "pSizeOfData")]),
+ Method(HRESULT, "SetPrivateData", [(REFGUID, "refguid"), (OpaquePointer(Const(Void)), "pData"), (DWORD, "SizeOfData"), (DWORD, "Flags")]),
+ Method(HRESULT, "GetPrivateData", [(REFGUID, "refguid"), Out(OpaquePointer(Void), "pData"), Out(Pointer(DWORD), "pSizeOfData")]),
Method(HRESULT, "FreePrivateData", [(REFGUID, "refguid")]),
- Method(HRESULT, "GetContainer", [(REFIID, "riid"), Out(Pointer(Pointer(Void)), "ppContainer")]),
+ Method(HRESULT, "GetContainer", [(REFIID, "riid"), Out(Pointer(OpaquePointer(Void)), "ppContainer")]),
Method(HRESULT, "GetDesc", [Out(Pointer(D3DVOLUME_DESC), "pDesc")]),
Method(HRESULT, "LockBox", [Out(Pointer(D3DLOCKED_BOX), "pLockedVolume"), (ConstPointer(D3DBOX), "pBox"), (DWORD, "Flags")]),
Method(HRESULT, "UnlockBox", []),
Method(D3DQUERYTYPE, "GetType", []),
Method(DWORD, "GetDataSize", []),
Method(HRESULT, "Issue", [(DWORD, "dwIssueFlags")]),
- Method(HRESULT, "GetData", [Out(Pointer(Void), "pData"), (DWORD, "dwSize"), (DWORD, "dwGetDataFlags")]),
+ Method(HRESULT, "GetData", [Out(OpaquePointer(Void), "pData"), (DWORD, "dwSize"), (DWORD, "dwGetDataFlags")]),
]
IDirect3D9Ex.methods += [
D3DLOCKED_RECT = Struct("D3DLOCKED_RECT", [
(INT, "Pitch"),
- (Pointer(Void), "pBits"),
+ (OpaquePointer(Void), "pBits"),
])
D3DBOX = Struct("D3DBOX", [
D3DLOCKED_BOX = Struct("D3DLOCKED_BOX", [
(INT, "RowPitch"),
(INT, "SlicePitch"),
- (Pointer(Void), "pBits"),
+ (OpaquePointer(Void), "pBits"),
])
D3DRANGE = Struct("D3DRANGE", [
])
LPDDDEVICEIDENTIFIER2 = Pointer(DDDEVICEIDENTIFIER2)
-LPCLIPPERCALLBACK = Pointer(Function("DWORD", "CLIPPERCALLBACK", [(LPDIRECTDRAWCLIPPER, "lpDDClipper"), (HWND, "hWnd"), (DWORD, "code"), (LPVOID, "lpContext")]))
-LPSURFACESTREAMINGCALLBACK = Pointer(Function("DWORD", "SURFACESTREAMINGCALLBACK", [DWORD]))
+LPCLIPPERCALLBACK = FunctionPointer("DWORD", "LPCLIPPERCALLBACK", [(LPDIRECTDRAWCLIPPER, "lpDDClipper"), (HWND, "hWnd"), (DWORD, "code"), (LPVOID, "lpContext")])
+LPSURFACESTREAMINGCALLBACK = FunctionPointer("DWORD", "LPSURFACESTREAMINGCALLBACK", [DWORD])
DDSURFACEDESC = Struct("DDSURFACEDESC", [
(DWORD, "dwSize"),
"DDERR_NOTINITIALIZED",
])
-LPDDENUMMODESCALLBACK = Pointer(Function(HRESULT, "LPDDENUMMODESCALLBACK", [LPDDSURFACEDESC, LPVOID]))
-LPDDENUMMODESCALLBACK2 = Pointer(Function(HRESULT, "LPDDENUMMODESCALLBACK2", [LPDDSURFACEDESC2, LPVOID]))
-LPDDENUMSURFACESCALLBACK = Pointer(Function(HRESULT, "LPDDENUMSURFACESCALLBACK", [LPDIRECTDRAWSURFACE, LPDDSURFACEDESC, LPVOID]))
-LPDDENUMSURFACESCALLBACK2 = Pointer(Function(HRESULT, "LPDDENUMSURFACESCALLBACK2", [LPDIRECTDRAWSURFACE4, LPDDSURFACEDESC2, LPVOID]))
-LPDDENUMSURFACESCALLBACK7 = Pointer(Function(HRESULT, "LPDDENUMSURFACESCALLBACK7", [LPDIRECTDRAWSURFACE7, LPDDSURFACEDESC2, LPVOID]))
+LPDDENUMMODESCALLBACK = FunctionPointer(HRESULT, "LPDDENUMMODESCALLBACK", [LPDDSURFACEDESC, LPVOID])
+LPDDENUMMODESCALLBACK2 = FunctionPointer(HRESULT, "LPDDENUMMODESCALLBACK2", [LPDDSURFACEDESC2, LPVOID])
+LPDDENUMSURFACESCALLBACK = FunctionPointer(HRESULT, "LPDDENUMSURFACESCALLBACK", [LPDIRECTDRAWSURFACE, LPDDSURFACEDESC, LPVOID])
+LPDDENUMSURFACESCALLBACK2 = FunctionPointer(HRESULT, "LPDDENUMSURFACESCALLBACK2", [LPDIRECTDRAWSURFACE4, LPDDSURFACEDESC2, LPVOID])
+LPDDENUMSURFACESCALLBACK7 = FunctionPointer(HRESULT, "LPDDENUMSURFACESCALLBACK7", [LPDIRECTDRAWSURFACE7, LPDDSURFACEDESC2, LPVOID])
IDirectDraw.methods += [
Method(HRESULT, "Compact", []),
Method(HRESULT, "SetGammaRamp", [DWORD, LPDDGAMMARAMP]),
]
-#LPDDENUMCALLBACKA = WrapPointer(Function(BOOL, "LPDDENUMCALLBACKA", [Pointer(GUID), LPSTR, LPSTR, LPVOID]))
-#LPDDENUMCALLBACKW = WrapPointer(Function(BOOL, "LPDDENUMCALLBACKW", [Pointer(GUID), LPWSTR, LPWSTR, LPVOID]))
-#LPDDENUMCALLBACKEXA = WrapPointer(Function(BOOL, "LPDDENUMCALLBACKEXA", [Pointer(GUID), LPSTR, LPSTR, LPVOID, HMONITOR]))
-#LPDDENUMCALLBACKEXW = WrapPointer(Function(BOOL, "LPDDENUMCALLBACKEXW", [Pointer(GUID), LPWSTR, LPWSTR, LPVOID, HMONITOR]))
-LPDDENUMCALLBACKA = Alias("LPDDENUMCALLBACKA", Pointer(Void))
-LPDDENUMCALLBACKW = Alias("LPDDENUMCALLBACKW", Pointer(Void))
-LPDDENUMCALLBACKEXA = Alias("LPDDENUMCALLBACKEXA", Pointer(Void))
-LPDDENUMCALLBACKEXW = Alias("LPDDENUMCALLBACKEXW", Pointer(Void))
+LPDDENUMCALLBACKA = FunctionPointer(BOOL, "LPDDENUMCALLBACKA", [Pointer(GUID), LPSTR, LPSTR, LPVOID])
+LPDDENUMCALLBACKW = FunctionPointer(BOOL, "LPDDENUMCALLBACKW", [Pointer(GUID), LPWSTR, LPWSTR, LPVOID])
+LPDDENUMCALLBACKEXA = FunctionPointer(BOOL, "LPDDENUMCALLBACKEXA", [Pointer(GUID), LPSTR, LPSTR, LPVOID, HMONITOR])
+LPDDENUMCALLBACKEXW = FunctionPointer(BOOL, "LPDDENUMCALLBACKEXW", [Pointer(GUID), LPWSTR, LPWSTR, LPVOID, HMONITOR])
DDENUM = Flags(DWORD, [
"DDENUM_ATTACHEDSECONDARYDEVICES",
DllFunction(HRESULT, "DirectDrawEnumerateA", [(LPDDENUMCALLBACKA, "lpCallback"), (LPVOID, "lpContext")]),
DllFunction(HRESULT, "DirectDrawEnumerateExW", [(LPDDENUMCALLBACKEXW, "lpCallback"), (LPVOID, "lpContext"), (DDENUM, "dwFlags")]),
DllFunction(HRESULT, "DirectDrawEnumerateExA", [(LPDDENUMCALLBACKEXA, "lpCallback"), (LPVOID, "lpContext"), (DDENUM, "dwFlags")]),
- DllFunction(HRESULT, "DirectDrawCreate", [(Pointer(GUID), "lpGUID"), (OutPointer(LPDIRECTDRAW), "lplpDD"), (Pointer(IUnknown), "pUnkOuter")]),
- DllFunction(HRESULT, "DirectDrawCreateEx", [(Pointer(GUID), "lpGuid"), (OutPointer(LPVOID), "lplpDD"), (REFIID, "iid"), (Pointer(IUnknown), "pUnkOuter")]),
- DllFunction(HRESULT, "DirectDrawCreateClipper", [(DWORD, "dwFlags"), (OutPointer(LPDIRECTDRAWCLIPPER), "lplpDDClipper"), (Pointer(IUnknown), "pUnkOuter")]),
+ DllFunction(HRESULT, "DirectDrawCreate", [(Pointer(GUID), "lpGUID"), Out(Pointer(LPDIRECTDRAW), "lplpDD"), (Pointer(IUnknown), "pUnkOuter")]),
+ DllFunction(HRESULT, "DirectDrawCreateEx", [(Pointer(GUID), "lpGuid"), Out(Pointer(LPVOID), "lplpDD"), (REFIID, "iid"), (Pointer(IUnknown), "pUnkOuter")]),
+ DllFunction(HRESULT, "DirectDrawCreateClipper", [(DWORD, "dwFlags"), Out(Pointer(LPDIRECTDRAWCLIPPER), "lplpDDClipper"), (Pointer(IUnknown), "pUnkOuter")]),
]
if __name__ == '__main__':
])
LPRGNDATA = Pointer(RGNDATA)
-HMODULE = Alias("HMODULE", LPVOID)
+HMODULE = Opaque("HMODULE")
IUnknown = Interface("IUnknown")
IUnknown.methods = (
- Method(HRESULT, "QueryInterface", ((REFIID, "riid"), (Pointer(Pointer(Void)), "ppvObj"))),
+ Method(HRESULT, "QueryInterface", ((REFIID, "riid"), (Pointer(OpaquePointer(Void)), "ppvObj"))),
Method(ULONG, "AddRef", ()),
Method(ULONG, "Release", ()),
)