ID2D1Factory
])
d2d1.addFunctions([
- StdFunction(HRESULT, "D2D1CreateFactory", [(D2D1_FACTORY_TYPE, "factoryType"), (REFIID, "riid"), (Pointer(Const(D2D1_FACTORY_OPTIONS)), "pFactoryOptions"), Out(Pointer(OpaquePointer(Void)), "ppIFactory")]),
+ StdFunction(HRESULT, "D2D1CreateFactory", [(D2D1_FACTORY_TYPE, "factoryType"), (REFIID, "riid"), (Pointer(Const(D2D1_FACTORY_OPTIONS)), "pFactoryOptions"), Out(Pointer(ObjPointer(Void)), "ppIFactory")]),
StdFunction(Void, "D2D1MakeRotateMatrix", [(FLOAT, "angle"), (D2D1_POINT_2F, "center"), Out(Pointer(D2D1_MATRIX_3X2_F), "matrix")]),
StdFunction(Void, "D2D1MakeSkewMatrix", [(FLOAT, "angleX"), (FLOAT, "angleY"), (D2D1_POINT_2F, "center"), Out(Pointer(D2D1_MATRIX_3X2_F), "matrix")]),
StdFunction(BOOL, "D2D1IsMatrixInvertible", [(Pointer(Const(D2D1_MATRIX_3X2_F)), "matrix")]),
from specs.d2d1 import d2d1
-class D2D1Tracer(DllTracer):
-
- def wrapArg(self, function, arg):
- if function.name == 'D2D1CreateFactory' and arg.output:
- print ' if (*%s) {' % arg.name
- for iface in d2d1.interfaces:
- print ' if (riid == IID_%s) {' % iface.name
- print ' *%s = (LPVOID) new Wrap%s((%s *)*%s);' % (arg.name, iface.name, iface.name, arg.name)
- print ' }'
- print ' }'
- else:
- DllTracer.wrapArg(self, function, arg)
-
-
if __name__ == '__main__':
print '#define INITGUID'
print
print '#include "d2dimports.hpp"'
print
- tracer = D2D1Tracer('d2d1.dll')
+ tracer = DllTracer('d2d1.dll')
tracer.traceModule(d2d1)
from specs.d2d1 import d2d1 # cyclic dependency
-class DWriteTracer(DllTracer):
-
- def wrapArg(self, function, arg):
- if function.name == 'DWriteCreateFactory' and arg.output:
- print ' if (*%s) {' % arg.name
- for iface in dwrite.interfaces:
- print ' if (iid == IID_%s) {' % iface.name
- print ' *%s = new Wrap%s(static_cast<%s *>(*%s));' % (arg.name, iface.name, iface.name, arg.name)
- print ' }'
- print ' }'
- else:
- DllTracer.wrapArg(self, function, arg)
-
-
if __name__ == '__main__':
print '#define INITGUID'
print
print '#include "d2dimports.hpp"'
print
- tracer = DWriteTracer('dwrite.dll')
+ tracer = DllTracer('dwrite.dll')
tracer.traceModule(dwrite)