123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125 |
- // 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/rid.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"
- // NewEmptyRid will return a pointer to an empty
- // initialized Rid. This is primarily used in
- // conjunction with MethodBindPtrCall.
- func NewEmptyRid() Pointer {
- var obj C.godot_rid
- return Pointer{base: unsafe.Pointer(&obj)}
- }
- // NewPointerFromRid will return an unsafe pointer to the given
- // object. This is primarily used in conjunction with MethodBindPtrCall.
- func NewPointerFromRid(obj Rid) Pointer {
- return Pointer{base: unsafe.Pointer(obj.getBase())}
- }
- // NewRidFromPointer will return a Rid from the
- // given unsafe pointer. This is primarily used in conjunction with MethodBindPtrCall.
- func NewRidFromPointer(ptr Pointer) Rid {
- return Rid{base: (*C.godot_rid)(ptr.getBase())}
- }
- // Rid data structure wrapper
- type Rid struct {
- base *C.godot_rid
- }
- // returns the wrapped C base data type for this type
- func (gdt Rid) getBase() *C.godot_rid {
- return gdt.base
- }
- // NewRid godot_rid_new [[godot_rid * r_dest]] void
- func NewRid() Rid {
- var dest C.godot_rid
- C.go_godot_rid_new(GDNative.api, &dest)
- return Rid{base: &dest}
- }
- // GetId godot_rid_get_id [[const godot_rid * p_self]] godot_int
- func (gdt *Rid) GetId() Int {
- arg0 := gdt.getBase()
- ret := C.go_godot_rid_get_id(GDNative.api, arg0)
- return Int(ret)
- }
- // NewRidWithResource godot_rid_new_with_resource [[godot_rid * r_dest] [const godot_object * p_from]] void
- func NewRidWithResource(from Object) Rid {
- var dest C.godot_rid
- arg1 := unsafe.Pointer(from.getBase())
- C.go_godot_rid_new_with_resource(GDNative.api, &dest, arg1)
- return Rid{base: &dest}
- }
- // OperatorEqual godot_rid_operator_equal [[const godot_rid * p_self] [const godot_rid * p_b]] godot_bool
- func (gdt *Rid) OperatorEqual(b Rid) Bool {
- arg0 := gdt.getBase()
- arg1 := b.getBase()
- ret := C.go_godot_rid_operator_equal(GDNative.api, arg0, arg1)
- return Bool(ret)
- }
- // OperatorLess godot_rid_operator_less [[const godot_rid * p_self] [const godot_rid * p_b]] godot_bool
- func (gdt *Rid) OperatorLess(b Rid) Bool {
- arg0 := gdt.getBase()
- arg1 := b.getBase()
- ret := C.go_godot_rid_operator_less(GDNative.api, arg0, arg1)
- return Bool(ret)
- }
|