node_path.gen.go 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. // Copyright © 2019 - 2020 Oscar Campos <oscar.campos@thepimpam.com>
  2. // Copyright © 2017 - William Edwards
  3. //
  4. // Licensed under the Apache License, Version 2.0 (the "License");
  5. // you may not use this file except in compliance with the License.
  6. // You may obtain a copy of the License at
  7. //
  8. // http://www.apache.org/licenses/LICENSE-2.0
  9. //
  10. // Unless required by applicable law or agreed to in writing, software
  11. // distributed under the License is distributed on an "AS IS" BASIS,
  12. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. // See the License for the specific language governing permissions and
  14. // limitations under the License.
  15. package gdnative
  16. // ==================================================================
  17. // This file was autogenerated by PimPam GDNative-Go binding tools
  18. // Please do not modify this file, any change will be lost
  19. // ==================================================================
  20. /*
  21. #include "gdnative.gen.h"
  22. #include <gdnative/node_path.h>
  23. // Include all headers for now. TODO: Look up all the required
  24. // headers we need to import based on the method arguments and return types.
  25. #include <gdnative/aabb.h>
  26. #include <gdnative/array.h>
  27. #include <gdnative/basis.h>
  28. #include <gdnative/color.h>
  29. #include <gdnative/dictionary.h>
  30. #include <gdnative/gdnative.h>
  31. #include <gdnative/node_path.h>
  32. #include <gdnative/plane.h>
  33. #include <gdnative/pool_arrays.h>
  34. #include <gdnative/quat.h>
  35. #include <gdnative/rect2.h>
  36. #include <gdnative/rid.h>
  37. #include <gdnative/string.h>
  38. #include <gdnative/string_name.h>
  39. #include <gdnative/transform.h>
  40. #include <gdnative/transform2d.h>
  41. #include <gdnative/variant.h>
  42. #include <gdnative/vector2.h>
  43. #include <gdnative/vector3.h>
  44. #include <gdnative_api_struct.gen.h>
  45. */
  46. import "C"
  47. import "unsafe"
  48. // NewEmptyNodePath will return a pointer to an empty
  49. // initialized NodePath. This is primarily used in
  50. // conjunction with MethodBindPtrCall.
  51. func NewEmptyNodePath() Pointer {
  52. var obj C.godot_node_path
  53. return Pointer{base: unsafe.Pointer(&obj)}
  54. }
  55. // NewPointerFromNodePath will return an unsafe pointer to the given
  56. // object. This is primarily used in conjunction with MethodBindPtrCall.
  57. func NewPointerFromNodePath(obj NodePath) Pointer {
  58. return Pointer{base: unsafe.Pointer(obj.getBase())}
  59. }
  60. // NewNodePathFromPointer will return a NodePath from the
  61. // given unsafe pointer. This is primarily used in conjunction with MethodBindPtrCall.
  62. func NewNodePathFromPointer(ptr Pointer) NodePath {
  63. return NodePath{base: (*C.godot_node_path)(ptr.getBase())}
  64. }
  65. // NodePath data structure wrapper
  66. type NodePath struct {
  67. base *C.godot_node_path
  68. }
  69. // returns the wrapped C base data type for this type
  70. func (gdt NodePath) getBase() *C.godot_node_path {
  71. return gdt.base
  72. }
  73. // NewNodePath godot_node_path_new [[godot_node_path * r_dest] [const godot_string * p_from]] void
  74. func NewNodePath(from String) NodePath {
  75. var dest C.godot_node_path
  76. arg1 := from.getBase()
  77. C.go_godot_node_path_new(GDNative.api, &dest, arg1)
  78. return NodePath{base: &dest}
  79. }
  80. // NewNodePathCopy godot_node_path_new_copy [[godot_node_path * r_dest] [const godot_node_path * p_src]] void
  81. func NewNodePathCopy(src NodePath) NodePath {
  82. var dest C.godot_node_path
  83. arg1 := src.getBase()
  84. C.go_godot_node_path_new_copy(GDNative.api, &dest, arg1)
  85. return NodePath{base: &dest}
  86. }
  87. // Destroy godot_node_path_destroy [[godot_node_path * p_self]] void
  88. func (gdt *NodePath) Destroy() {
  89. arg0 := gdt.getBase()
  90. C.go_godot_node_path_destroy(GDNative.api, arg0)
  91. }
  92. // AsString godot_node_path_as_string [[const godot_node_path * p_self]] godot_string
  93. func (gdt *NodePath) AsString() String {
  94. arg0 := gdt.getBase()
  95. ret := C.go_godot_node_path_as_string(GDNative.api, arg0)
  96. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  97. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  98. goStr := C.GoString(char)
  99. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  100. return String(goStr)
  101. }
  102. // IsAbsolute godot_node_path_is_absolute [[const godot_node_path * p_self]] godot_bool
  103. func (gdt *NodePath) IsAbsolute() Bool {
  104. arg0 := gdt.getBase()
  105. ret := C.go_godot_node_path_is_absolute(GDNative.api, arg0)
  106. return Bool(ret)
  107. }
  108. // GetNameCount godot_node_path_get_name_count [[const godot_node_path * p_self]] godot_int
  109. func (gdt *NodePath) GetNameCount() Int {
  110. arg0 := gdt.getBase()
  111. ret := C.go_godot_node_path_get_name_count(GDNative.api, arg0)
  112. return Int(ret)
  113. }
  114. // GetName godot_node_path_get_name [[const godot_node_path * p_self] [const godot_int p_idx]] godot_string
  115. func (gdt *NodePath) GetName(idx Int) String {
  116. arg0 := gdt.getBase()
  117. arg1 := idx.getBase()
  118. ret := C.go_godot_node_path_get_name(GDNative.api, arg0, arg1)
  119. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  120. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  121. goStr := C.GoString(char)
  122. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  123. return String(goStr)
  124. }
  125. // GetSubnameCount godot_node_path_get_subname_count [[const godot_node_path * p_self]] godot_int
  126. func (gdt *NodePath) GetSubnameCount() Int {
  127. arg0 := gdt.getBase()
  128. ret := C.go_godot_node_path_get_subname_count(GDNative.api, arg0)
  129. return Int(ret)
  130. }
  131. // GetSubname godot_node_path_get_subname [[const godot_node_path * p_self] [const godot_int p_idx]] godot_string
  132. func (gdt *NodePath) GetSubname(idx Int) String {
  133. arg0 := gdt.getBase()
  134. arg1 := idx.getBase()
  135. ret := C.go_godot_node_path_get_subname(GDNative.api, arg0, arg1)
  136. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  137. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  138. goStr := C.GoString(char)
  139. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  140. return String(goStr)
  141. }
  142. // GetConcatenatedSubnames godot_node_path_get_concatenated_subnames [[const godot_node_path * p_self]] godot_string
  143. func (gdt *NodePath) GetConcatenatedSubnames() String {
  144. arg0 := gdt.getBase()
  145. ret := C.go_godot_node_path_get_concatenated_subnames(GDNative.api, arg0)
  146. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  147. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  148. goStr := C.GoString(char)
  149. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  150. return String(goStr)
  151. }
  152. // IsEmpty godot_node_path_is_empty [[const godot_node_path * p_self]] godot_bool
  153. func (gdt *NodePath) IsEmpty() Bool {
  154. arg0 := gdt.getBase()
  155. ret := C.go_godot_node_path_is_empty(GDNative.api, arg0)
  156. return Bool(ret)
  157. }
  158. // OperatorEqual godot_node_path_operator_equal [[const godot_node_path * p_self] [const godot_node_path * p_b]] godot_bool
  159. func (gdt *NodePath) OperatorEqual(b NodePath) Bool {
  160. arg0 := gdt.getBase()
  161. arg1 := b.getBase()
  162. ret := C.go_godot_node_path_operator_equal(GDNative.api, arg0, arg1)
  163. return Bool(ret)
  164. }