string_name.gen.go 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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/string_name.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. // NewEmptyStringName will return a pointer to an empty
  49. // initialized StringName. This is primarily used in
  50. // conjunction with MethodBindPtrCall.
  51. func NewEmptyStringName() Pointer {
  52. var obj C.godot_string_name
  53. return Pointer{base: unsafe.Pointer(&obj)}
  54. }
  55. // NewPointerFromStringName will return an unsafe pointer to the given
  56. // object. This is primarily used in conjunction with MethodBindPtrCall.
  57. func NewPointerFromStringName(obj StringName) Pointer {
  58. return Pointer{base: unsafe.Pointer(obj.getBase())}
  59. }
  60. // NewStringNameFromPointer will return a StringName from the
  61. // given unsafe pointer. This is primarily used in conjunction with MethodBindPtrCall.
  62. func NewStringNameFromPointer(ptr Pointer) StringName {
  63. return StringName{base: (*C.godot_string_name)(ptr.getBase())}
  64. }
  65. // StringName data structure wrapper
  66. type StringName struct {
  67. base *C.godot_string_name
  68. }
  69. // returns the wrapped C base data type for this type
  70. func (gdt StringName) getBase() *C.godot_string_name {
  71. return gdt.base
  72. }
  73. // GetName godot_string_name_get_name [[const godot_string_name * p_self]] godot_string
  74. func (gdt *StringName) GetName() String {
  75. arg0 := gdt.getBase()
  76. ret := C.go_godot_string_name_get_name(GDNative.api, arg0)
  77. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  78. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  79. goStr := C.GoString(char)
  80. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  81. return String(goStr)
  82. }
  83. // GetHash godot_string_name_get_hash [[const godot_string_name * p_self]] uint32_t
  84. func (gdt *StringName) GetHash() Uint32T {
  85. arg0 := gdt.getBase()
  86. ret := C.go_godot_string_name_get_hash(GDNative.api, arg0)
  87. return Uint32T(ret)
  88. }
  89. // GetDataUniquePointer godot_string_name_get_data_unique_pointer [[const godot_string_name * p_self]] const void *
  90. func (gdt *StringName) GetDataUniquePointer() {
  91. arg0 := gdt.getBase()
  92. C.go_godot_string_name_get_data_unique_pointer(GDNative.api, arg0)
  93. }
  94. // OperatorEqual godot_string_name_operator_equal [[const godot_string_name * p_self] [const godot_string_name * p_other]] godot_bool
  95. func (gdt *StringName) OperatorEqual(other StringName) Bool {
  96. arg0 := gdt.getBase()
  97. arg1 := other.getBase()
  98. ret := C.go_godot_string_name_operator_equal(GDNative.api, arg0, arg1)
  99. return Bool(ret)
  100. }
  101. // OperatorLess godot_string_name_operator_less [[const godot_string_name * p_self] [const godot_string_name * p_other]] godot_bool
  102. func (gdt *StringName) OperatorLess(other StringName) Bool {
  103. arg0 := gdt.getBase()
  104. arg1 := other.getBase()
  105. ret := C.go_godot_string_name_operator_less(GDNative.api, arg0, arg1)
  106. return Bool(ret)
  107. }
  108. // Destroy godot_string_name_destroy [[godot_string_name * p_self]] void
  109. func (gdt *StringName) Destroy() {
  110. arg0 := gdt.getBase()
  111. C.go_godot_string_name_destroy(GDNative.api, arg0)
  112. }