Accept ObjC API wrapper types as arguments and return values from bound Go package functions and methods. Also, allow Go structs to extend ObjC classes and implement ObjC protocols as well as override and implement methods. This is the third and final part of the implementation of the golang/go#17102 proposal. Fixes golang/go#17102 Change-Id: I601d90fb6d22b8d6f8b7d5fe0130daa1a4dd4734 Reviewed-on: https://go-review.googlesource.com/29175 Reviewed-by: David Crawshaw <crawshaw@golang.org>
137 lines
2.8 KiB
Plaintext
137 lines
2.8 KiB
Plaintext
// Objective-C API for talking to interfaces Go package.
|
|
// gobind -lang=objc interfaces
|
|
//
|
|
// File is generated by gobind. Do not edit.
|
|
|
|
#ifndef __GoInterfaces_H__
|
|
#define __GoInterfaces_H__
|
|
|
|
@import Foundation;
|
|
#include "GoUniverse.h"
|
|
|
|
|
|
@protocol GoInterfacesError;
|
|
@class GoInterfacesError;
|
|
@protocol GoInterfacesI;
|
|
@class GoInterfacesI;
|
|
@protocol GoInterfacesI1;
|
|
@protocol GoInterfacesI2;
|
|
@protocol GoInterfacesI3;
|
|
@class GoInterfacesI3;
|
|
@protocol GoInterfacesLargerI;
|
|
@class GoInterfacesLargerI;
|
|
@protocol GoInterfacesSameI;
|
|
@class GoInterfacesSameI;
|
|
@protocol GoInterfacesWithParam;
|
|
@class GoInterfacesWithParam;
|
|
|
|
@protocol GoInterfacesError <NSObject>
|
|
- (BOOL)err:(NSError**)error;
|
|
@end
|
|
|
|
@protocol GoInterfacesI <NSObject>
|
|
- (int32_t)rand;
|
|
@end
|
|
|
|
@interface GoInterfacesI1 : NSObject <goSeqRefInterface> {
|
|
}
|
|
@property(strong, readonly) id _ref;
|
|
|
|
- (instancetype)initWithRef:(id)ref;
|
|
- (void)j;
|
|
@end
|
|
|
|
@interface GoInterfacesI2 : NSObject <goSeqRefInterface> {
|
|
}
|
|
@property(strong, readonly) id _ref;
|
|
|
|
- (instancetype)initWithRef:(id)ref;
|
|
- (void)g;
|
|
@end
|
|
|
|
@protocol GoInterfacesI3 <NSObject>
|
|
- (GoInterfacesI1*)f;
|
|
@end
|
|
|
|
@protocol GoInterfacesLargerI <NSObject>
|
|
- (void)anotherFunc;
|
|
- (int32_t)rand;
|
|
@end
|
|
|
|
@protocol GoInterfacesSameI <NSObject>
|
|
- (int32_t)rand;
|
|
@end
|
|
|
|
@protocol GoInterfacesWithParam <NSObject>
|
|
- (void)hasParam:(BOOL)p0;
|
|
@end
|
|
|
|
FOUNDATION_EXPORT int32_t GoInterfacesAdd3(id<GoInterfacesI> r);
|
|
|
|
FOUNDATION_EXPORT BOOL GoInterfacesCallErr(id<GoInterfacesError> e, NSError** error);
|
|
|
|
FOUNDATION_EXPORT id<GoInterfacesI> GoInterfacesSeven();
|
|
|
|
@class GoInterfacesError;
|
|
|
|
@class GoInterfacesI;
|
|
|
|
@class GoInterfacesI3;
|
|
|
|
@class GoInterfacesLargerI;
|
|
|
|
@class GoInterfacesSameI;
|
|
|
|
@class GoInterfacesWithParam;
|
|
|
|
@interface GoInterfacesError : NSObject <goSeqRefInterface, GoInterfacesError> {
|
|
}
|
|
@property(strong, readonly) id _ref;
|
|
|
|
- (instancetype)initWithRef:(id)ref;
|
|
- (BOOL)err:(NSError**)error;
|
|
@end
|
|
|
|
@interface GoInterfacesI : NSObject <goSeqRefInterface, GoInterfacesI> {
|
|
}
|
|
@property(strong, readonly) id _ref;
|
|
|
|
- (instancetype)initWithRef:(id)ref;
|
|
- (int32_t)rand;
|
|
@end
|
|
|
|
@interface GoInterfacesI3 : NSObject <goSeqRefInterface, GoInterfacesI3> {
|
|
}
|
|
@property(strong, readonly) id _ref;
|
|
|
|
- (instancetype)initWithRef:(id)ref;
|
|
- (GoInterfacesI1*)f;
|
|
@end
|
|
|
|
@interface GoInterfacesLargerI : NSObject <goSeqRefInterface, GoInterfacesLargerI> {
|
|
}
|
|
@property(strong, readonly) id _ref;
|
|
|
|
- (instancetype)initWithRef:(id)ref;
|
|
- (void)anotherFunc;
|
|
- (int32_t)rand;
|
|
@end
|
|
|
|
@interface GoInterfacesSameI : NSObject <goSeqRefInterface, GoInterfacesSameI> {
|
|
}
|
|
@property(strong, readonly) id _ref;
|
|
|
|
- (instancetype)initWithRef:(id)ref;
|
|
- (int32_t)rand;
|
|
@end
|
|
|
|
@interface GoInterfacesWithParam : NSObject <goSeqRefInterface, GoInterfacesWithParam> {
|
|
}
|
|
@property(strong, readonly) id _ref;
|
|
|
|
- (instancetype)initWithRef:(id)ref;
|
|
- (void)hasParam:(BOOL)p0;
|
|
@end
|
|
|
|
#endif
|