2023-01-10 14:26:54 +00:00
|
|
|
/**************************************************************************/
|
|
|
|
/* collections_glue.h */
|
|
|
|
/**************************************************************************/
|
|
|
|
/* This file is part of: */
|
|
|
|
/* GODOT ENGINE */
|
|
|
|
/* https://godotengine.org */
|
|
|
|
/**************************************************************************/
|
|
|
|
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
|
|
|
|
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
|
|
|
|
/* */
|
|
|
|
/* Permission is hereby granted, free of charge, to any person obtaining */
|
|
|
|
/* a copy of this software and associated documentation files (the */
|
|
|
|
/* "Software"), to deal in the Software without restriction, including */
|
|
|
|
/* without limitation the rights to use, copy, modify, merge, publish, */
|
|
|
|
/* distribute, sublicense, and/or sell copies of the Software, and to */
|
|
|
|
/* permit persons to whom the Software is furnished to do so, subject to */
|
|
|
|
/* the following conditions: */
|
|
|
|
/* */
|
|
|
|
/* The above copyright notice and this permission notice shall be */
|
|
|
|
/* included in all copies or substantial portions of the Software. */
|
|
|
|
/* */
|
|
|
|
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
|
|
|
|
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
|
|
|
|
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
|
|
|
|
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
|
|
|
|
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
|
|
|
|
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
|
|
|
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
|
|
|
/**************************************************************************/
|
2018-07-18 21:07:57 +00:00
|
|
|
|
|
|
|
#ifndef COLLECTIONS_GLUE_H
|
|
|
|
#define COLLECTIONS_GLUE_H
|
|
|
|
|
2018-09-04 03:40:41 +00:00
|
|
|
#ifdef MONO_GLUE_ENABLED
|
|
|
|
|
2018-07-18 21:07:57 +00:00
|
|
|
#include "core/array.h"
|
|
|
|
|
|
|
|
#include "../mono_gd/gd_mono_marshal.h"
|
|
|
|
|
|
|
|
// Array
|
|
|
|
|
|
|
|
Array *godot_icall_Array_Ctor();
|
|
|
|
|
|
|
|
void godot_icall_Array_Dtor(Array *ptr);
|
|
|
|
|
|
|
|
MonoObject *godot_icall_Array_At(Array *ptr, int index);
|
|
|
|
|
2018-09-26 22:11:31 +00:00
|
|
|
MonoObject *godot_icall_Array_At_Generic(Array *ptr, int index, uint32_t type_encoding, GDMonoClass *type_class);
|
|
|
|
|
2018-07-18 21:07:57 +00:00
|
|
|
void godot_icall_Array_SetAt(Array *ptr, int index, MonoObject *value);
|
|
|
|
|
|
|
|
int godot_icall_Array_Count(Array *ptr);
|
|
|
|
|
2019-03-04 20:31:04 +00:00
|
|
|
int godot_icall_Array_Add(Array *ptr, MonoObject *item);
|
2018-07-18 21:07:57 +00:00
|
|
|
|
|
|
|
void godot_icall_Array_Clear(Array *ptr);
|
|
|
|
|
2019-03-28 19:01:54 +00:00
|
|
|
MonoBoolean godot_icall_Array_Contains(Array *ptr, MonoObject *item);
|
2018-07-18 21:07:57 +00:00
|
|
|
|
|
|
|
void godot_icall_Array_CopyTo(Array *ptr, MonoArray *array, int array_index);
|
|
|
|
|
2019-12-04 13:54:33 +00:00
|
|
|
Array *godot_icall_Array_Duplicate(Array *ptr, MonoBoolean deep);
|
|
|
|
|
2018-07-18 21:07:57 +00:00
|
|
|
int godot_icall_Array_IndexOf(Array *ptr, MonoObject *item);
|
|
|
|
|
|
|
|
void godot_icall_Array_Insert(Array *ptr, int index, MonoObject *item);
|
|
|
|
|
2019-03-28 19:01:54 +00:00
|
|
|
MonoBoolean godot_icall_Array_Remove(Array *ptr, MonoObject *item);
|
2018-07-18 21:07:57 +00:00
|
|
|
|
|
|
|
void godot_icall_Array_RemoveAt(Array *ptr, int index);
|
|
|
|
|
2020-12-04 23:05:01 +00:00
|
|
|
int32_t godot_icall_Array_Resize(Array *ptr, int new_size);
|
2019-02-28 17:33:42 +00:00
|
|
|
|
2022-11-02 10:20:26 +00:00
|
|
|
void godot_icall_Array_Shuffle(Array *ptr);
|
|
|
|
|
2018-09-26 22:11:31 +00:00
|
|
|
void godot_icall_Array_Generic_GetElementTypeInfo(MonoReflectionType *refltype, uint32_t *type_encoding, GDMonoClass **type_class);
|
|
|
|
|
2019-04-18 12:48:10 +00:00
|
|
|
MonoString *godot_icall_Array_ToString(Array *ptr);
|
|
|
|
|
2018-07-18 21:07:57 +00:00
|
|
|
// Dictionary
|
|
|
|
|
|
|
|
Dictionary *godot_icall_Dictionary_Ctor();
|
|
|
|
|
|
|
|
void godot_icall_Dictionary_Dtor(Dictionary *ptr);
|
|
|
|
|
|
|
|
MonoObject *godot_icall_Dictionary_GetValue(Dictionary *ptr, MonoObject *key);
|
|
|
|
|
2018-09-26 22:11:31 +00:00
|
|
|
MonoObject *godot_icall_Dictionary_GetValue_Generic(Dictionary *ptr, MonoObject *key, uint32_t type_encoding, GDMonoClass *type_class);
|
|
|
|
|
2018-07-18 21:07:57 +00:00
|
|
|
void godot_icall_Dictionary_SetValue(Dictionary *ptr, MonoObject *key, MonoObject *value);
|
|
|
|
|
|
|
|
Array *godot_icall_Dictionary_Keys(Dictionary *ptr);
|
|
|
|
|
|
|
|
Array *godot_icall_Dictionary_Values(Dictionary *ptr);
|
|
|
|
|
|
|
|
int godot_icall_Dictionary_Count(Dictionary *ptr);
|
|
|
|
|
|
|
|
void godot_icall_Dictionary_Add(Dictionary *ptr, MonoObject *key, MonoObject *value);
|
|
|
|
|
|
|
|
void godot_icall_Dictionary_Clear(Dictionary *ptr);
|
|
|
|
|
2019-03-28 19:01:54 +00:00
|
|
|
MonoBoolean godot_icall_Dictionary_Contains(Dictionary *ptr, MonoObject *key, MonoObject *value);
|
2018-07-18 21:07:57 +00:00
|
|
|
|
2019-03-28 19:01:54 +00:00
|
|
|
MonoBoolean godot_icall_Dictionary_ContainsKey(Dictionary *ptr, MonoObject *key);
|
2018-07-18 21:07:57 +00:00
|
|
|
|
2019-12-04 13:54:33 +00:00
|
|
|
Dictionary *godot_icall_Dictionary_Duplicate(Dictionary *ptr, MonoBoolean deep);
|
|
|
|
|
2019-03-28 19:01:54 +00:00
|
|
|
MonoBoolean godot_icall_Dictionary_RemoveKey(Dictionary *ptr, MonoObject *key);
|
2018-07-18 21:07:57 +00:00
|
|
|
|
2019-03-28 19:01:54 +00:00
|
|
|
MonoBoolean godot_icall_Dictionary_Remove(Dictionary *ptr, MonoObject *key, MonoObject *value);
|
2018-07-18 21:07:57 +00:00
|
|
|
|
2019-03-28 19:01:54 +00:00
|
|
|
MonoBoolean godot_icall_Dictionary_TryGetValue(Dictionary *ptr, MonoObject *key, MonoObject **value);
|
2018-07-18 21:07:57 +00:00
|
|
|
|
2019-03-28 19:01:54 +00:00
|
|
|
MonoBoolean godot_icall_Dictionary_TryGetValue_Generic(Dictionary *ptr, MonoObject *key, MonoObject **value, uint32_t type_encoding, GDMonoClass *type_class);
|
2018-09-26 22:11:31 +00:00
|
|
|
|
|
|
|
void godot_icall_Dictionary_Generic_GetValueTypeInfo(MonoReflectionType *refltype, uint32_t *type_encoding, GDMonoClass **type_class);
|
|
|
|
|
2019-04-18 12:48:10 +00:00
|
|
|
MonoString *godot_icall_Dictionary_ToString(Dictionary *ptr);
|
|
|
|
|
2018-07-18 21:07:57 +00:00
|
|
|
// Register internal calls
|
|
|
|
|
|
|
|
void godot_register_collections_icalls();
|
|
|
|
|
2018-09-04 03:40:41 +00:00
|
|
|
#endif // MONO_GLUE_ENABLED
|
|
|
|
|
2018-07-18 21:07:57 +00:00
|
|
|
#endif // COLLECTIONS_GLUE_H
|