This is the Objective-C equivalent of CL 34776, generating reverse wrappers for generated ObjC types. The implementation follows the same strategy as the Java implementation: use the Go ast package to find exported structs with embedded Objective-C types and synthesize their types as if they were imported through clang. In turn, the handling of the implicit "self" parameter changes in the same way as well: the type of self parameters must be the wrapped type for the generated type. For example: func (d *GoNSDate) Description(self Foundation.NSDate) string becomes import gopkg "ObjC/Objcpkg" func (d *GoNSDate) Description(self gopkg.GoNSDate) string Change-Id: I26f838b06a622864be463f81dbb4dcae76f70f20 Reviewed-on: https://go-review.googlesource.com/34780 Reviewed-by: David Crawshaw <crawshaw@golang.org>
89 lines
1.7 KiB
Plaintext
89 lines
1.7 KiB
Plaintext
//File is generated by gobind. Do not edit.
|
|
|
|
package ObjC
|
|
|
|
// Used to silence this package not used errors
|
|
const Dummy = 0
|
|
|
|
type Foundation_NSString interface {
|
|
}
|
|
|
|
type Foundation_NSDate interface {
|
|
}
|
|
|
|
type Foundation_NSObjectC interface {
|
|
}
|
|
|
|
// File is generated by gobind. Do not edit.
|
|
|
|
package gomobile_bind
|
|
|
|
// #cgo CFLAGS: -fobjc-arc -fmodules -fblocks
|
|
// #include "interfaces.h"
|
|
import "C"
|
|
|
|
import "ObjC"
|
|
import _seq "golang.org/x/mobile/bind/seq"
|
|
|
|
type proxy interface { Bind_proxy_refnum__() int32 }
|
|
|
|
// Suppress unused package error
|
|
|
|
var _ = _seq.FromRefNum
|
|
const _ = ObjC.Dummy
|
|
|
|
func init() {
|
|
}
|
|
|
|
type proxy_class_NSString _seq.Ref
|
|
|
|
func (p *proxy_class_NSString) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
|
|
|
|
func init() {
|
|
}
|
|
|
|
type proxy_class_NSDate _seq.Ref
|
|
|
|
func (p *proxy_class_NSDate) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
|
|
|
|
func init() {
|
|
}
|
|
|
|
type proxy_class_NSObjectC _seq.Ref
|
|
|
|
func (p *proxy_class_NSObjectC) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
|
|
|
|
// Package gomobile_bind is an autogenerated binder stub for package objc.
|
|
// gobind -lang=go objc
|
|
//
|
|
// File is generated by gobind. Do not edit.
|
|
package gomobile_bind
|
|
|
|
/*
|
|
#include <stdlib.h>
|
|
#include <stdint.h>
|
|
#include "seq.h"
|
|
#include "objc.h"
|
|
|
|
*/
|
|
import "C"
|
|
|
|
import (
|
|
_seq "golang.org/x/mobile/bind/seq"
|
|
)
|
|
|
|
// suppress the error if seq ends up unused
|
|
var _ = _seq.FromRefNum
|
|
|
|
type proxyobjc_D _seq.Ref
|
|
|
|
func (p *proxyobjc_D) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
|
|
|
|
type proxyobjc_O _seq.Ref
|
|
|
|
func (p *proxyobjc_O) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
|
|
|
|
type proxyobjc_S _seq.Ref
|
|
|
|
func (p *proxyobjc_S) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
|