rid.gen.go 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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/rid.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. // NewEmptyRid will return a pointer to an empty
  49. // initialized Rid. This is primarily used in
  50. // conjunction with MethodBindPtrCall.
  51. func NewEmptyRid() Pointer {
  52. var obj C.godot_rid
  53. return Pointer{base: unsafe.Pointer(&obj)}
  54. }
  55. // NewPointerFromRid will return an unsafe pointer to the given
  56. // object. This is primarily used in conjunction with MethodBindPtrCall.
  57. func NewPointerFromRid(obj Rid) Pointer {
  58. return Pointer{base: unsafe.Pointer(obj.getBase())}
  59. }
  60. // NewRidFromPointer will return a Rid from the
  61. // given unsafe pointer. This is primarily used in conjunction with MethodBindPtrCall.
  62. func NewRidFromPointer(ptr Pointer) Rid {
  63. return Rid{base: (*C.godot_rid)(ptr.getBase())}
  64. }
  65. // Rid data structure wrapper
  66. type Rid struct {
  67. base *C.godot_rid
  68. }
  69. // returns the wrapped C base data type for this type
  70. func (gdt Rid) getBase() *C.godot_rid {
  71. return gdt.base
  72. }
  73. // NewRid godot_rid_new [[godot_rid * r_dest]] void
  74. func NewRid() Rid {
  75. var dest C.godot_rid
  76. C.go_godot_rid_new(GDNative.api, &dest)
  77. return Rid{base: &dest}
  78. }
  79. // GetId godot_rid_get_id [[const godot_rid * p_self]] godot_int
  80. func (gdt *Rid) GetId() Int {
  81. arg0 := gdt.getBase()
  82. ret := C.go_godot_rid_get_id(GDNative.api, arg0)
  83. return Int(ret)
  84. }
  85. // NewRidWithResource godot_rid_new_with_resource [[godot_rid * r_dest] [const godot_object * p_from]] void
  86. func NewRidWithResource(from Object) Rid {
  87. var dest C.godot_rid
  88. arg1 := unsafe.Pointer(from.getBase())
  89. C.go_godot_rid_new_with_resource(GDNative.api, &dest, arg1)
  90. return Rid{base: &dest}
  91. }
  92. // OperatorEqual godot_rid_operator_equal [[const godot_rid * p_self] [const godot_rid * p_b]] godot_bool
  93. func (gdt *Rid) OperatorEqual(b Rid) Bool {
  94. arg0 := gdt.getBase()
  95. arg1 := b.getBase()
  96. ret := C.go_godot_rid_operator_equal(GDNative.api, arg0, arg1)
  97. return Bool(ret)
  98. }
  99. // OperatorLess godot_rid_operator_less [[const godot_rid * p_self] [const godot_rid * p_b]] godot_bool
  100. func (gdt *Rid) OperatorLess(b Rid) Bool {
  101. arg0 := gdt.getBase()
  102. arg1 := b.getBase()
  103. ret := C.go_godot_rid_operator_less(GDNative.api, arg0, arg1)
  104. return Bool(ret)
  105. }