diff options
Diffstat (limited to 'specs')
-rw-r--r-- | specs/dcomp.py | 192 | ||||
-rw-r--r-- | specs/stdapi.py | 22 |
2 files changed, 114 insertions, 100 deletions
diff --git a/specs/dcomp.py b/specs/dcomp.py index 983ce3c3..85049ff6 100644 --- a/specs/dcomp.py +++ b/specs/dcomp.py @@ -124,18 +124,18 @@ IDCompositionTarget.methods += [ ] IDCompositionVisual.methods += [ - StdMethod(HRESULT, 'SetOffsetX', [(Float, 'offsetX')]), - StdMethod(HRESULT, 'SetOffsetX', [(ObjPointer(IDCompositionAnimation), 'animation')]), - StdMethod(HRESULT, 'SetOffsetY', [(Float, 'offsetY')]), - StdMethod(HRESULT, 'SetOffsetY', [(ObjPointer(IDCompositionAnimation), 'animation')]), - StdMethod(HRESULT, 'SetTransform', [(Reference(Const(D2D_MATRIX_3X2_F)), 'matrix')]), - StdMethod(HRESULT, 'SetTransform', [(ObjPointer(IDCompositionTransform), 'transform')]), + StdMethod(HRESULT, 'SetOffsetX', [(Float, 'offsetX')], overloaded=True), + StdMethod(HRESULT, 'SetOffsetX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), + StdMethod(HRESULT, 'SetOffsetY', [(Float, 'offsetY')], overloaded=True), + StdMethod(HRESULT, 'SetOffsetY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), + StdMethod(HRESULT, 'SetTransform', [(Reference(Const(D2D_MATRIX_3X2_F)), 'matrix')], overloaded=True), + StdMethod(HRESULT, 'SetTransform', [(ObjPointer(IDCompositionTransform), 'transform')], overloaded=True), StdMethod(HRESULT, 'SetTransformParent', [(ObjPointer(IDCompositionVisual), 'visual')]), StdMethod(HRESULT, 'SetEffect', [(ObjPointer(IDCompositionEffect), 'effect')]), StdMethod(HRESULT, 'SetBitmapInterpolationMode', [(DCOMPOSITION_BITMAP_INTERPOLATION_MODE, 'interpolationMode')]), StdMethod(HRESULT, 'SetBorderMode', [(DCOMPOSITION_BORDER_MODE, 'borderMode')]), - StdMethod(HRESULT, 'SetClip', [(Reference(Const(D2D_RECT_F)), 'rect')]), - StdMethod(HRESULT, 'SetClip', [(ObjPointer(IDCompositionClip), 'clip')]), + StdMethod(HRESULT, 'SetClip', [(Reference(Const(D2D_RECT_F)), 'rect')], overloaded=True), + StdMethod(HRESULT, 'SetClip', [(ObjPointer(IDCompositionClip), 'clip')], overloaded=True), StdMethod(HRESULT, 'SetContent', [(ObjPointer(IUnknown), 'content')]), StdMethod(HRESULT, 'AddVisual', [(ObjPointer(IDCompositionVisual), 'visual'), (BOOL, 'insertAbove'), (ObjPointer(IDCompositionVisual), 'referenceVisual')]), StdMethod(HRESULT, 'RemoveVisual', [(ObjPointer(IDCompositionVisual), 'visual')]), @@ -150,102 +150,102 @@ IDCompositionTransform3D.methods += [ ] IDCompositionTranslateTransform.methods += [ - StdMethod(HRESULT, 'SetOffsetX', [(Float, 'offsetX')]), - StdMethod(HRESULT, 'SetOffsetX', [(ObjPointer(IDCompositionAnimation), 'animation')]), - StdMethod(HRESULT, 'SetOffsetY', [(Float, 'offsetY')]), - StdMethod(HRESULT, 'SetOffsetY', [(ObjPointer(IDCompositionAnimation), 'animation')]), + StdMethod(HRESULT, 'SetOffsetX', [(Float, 'offsetX')], overloaded=True), + StdMethod(HRESULT, 'SetOffsetX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), + StdMethod(HRESULT, 'SetOffsetY', [(Float, 'offsetY')], overloaded=True), + StdMethod(HRESULT, 'SetOffsetY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), ] IDCompositionTranslateTransform3D.methods += [ - StdMethod(HRESULT, 'SetOffsetX', [(Float, 'offsetX')]), - StdMethod(HRESULT, 'SetOffsetX', [(ObjPointer(IDCompositionAnimation), 'animation')]), - StdMethod(HRESULT, 'SetOffsetY', [(Float, 'offsetY')]), - StdMethod(HRESULT, 'SetOffsetY', [(ObjPointer(IDCompositionAnimation), 'animation')]), - StdMethod(HRESULT, 'SetOffsetZ', [(Float, 'offsetZ')]), - StdMethod(HRESULT, 'SetOffsetZ', [(ObjPointer(IDCompositionAnimation), 'animation')]), + StdMethod(HRESULT, 'SetOffsetX', [(Float, 'offsetX')], overloaded=True), + StdMethod(HRESULT, 'SetOffsetX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), + StdMethod(HRESULT, 'SetOffsetY', [(Float, 'offsetY')], overloaded=True), + StdMethod(HRESULT, 'SetOffsetY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), + StdMethod(HRESULT, 'SetOffsetZ', [(Float, 'offsetZ')], overloaded=True), + StdMethod(HRESULT, 'SetOffsetZ', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), ] IDCompositionScaleTransform.methods += [ - StdMethod(HRESULT, 'SetScaleX', [(Float, 'scaleX')]), - StdMethod(HRESULT, 'SetScaleX', [(ObjPointer(IDCompositionAnimation), 'animation')]), - StdMethod(HRESULT, 'SetScaleY', [(Float, 'scaleY')]), - StdMethod(HRESULT, 'SetScaleY', [(ObjPointer(IDCompositionAnimation), 'animation')]), - StdMethod(HRESULT, 'SetCenterX', [(Float, 'centerX')]), - StdMethod(HRESULT, 'SetCenterX', [(ObjPointer(IDCompositionAnimation), 'animation')]), - StdMethod(HRESULT, 'SetCenterY', [(Float, 'centerY')]), - StdMethod(HRESULT, 'SetCenterY', [(ObjPointer(IDCompositionAnimation), 'animation')]), + StdMethod(HRESULT, 'SetScaleX', [(Float, 'scaleX')], overloaded=True), + StdMethod(HRESULT, 'SetScaleX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), + StdMethod(HRESULT, 'SetScaleY', [(Float, 'scaleY')], overloaded=True), + StdMethod(HRESULT, 'SetScaleY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), + StdMethod(HRESULT, 'SetCenterX', [(Float, 'centerX')], overloaded=True), + StdMethod(HRESULT, 'SetCenterX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), + StdMethod(HRESULT, 'SetCenterY', [(Float, 'centerY')], overloaded=True), + StdMethod(HRESULT, 'SetCenterY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), ] IDCompositionScaleTransform3D.methods += [ - StdMethod(HRESULT, 'SetScaleX', [(Float, 'scaleX')]), - StdMethod(HRESULT, 'SetScaleX', [(ObjPointer(IDCompositionAnimation), 'animation')]), - StdMethod(HRESULT, 'SetScaleY', [(Float, 'scaleY')]), - StdMethod(HRESULT, 'SetScaleY', [(ObjPointer(IDCompositionAnimation), 'animation')]), - StdMethod(HRESULT, 'SetScaleZ', [(Float, 'scaleZ')]), - StdMethod(HRESULT, 'SetScaleZ', [(ObjPointer(IDCompositionAnimation), 'animation')]), - StdMethod(HRESULT, 'SetCenterX', [(Float, 'centerX')]), - StdMethod(HRESULT, 'SetCenterX', [(ObjPointer(IDCompositionAnimation), 'animation')]), - StdMethod(HRESULT, 'SetCenterY', [(Float, 'centerY')]), - StdMethod(HRESULT, 'SetCenterY', [(ObjPointer(IDCompositionAnimation), 'animation')]), - StdMethod(HRESULT, 'SetCenterZ', [(Float, 'centerZ')]), - StdMethod(HRESULT, 'SetCenterZ', [(ObjPointer(IDCompositionAnimation), 'animation')]), + StdMethod(HRESULT, 'SetScaleX', [(Float, 'scaleX')], overloaded=True), + StdMethod(HRESULT, 'SetScaleX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), + StdMethod(HRESULT, 'SetScaleY', [(Float, 'scaleY')], overloaded=True), + StdMethod(HRESULT, 'SetScaleY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), + StdMethod(HRESULT, 'SetScaleZ', [(Float, 'scaleZ')], overloaded=True), + StdMethod(HRESULT, 'SetScaleZ', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), + StdMethod(HRESULT, 'SetCenterX', [(Float, 'centerX')], overloaded=True), + StdMethod(HRESULT, 'SetCenterX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), + StdMethod(HRESULT, 'SetCenterY', [(Float, 'centerY')], overloaded=True), + StdMethod(HRESULT, 'SetCenterY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), + StdMethod(HRESULT, 'SetCenterZ', [(Float, 'centerZ')], overloaded=True), + StdMethod(HRESULT, 'SetCenterZ', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), ] IDCompositionRotateTransform.methods += [ - StdMethod(HRESULT, 'SetAngle', [(Float, 'angle')]), - StdMethod(HRESULT, 'SetAngle', [(ObjPointer(IDCompositionAnimation), 'animation')]), - StdMethod(HRESULT, 'SetCenterX', [(Float, 'centerX')]), - StdMethod(HRESULT, 'SetCenterX', [(ObjPointer(IDCompositionAnimation), 'animation')]), - StdMethod(HRESULT, 'SetCenterY', [(Float, 'centerY')]), - StdMethod(HRESULT, 'SetCenterY', [(ObjPointer(IDCompositionAnimation), 'animation')]), + StdMethod(HRESULT, 'SetAngle', [(Float, 'angle')], overloaded=True), + StdMethod(HRESULT, 'SetAngle', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), + StdMethod(HRESULT, 'SetCenterX', [(Float, 'centerX')], overloaded=True), + StdMethod(HRESULT, 'SetCenterX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), + StdMethod(HRESULT, 'SetCenterY', [(Float, 'centerY')], overloaded=True), + StdMethod(HRESULT, 'SetCenterY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), ] IDCompositionRotateTransform3D.methods += [ - StdMethod(HRESULT, 'SetAngle', [(Float, 'angle')]), - StdMethod(HRESULT, 'SetAngle', [(ObjPointer(IDCompositionAnimation), 'animation')]), - StdMethod(HRESULT, 'SetAxisX', [(Float, 'axisX')]), - StdMethod(HRESULT, 'SetAxisX', [(ObjPointer(IDCompositionAnimation), 'animation')]), - StdMethod(HRESULT, 'SetAxisY', [(Float, 'axisY')]), - StdMethod(HRESULT, 'SetAxisY', [(ObjPointer(IDCompositionAnimation), 'animation')]), - StdMethod(HRESULT, 'SetAxisZ', [(Float, 'axisZ')]), - StdMethod(HRESULT, 'SetAxisZ', [(ObjPointer(IDCompositionAnimation), 'animation')]), - StdMethod(HRESULT, 'SetCenterX', [(Float, 'centerX')]), - StdMethod(HRESULT, 'SetCenterX', [(ObjPointer(IDCompositionAnimation), 'animation')]), - StdMethod(HRESULT, 'SetCenterY', [(Float, 'centerY')]), - StdMethod(HRESULT, 'SetCenterY', [(ObjPointer(IDCompositionAnimation), 'animation')]), - StdMethod(HRESULT, 'SetCenterZ', [(Float, 'centerZ')]), - StdMethod(HRESULT, 'SetCenterZ', [(ObjPointer(IDCompositionAnimation), 'animation')]), + StdMethod(HRESULT, 'SetAngle', [(Float, 'angle')], overloaded=True), + StdMethod(HRESULT, 'SetAngle', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), + StdMethod(HRESULT, 'SetAxisX', [(Float, 'axisX')], overloaded=True), + StdMethod(HRESULT, 'SetAxisX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), + StdMethod(HRESULT, 'SetAxisY', [(Float, 'axisY')], overloaded=True), + StdMethod(HRESULT, 'SetAxisY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), + StdMethod(HRESULT, 'SetAxisZ', [(Float, 'axisZ')], overloaded=True), + StdMethod(HRESULT, 'SetAxisZ', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), + StdMethod(HRESULT, 'SetCenterX', [(Float, 'centerX')], overloaded=True), + StdMethod(HRESULT, 'SetCenterX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), + StdMethod(HRESULT, 'SetCenterY', [(Float, 'centerY')], overloaded=True), + StdMethod(HRESULT, 'SetCenterY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), + StdMethod(HRESULT, 'SetCenterZ', [(Float, 'centerZ')], overloaded=True), + StdMethod(HRESULT, 'SetCenterZ', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), ] IDCompositionSkewTransform.methods += [ - StdMethod(HRESULT, 'SetAngleX', [(Float, 'angleX')]), - StdMethod(HRESULT, 'SetAngleX', [(ObjPointer(IDCompositionAnimation), 'animation')]), - StdMethod(HRESULT, 'SetAngleY', [(Float, 'angleY')]), - StdMethod(HRESULT, 'SetAngleY', [(ObjPointer(IDCompositionAnimation), 'animation')]), - StdMethod(HRESULT, 'SetCenterX', [(Float, 'centerX')]), - StdMethod(HRESULT, 'SetCenterX', [(ObjPointer(IDCompositionAnimation), 'animation')]), - StdMethod(HRESULT, 'SetCenterY', [(Float, 'centerY')]), - StdMethod(HRESULT, 'SetCenterY', [(ObjPointer(IDCompositionAnimation), 'animation')]), + StdMethod(HRESULT, 'SetAngleX', [(Float, 'angleX')], overloaded=True), + StdMethod(HRESULT, 'SetAngleX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), + StdMethod(HRESULT, 'SetAngleY', [(Float, 'angleY')], overloaded=True), + StdMethod(HRESULT, 'SetAngleY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), + StdMethod(HRESULT, 'SetCenterX', [(Float, 'centerX')], overloaded=True), + StdMethod(HRESULT, 'SetCenterX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), + StdMethod(HRESULT, 'SetCenterY', [(Float, 'centerY')], overloaded=True), + StdMethod(HRESULT, 'SetCenterY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), ] IDCompositionMatrixTransform.methods += [ StdMethod(HRESULT, 'SetMatrix', [(Reference(Const(D2D_MATRIX_3X2_F)), 'matrix')]), - StdMethod(HRESULT, 'SetMatrixElement', [(Int, 'row'), (Int, 'column'), (Float, 'value')]), - StdMethod(HRESULT, 'SetMatrixElement', [(Int, 'row'), (Int, 'column'), (ObjPointer(IDCompositionAnimation), 'animation')]), + StdMethod(HRESULT, 'SetMatrixElement', [(Int, 'row'), (Int, 'column'), (Float, 'value')], overloaded=True), + StdMethod(HRESULT, 'SetMatrixElement', [(Int, 'row'), (Int, 'column'), (ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), ] IDCompositionMatrixTransform3D.methods += [ StdMethod(HRESULT, 'SetMatrix', [(Reference(Const(D3DMATRIX)), 'matrix')]), - StdMethod(HRESULT, 'SetMatrixElement', [(Int, 'row'), (Int, 'column'), (Float, 'value')]), - StdMethod(HRESULT, 'SetMatrixElement', [(Int, 'row'), (Int, 'column'), (ObjPointer(IDCompositionAnimation), 'animation')]), + StdMethod(HRESULT, 'SetMatrixElement', [(Int, 'row'), (Int, 'column'), (Float, 'value')], overloaded=True), + StdMethod(HRESULT, 'SetMatrixElement', [(Int, 'row'), (Int, 'column'), (ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), ] IDCompositionEffect.methods += [ ] IDCompositionEffectGroup.methods += [ - StdMethod(HRESULT, 'SetOpacity', [(Float, 'opacity')]), - StdMethod(HRESULT, 'SetOpacity', [(ObjPointer(IDCompositionAnimation), 'animation')]), + StdMethod(HRESULT, 'SetOpacity', [(Float, 'opacity')], overloaded=True), + StdMethod(HRESULT, 'SetOpacity', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), StdMethod(HRESULT, 'SetTransform3D', [(ObjPointer(IDCompositionTransform3D), 'transform3D')]), ] @@ -253,30 +253,30 @@ IDCompositionClip.methods += [ ] IDCompositionRectangleClip.methods += [ - StdMethod(HRESULT, 'SetLeft', [(Float, 'left')]), - StdMethod(HRESULT, 'SetLeft', [(ObjPointer(IDCompositionAnimation), 'animation')]), - StdMethod(HRESULT, 'SetTop', [(Float, 'top')]), - StdMethod(HRESULT, 'SetTop', [(ObjPointer(IDCompositionAnimation), 'animation')]), - StdMethod(HRESULT, 'SetRight', [(Float, 'right')]), - StdMethod(HRESULT, 'SetRight', [(ObjPointer(IDCompositionAnimation), 'animation')]), - StdMethod(HRESULT, 'SetBottom', [(Float, 'bottom')]), - StdMethod(HRESULT, 'SetBottom', [(ObjPointer(IDCompositionAnimation), 'animation')]), - StdMethod(HRESULT, 'SetTopLeftRadiusX', [(Float, 'radius')]), - StdMethod(HRESULT, 'SetTopLeftRadiusX', [(ObjPointer(IDCompositionAnimation), 'animation')]), - StdMethod(HRESULT, 'SetTopLeftRadiusY', [(Float, 'radius')]), - StdMethod(HRESULT, 'SetTopLeftRadiusY', [(ObjPointer(IDCompositionAnimation), 'animation')]), - StdMethod(HRESULT, 'SetTopRightRadiusX', [(Float, 'radius')]), - StdMethod(HRESULT, 'SetTopRightRadiusX', [(ObjPointer(IDCompositionAnimation), 'animation')]), - StdMethod(HRESULT, 'SetTopRightRadiusY', [(Float, 'radius')]), - StdMethod(HRESULT, 'SetTopRightRadiusY', [(ObjPointer(IDCompositionAnimation), 'animation')]), - StdMethod(HRESULT, 'SetBottomLeftRadiusX', [(Float, 'radius')]), - StdMethod(HRESULT, 'SetBottomLeftRadiusX', [(ObjPointer(IDCompositionAnimation), 'animation')]), - StdMethod(HRESULT, 'SetBottomLeftRadiusY', [(Float, 'radius')]), - StdMethod(HRESULT, 'SetBottomLeftRadiusY', [(ObjPointer(IDCompositionAnimation), 'animation')]), - StdMethod(HRESULT, 'SetBottomRightRadiusX', [(Float, 'radius')]), - StdMethod(HRESULT, 'SetBottomRightRadiusX', [(ObjPointer(IDCompositionAnimation), 'animation')]), - StdMethod(HRESULT, 'SetBottomRightRadiusY', [(Float, 'radius')]), - StdMethod(HRESULT, 'SetBottomRightRadiusY', [(ObjPointer(IDCompositionAnimation), 'animation')]), + StdMethod(HRESULT, 'SetLeft', [(Float, 'left')], overloaded=True), + StdMethod(HRESULT, 'SetLeft', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), + StdMethod(HRESULT, 'SetTop', [(Float, 'top')], overloaded=True), + StdMethod(HRESULT, 'SetTop', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), + StdMethod(HRESULT, 'SetRight', [(Float, 'right')], overloaded=True), + StdMethod(HRESULT, 'SetRight', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), + StdMethod(HRESULT, 'SetBottom', [(Float, 'bottom')], overloaded=True), + StdMethod(HRESULT, 'SetBottom', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), + StdMethod(HRESULT, 'SetTopLeftRadiusX', [(Float, 'radius')], overloaded=True), + StdMethod(HRESULT, 'SetTopLeftRadiusX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), + StdMethod(HRESULT, 'SetTopLeftRadiusY', [(Float, 'radius')], overloaded=True), + StdMethod(HRESULT, 'SetTopLeftRadiusY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), + StdMethod(HRESULT, 'SetTopRightRadiusX', [(Float, 'radius')], overloaded=True), + StdMethod(HRESULT, 'SetTopRightRadiusX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), + StdMethod(HRESULT, 'SetTopRightRadiusY', [(Float, 'radius')], overloaded=True), + StdMethod(HRESULT, 'SetTopRightRadiusY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), + StdMethod(HRESULT, 'SetBottomLeftRadiusX', [(Float, 'radius')], overloaded=True), + StdMethod(HRESULT, 'SetBottomLeftRadiusX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), + StdMethod(HRESULT, 'SetBottomLeftRadiusY', [(Float, 'radius')], overloaded=True), + StdMethod(HRESULT, 'SetBottomLeftRadiusY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), + StdMethod(HRESULT, 'SetBottomRightRadiusX', [(Float, 'radius')], overloaded=True), + StdMethod(HRESULT, 'SetBottomRightRadiusX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), + StdMethod(HRESULT, 'SetBottomRightRadiusY', [(Float, 'radius')], overloaded=True), + StdMethod(HRESULT, 'SetBottomRightRadiusY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True), ] IDCompositionSurface.methods += [ diff --git a/specs/stdapi.py b/specs/stdapi.py index c72c264b..de0cc93a 100644 --- a/specs/stdapi.py +++ b/specs/stdapi.py @@ -26,6 +26,8 @@ """C basic types""" +import sys + import debug @@ -372,7 +374,7 @@ def InOut(type, name): class Function: - def __init__(self, type, name, args, call = '', fail = None, sideeffects=True, internal=False): + def __init__(self, type, name, args, call = '', fail = None, sideeffects=True, internal=False, overloaded=False): self.type = type self.name = name @@ -394,6 +396,7 @@ class Function: self.fail = fail self.sideeffects = sideeffects self.internal = internal + self.overloaded = overloaded def prototype(self, name=None): if name is not None: @@ -414,6 +417,17 @@ class Function: s += ")" return s + def sigName(self): + name = self.name + if self.overloaded: + # suffix used to make overloaded functions/methods unique + suffix = ','.join([str(arg.type) for arg in self.args]) + suffix = suffix.replace(' *', '*') + suffix = suffix.replace(' &', '&') + suffix = '(' + suffix + ')' + name += suffix + return name + def argNames(self): return [arg.name for arg in self.args] @@ -489,9 +503,9 @@ class Interface(Type): class Method(Function): - def __init__(self, type, name, args, call = '', const=False, sideeffects=True): + def __init__(self, type, name, args, call = '', const=False, sideeffects=True, overloaded=False): assert call == '__stdcall' - Function.__init__(self, type, name, args, call = call, sideeffects=sideeffects) + Function.__init__(self, type, name, args, call = call, sideeffects=sideeffects, overloaded=overloaded) for index in range(len(self.args)): self.args[index].index = index + 1 self.const = const @@ -792,7 +806,7 @@ class MutableRebuilder(Rebuilder): def visitReference(self, reference): # Strip out references - return reference.type + return self.visit(reference.type) class Traverser(Visitor): |