interfaces.go.golden 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  1. // Code generated by gobind. DO NOT EDIT.
  2. // Package main is an autogenerated binder stub for package interfaces.
  3. //
  4. // autogenerated by gobind -lang=go interfaces
  5. package main
  6. /*
  7. #include <stdlib.h>
  8. #include <stdint.h>
  9. #include "seq.h"
  10. #include "interfaces.h"
  11. */
  12. import "C"
  13. import (
  14. _seq "golang.org/x/mobile/bind/seq"
  15. "interfaces"
  16. )
  17. // suppress the error if seq ends up unused
  18. var _ = _seq.FromRefNum
  19. //export proxyinterfaces_Error_Err
  20. func proxyinterfaces_Error_Err(refnum C.int32_t) C.int32_t {
  21. ref := _seq.FromRefNum(int32(refnum))
  22. v := ref.Get().(interfaces.Error)
  23. res_0 := v.Err()
  24. var _res_0 C.int32_t = _seq.NullRefNum
  25. if res_0 != nil {
  26. _res_0 = C.int32_t(_seq.ToRefNum(res_0))
  27. }
  28. return _res_0
  29. }
  30. type proxyinterfaces_Error _seq.Ref
  31. func (p *proxyinterfaces_Error) Bind_proxy_refnum__() int32 {
  32. return (*_seq.Ref)(p).Bind_IncNum()
  33. }
  34. func (p *proxyinterfaces_Error) Err() error {
  35. res := C.cproxyinterfaces_Error_Err(C.int32_t(p.Bind_proxy_refnum__()))
  36. var _res error
  37. _res_ref := _seq.FromRefNum(int32(res))
  38. if _res_ref != nil {
  39. if res < 0 { // go object
  40. _res = _res_ref.Get().(error)
  41. } else { // foreign object
  42. _res = (*proxy_error)(_res_ref)
  43. }
  44. }
  45. return _res
  46. }
  47. //export proxyinterfaces_I_Rand
  48. func proxyinterfaces_I_Rand(refnum C.int32_t) C.int32_t {
  49. ref := _seq.FromRefNum(int32(refnum))
  50. v := ref.Get().(interfaces.I)
  51. res_0 := v.Rand()
  52. _res_0 := C.int32_t(res_0)
  53. return _res_0
  54. }
  55. type proxyinterfaces_I _seq.Ref
  56. func (p *proxyinterfaces_I) Bind_proxy_refnum__() int32 {
  57. return (*_seq.Ref)(p).Bind_IncNum()
  58. }
  59. func (p *proxyinterfaces_I) Rand() int32 {
  60. res := C.cproxyinterfaces_I_Rand(C.int32_t(p.Bind_proxy_refnum__()))
  61. _res := int32(res)
  62. return _res
  63. }
  64. //export proxyinterfaces_I1_J
  65. func proxyinterfaces_I1_J(refnum C.int32_t) {
  66. ref := _seq.FromRefNum(int32(refnum))
  67. v := ref.Get().(interfaces.I1)
  68. v.J()
  69. }
  70. //export proxyinterfaces_I2_G
  71. func proxyinterfaces_I2_G(refnum C.int32_t) {
  72. ref := _seq.FromRefNum(int32(refnum))
  73. v := ref.Get().(interfaces.I2)
  74. v.G()
  75. }
  76. //export proxyinterfaces_I3_F
  77. func proxyinterfaces_I3_F(refnum C.int32_t) C.int32_t {
  78. ref := _seq.FromRefNum(int32(refnum))
  79. v := ref.Get().(interfaces.I3)
  80. res_0 := v.F()
  81. var _res_0 C.int32_t = _seq.NullRefNum
  82. if res_0 != nil {
  83. _res_0 = C.int32_t(_seq.ToRefNum(res_0))
  84. }
  85. return _res_0
  86. }
  87. type proxyinterfaces_I3 _seq.Ref
  88. func (p *proxyinterfaces_I3) Bind_proxy_refnum__() int32 {
  89. return (*_seq.Ref)(p).Bind_IncNum()
  90. }
  91. func (p *proxyinterfaces_I3) F() interfaces.I1 {
  92. res := C.cproxyinterfaces_I3_F(C.int32_t(p.Bind_proxy_refnum__()))
  93. var _res interfaces.I1
  94. _res_ref := _seq.FromRefNum(int32(res))
  95. if _res_ref != nil {
  96. if res < 0 { // go object
  97. _res = _res_ref.Get().(interfaces.I1)
  98. }
  99. }
  100. return _res
  101. }
  102. //export proxyinterfaces_Interfaces_SomeMethod
  103. func proxyinterfaces_Interfaces_SomeMethod(refnum C.int32_t) {
  104. ref := _seq.FromRefNum(int32(refnum))
  105. v := ref.Get().(interfaces.Interfaces)
  106. v.SomeMethod()
  107. }
  108. type proxyinterfaces_Interfaces _seq.Ref
  109. func (p *proxyinterfaces_Interfaces) Bind_proxy_refnum__() int32 {
  110. return (*_seq.Ref)(p).Bind_IncNum()
  111. }
  112. func (p *proxyinterfaces_Interfaces) SomeMethod() {
  113. C.cproxyinterfaces_Interfaces_SomeMethod(C.int32_t(p.Bind_proxy_refnum__()))
  114. }
  115. //export proxyinterfaces_LargerI_AnotherFunc
  116. func proxyinterfaces_LargerI_AnotherFunc(refnum C.int32_t) {
  117. ref := _seq.FromRefNum(int32(refnum))
  118. v := ref.Get().(interfaces.LargerI)
  119. v.AnotherFunc()
  120. }
  121. //export proxyinterfaces_LargerI_Rand
  122. func proxyinterfaces_LargerI_Rand(refnum C.int32_t) C.int32_t {
  123. ref := _seq.FromRefNum(int32(refnum))
  124. v := ref.Get().(interfaces.LargerI)
  125. res_0 := v.Rand()
  126. _res_0 := C.int32_t(res_0)
  127. return _res_0
  128. }
  129. type proxyinterfaces_LargerI _seq.Ref
  130. func (p *proxyinterfaces_LargerI) Bind_proxy_refnum__() int32 {
  131. return (*_seq.Ref)(p).Bind_IncNum()
  132. }
  133. func (p *proxyinterfaces_LargerI) AnotherFunc() {
  134. C.cproxyinterfaces_LargerI_AnotherFunc(C.int32_t(p.Bind_proxy_refnum__()))
  135. }
  136. func (p *proxyinterfaces_LargerI) Rand() int32 {
  137. res := C.cproxyinterfaces_LargerI_Rand(C.int32_t(p.Bind_proxy_refnum__()))
  138. _res := int32(res)
  139. return _res
  140. }
  141. //export proxyinterfaces_SameI_Rand
  142. func proxyinterfaces_SameI_Rand(refnum C.int32_t) C.int32_t {
  143. ref := _seq.FromRefNum(int32(refnum))
  144. v := ref.Get().(interfaces.SameI)
  145. res_0 := v.Rand()
  146. _res_0 := C.int32_t(res_0)
  147. return _res_0
  148. }
  149. type proxyinterfaces_SameI _seq.Ref
  150. func (p *proxyinterfaces_SameI) Bind_proxy_refnum__() int32 {
  151. return (*_seq.Ref)(p).Bind_IncNum()
  152. }
  153. func (p *proxyinterfaces_SameI) Rand() int32 {
  154. res := C.cproxyinterfaces_SameI_Rand(C.int32_t(p.Bind_proxy_refnum__()))
  155. _res := int32(res)
  156. return _res
  157. }
  158. //export proxyinterfaces_WithParam_HasParam
  159. func proxyinterfaces_WithParam_HasParam(refnum C.int32_t, param_p0 C.char) {
  160. ref := _seq.FromRefNum(int32(refnum))
  161. v := ref.Get().(interfaces.WithParam)
  162. _param_p0 := param_p0 != 0
  163. v.HasParam(_param_p0)
  164. }
  165. type proxyinterfaces_WithParam _seq.Ref
  166. func (p *proxyinterfaces_WithParam) Bind_proxy_refnum__() int32 {
  167. return (*_seq.Ref)(p).Bind_IncNum()
  168. }
  169. func (p *proxyinterfaces_WithParam) HasParam(param_p0 bool) {
  170. var _param_p0 C.char = 0
  171. if param_p0 {
  172. _param_p0 = 1
  173. }
  174. C.cproxyinterfaces_WithParam_HasParam(C.int32_t(p.Bind_proxy_refnum__()), _param_p0)
  175. }
  176. //export proxyinterfaces__Add3
  177. func proxyinterfaces__Add3(param_r C.int32_t) C.int32_t {
  178. var _param_r interfaces.I
  179. _param_r_ref := _seq.FromRefNum(int32(param_r))
  180. if _param_r_ref != nil {
  181. if param_r < 0 { // go object
  182. _param_r = _param_r_ref.Get().(interfaces.I)
  183. } else { // foreign object
  184. _param_r = (*proxyinterfaces_I)(_param_r_ref)
  185. }
  186. }
  187. res_0 := interfaces.Add3(_param_r)
  188. _res_0 := C.int32_t(res_0)
  189. return _res_0
  190. }
  191. //export proxyinterfaces__CallErr
  192. func proxyinterfaces__CallErr(param_e C.int32_t) C.int32_t {
  193. var _param_e interfaces.Error
  194. _param_e_ref := _seq.FromRefNum(int32(param_e))
  195. if _param_e_ref != nil {
  196. if param_e < 0 { // go object
  197. _param_e = _param_e_ref.Get().(interfaces.Error)
  198. } else { // foreign object
  199. _param_e = (*proxyinterfaces_Error)(_param_e_ref)
  200. }
  201. }
  202. res_0 := interfaces.CallErr(_param_e)
  203. var _res_0 C.int32_t = _seq.NullRefNum
  204. if res_0 != nil {
  205. _res_0 = C.int32_t(_seq.ToRefNum(res_0))
  206. }
  207. return _res_0
  208. }
  209. //export proxyinterfaces__Seven
  210. func proxyinterfaces__Seven() C.int32_t {
  211. res_0 := interfaces.Seven()
  212. var _res_0 C.int32_t = _seq.NullRefNum
  213. if res_0 != nil {
  214. _res_0 = C.int32_t(_seq.ToRefNum(res_0))
  215. }
  216. return _res_0
  217. }