#define SWIFT_NAME(name) __attribute__((__swift_name__(name)))
#define SWIFT_ASYNC_NAME(name) __attribute__((__swift_async_name__(name)))
typedef struct {
float x, y, z;
} Point3D;
__attribute__((__swift_name__("PType")))
@protocol P
@end
__attribute__((__swift_name__("IClass")))
@interface I<P>
- (instancetype)init SWIFT_NAME("init()");
- (instancetype)initWithValue:(int)value SWIFT_NAME("iWithValue(_:)");
+ (void)refresh SWIFT_NAME("refresh()");
- (instancetype)i SWIFT_NAME("i()");
- (I *)iWithValue:(int)value SWIFT_NAME("i(value:)");
- (I *)iWithValue:(int)value value:(int)value2 SWIFT_NAME("i(value:extra:)");
- (I *)iWithValueConvertingValue:(int)value value:(int)value2 SWIFT_NAME("i(_:extra:)");
+ (I *)iWithOtheValue:(int)value SWIFT_NAME("init");
+ (I *)iWithAnotherValue:(int)value SWIFT_NAME("i()");
+ (I *)iWithYetAnotherValue:(int)value SWIFT_NAME("i(value:extra:)");
+ (I *)iAndReturnErrorCode:(int *)errorCode SWIFT_NAME("i()"); + (I *)iWithValue:(int)value andReturnErrorCode:(int *)errorCode SWIFT_NAME("i(value:)");
+ (I *)iFromErrorCode:(const int *)errorCode SWIFT_NAME("i()");
+ (I *)iWithPointerA:(int *)value andReturnErrorCode:(int *)errorCode SWIFT_NAME("i()"); + (I *)iWithPointerB:(int *)value andReturnErrorCode:(int *)errorCode SWIFT_NAME("i(pointer:)"); + (I *)iWithPointerC:(int *)value andReturnErrorCode:(int *)errorCode SWIFT_NAME("i(pointer:errorCode:)");
+ (I *)iWithOtherI:(I *)other SWIFT_NAME("i()");
+ (instancetype)specialI SWIFT_NAME("init(options:)");
+ (instancetype)specialJ SWIFT_NAME("init(options:extra:)");
+ (instancetype)specialK SWIFT_NAME("init(_:)");
+ (instancetype)specialL SWIFT_NAME("i(options:)");
+ (instancetype)trailingParen SWIFT_NAME("foo(");
+ (instancetype)trailingColon SWIFT_NAME("foo:");
+ (instancetype)initialIgnore:(int)value SWIFT_NAME("_(value:)");
+ (instancetype)middleOmitted:(int)value SWIFT_NAME("i(:)");
@property(strong) id someProp SWIFT_NAME("prop");
@end
enum SWIFT_NAME("E") E {
value1,
value2,
value3 SWIFT_NAME("three"),
value4 SWIFT_NAME("four()"), };
struct SWIFT_NAME("TStruct") SStruct {
int i, j, k SWIFT_NAME("kay");
};
int i SWIFT_NAME("g_i");
void f0(int i) SWIFT_NAME("f_0");
void f1(int i) SWIFT_NAME("f_1()");
void f2(int i) SWIFT_NAME("f_2(a:b:)");
void f3(int x, int y) SWIFT_NAME("fWithX(_:y:)");
void f4(int x, int *error) SWIFT_NAME("fWithX(_:)");
typedef int int_t SWIFT_NAME("IntType");
struct Point3D createPoint3D(float x, float y, float z) SWIFT_NAME("Point3D.init(x:y:z:)");
struct Point3D rotatePoint3D(Point3D point, float radians) SWIFT_NAME("Point3D.rotate(self:radians:)");
struct Point3D badRotatePoint3D(Point3D point, float radians) SWIFT_NAME("Point3D.rotate(radians:)");
extern struct Point3D identityPoint SWIFT_NAME("Point3D.identity");
float Point3DGetMagnitude(Point3D point) SWIFT_NAME("getter:Point3D.magnitude(self:)");
float Point3DGetMagnitudeAndSomethingElse(Point3D point, float f) SWIFT_NAME("getter:Point3D.magnitude(self:f:)");
float Point3DGetRadius(Point3D point) SWIFT_NAME("getter:Point3D.radius(self:)");
void Point3DSetRadius(Point3D point, float radius) SWIFT_NAME("setter:Point3D.radius(self:newValue:)");
float Point3DPreGetRadius(Point3D point) SWIFT_NAME("getter:Point3D.preRadius(self:)");
void Point3DPreSetRadius(float radius, Point3D point) SWIFT_NAME("setter:Point3D.preRadius(newValue:self:)");
void Point3DSetRadiusAndSomethingElse(Point3D point, float radius, float f) SWIFT_NAME("setter:Point3D.radius(self:newValue:f:)");
float Point3DGetComponent(Point3D point, unsigned index) SWIFT_NAME("getter:Point3D.subscript(self:_:)");
float Point3DSetComponent(Point3D point, unsigned index, float value) SWIFT_NAME("setter:Point3D.subscript(self:_:newValue:)");
float Point3DGetMatrixComponent(Point3D point, unsigned x, unsigned y) SWIFT_NAME("getter:Point3D.subscript(self:x:y:)");
void Point3DSetMatrixComponent(Point3D point, unsigned x, float value, unsigned y) SWIFT_NAME("setter:Point3D.subscript(self:x:newValue:y:)");
float Point3DSetWithoutNewValue(Point3D point, unsigned x, unsigned y) SWIFT_NAME("setter:Point3D.subscript(self:x:y:)");
float Point3DSubscriptButNotGetterSetter(Point3D point, unsigned x) SWIFT_NAME("Point3D.subscript(self:_:)");
void Point3DSubscriptSetterTwoNewValues(Point3D point, unsigned x, float a, float b) SWIFT_NAME("setter:Point3D.subscript(self:_:newValue:newValue:)");
float Point3DSubscriptGetterNewValue(Point3D point, unsigned x, float a, float b) SWIFT_NAME("getter:Point3D.subscript(self:_:newValue:newValue:)");
void Point3DMethodWithNewValue(Point3D point, float newValue) SWIFT_NAME("Point3D.method(self:newValue:)");
void Point3DMethodWithNewValues(Point3D point, float newValue, float newValueB) SWIFT_NAME("Point3D.method(self:newValue:newValue:)");
float Point3DStaticSubscript(unsigned x) SWIFT_NAME("getter:Point3D.subscript(_:)");
float Point3DStaticSubscriptNoArgs(void) SWIFT_NAME("getter:Point3D.subscript()");
float Point3DPreGetComponent(Point3D point, unsigned index) SWIFT_NAME("getter:Point3D.subscript(self:_:)");
Point3D getCurrentPoint3D(void) SWIFT_NAME("getter:currentPoint3D()");
void setCurrentPoint3D(Point3D point) SWIFT_NAME("setter:currentPoint3D(newValue:)");
Point3D getLastPoint3D(void) SWIFT_NAME("getter:lastPoint3D()");
void setLastPoint3D(Point3D point) SWIFT_NAME("setter:lastPoint3D(newValue:)");
Point3D getZeroPoint(void) SWIFT_NAME("getter:Point3D.zero()");
void setZeroPoint(Point3D point) SWIFT_NAME("setter:Point3D.zero(newValue:)");
Point3D getZeroPointNoPrototype() SWIFT_NAME("getter:Point3D.zeroNoPrototype()");
Point3D badGetter1(int x) SWIFT_NAME("getter:bad1(_:)");
void badSetter1(void) SWIFT_NAME("getter:bad1())");
Point3D badGetter2(Point3D point) SWIFT_NAME("getter:bad2(_:))");
void badSetter2(Point3D point) SWIFT_NAME("setter:bad2(self:))");
void g(int i) SWIFT_NAME("function(int:)");
void g(int i) SWIFT_NAME("function(_:)") {
}
typedef int (^CallbackTy)(void);
@interface AsyncI<P>
- (void)doSomethingWithCallback:(CallbackTy)callback SWIFT_ASYNC_NAME("doSomething()");
- (void)doSomethingX:(int)x withCallback:(CallbackTy)callback SWIFT_ASYNC_NAME("doSomething(x:)");
- (void)doSomethingY:(int)x withCallback:(CallbackTy)callback SWIFT_ASYNC_NAME("doSomething(x:y:)");
- (void)doSomethingZ:(int)x withCallback:(CallbackTy)callback SWIFT_ASYNC_NAME("doSomething()");
- (void)doSomethingNone SWIFT_ASYNC_NAME("doSomething()");
- (void)brokenAttr __attribute__((__swift_async_name__("brokenAttr", 2)));
@end
void asyncFunc(CallbackTy callback) SWIFT_ASYNC_NAME("asyncFunc()");
void asyncNoParams(void) SWIFT_ASYNC_NAME("asyncNoParams()");
SWIFT_ASYNC_NAME("NoAsync")
@protocol NoAsync @end