summaryrefslogtreecommitdiffstats
path: root/gdextension/gdextension_interface.h
diff options
context:
space:
mode:
authorDavid Snopek <dsnopek@gmail.com>2023-08-28 16:07:26 -0500
committerDavid Snopek <dsnopek@gmail.com>2023-08-28 17:02:13 -0500
commitf0405f18a3b2a3a925ce5b42eb11e35c15f170c5 (patch)
tree032a857d1d3e5e46e2f9bfda99ea2c2e24906a1c /gdextension/gdextension_interface.h
parentc370f0f24a6e4ce767e21673731838f1affc45fb (diff)
downloadredot-cpp-f0405f18a3b2a3a925ce5b42eb11e35c15f170c5.tar.gz
Add support for placeholder_script_instance_create/update
Diffstat (limited to 'gdextension/gdextension_interface.h')
-rw-r--r--gdextension/gdextension_interface.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/gdextension/gdextension_interface.h b/gdextension/gdextension_interface.h
index 6c05f39..e760c42 100644
--- a/gdextension/gdextension_interface.h
+++ b/gdextension/gdextension_interface.h
@@ -2126,6 +2126,37 @@ typedef void (*GDExtensionInterfaceRefSetObject)(GDExtensionRefPtr p_ref, GDExte
*/
typedef GDExtensionScriptInstancePtr (*GDExtensionInterfaceScriptInstanceCreate)(const GDExtensionScriptInstanceInfo *p_info, GDExtensionScriptInstanceDataPtr p_instance_data);
+/**
+ * @name placeholder_script_instance_create
+ * @since 4.2
+ *
+ * Creates a placeholder script instance for a given script and instance.
+ *
+ * This interface is optional as a custom placeholder could also be created with script_instance_create().
+ *
+ * @param p_language A pointer to a ScriptLanguage.
+ * @param p_script A pointer to a Script.
+ * @param p_owner A pointer to an Object.
+ *
+ * @return A pointer to a PlaceHolderScriptInstance object.
+ */
+typedef GDExtensionScriptInstancePtr (*GDExtensionInterfacePlaceHolderScriptInstanceCreate)(GDExtensionObjectPtr p_language, GDExtensionObjectPtr p_script, GDExtensionObjectPtr p_owner);
+
+/**
+ * @name placeholder_script_instance_update
+ * @since 4.2
+ *
+ * Updates a placeholder script instance with the given properties and values.
+ *
+ * The passed in placeholder must be an instance of PlaceHolderScriptInstance
+ * such as the one returned by placeholder_script_instance_create().
+ *
+ * @param p_placeholder A pointer to a PlaceHolderScriptInstance.
+ * @param p_properties A pointer to an Array of Dictionary representing PropertyInfo.
+ * @param p_values A pointer to a Dictionary mapping StringName to Variant values.
+ */
+typedef void (*GDExtensionInterfacePlaceHolderScriptInstanceUpdate)(GDExtensionScriptInstancePtr p_placeholder, GDExtensionConstTypePtr p_properties, GDExtensionConstTypePtr p_values);
+
/* INTERFACE: ClassDB */
/**