| 1 |
// Code generated by gobind. DO NOT EDIT. |
| 2 |
|
| 3 |
// Package main is an autogenerated binder stub for package structs. |
| 4 |
// |
| 5 |
// autogenerated by gobind -lang=go structs |
| 6 |
package main |
| 7 |
|
| 8 |
/* |
| 9 |
#include <stdlib.h> |
| 10 |
#include <stdint.h> |
| 11 |
#include "seq.h" |
| 12 |
#include "structs.h" |
| 13 |
|
| 14 |
*/ |
| 15 |
import "C" |
| 16 |
|
| 17 |
import ( |
| 18 |
_seq "golang.org/x/mobile/bind/seq" |
| 19 |
"structs" |
| 20 |
) |
| 21 |
|
| 22 |
// suppress the error if seq ends up unused |
| 23 |
var _ = _seq.FromRefNum |
| 24 |
|
| 25 |
//export proxystructs_S_X_Set |
| 26 |
func proxystructs_S_X_Set(refnum C.int32_t, v C.double) { |
| 27 |
ref := _seq.FromRefNum(int32(refnum)) |
| 28 |
_v := float64(v) |
| 29 |
ref.Get().(*structs.S).X = _v |
| 30 |
} |
| 31 |
|
| 32 |
//export proxystructs_S_X_Get |
| 33 |
func proxystructs_S_X_Get(refnum C.int32_t) C.double { |
| 34 |
ref := _seq.FromRefNum(int32(refnum)) |
| 35 |
v := ref.Get().(*structs.S).X |
| 36 |
_v := C.double(v) |
| 37 |
return _v |
| 38 |
} |
| 39 |
|
| 40 |
//export proxystructs_S_Y_Set |
| 41 |
func proxystructs_S_Y_Set(refnum C.int32_t, v C.double) { |
| 42 |
ref := _seq.FromRefNum(int32(refnum)) |
| 43 |
_v := float64(v) |
| 44 |
ref.Get().(*structs.S).Y = _v |
| 45 |
} |
| 46 |
|
| 47 |
//export proxystructs_S_Y_Get |
| 48 |
func proxystructs_S_Y_Get(refnum C.int32_t) C.double { |
| 49 |
ref := _seq.FromRefNum(int32(refnum)) |
| 50 |
v := ref.Get().(*structs.S).Y |
| 51 |
_v := C.double(v) |
| 52 |
return _v |
| 53 |
} |
| 54 |
|
| 55 |
//export proxystructs_S_Identity |
| 56 |
func proxystructs_S_Identity(refnum C.int32_t) (C.int32_t, C.int32_t) { |
| 57 |
ref := _seq.FromRefNum(int32(refnum)) |
| 58 |
v := ref.Get().(*structs.S) |
| 59 |
res_0, res_1 := v.Identity() |
| 60 |
var _res_0 C.int32_t = _seq.NullRefNum |
| 61 |
if res_0 != nil { |
| 62 |
_res_0 = C.int32_t(_seq.ToRefNum(res_0)) |
| 63 |
} |
| 64 |
var _res_1 C.int32_t = _seq.NullRefNum |
| 65 |
if res_1 != nil { |
| 66 |
_res_1 = C.int32_t(_seq.ToRefNum(res_1)) |
| 67 |
} |
| 68 |
return _res_0, _res_1 |
| 69 |
} |
| 70 |
|
| 71 |
//export proxystructs_S_Sum |
| 72 |
func proxystructs_S_Sum(refnum C.int32_t) C.double { |
| 73 |
ref := _seq.FromRefNum(int32(refnum)) |
| 74 |
v := ref.Get().(*structs.S) |
| 75 |
res_0 := v.Sum() |
| 76 |
_res_0 := C.double(res_0) |
| 77 |
return _res_0 |
| 78 |
} |
| 79 |
|
| 80 |
//export new_structs_S |
| 81 |
func new_structs_S() C.int32_t { |
| 82 |
return C.int32_t(_seq.ToRefNum(new(structs.S))) |
| 83 |
} |
| 84 |
|
| 85 |
//export proxystructs_S2_M |
| 86 |
func proxystructs_S2_M(refnum C.int32_t) { |
| 87 |
ref := _seq.FromRefNum(int32(refnum)) |
| 88 |
v := ref.Get().(*structs.S2) |
| 89 |
v.M() |
| 90 |
} |
| 91 |
|
| 92 |
//export proxystructs_S2_String |
| 93 |
func proxystructs_S2_String(refnum C.int32_t) C.nstring { |
| 94 |
ref := _seq.FromRefNum(int32(refnum)) |
| 95 |
v := ref.Get().(*structs.S2) |
| 96 |
res_0 := v.String() |
| 97 |
_res_0 := encodeString(res_0) |
| 98 |
return _res_0 |
| 99 |
} |
| 100 |
|
| 101 |
//export new_structs_S2 |
| 102 |
func new_structs_S2() C.int32_t { |
| 103 |
return C.int32_t(_seq.ToRefNum(new(structs.S2))) |
| 104 |
} |
| 105 |
|
| 106 |
//export proxystructs_Structs_M |
| 107 |
func proxystructs_Structs_M(refnum C.int32_t) { |
| 108 |
ref := _seq.FromRefNum(int32(refnum)) |
| 109 |
v := ref.Get().(*structs.Structs) |
| 110 |
v.M() |
| 111 |
} |
| 112 |
|
| 113 |
//export new_structs_Structs |
| 114 |
func new_structs_Structs() C.int32_t { |
| 115 |
return C.int32_t(_seq.ToRefNum(new(structs.Structs))) |
| 116 |
} |
| 117 |
|
| 118 |
//export proxystructs_I_M |
| 119 |
func proxystructs_I_M(refnum C.int32_t) { |
| 120 |
ref := _seq.FromRefNum(int32(refnum)) |
| 121 |
v := ref.Get().(structs.I) |
| 122 |
v.M() |
| 123 |
} |
| 124 |
|
| 125 |
type proxystructs_I _seq.Ref |
| 126 |
|
| 127 |
func (p *proxystructs_I) Bind_proxy_refnum__() int32 { |
| 128 |
return (*_seq.Ref)(p).Bind_IncNum() |
| 129 |
} |
| 130 |
|
| 131 |
func (p *proxystructs_I) M() { |
| 132 |
C.cproxystructs_I_M(C.int32_t(p.Bind_proxy_refnum__())) |
| 133 |
} |
| 134 |
|
| 135 |
//export proxystructs__Identity |
| 136 |
func proxystructs__Identity(param_s C.int32_t) C.int32_t { |
| 137 |
// Must be a Go object |
| 138 |
var _param_s *structs.S |
| 139 |
if _param_s_ref := _seq.FromRefNum(int32(param_s)); _param_s_ref != nil { |
| 140 |
_param_s = _param_s_ref.Get().(*structs.S) |
| 141 |
} |
| 142 |
res_0 := structs.Identity(_param_s) |
| 143 |
var _res_0 C.int32_t = _seq.NullRefNum |
| 144 |
if res_0 != nil { |
| 145 |
_res_0 = C.int32_t(_seq.ToRefNum(res_0)) |
| 146 |
} |
| 147 |
return _res_0 |
| 148 |
} |
| 149 |
|
| 150 |
//export proxystructs__IdentityWithError |
| 151 |
func proxystructs__IdentityWithError(param_s C.int32_t) (C.int32_t, C.int32_t) { |
| 152 |
// Must be a Go object |
| 153 |
var _param_s *structs.S |
| 154 |
if _param_s_ref := _seq.FromRefNum(int32(param_s)); _param_s_ref != nil { |
| 155 |
_param_s = _param_s_ref.Get().(*structs.S) |
| 156 |
} |
| 157 |
res_0, res_1 := structs.IdentityWithError(_param_s) |
| 158 |
var _res_0 C.int32_t = _seq.NullRefNum |
| 159 |
if res_0 != nil { |
| 160 |
_res_0 = C.int32_t(_seq.ToRefNum(res_0)) |
| 161 |
} |
| 162 |
var _res_1 C.int32_t = _seq.NullRefNum |
| 163 |
if res_1 != nil { |
| 164 |
_res_1 = C.int32_t(_seq.ToRefNum(res_1)) |
| 165 |
} |
| 166 |
return _res_0, _res_1 |
| 167 |
} |