123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212 |
- // Copyright © 2019 - 2020 Oscar Campos <oscar.campos@thepimpam.com>
- // Copyright © 2017 - William Edwards
- //
- // Licensed under the Apache License, Version 2.0 (the "License");
- // you may not use this file except in compliance with the License.
- // You may obtain a copy of the License at
- //
- // http://www.apache.org/licenses/LICENSE-2.0
- //
- // Unless required by applicable law or agreed to in writing, software
- // distributed under the License is distributed on an "AS IS" BASIS,
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- // See the License for the specific language governing permissions and
- // limitations under the License.
- package gdnative
- // ==================================================================
- // This file was autogenerated by PimPam GDNative-Go binding tools
- // Please do not modify this file, any change will be lost
- // ==================================================================
- /*
- #include "gdnative.gen.h"
- #include <gdnative/node_path.h>
- // Include all headers for now. TODO: Look up all the required
- // headers we need to import based on the method arguments and return types.
- #include <gdnative/aabb.h>
- #include <gdnative/array.h>
- #include <gdnative/basis.h>
- #include <gdnative/color.h>
- #include <gdnative/dictionary.h>
- #include <gdnative/gdnative.h>
- #include <gdnative/node_path.h>
- #include <gdnative/plane.h>
- #include <gdnative/pool_arrays.h>
- #include <gdnative/quat.h>
- #include <gdnative/rect2.h>
- #include <gdnative/rid.h>
- #include <gdnative/string.h>
- #include <gdnative/string_name.h>
- #include <gdnative/transform.h>
- #include <gdnative/transform2d.h>
- #include <gdnative/variant.h>
- #include <gdnative/vector2.h>
- #include <gdnative/vector3.h>
- #include <gdnative_api_struct.gen.h>
- */
- import "C"
- import "unsafe"
- // NewEmptyNodePath will return a pointer to an empty
- // initialized NodePath. This is primarily used in
- // conjunction with MethodBindPtrCall.
- func NewEmptyNodePath() Pointer {
- var obj C.godot_node_path
- return Pointer{base: unsafe.Pointer(&obj)}
- }
- // NewPointerFromNodePath will return an unsafe pointer to the given
- // object. This is primarily used in conjunction with MethodBindPtrCall.
- func NewPointerFromNodePath(obj NodePath) Pointer {
- return Pointer{base: unsafe.Pointer(obj.getBase())}
- }
- // NewNodePathFromPointer will return a NodePath from the
- // given unsafe pointer. This is primarily used in conjunction with MethodBindPtrCall.
- func NewNodePathFromPointer(ptr Pointer) NodePath {
- return NodePath{base: (*C.godot_node_path)(ptr.getBase())}
- }
- // NodePath data structure wrapper
- type NodePath struct {
- base *C.godot_node_path
- }
- // returns the wrapped C base data type for this type
- func (gdt NodePath) getBase() *C.godot_node_path {
- return gdt.base
- }
- // NewNodePath godot_node_path_new [[godot_node_path * r_dest] [const godot_string * p_from]] void
- func NewNodePath(from String) NodePath {
- var dest C.godot_node_path
- arg1 := from.getBase()
- C.go_godot_node_path_new(GDNative.api, &dest, arg1)
- return NodePath{base: &dest}
- }
- // NewNodePathCopy godot_node_path_new_copy [[godot_node_path * r_dest] [const godot_node_path * p_src]] void
- func NewNodePathCopy(src NodePath) NodePath {
- var dest C.godot_node_path
- arg1 := src.getBase()
- C.go_godot_node_path_new_copy(GDNative.api, &dest, arg1)
- return NodePath{base: &dest}
- }
- // Destroy godot_node_path_destroy [[godot_node_path * p_self]] void
- func (gdt *NodePath) Destroy() {
- arg0 := gdt.getBase()
- C.go_godot_node_path_destroy(GDNative.api, arg0)
- }
- // AsString godot_node_path_as_string [[const godot_node_path * p_self]] godot_string
- func (gdt *NodePath) AsString() String {
- arg0 := gdt.getBase()
- ret := C.go_godot_node_path_as_string(GDNative.api, arg0)
- utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
- char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
- goStr := C.GoString(char)
- C.go_godot_char_string_destroy(GDNative.api, &utfStr)
- return String(goStr)
- }
- // IsAbsolute godot_node_path_is_absolute [[const godot_node_path * p_self]] godot_bool
- func (gdt *NodePath) IsAbsolute() Bool {
- arg0 := gdt.getBase()
- ret := C.go_godot_node_path_is_absolute(GDNative.api, arg0)
- return Bool(ret)
- }
- // GetNameCount godot_node_path_get_name_count [[const godot_node_path * p_self]] godot_int
- func (gdt *NodePath) GetNameCount() Int {
- arg0 := gdt.getBase()
- ret := C.go_godot_node_path_get_name_count(GDNative.api, arg0)
- return Int(ret)
- }
- // GetName godot_node_path_get_name [[const godot_node_path * p_self] [const godot_int p_idx]] godot_string
- func (gdt *NodePath) GetName(idx Int) String {
- arg0 := gdt.getBase()
- arg1 := idx.getBase()
- ret := C.go_godot_node_path_get_name(GDNative.api, arg0, arg1)
- utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
- char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
- goStr := C.GoString(char)
- C.go_godot_char_string_destroy(GDNative.api, &utfStr)
- return String(goStr)
- }
- // GetSubnameCount godot_node_path_get_subname_count [[const godot_node_path * p_self]] godot_int
- func (gdt *NodePath) GetSubnameCount() Int {
- arg0 := gdt.getBase()
- ret := C.go_godot_node_path_get_subname_count(GDNative.api, arg0)
- return Int(ret)
- }
- // GetSubname godot_node_path_get_subname [[const godot_node_path * p_self] [const godot_int p_idx]] godot_string
- func (gdt *NodePath) GetSubname(idx Int) String {
- arg0 := gdt.getBase()
- arg1 := idx.getBase()
- ret := C.go_godot_node_path_get_subname(GDNative.api, arg0, arg1)
- utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
- char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
- goStr := C.GoString(char)
- C.go_godot_char_string_destroy(GDNative.api, &utfStr)
- return String(goStr)
- }
- // GetConcatenatedSubnames godot_node_path_get_concatenated_subnames [[const godot_node_path * p_self]] godot_string
- func (gdt *NodePath) GetConcatenatedSubnames() String {
- arg0 := gdt.getBase()
- ret := C.go_godot_node_path_get_concatenated_subnames(GDNative.api, arg0)
- utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
- char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
- goStr := C.GoString(char)
- C.go_godot_char_string_destroy(GDNative.api, &utfStr)
- return String(goStr)
- }
- // IsEmpty godot_node_path_is_empty [[const godot_node_path * p_self]] godot_bool
- func (gdt *NodePath) IsEmpty() Bool {
- arg0 := gdt.getBase()
- ret := C.go_godot_node_path_is_empty(GDNative.api, arg0)
- return Bool(ret)
- }
- // OperatorEqual godot_node_path_operator_equal [[const godot_node_path * p_self] [const godot_node_path * p_b]] godot_bool
- func (gdt *NodePath) OperatorEqual(b NodePath) Bool {
- arg0 := gdt.getBase()
- arg1 := b.getBase()
- ret := C.go_godot_node_path_operator_equal(GDNative.api, arg0, arg1)
- return Bool(ret)
- }
|