123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849 |
- // 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/variant.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"
- // NewEmptyVariant will return a pointer to an empty
- // initialized Variant. This is primarily used in
- // conjunction with MethodBindPtrCall.
- func NewEmptyVariant() Pointer {
- var obj C.godot_variant
- return Pointer{base: unsafe.Pointer(&obj)}
- }
- // NewPointerFromVariant will return an unsafe pointer to the given
- // object. This is primarily used in conjunction with MethodBindPtrCall.
- func NewPointerFromVariant(obj Variant) Pointer {
- return Pointer{base: unsafe.Pointer(obj.getBase())}
- }
- // NewVariantFromPointer will return a Variant from the
- // given unsafe pointer. This is primarily used in conjunction with MethodBindPtrCall.
- func NewVariantFromPointer(ptr Pointer) Variant {
- return Variant{base: (*C.godot_variant)(ptr.getBase())}
- }
- // Variant data structure wrapper
- type Variant struct {
- base *C.godot_variant
- }
- // returns the wrapped C base data type for this type
- func (gdt Variant) getBase() *C.godot_variant {
- return gdt.base
- }
- // NewVariantCopy godot_variant_new_copy [[godot_variant * r_dest] [const godot_variant * p_src]] void
- func NewVariantCopy(src Variant) Variant {
- var dest C.godot_variant
- arg1 := src.getBase()
- C.go_godot_variant_new_copy(GDNative.api, &dest, arg1)
- return Variant{base: &dest}
- }
- // NewVariantNil godot_variant_new_nil [[godot_variant * r_dest]] void
- func NewVariantNil() Variant {
- var dest C.godot_variant
- C.go_godot_variant_new_nil(GDNative.api, &dest)
- return Variant{base: &dest}
- }
- // NewVariantBool godot_variant_new_bool [[godot_variant * r_dest] [const godot_bool p_b]] void
- func NewVariantBool(b Bool) Variant {
- var dest C.godot_variant
- arg1 := b.getBase()
- C.go_godot_variant_new_bool(GDNative.api, &dest, arg1)
- return Variant{base: &dest}
- }
- // NewVariantUint godot_variant_new_uint [[godot_variant * r_dest] [const uint64_t p_i]] void
- func NewVariantUint(i Uint64T) Variant {
- var dest C.godot_variant
- arg1 := i.getBase()
- C.go_godot_variant_new_uint(GDNative.api, &dest, arg1)
- return Variant{base: &dest}
- }
- // NewVariantInt godot_variant_new_int [[godot_variant * r_dest] [const int64_t p_i]] void
- func NewVariantInt(i Int64T) Variant {
- var dest C.godot_variant
- arg1 := i.getBase()
- C.go_godot_variant_new_int(GDNative.api, &dest, arg1)
- return Variant{base: &dest}
- }
- // NewVariantReal godot_variant_new_real [[godot_variant * r_dest] [const double p_r]] void
- func NewVariantReal(r Double) Variant {
- var dest C.godot_variant
- arg1 := r.getBase()
- C.go_godot_variant_new_real(GDNative.api, &dest, arg1)
- return Variant{base: &dest}
- }
- // NewVariantString godot_variant_new_string [[godot_variant * r_dest] [const godot_string * p_s]] void
- func NewVariantString(s String) Variant {
- var dest C.godot_variant
- arg1 := s.getBase()
- C.go_godot_variant_new_string(GDNative.api, &dest, arg1)
- return Variant{base: &dest}
- }
- // NewVariantVector2 godot_variant_new_vector2 [[godot_variant * r_dest] [const godot_vector2 * p_v2]] void
- func NewVariantVector2(v2 Vector2) Variant {
- var dest C.godot_variant
- arg1 := v2.getBase()
- C.go_godot_variant_new_vector2(GDNative.api, &dest, arg1)
- return Variant{base: &dest}
- }
- // NewVariantRect2 godot_variant_new_rect2 [[godot_variant * r_dest] [const godot_rect2 * p_rect2]] void
- func NewVariantRect2(rect2 Rect2) Variant {
- var dest C.godot_variant
- arg1 := rect2.getBase()
- C.go_godot_variant_new_rect2(GDNative.api, &dest, arg1)
- return Variant{base: &dest}
- }
- // NewVariantVector3 godot_variant_new_vector3 [[godot_variant * r_dest] [const godot_vector3 * p_v3]] void
- func NewVariantVector3(v3 Vector3) Variant {
- var dest C.godot_variant
- arg1 := v3.getBase()
- C.go_godot_variant_new_vector3(GDNative.api, &dest, arg1)
- return Variant{base: &dest}
- }
- // NewVariantTransform2D godot_variant_new_transform2d [[godot_variant * r_dest] [const godot_transform2d * p_t2d]] void
- func NewVariantTransform2D(t2D Transform2D) Variant {
- var dest C.godot_variant
- arg1 := t2D.getBase()
- C.go_godot_variant_new_transform2d(GDNative.api, &dest, arg1)
- return Variant{base: &dest}
- }
- // NewVariantPlane godot_variant_new_plane [[godot_variant * r_dest] [const godot_plane * p_plane]] void
- func NewVariantPlane(plane Plane) Variant {
- var dest C.godot_variant
- arg1 := plane.getBase()
- C.go_godot_variant_new_plane(GDNative.api, &dest, arg1)
- return Variant{base: &dest}
- }
- // NewVariantQuat godot_variant_new_quat [[godot_variant * r_dest] [const godot_quat * p_quat]] void
- func NewVariantQuat(quat Quat) Variant {
- var dest C.godot_variant
- arg1 := quat.getBase()
- C.go_godot_variant_new_quat(GDNative.api, &dest, arg1)
- return Variant{base: &dest}
- }
- // NewVariantAabb godot_variant_new_aabb [[godot_variant * r_dest] [const godot_aabb * p_aabb]] void
- func NewVariantAabb(aabb Aabb) Variant {
- var dest C.godot_variant
- arg1 := aabb.getBase()
- C.go_godot_variant_new_aabb(GDNative.api, &dest, arg1)
- return Variant{base: &dest}
- }
- // NewVariantBasis godot_variant_new_basis [[godot_variant * r_dest] [const godot_basis * p_basis]] void
- func NewVariantBasis(basis Basis) Variant {
- var dest C.godot_variant
- arg1 := basis.getBase()
- C.go_godot_variant_new_basis(GDNative.api, &dest, arg1)
- return Variant{base: &dest}
- }
- // NewVariantTransform godot_variant_new_transform [[godot_variant * r_dest] [const godot_transform * p_trans]] void
- func NewVariantTransform(trans Transform) Variant {
- var dest C.godot_variant
- arg1 := trans.getBase()
- C.go_godot_variant_new_transform(GDNative.api, &dest, arg1)
- return Variant{base: &dest}
- }
- // NewVariantColor godot_variant_new_color [[godot_variant * r_dest] [const godot_color * p_color]] void
- func NewVariantColor(color Color) Variant {
- var dest C.godot_variant
- arg1 := color.getBase()
- C.go_godot_variant_new_color(GDNative.api, &dest, arg1)
- return Variant{base: &dest}
- }
- // NewVariantNodePath godot_variant_new_node_path [[godot_variant * r_dest] [const godot_node_path * p_np]] void
- func NewVariantNodePath(np NodePath) Variant {
- var dest C.godot_variant
- arg1 := np.getBase()
- C.go_godot_variant_new_node_path(GDNative.api, &dest, arg1)
- return Variant{base: &dest}
- }
- // NewVariantRid godot_variant_new_rid [[godot_variant * r_dest] [const godot_rid * p_rid]] void
- func NewVariantRid(rid Rid) Variant {
- var dest C.godot_variant
- arg1 := rid.getBase()
- C.go_godot_variant_new_rid(GDNative.api, &dest, arg1)
- return Variant{base: &dest}
- }
- // NewVariantObject godot_variant_new_object [[godot_variant * r_dest] [const godot_object * p_obj]] void
- func NewVariantObject(obj Object) Variant {
- var dest C.godot_variant
- arg1 := unsafe.Pointer(obj.getBase())
- C.go_godot_variant_new_object(GDNative.api, &dest, arg1)
- return Variant{base: &dest}
- }
- // NewVariantDictionary godot_variant_new_dictionary [[godot_variant * r_dest] [const godot_dictionary * p_dict]] void
- func NewVariantDictionary(dict Dictionary) Variant {
- var dest C.godot_variant
- arg1 := dict.getBase()
- C.go_godot_variant_new_dictionary(GDNative.api, &dest, arg1)
- return Variant{base: &dest}
- }
- // NewVariantArray godot_variant_new_array [[godot_variant * r_dest] [const godot_array * p_arr]] void
- func NewVariantArray(arr Array) Variant {
- var dest C.godot_variant
- arg1 := arr.getBase()
- C.go_godot_variant_new_array(GDNative.api, &dest, arg1)
- return Variant{base: &dest}
- }
- // NewVariantPoolByteArray godot_variant_new_pool_byte_array [[godot_variant * r_dest] [const godot_pool_byte_array * p_pba]] void
- func NewVariantPoolByteArray(pba PoolByteArray) Variant {
- var dest C.godot_variant
- arg1 := pba.getBase()
- C.go_godot_variant_new_pool_byte_array(GDNative.api, &dest, arg1)
- return Variant{base: &dest}
- }
- // NewVariantPoolIntArray godot_variant_new_pool_int_array [[godot_variant * r_dest] [const godot_pool_int_array * p_pia]] void
- func NewVariantPoolIntArray(pia PoolIntArray) Variant {
- var dest C.godot_variant
- arg1 := pia.getBase()
- C.go_godot_variant_new_pool_int_array(GDNative.api, &dest, arg1)
- return Variant{base: &dest}
- }
- // NewVariantPoolRealArray godot_variant_new_pool_real_array [[godot_variant * r_dest] [const godot_pool_real_array * p_pra]] void
- func NewVariantPoolRealArray(pra PoolRealArray) Variant {
- var dest C.godot_variant
- arg1 := pra.getBase()
- C.go_godot_variant_new_pool_real_array(GDNative.api, &dest, arg1)
- return Variant{base: &dest}
- }
- // NewVariantPoolStringArray godot_variant_new_pool_string_array [[godot_variant * r_dest] [const godot_pool_string_array * p_psa]] void
- func NewVariantPoolStringArray(psa PoolStringArray) Variant {
- var dest C.godot_variant
- arg1 := psa.getBase()
- C.go_godot_variant_new_pool_string_array(GDNative.api, &dest, arg1)
- return Variant{base: &dest}
- }
- // NewVariantPoolVector2Array godot_variant_new_pool_vector2_array [[godot_variant * r_dest] [const godot_pool_vector2_array * p_pv2a]] void
- func NewVariantPoolVector2Array(pv2A PoolVector2Array) Variant {
- var dest C.godot_variant
- arg1 := pv2A.getBase()
- C.go_godot_variant_new_pool_vector2_array(GDNative.api, &dest, arg1)
- return Variant{base: &dest}
- }
- // NewVariantPoolVector3Array godot_variant_new_pool_vector3_array [[godot_variant * r_dest] [const godot_pool_vector3_array * p_pv3a]] void
- func NewVariantPoolVector3Array(pv3A PoolVector3Array) Variant {
- var dest C.godot_variant
- arg1 := pv3A.getBase()
- C.go_godot_variant_new_pool_vector3_array(GDNative.api, &dest, arg1)
- return Variant{base: &dest}
- }
- // NewVariantPoolColorArray godot_variant_new_pool_color_array [[godot_variant * r_dest] [const godot_pool_color_array * p_pca]] void
- func NewVariantPoolColorArray(pca PoolColorArray) Variant {
- var dest C.godot_variant
- arg1 := pca.getBase()
- C.go_godot_variant_new_pool_color_array(GDNative.api, &dest, arg1)
- return Variant{base: &dest}
- }
- // AsBool godot_variant_as_bool [[const godot_variant * p_self]] godot_bool
- func (gdt *Variant) AsBool() Bool {
- arg0 := gdt.getBase()
- ret := C.go_godot_variant_as_bool(GDNative.api, arg0)
- return Bool(ret)
- }
- // AsUint godot_variant_as_uint [[const godot_variant * p_self]] uint64_t
- func (gdt *Variant) AsUint() Uint64T {
- arg0 := gdt.getBase()
- ret := C.go_godot_variant_as_uint(GDNative.api, arg0)
- return Uint64T(ret)
- }
- // AsInt godot_variant_as_int [[const godot_variant * p_self]] int64_t
- func (gdt *Variant) AsInt() Int64T {
- arg0 := gdt.getBase()
- ret := C.go_godot_variant_as_int(GDNative.api, arg0)
- return Int64T(ret)
- }
- // AsReal godot_variant_as_real [[const godot_variant * p_self]] double
- func (gdt *Variant) AsReal() Double {
- arg0 := gdt.getBase()
- ret := C.go_godot_variant_as_real(GDNative.api, arg0)
- return Double(ret)
- }
- // AsString godot_variant_as_string [[const godot_variant * p_self]] godot_string
- func (gdt *Variant) AsString() String {
- arg0 := gdt.getBase()
- ret := C.go_godot_variant_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)
- }
- // AsVector2 godot_variant_as_vector2 [[const godot_variant * p_self]] godot_vector2
- func (gdt *Variant) AsVector2() Vector2 {
- arg0 := gdt.getBase()
- ret := C.go_godot_variant_as_vector2(GDNative.api, arg0)
- return Vector2{base: &ret}
- }
- // AsRect2 godot_variant_as_rect2 [[const godot_variant * p_self]] godot_rect2
- func (gdt *Variant) AsRect2() Rect2 {
- arg0 := gdt.getBase()
- ret := C.go_godot_variant_as_rect2(GDNative.api, arg0)
- return Rect2{base: &ret}
- }
- // AsVector3 godot_variant_as_vector3 [[const godot_variant * p_self]] godot_vector3
- func (gdt *Variant) AsVector3() Vector3 {
- arg0 := gdt.getBase()
- ret := C.go_godot_variant_as_vector3(GDNative.api, arg0)
- return Vector3{base: &ret}
- }
- // AsTransform2D godot_variant_as_transform2d [[const godot_variant * p_self]] godot_transform2d
- func (gdt *Variant) AsTransform2D() Transform2D {
- arg0 := gdt.getBase()
- ret := C.go_godot_variant_as_transform2d(GDNative.api, arg0)
- return Transform2D{base: &ret}
- }
- // AsPlane godot_variant_as_plane [[const godot_variant * p_self]] godot_plane
- func (gdt *Variant) AsPlane() Plane {
- arg0 := gdt.getBase()
- ret := C.go_godot_variant_as_plane(GDNative.api, arg0)
- return Plane{base: &ret}
- }
- // AsQuat godot_variant_as_quat [[const godot_variant * p_self]] godot_quat
- func (gdt *Variant) AsQuat() Quat {
- arg0 := gdt.getBase()
- ret := C.go_godot_variant_as_quat(GDNative.api, arg0)
- return Quat{base: &ret}
- }
- // AsAabb godot_variant_as_aabb [[const godot_variant * p_self]] godot_aabb
- func (gdt *Variant) AsAabb() Aabb {
- arg0 := gdt.getBase()
- ret := C.go_godot_variant_as_aabb(GDNative.api, arg0)
- return Aabb{base: &ret}
- }
- // AsBasis godot_variant_as_basis [[const godot_variant * p_self]] godot_basis
- func (gdt *Variant) AsBasis() Basis {
- arg0 := gdt.getBase()
- ret := C.go_godot_variant_as_basis(GDNative.api, arg0)
- return Basis{base: &ret}
- }
- // AsTransform godot_variant_as_transform [[const godot_variant * p_self]] godot_transform
- func (gdt *Variant) AsTransform() Transform {
- arg0 := gdt.getBase()
- ret := C.go_godot_variant_as_transform(GDNative.api, arg0)
- return Transform{base: &ret}
- }
- // AsColor godot_variant_as_color [[const godot_variant * p_self]] godot_color
- func (gdt *Variant) AsColor() Color {
- arg0 := gdt.getBase()
- ret := C.go_godot_variant_as_color(GDNative.api, arg0)
- return Color{base: &ret}
- }
- // AsNodePath godot_variant_as_node_path [[const godot_variant * p_self]] godot_node_path
- func (gdt *Variant) AsNodePath() NodePath {
- arg0 := gdt.getBase()
- ret := C.go_godot_variant_as_node_path(GDNative.api, arg0)
- return NodePath{base: &ret}
- }
- // AsRid godot_variant_as_rid [[const godot_variant * p_self]] godot_rid
- func (gdt *Variant) AsRid() Rid {
- arg0 := gdt.getBase()
- ret := C.go_godot_variant_as_rid(GDNative.api, arg0)
- return Rid{base: &ret}
- }
- // AsObject godot_variant_as_object [[const godot_variant * p_self]] godot_object *
- func (gdt *Variant) AsObject() Object {
- arg0 := gdt.getBase()
- ret := C.go_godot_variant_as_object(GDNative.api, arg0)
- return Object{base: (*C.godot_object)(ret)}
- }
- // AsDictionary godot_variant_as_dictionary [[const godot_variant * p_self]] godot_dictionary
- func (gdt *Variant) AsDictionary() Dictionary {
- arg0 := gdt.getBase()
- ret := C.go_godot_variant_as_dictionary(GDNative.api, arg0)
- return Dictionary{base: &ret}
- }
- // AsArray godot_variant_as_array [[const godot_variant * p_self]] godot_array
- func (gdt *Variant) AsArray() Array {
- arg0 := gdt.getBase()
- ret := C.go_godot_variant_as_array(GDNative.api, arg0)
- return Array{base: &ret}
- }
- // AsPoolByteArray godot_variant_as_pool_byte_array [[const godot_variant * p_self]] godot_pool_byte_array
- func (gdt *Variant) AsPoolByteArray() PoolByteArray {
- arg0 := gdt.getBase()
- ret := C.go_godot_variant_as_pool_byte_array(GDNative.api, arg0)
- return PoolByteArray{base: &ret}
- }
- // AsPoolIntArray godot_variant_as_pool_int_array [[const godot_variant * p_self]] godot_pool_int_array
- func (gdt *Variant) AsPoolIntArray() PoolIntArray {
- arg0 := gdt.getBase()
- ret := C.go_godot_variant_as_pool_int_array(GDNative.api, arg0)
- return PoolIntArray{base: &ret}
- }
- // AsPoolRealArray godot_variant_as_pool_real_array [[const godot_variant * p_self]] godot_pool_real_array
- func (gdt *Variant) AsPoolRealArray() PoolRealArray {
- arg0 := gdt.getBase()
- ret := C.go_godot_variant_as_pool_real_array(GDNative.api, arg0)
- return PoolRealArray{base: &ret}
- }
- // AsPoolStringArray godot_variant_as_pool_string_array [[const godot_variant * p_self]] godot_pool_string_array
- func (gdt *Variant) AsPoolStringArray() PoolStringArray {
- arg0 := gdt.getBase()
- ret := C.go_godot_variant_as_pool_string_array(GDNative.api, arg0)
- return PoolStringArray{base: &ret}
- }
- // AsPoolVector2Array godot_variant_as_pool_vector2_array [[const godot_variant * p_self]] godot_pool_vector2_array
- func (gdt *Variant) AsPoolVector2Array() PoolVector2Array {
- arg0 := gdt.getBase()
- ret := C.go_godot_variant_as_pool_vector2_array(GDNative.api, arg0)
- return PoolVector2Array{base: &ret}
- }
- // AsPoolVector3Array godot_variant_as_pool_vector3_array [[const godot_variant * p_self]] godot_pool_vector3_array
- func (gdt *Variant) AsPoolVector3Array() PoolVector3Array {
- arg0 := gdt.getBase()
- ret := C.go_godot_variant_as_pool_vector3_array(GDNative.api, arg0)
- return PoolVector3Array{base: &ret}
- }
- // AsPoolColorArray godot_variant_as_pool_color_array [[const godot_variant * p_self]] godot_pool_color_array
- func (gdt *Variant) AsPoolColorArray() PoolColorArray {
- arg0 := gdt.getBase()
- ret := C.go_godot_variant_as_pool_color_array(GDNative.api, arg0)
- return PoolColorArray{base: &ret}
- }
- // Call godot_variant_call [[godot_variant * p_self] [const godot_string * p_method] [const godot_variant ** p_args] [const godot_int p_argcount] [godot_variant_call_error * r_error]] godot_variant
- func (gdt *Variant) Call(method String, args []Variant, argcount Int, error VariantCallError) Variant {
- arg0 := gdt.getBase()
- arg1 := method.getBase()
- arg2Array := VariantArray{array: args}
- arg2 := arg2Array.getBase()
- arg3 := argcount.getBase()
- arg4 := error.getBase()
- ret := C.go_godot_variant_call(GDNative.api, arg0, arg1, arg2, arg3, arg4)
- return Variant{base: &ret}
- }
- // HasMethod godot_variant_has_method [[const godot_variant * p_self] [const godot_string * p_method]] godot_bool
- func (gdt *Variant) HasMethod(method String) Bool {
- arg0 := gdt.getBase()
- arg1 := method.getBase()
- ret := C.go_godot_variant_has_method(GDNative.api, arg0, arg1)
- return Bool(ret)
- }
- // OperatorEqual godot_variant_operator_equal [[const godot_variant * p_self] [const godot_variant * p_other]] godot_bool
- func (gdt *Variant) OperatorEqual(other Variant) Bool {
- arg0 := gdt.getBase()
- arg1 := other.getBase()
- ret := C.go_godot_variant_operator_equal(GDNative.api, arg0, arg1)
- return Bool(ret)
- }
- // OperatorLess godot_variant_operator_less [[const godot_variant * p_self] [const godot_variant * p_other]] godot_bool
- func (gdt *Variant) OperatorLess(other Variant) Bool {
- arg0 := gdt.getBase()
- arg1 := other.getBase()
- ret := C.go_godot_variant_operator_less(GDNative.api, arg0, arg1)
- return Bool(ret)
- }
- // HashCompare godot_variant_hash_compare [[const godot_variant * p_self] [const godot_variant * p_other]] godot_bool
- func (gdt *Variant) HashCompare(other Variant) Bool {
- arg0 := gdt.getBase()
- arg1 := other.getBase()
- ret := C.go_godot_variant_hash_compare(GDNative.api, arg0, arg1)
- return Bool(ret)
- }
- // Booleanize godot_variant_booleanize [[const godot_variant * p_self]] godot_bool
- func (gdt *Variant) Booleanize() Bool {
- arg0 := gdt.getBase()
- ret := C.go_godot_variant_booleanize(GDNative.api, arg0)
- return Bool(ret)
- }
- // Destroy godot_variant_destroy [[godot_variant * p_self]] void
- func (gdt *Variant) Destroy() {
- arg0 := gdt.getBase()
- C.go_godot_variant_destroy(GDNative.api, arg0)
- }
- // VariantType is a Go wrapper for the C.godot_variant_type enum type.
- type VariantType int
- func (e VariantType) getBase() C.godot_variant_type {
- return C.godot_variant_type(e)
- }
- const (
- VariantTypeNil VariantType = 0
- VariantTypeBool VariantType = 1
- VariantTypeInt VariantType = 2
- VariantTypeReal VariantType = 3
- VariantTypeString VariantType = 4
- VariantTypeVector2 VariantType = 5 // 5
- VariantTypeRect2 VariantType = 6
- VariantTypeVector3 VariantType = 7
- VariantTypeTransform2D VariantType = 8
- VariantTypePlane VariantType = 9
- VariantTypeQuat VariantType = 10 // 10
- VariantTypeAabb VariantType = 11
- VariantTypeBasis VariantType = 12
- VariantTypeTransform VariantType = 13
- VariantTypeColor VariantType = 14
- VariantTypeNodePath VariantType = 15 // 15
- VariantTypeRid VariantType = 16
- VariantTypeObject VariantType = 17
- VariantTypeDictionary VariantType = 18
- VariantTypeArray VariantType = 19 // 20
- VariantTypePoolByteArray VariantType = 20
- VariantTypePoolIntArray VariantType = 21
- VariantTypePoolRealArray VariantType = 22
- VariantTypePoolStringArray VariantType = 23
- VariantTypePoolVector2Array VariantType = 24 // 25
- VariantTypePoolVector3Array VariantType = 25
- VariantTypePoolColorArray VariantType = 26
- )
- // VariantTypeLookupMap is a string-based lookup table of constants for VariantType.
- var VariantTypeLookupMap = map[string]VariantType{
- "VariantTypeNil": VariantTypeNil,
- "VariantTypeBool": VariantTypeBool,
- "VariantTypeInt": VariantTypeInt,
- "VariantTypeReal": VariantTypeReal,
- "VariantTypeString": VariantTypeString,
- "VariantTypeVector2": VariantTypeVector2,
- "VariantTypeRect2": VariantTypeRect2,
- "VariantTypeVector3": VariantTypeVector3,
- "VariantTypeTransform2D": VariantTypeTransform2D,
- "VariantTypePlane": VariantTypePlane,
- "VariantTypeQuat": VariantTypeQuat,
- "VariantTypeAabb": VariantTypeAabb,
- "VariantTypeBasis": VariantTypeBasis,
- "VariantTypeTransform": VariantTypeTransform,
- "VariantTypeColor": VariantTypeColor,
- "VariantTypeNodePath": VariantTypeNodePath,
- "VariantTypeRid": VariantTypeRid,
- "VariantTypeObject": VariantTypeObject,
- "VariantTypeDictionary": VariantTypeDictionary,
- "VariantTypeArray": VariantTypeArray,
- "VariantTypePoolByteArray": VariantTypePoolByteArray,
- "VariantTypePoolIntArray": VariantTypePoolIntArray,
- "VariantTypePoolRealArray": VariantTypePoolRealArray,
- "VariantTypePoolStringArray": VariantTypePoolStringArray,
- "VariantTypePoolVector2Array": VariantTypePoolVector2Array,
- "VariantTypePoolVector3Array": VariantTypePoolVector3Array,
- "VariantTypePoolColorArray": VariantTypePoolColorArray,
- }
- // VariantCallErrorError is a Go wrapper for the C.godot_variant_call_error_error enum type.
- type VariantCallErrorError int
- func (e VariantCallErrorError) getBase() C.godot_variant_call_error_error {
- return C.godot_variant_call_error_error(e)
- }
- const (
- CallErrorCallOk VariantCallErrorError = 0
- CallErrorCallErrorInvalidMethod VariantCallErrorError = 1
- CallErrorCallErrorInvalidArgument VariantCallErrorError = 2
- CallErrorCallErrorTooManyArguments VariantCallErrorError = 3
- CallErrorCallErrorTooFewArguments VariantCallErrorError = 4
- CallErrorCallErrorInstanceIsNull VariantCallErrorError = 5
- )
- // VariantCallErrorErrorLookupMap is a string-based lookup table of constants for VariantCallErrorError.
- var VariantCallErrorErrorLookupMap = map[string]VariantCallErrorError{
- "CallErrorCallOk": CallErrorCallOk,
- "CallErrorCallErrorInvalidMethod": CallErrorCallErrorInvalidMethod,
- "CallErrorCallErrorInvalidArgument": CallErrorCallErrorInvalidArgument,
- "CallErrorCallErrorTooManyArguments": CallErrorCallErrorTooManyArguments,
- "CallErrorCallErrorTooFewArguments": CallErrorCallErrorTooFewArguments,
- "CallErrorCallErrorInstanceIsNull": CallErrorCallErrorInstanceIsNull,
- }
- // NewEmptyVariantCallError will return a pointer to an empty
- // initialized VariantCallError. This is primarily used in
- // conjunction with MethodBindPtrCall.
- func NewEmptyVariantCallError() Pointer {
- var obj C.godot_variant_call_error
- return Pointer{base: unsafe.Pointer(&obj)}
- }
- // NewPointerFromVariantCallError will return an unsafe pointer to the given
- // object. This is primarily used in conjunction with MethodBindPtrCall.
- func NewPointerFromVariantCallError(obj VariantCallError) Pointer {
- return Pointer{base: unsafe.Pointer(obj.getBase())}
- }
- // NewVariantCallErrorFromPointer will return a VariantCallError from the
- // given unsafe pointer. This is primarily used in conjunction with MethodBindPtrCall.
- func NewVariantCallErrorFromPointer(ptr Pointer) VariantCallError {
- return VariantCallError{base: (*C.godot_variant_call_error)(ptr.getBase())}
- }
- // VariantCallError data structure wrapper
- type VariantCallError struct {
- base *C.godot_variant_call_error
- Error VariantCallErrorError
- Argument Int
- Expected VariantType
- }
- // returns the wrapped C base data type for this type
- func (gdt VariantCallError) getBase() *C.godot_variant_call_error {
- return gdt.base
- }
- // VariantOperator is a Go wrapper for the C.godot_variant_operator enum type.
- type VariantOperator int
- func (e VariantOperator) getBase() C.godot_variant_operator {
- return C.godot_variant_operator(e)
- }
- const (
- VariantOpEqual VariantOperator = 0
- VariantOpNotEqual VariantOperator = 1
- VariantOpLess VariantOperator = 2
- VariantOpLessEqual VariantOperator = 3
- VariantOpGreater VariantOperator = 4
- VariantOpGreaterEqual VariantOperator = 5
- VariantOpAdd VariantOperator = 6
- VariantOpSubtract VariantOperator = 7
- VariantOpMultiply VariantOperator = 8
- VariantOpDivide VariantOperator = 9
- VariantOpNegate VariantOperator = 10
- VariantOpPositive VariantOperator = 11
- VariantOpModule VariantOperator = 12
- VariantOpStringConcat VariantOperator = 13
- VariantOpShiftLeft VariantOperator = 14
- VariantOpShiftRight VariantOperator = 15
- VariantOpBitAnd VariantOperator = 16
- VariantOpBitOr VariantOperator = 17
- VariantOpBitXor VariantOperator = 18
- VariantOpBitNegate VariantOperator = 19
- VariantOpAnd VariantOperator = 20
- VariantOpOr VariantOperator = 21
- VariantOpXor VariantOperator = 22
- VariantOpNot VariantOperator = 23
- VariantOpIn VariantOperator = 24
- VariantOpMax VariantOperator = 25
- )
- // VariantOperatorLookupMap is a string-based lookup table of constants for VariantOperator.
- var VariantOperatorLookupMap = map[string]VariantOperator{
- "VariantOpEqual": VariantOpEqual,
- "VariantOpNotEqual": VariantOpNotEqual,
- "VariantOpLess": VariantOpLess,
- "VariantOpLessEqual": VariantOpLessEqual,
- "VariantOpGreater": VariantOpGreater,
- "VariantOpGreaterEqual": VariantOpGreaterEqual,
- "VariantOpAdd": VariantOpAdd,
- "VariantOpSubtract": VariantOpSubtract,
- "VariantOpMultiply": VariantOpMultiply,
- "VariantOpDivide": VariantOpDivide,
- "VariantOpNegate": VariantOpNegate,
- "VariantOpPositive": VariantOpPositive,
- "VariantOpModule": VariantOpModule,
- "VariantOpStringConcat": VariantOpStringConcat,
- "VariantOpShiftLeft": VariantOpShiftLeft,
- "VariantOpShiftRight": VariantOpShiftRight,
- "VariantOpBitAnd": VariantOpBitAnd,
- "VariantOpBitOr": VariantOpBitOr,
- "VariantOpBitXor": VariantOpBitXor,
- "VariantOpBitNegate": VariantOpBitNegate,
- "VariantOpAnd": VariantOpAnd,
- "VariantOpOr": VariantOpOr,
- "VariantOpXor": VariantOpXor,
- "VariantOpNot": VariantOpNot,
- "VariantOpIn": VariantOpIn,
- "VariantOpMax": VariantOpMax,
- }
|