summaryrefslogtreecommitdiffstats
path: root/gdextension
diff options
context:
space:
mode:
authorMikael Hermansson <mikael@hermansson.io>2023-07-21 22:58:44 +0200
committerMikael Hermansson <mikael@hermansson.io>2023-07-26 00:31:53 +0200
commit7d8cb7c155c805b2dcc0f0a091fde2bcacb98fa6 (patch)
treeb0128b7d73f249cc6f93a73262fc606d1802f848 /gdextension
parent1009da4d7e395abadfdb454cff6623e9456181c4 (diff)
downloadredot-cpp-7d8cb7c155c805b2dcc0f0a091fde2bcacb98fa6.tar.gz
Add support for indexed properties
Diffstat (limited to 'gdextension')
-rw-r--r--gdextension/gdextension_interface.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/gdextension/gdextension_interface.h b/gdextension/gdextension_interface.h
index 4d7bdf9..43931cc 100644
--- a/gdextension/gdextension_interface.h
+++ b/gdextension/gdextension_interface.h
@@ -2212,6 +2212,23 @@ typedef void (*GDExtensionInterfaceClassdbRegisterExtensionClassIntegerConstant)
typedef void (*GDExtensionInterfaceClassdbRegisterExtensionClassProperty)(GDExtensionClassLibraryPtr p_library, GDExtensionConstStringNamePtr p_class_name, const GDExtensionPropertyInfo *p_info, GDExtensionConstStringNamePtr p_setter, GDExtensionConstStringNamePtr p_getter);
/**
+ * @name classdb_register_extension_class_property_indexed
+ * @since 4.2
+ *
+ * Registers an indexed property on an extension class in the ClassDB.
+ *
+ * Provided struct can be safely freed once the function returns.
+ *
+ * @param p_library A pointer the library received by the GDExtension's entry point function.
+ * @param p_class_name A pointer to a StringName with the class name.
+ * @param p_info A pointer to a GDExtensionPropertyInfo struct.
+ * @param p_setter A pointer to a StringName with the name of the setter method.
+ * @param p_getter A pointer to a StringName with the name of the getter method.
+ * @param p_index The index to pass as the first argument to the getter and setter methods.
+ */
+typedef void (*GDExtensionInterfaceClassdbRegisterExtensionClassPropertyIndexed)(GDExtensionClassLibraryPtr p_library, GDExtensionConstStringNamePtr p_class_name, const GDExtensionPropertyInfo *p_info, GDExtensionConstStringNamePtr p_setter, GDExtensionConstStringNamePtr p_getter, GDExtensionInt p_index);
+
+/**
* @name classdb_register_extension_class_property_group
* @since 4.1
*