github.com/F4RD1N/gomobile@v1.0.1/bind/testdata/doc.go.golden (about)

     1  // Code generated by gobind. DO NOT EDIT.
     2  
     3  // Package main is an autogenerated binder stub for package doc.
     4  //
     5  //   autogenerated by gobind -lang=go doc
     6  package main
     7  
     8  /*
     9  #include <stdlib.h>
    10  #include <stdint.h>
    11  #include "seq.h"
    12  #include "doc.h"
    13  
    14  */
    15  import "C"
    16  
    17  import (
    18  	"doc"
    19  	_seq "github.com/F4RD1N/gomobile/bind/seq"
    20  )
    21  
    22  // suppress the error if seq ends up unused
    23  var _ = _seq.FromRefNum
    24  
    25  //export new_doc_NoDoc
    26  func new_doc_NoDoc() C.int32_t {
    27  	return C.int32_t(_seq.ToRefNum(new(doc.NoDoc)))
    28  }
    29  
    30  //export proxydoc_S_SF_Set
    31  func proxydoc_S_SF_Set(refnum C.int32_t, v C.nstring) {
    32  	ref := _seq.FromRefNum(int32(refnum))
    33  	_v := decodeString(v)
    34  	ref.Get().(*doc.S).SF = _v
    35  }
    36  
    37  //export proxydoc_S_SF_Get
    38  func proxydoc_S_SF_Get(refnum C.int32_t) C.nstring {
    39  	ref := _seq.FromRefNum(int32(refnum))
    40  	v := ref.Get().(*doc.S).SF
    41  	_v := encodeString(v)
    42  	return _v
    43  }
    44  
    45  //export proxydoc_S_S2_Set
    46  func proxydoc_S_S2_Set(refnum C.int32_t, v C.int32_t) {
    47  	ref := _seq.FromRefNum(int32(refnum))
    48  	// Must be a Go object
    49  	var _v *doc.S2
    50  	if _v_ref := _seq.FromRefNum(int32(v)); _v_ref != nil {
    51  		_v = _v_ref.Get().(*doc.S2)
    52  	}
    53  	ref.Get().(*doc.S).S2 = _v
    54  }
    55  
    56  //export proxydoc_S_S2_Get
    57  func proxydoc_S_S2_Get(refnum C.int32_t) C.int32_t {
    58  	ref := _seq.FromRefNum(int32(refnum))
    59  	v := ref.Get().(*doc.S).S2
    60  	var _v C.int32_t = _seq.NullRefNum
    61  	if v != nil {
    62  		_v = C.int32_t(_seq.ToRefNum(v))
    63  	}
    64  	return _v
    65  }
    66  
    67  //export proxydoc_S_F1_Set
    68  func proxydoc_S_F1_Set(refnum C.int32_t, v C.nstring) {
    69  	ref := _seq.FromRefNum(int32(refnum))
    70  	_v := decodeString(v)
    71  	ref.Get().(*doc.S).F1 = _v
    72  }
    73  
    74  //export proxydoc_S_F1_Get
    75  func proxydoc_S_F1_Get(refnum C.int32_t) C.nstring {
    76  	ref := _seq.FromRefNum(int32(refnum))
    77  	v := ref.Get().(*doc.S).F1
    78  	_v := encodeString(v)
    79  	return _v
    80  }
    81  
    82  //export proxydoc_S_F2_Set
    83  func proxydoc_S_F2_Set(refnum C.int32_t, v C.nstring) {
    84  	ref := _seq.FromRefNum(int32(refnum))
    85  	_v := decodeString(v)
    86  	ref.Get().(*doc.S).F2 = _v
    87  }
    88  
    89  //export proxydoc_S_F2_Get
    90  func proxydoc_S_F2_Get(refnum C.int32_t) C.nstring {
    91  	ref := _seq.FromRefNum(int32(refnum))
    92  	v := ref.Get().(*doc.S).F2
    93  	_v := encodeString(v)
    94  	return _v
    95  }
    96  
    97  //export proxydoc_S_After
    98  func proxydoc_S_After(refnum C.int32_t) {
    99  	ref := _seq.FromRefNum(int32(refnum))
   100  	v := ref.Get().(*doc.S)
   101  	v.After()
   102  }
   103  
   104  //export proxydoc_S_Before
   105  func proxydoc_S_Before(refnum C.int32_t) {
   106  	ref := _seq.FromRefNum(int32(refnum))
   107  	v := ref.Get().(*doc.S)
   108  	v.Before()
   109  }
   110  
   111  //export new_doc_S
   112  func new_doc_S() C.int32_t {
   113  	return C.int32_t(_seq.ToRefNum(new(doc.S)))
   114  }
   115  
   116  //export new_doc_S2
   117  func new_doc_S2() C.int32_t {
   118  	return C.int32_t(_seq.ToRefNum(new(doc.S2)))
   119  }
   120  
   121  //export proxydoc_I_IM
   122  func proxydoc_I_IM(refnum C.int32_t) {
   123  	ref := _seq.FromRefNum(int32(refnum))
   124  	v := ref.Get().(doc.I)
   125  	v.IM()
   126  }
   127  
   128  type proxydoc_I _seq.Ref
   129  
   130  func (p *proxydoc_I) Bind_proxy_refnum__() int32 {
   131  	return (*_seq.Ref)(p).Bind_IncNum()
   132  }
   133  
   134  func (p *proxydoc_I) IM() {
   135  	C.cproxydoc_I_IM(C.int32_t(p.Bind_proxy_refnum__()))
   136  }
   137  
   138  //export var_setdoc_NoDocVar
   139  func var_setdoc_NoDocVar(v C.double) {
   140  	_v := float64(v)
   141  	doc.NoDocVar = _v
   142  }
   143  
   144  //export var_getdoc_NoDocVar
   145  func var_getdoc_NoDocVar() C.double {
   146  	v := doc.NoDocVar
   147  	_v := C.double(v)
   148  	return _v
   149  }
   150  
   151  //export var_setdoc_Specific
   152  func var_setdoc_Specific(v C.nstring) {
   153  	_v := decodeString(v)
   154  	doc.Specific = _v
   155  }
   156  
   157  //export var_getdoc_Specific
   158  func var_getdoc_Specific() C.nstring {
   159  	v := doc.Specific
   160  	_v := encodeString(v)
   161  	return _v
   162  }
   163  
   164  //export var_setdoc_V
   165  func var_setdoc_V(v C.nstring) {
   166  	_v := decodeString(v)
   167  	doc.V = _v
   168  }
   169  
   170  //export var_getdoc_V
   171  func var_getdoc_V() C.nstring {
   172  	v := doc.V
   173  	_v := encodeString(v)
   174  	return _v
   175  }
   176  
   177  //export proxydoc__F
   178  func proxydoc__F() {
   179  	doc.F()
   180  }
   181  
   182  //export proxydoc__NewS
   183  func proxydoc__NewS() C.int32_t {
   184  	res_0 := doc.NewS()
   185  	var _res_0 C.int32_t = _seq.NullRefNum
   186  	if res_0 != nil {
   187  		_res_0 = C.int32_t(_seq.ToRefNum(res_0))
   188  	}
   189  	return _res_0
   190  }