// Copyright © 2019 - 2020 Oscar Campos // 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 // 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 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include */ import "C" import "unsafe" // NewEmptyStringName will return a pointer to an empty // initialized StringName. This is primarily used in // conjunction with MethodBindPtrCall. func NewEmptyStringName() Pointer { var obj C.godot_string_name return Pointer{base: unsafe.Pointer(&obj)} } // NewPointerFromStringName will return an unsafe pointer to the given // object. This is primarily used in conjunction with MethodBindPtrCall. func NewPointerFromStringName(obj StringName) Pointer { return Pointer{base: unsafe.Pointer(obj.getBase())} } // NewStringNameFromPointer will return a StringName from the // given unsafe pointer. This is primarily used in conjunction with MethodBindPtrCall. func NewStringNameFromPointer(ptr Pointer) StringName { return StringName{base: (*C.godot_string_name)(ptr.getBase())} } // StringName data structure wrapper type StringName struct { base *C.godot_string_name } // returns the wrapped C base data type for this type func (gdt StringName) getBase() *C.godot_string_name { return gdt.base } // GetName godot_string_name_get_name [[const godot_string_name * p_self]] godot_string func (gdt *StringName) GetName() String { arg0 := gdt.getBase() ret := C.go_godot_string_name_get_name(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) } // GetHash godot_string_name_get_hash [[const godot_string_name * p_self]] uint32_t func (gdt *StringName) GetHash() Uint32T { arg0 := gdt.getBase() ret := C.go_godot_string_name_get_hash(GDNative.api, arg0) return Uint32T(ret) } // GetDataUniquePointer godot_string_name_get_data_unique_pointer [[const godot_string_name * p_self]] const void * func (gdt *StringName) GetDataUniquePointer() { arg0 := gdt.getBase() C.go_godot_string_name_get_data_unique_pointer(GDNative.api, arg0) } // OperatorEqual godot_string_name_operator_equal [[const godot_string_name * p_self] [const godot_string_name * p_other]] godot_bool func (gdt *StringName) OperatorEqual(other StringName) Bool { arg0 := gdt.getBase() arg1 := other.getBase() ret := C.go_godot_string_name_operator_equal(GDNative.api, arg0, arg1) return Bool(ret) } // OperatorLess godot_string_name_operator_less [[const godot_string_name * p_self] [const godot_string_name * p_other]] godot_bool func (gdt *StringName) OperatorLess(other StringName) Bool { arg0 := gdt.getBase() arg1 := other.getBase() ret := C.go_godot_string_name_operator_less(GDNative.api, arg0, arg1) return Bool(ret) } // Destroy godot_string_name_destroy [[godot_string_name * p_self]] void func (gdt *StringName) Destroy() { arg0 := gdt.getBase() C.go_godot_string_name_destroy(GDNative.api, arg0) }