structs.go.golden 3.9 KB

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