split property & values into separate classes and files

Signed-off-by: Folling <mail@folling.io>
This commit is contained in:
Folling 2023-11-21 15:10:43 +01:00 committed by Folling
parent 424bd22aa5
commit 9e63219bf9
No known key found for this signature in database
28 changed files with 700 additions and 269 deletions

View file

@ -77,7 +77,10 @@ IKA_API void ikarus_blueprint_get_linked_entities(
/// \pre \li Must exist.
/// \return The blueprint represented as an object or null if an error occurs.
/// \remark This operation is guaranteed to be very fast and is intended to be used frequently.
IKA_API struct IkarusObject * ikarus_blueprint_to_object(IkarusBlueprint const * blueprint);
IKA_API struct IkarusObject * ikarus_blueprint_to_object(IkarusBlueprint * blueprint);
/// \see ikarus_blueprint_to_object
IKA_API struct IkarusObject const * ikarus_blueprint_to_object_const(IkarusBlueprint const * blueprint);
IKARUS_END_HEADER

View file

@ -50,12 +50,7 @@ struct IkarusEntity;
/// \return The created entity or null if an error occurs.
/// \remark Must be freed using #ikarus_free.
IKA_API IkarusEntity * ikarus_entity_create(
struct IkarusProject * project,
struct IkarusEntityFolder * parent,
size_t position,
char const * name,
struct IkarusBlueprint ** blueprints,
size_t blueprints_count
struct IkarusProject * project, char const * name, struct IkarusBlueprint ** blueprints, size_t blueprints_count
);
/// \brief Deletes an entity.
@ -67,16 +62,6 @@ IKA_API void ikarus_entity_delete(IkarusEntity * entity);
IKA_API bool ikarus_entity_is_linked_to_blueprint(IkarusEntity const * entity, struct IkarusBlueprint const * blueprint);
/// \brief Checks if an entity has a specific property.
/// \param entity The entity to check.
/// \pre \li Must not be null.
/// \pre \li Must exist.
/// \param property The property to check.
/// \pre \li Must not be null.
/// \pre \li Must exist.
/// \return True if the entity has the property, false otherwise.
IKA_API bool ikarus_entity_has_property(IkarusEntity const * entity, struct IkarusProperty const * property);
/// \brief Links an entity to a blueprint.
/// \param entity The entity to link.
/// \pre \li Must not be null.
@ -98,6 +83,16 @@ IKA_API void ikarus_entity_link_to_blueprint(IkarusEntity * entity, struct Ikaru
/// \remark No-op if the entity is not linked to the blueprint.
IKA_API void ikarus_entity_unlink_from_blueprint(IkarusEntity * entity, struct IkarusBlueprint * blueprint);
/// \brief Checks if an entity has a specific property.
/// \param entity The entity to check.
/// \pre \li Must not be null.
/// \pre \li Must exist.
/// \param property The property to check.
/// \pre \li Must not be null.
/// \pre \li Must exist.
/// \return True if the entity has the property, false otherwise.
IKA_API bool ikarus_entity_has_property(IkarusEntity const * entity, struct IkarusProperty const * property);
/// \brief Gets the number of properties of an entity.
/// \param entity The entity to get the number of properties of.
/// \pre \li Must not be null.
@ -126,7 +121,7 @@ IKA_API void ikarus_entity_get_properties(
/// \pre \li Must exist.
/// \return The value of the property or null if the entity does not have the property or an error occurs.
/// \remark Must be freed using #ikarus_free.
IKA_API struct IkarusEntityValue * get_value(IkarusEntity const * entity, struct IkarusProperty const * property);
IKA_API struct IkarusEntityValue * ikarus_entity_get_value(IkarusEntity const * entity, struct IkarusProperty const * property);
/// \brief Sets the value of a property of an entity.
/// \param entity The entity to set the value of.
@ -138,11 +133,10 @@ IKA_API struct IkarusEntityValue * get_value(IkarusEntity const * entity, struct
/// \param value The new value of the property.
/// \pre \li Must not be null.
/// \pre \li Must be of the same type as the property.
/// \param validate_settings If set, this function fails not only if the type of the value is invalid, but also if it's not
/// valid under the properties settings. \see property.h
/// \pre \li Must be valid for the property's settings.
/// \remark If the entity does not have the property, this function fails.
IKA_API void ikarus_entity_set_value(
IkarusEntity * entity, struct IkarusProperty const * property, struct IkarusValue * value, bool validate_settings
IkarusEntity * entity, struct IkarusProperty const * property, struct IkarusValue const * value
);
/// \brief Casts an entity to an object.
@ -151,7 +145,10 @@ IKA_API void ikarus_entity_set_value(
/// \pre \li Must exist.
/// \return The entity represented as an object or null if an error occurs.
/// \remark This operation is guaranteed to be very fast and is intended to be used frequently.
IKA_API struct IkarusObject * ikarus_entity_to_object(IkarusEntity const * entity);
IKA_API struct IkarusObject * ikarus_entity_to_object(IkarusEntity * entity);
/// \see ikarus_entity_to_object
IKA_API struct IkarusObject const * ikarus_entity_to_object_const(IkarusEntity const * entity);
IKARUS_END_HEADER

View file

@ -41,6 +41,18 @@ IKA_API void ikarus_object_visit(
void * data
);
/// \see ikarus_object_visit
IKA_API void ikarus_object_visit_const(
IkarusObject const * object,
void (*blueprint_visitor)(struct IkarusBlueprint const *, void *),
void (*property_visitor)(struct IkarusProperty const *, void *),
void (*entity_visitor)(struct IkarusEntity const *, void *),
void (*blueprint_folder_visitor)(struct IkarusBlueprintFolder const *, void *),
void (*property_folder_visitor)(struct IkarusPropertyFolder const *, void *),
void (*entity_folder_visitor)(struct IkarusEntityFolder const *, void *),
void * data
);
IKARUS_END_HEADER
// @}

View file

@ -10,10 +10,7 @@
IKARUS_BEGIN_HEADER
// IMPLEMENTATION_DETAIL_OBJECT_TYPES
/// \brief The type of an object.
/// \remark The folder types are identical to their counterparts in #IkarusFolderType.
enum IkarusObjectType {
/// \brief Not an object or no object.
IkarusObjectType_None = 0,

View file

@ -0,0 +1,25 @@
#pragma once
/// \file number_property.h
/// \author Folling <folling@ikarus.world>
#include <ikarus/macros.h>
/// \addtogroup properties Properties
/// \brief Number properties store a numeric value. (e.g. "Weight" or "Age")
/// @{
IKARUS_BEGIN_HEADER
struct IkarusNumberProperty;
IKA_API IkarusNumberProperty * ikarus_number_property_create(
struct IkarusProject * project,
char const * name,
struct IkarusPropertySource * property_source,
struct IkarusNumberSettings * settings
);
IKARUS_END_HEADER
/// @}

View file

@ -1,12 +1,10 @@
#pragma once
// IMPLEMENTATION_DETAIL_LAZY_VALUE_CREATION
/// \file property.h
/// \author Folling <folling@ikarus.world>
#include <ikarus/macros.h>
#include <ikarus/objects/property_type.h>
#include <ikarus/objects/properties/property_type.h>
#include <ikarus/stdtypes.h>
/// \defgroup properties Properties
@ -52,33 +50,12 @@ IKARUS_BEGIN_HEADER
/// \remark Properties' tree structures are scoped to the entity or blueprint they are associated with.
struct IkarusProperty;
/// \brief Creates a property
/// \param project The project the property is part of.
/// \pre \li Must not be null.
/// \pre \li Must exist.
/// \param property_source The property source the property is part of.
/// \pre \li Must not be null.
/// \pre \li Must exist.
/// \param name The name of the property.
/// \pre \li Must not be null.
/// \pre \li Must not be empty.
/// \param property_info The info of the property.
/// \pre \li Must not be null.
/// \return The created property or null if an error occurs.
/// \remark Must be freed using #ikarus_free.
IKA_API struct IkarusProperty * ikarus_property_create(
struct IkarusProject * project,
struct IkarusPropertySource * property_source,
char const * name,
struct IkarusPropertyTypeInfo * property_info
);
/// \brief Deletes a property.
/// \param property The property to delete.
/// \pre \li Must not be null.
/// \pre \li Must exist.
/// \remark The property must not be accessed after deletion.
IKA_API void ikarus_property_delete(struct IkarusProperty * property);
IKA_API void ikarus_property_delete(IkarusProperty * property);
/// \brief Gets the type info of a property.
/// \param property The property to get the type info of.
@ -86,7 +63,18 @@ IKA_API void ikarus_property_delete(struct IkarusProperty * property);
/// \pre \li Must exist.
/// \return The type info of the property or null if an error occurs.
/// \remark Must be freed using #ikarus_free.
IKA_API struct IkarusPropertyTypeInfo * ikarus_property_get_type_info(IkarusProperty const * property);
IKA_API IkarusPropertyType ikarus_property_get_type(IkarusProperty const * property);
/// \brief Gets the settings of a property.
/// \param property The property to get the settings of.
/// \pre \li Must not be null.
/// \pre \li Must exist.
/// \return The settings of the property or null if an error occurs.
/// \remark Must be freed using #ikarus_free.
IKA_API struct IkarusPropertySettings * ikarus_property_get_settings(IkarusProperty * property);
/// \see ikarus_property_get_settings
IKA_API struct IkarusPropertySettings const * ikarus_property_get_settings_const(IkarusProperty const * property);
/// \brief Gets the source of a property.
/// \param property The property to get the source of.
@ -94,25 +82,31 @@ IKA_API struct IkarusPropertyTypeInfo * ikarus_property_get_type_info(IkarusProp
/// \pre \li Must exist.
/// \return The source of the property or null if an error occurs.
/// \remark Must be freed using #ikarus_free.
IKA_API struct IkarusPropertySource * ikarus_property_get_source(IkarusProperty const * property);
IKA_API struct IkarusPropertySource const * ikarus_property_get_source(IkarusProperty const * property);
/// \brief Gets the default value of a property.
/// \param property The property to get the default value of.
/// \brief Visits a property. Calling the appropriate function for the property's type.
/// \param property The property to visit.
/// \pre \li Must not be null.
/// \pre \li Must exist.
/// \return The default value of the property or null if an error occurs.
/// \remark Must be freed using #ikarus_free.
IKA_API struct IkarusValue * ikarus_property_get_default_value(IkarusProperty const * property);
/// \param toggle_property The function to call if the property is a toggle property. Skipped if null.
/// \param number_property The function to call if the property is a number property. Skipped if null.
/// \param text_property The function to call if the property is a text property. Skipped if null.
/// \param data The data to pass to the functions.
IKA_API void ikarus_property_visit(
IkarusProperty * property,
void (*toggle_property)(struct IkarusToggleProperty *, void *),
void (*number_property)(struct IkarusNumberProperty *, void *),
void (*text_property)(struct IkarusTextProperty *, void *),
void * data
);
/// \brief Sets the type info of a property and resets all values to the new default value.
/// \param property The property to set the type info of.
/// \pre \li Must not be null.
/// \pre \li Must exist.
/// \param new_type The new type info of the property.
/// \param attempt_conversion Whether to attempt to convert the property's values to the new type info. Conversion rules are
/// unspecified for now, but follow common sense.
IKA_API void ikarus_property_set_type_info(
IkarusProperty * property, struct IkarusPropertyTypeInfo new_type_info, bool attempt_conversion
/// \see ikarus_property_visit
IKA_API void ikarus_property_visit_const(
IkarusProperty const * property,
void (*toggle_property)(struct IkarusToggleProperty const *, void *),
void (*number_property)(struct IkarusNumberProperty const *, void *),
void (*text_property)(struct IkarusTextProperty const *, void *),
void * data
);
/// \brief Casts a property to an object.
@ -121,7 +115,10 @@ IKA_API void ikarus_property_set_type_info(
/// \pre \li Must exist.
/// \return The property represented as an object or null if an error occurs.
/// \remark This operation is guaranteed to be very fast and is intended to be used frequently.
IKA_API struct IkarusObject * ikarus_property_to_object(IkarusProperty const * property);
IKA_API struct IkarusObject * ikarus_property_to_object(IkarusProperty * property);
/// \see ikarus_property_to_object
IKA_API struct IkarusObject const * ikarus_property_to_object_const(IkarusProperty const * property);
IKARUS_END_HEADER

View file

@ -10,7 +10,7 @@
IKARUS_BEGIN_HEADER
struct PropertySource;
struct IkarusPropertySource;
/// \brief Creates an blueprint property source.
/// \param blueprint The blueprint to create the property source for.
@ -18,7 +18,7 @@ struct PropertySource;
/// \pre \li Must exist.
/// \return The created property source or null if an error occurs.
/// \remark Must be freed using #ikarus_free.
IKA_API struct PropertySource * ikarus_property_source_create_blueprint(struct IkarusBlueprint * blueprint);
IKA_API struct IkarusPropertySource * ikarus_property_source_create_blueprint(struct IkarusBlueprint * blueprint);
/// \brief Creates an entity property source.
/// \param entity The entity to create the property source for.
@ -26,7 +26,7 @@ IKA_API struct PropertySource * ikarus_property_source_create_blueprint(struct I
/// \pre \li Must exist.
/// \return The created property source or null if an error occurs.
/// \remark Must be freed using #ikarus_free.
IKA_API struct PropertySource * ikarus_property_source_create_entity(struct IkarusEntity * entity);
IKA_API struct IkarusPropertySource * ikarus_property_source_create_entity(struct IkarusEntity * entity);
/// \brief Visits a property source, calling the appropriate callback.
/// \param property_source The property source to visit.
@ -36,12 +36,20 @@ IKA_API struct PropertySource * ikarus_property_source_create_entity(struct Ikar
/// \param entity_visitor The callback to call if the source is an entity, skipped if null.
/// \param user_data User data to pass to the callbacks.
IKA_API void ikarus_property_source_visit(
struct PropertySource * property_source,
struct IkarusPropertySource * property_source,
void (*blueprint_visitor)(struct IkarusBlueprint *, void *),
void (*entity_visitor)(struct IkarusEntity *, void *),
void * user_data
);
/// \see ikarus_property_source_visit
IKA_API void ikarus_property_source_visit_const(
struct IkarusPropertySource const * property_source,
void (*blueprint_visitor)(struct IkarusBlueprint const *, void *),
void (*entity_visitor)(struct IkarusEntity const *, void *),
void * user_data
);
IKARUS_END_HEADER
/// @}

View file

@ -1,7 +1,5 @@
#pragma once
// IMPLEMENTATION_DETAIL_PROPERTY_TYPES
/// \file property_type.h
/// \author Folling <folling@ikarus.world>

View file

@ -0,0 +1,31 @@
#pragma once
/// \file number_property_settings.h
/// \author Folling <folling@ikarus.world>
#include <ikarus/macros.h>
/// \addtogroup property_settings PropertySettings
/// \brief Number property settings add additional constraints to number properties.
/// \details The following settings are available:
///
/// @{
IKARUS_BEGIN_HEADER
struct IkarusNumberPropertySettings;
/// \brief Sets the default value for a number property.
/// \param settings The number property settings.
/// \pre \li Must not be null.
/// \param default_value The default value.
/// \pre \li Must not be null.
/// \pre \li Must be a valid value for the property.
/// \remark The settings take ownership of the value, the caller must not free it.
IKA_API void ikarus_number_property_settings_set_default_value(
struct IkarusNumberPropertySettings * settings, struct IkarusNumberValue * default_value
);
IKARUS_END_HEADER
/// @}

View file

@ -0,0 +1,92 @@
#pragma once
/// \file property_settings.h
/// \author Folling <folling@ikarus.world>
#include <ikarus/macros.h>
/// \defgroup property_settings PropertySettings
/// \brief Property settings add additional constraints to properties.
/// \details Each property has a certain set of settings. The options available depend on the type of the property.
/// Settings can be changed after the property has been created. Examples of settings are:
/// Note that the default value must be set using the concrete subtypes to ascertain type correctness.
/// - Minimum: The minimum value for a number property.
/// - Matches: A regular expression that the value of a text property must match.
/// There are also some common settings, shared among all properties:
/// - Default Value (default: PropertyType's default default (sic) value): The value that is returned if no value is specified
/// for some entity.
/// - List (default: false): If set to true, the property becomes a list. Instead of one number, you could then specify a series
/// of numbers. Note that each element in the list is subject to changes in values. E.g. when we say that all values are changed
/// in some way (e.g. reset to the default value), this applies to all elements in the list.
/// - Allow undefined (default: false): If set to true, you can specify an "unknown" value for a property.
/// It might not be known if a character is dead or not for example.
/// @{
IKARUS_BEGIN_HEADER
struct IkarusPropertySettings;
/// \brief Gets the default value of a property.
/// \param settings The settings to get the default value of.
/// \pre \li Must not be null.
/// \pre \li Must exist.
/// \return The default value of the property or null if an error occurs.
/// \remark Must be freed using #ikarus_free.
IKA_API struct IkarusValue const * ikarus_property_settings_get_default_value(IkarusPropertySettings const * settings);
/// \brief Fetches whether a property is a list.
/// \param settings The property settings.
/// \pre \li Must not be null.
/// \return True if the property is a list, false otherwise.
IKA_API bool ikarus_property_settings_is_list(IkarusPropertySettings const * settings);
/// \brief Sets whether a property is a list.
/// \details Noop if unchanged. A change from list -> single truncates to just the first element. A change from single -> list
/// sets the first element to the current value.
/// \param settings The property settings.
/// \pre \li Must not be null.
/// \param list Whether the property should be
/// a list.
IKA_API void ikarus_property_settings_set_is_list(IkarusPropertySettings * settings, bool list);
/// \brief Fetches whether a property may be undefined.
/// \param settings The property settings.
/// \pre \li Must not be null.
/// \return True if the property may be undefined, false otherwise.
IKA_API bool ikarus_property_settings_may_be_undefined(IkarusPropertySettings const * settings);
/// \brief Sets whether a property may be undefined.
/// \details Noop if unchanged. If the transition is from undefined -> defined, all undefined values will be reset to the
/// default value.
/// \param settings The property settings.
/// \pre \li Must not be null.
/// \param allow_undefined Whether the property should be allowed to be undefined.
/// \param allow_undefined Whether the property should be allowed to be undefined.
IKA_API void ikarus_property_settings_set_may_be_undefined(IkarusPropertySettings * settings, bool allow_undefined);
/// \brief Visits a property settings. Calling the appropriate function for the property's type.
/// \param settings The property settings.
/// \pre \li Must not be null.
/// \param toggle_property_visitor The function to call if the property is a toggle property. Skipped if null.
/// \param number_property_visitor The function to call if the property is a number property. Skipped if null.
/// \param text_property_visitor The function to call if the property is a text property. Skipped if null.
/// \param data Data passed to the visitors.
IKA_API void ikarus_property_settings_visit(
struct IkarusPropertySettings * settings,
void (*toggle_property_visitor)(struct IkarusTogglePropertySettings * settings, void * data),
void (*number_property_visitor)(struct IkarusNumberPropertySettings * settings, void * data),
void (*text_property_visitor)(struct IkarusTextPropertySettings * settings, void * data),
void * data
);
IKA_API void ikarus_property_settings_visit_const(
struct IkarusPropertySettings const * settings,
void (*toggle_property_visitor)(struct IkarusTogglePropertySettings const * settings, void * data),
void (*number_property_visitor)(struct IkarusNumberPropertySettings const * settings, void * data),
void (*text_property_visitor)(struct IkarusTextPropertySettings const * settings, void * data),
void * data
);
IKARUS_END_HEADER
/// @}

View file

@ -0,0 +1,31 @@
#pragma once
/// \file text_property_settings.h
/// \author Folling <folling@ikarus.world>
#include <ikarus/macros.h>
/// \addtogroup property_settings PropertySettings
/// \brief Text property settings add additional constraints to text properties.
/// \details The following settings are available:
///
/// @{
IKARUS_BEGIN_HEADER
struct IkarusTextPropertySettings;
/// \brief Sets the default value for a text property.
/// \param settings The text property settings.
/// \pre \li Must not be null.
/// \param default_value The default value.
/// \pre \li Must not be null.
/// \pre \li Must be a valid value for the property.
/// \remark The settings take ownership of the value, the caller must not free it.
IKA_API void ikarus_text_property_settings_set_default_value(
struct IkarusTextPropertySettings * settings, struct IkarusTextValue * default_value
);
IKARUS_END_HEADER
/// @}

View file

@ -0,0 +1,31 @@
#pragma once
/// \file toggle_property_settings.h
/// \author Folling <folling@ikarus.world>
#include <ikarus/macros.h>
/// \addtogroup property_settings PropertySettings
/// \brief Toggle property settings add additional constraints to toggle properties.
/// \details The following settings are available:
///
/// @{
IKARUS_BEGIN_HEADER
struct IkarusTogglePropertySettings;
/// \brief Sets the default value for a toggle property.
/// \param settings The toggle property settings.
/// \pre \li Must not be null.
/// \param default_value The default value.
/// \pre \li Must not be null.
/// \pre \li Must be a valid value for the property.
/// \remark The settings take ownership of the value, the caller must not free it.
IKA_API void ikarus_toggle_property_settings_set_default_value(
struct IkarusTogglePropertySettings * settings, struct IkarusToggleValue * default_value
);
IKARUS_END_HEADER
/// @}

View file

@ -0,0 +1,25 @@
#pragma once
/// \file text_property.h
/// \author Folling <folling@ikarus.world>
#include <ikarus/macros.h>
/// \addtogroup properties Properties
/// \brief Text properties store an arbitrary piece of text. (e.g. "Firstname" or "Description")
/// @{
IKARUS_BEGIN_HEADER
struct IkarusTextProperty;
IKA_API IkarusTextProperty * ikarus_text_property_create(
struct IkarusProject * project,
char const * name,
struct IkarusPropertySource * property_source,
struct IkarusTextSettings * settings
);
IKARUS_END_HEADER
/// @}

View file

@ -0,0 +1,25 @@
#pragma once
/// \file toggle_property.h
/// \author Folling <folling@ikarus.world>
#include <ikarus/macros.h>
/// \addtogroup properties Properties
/// \brief Toggle properties store a value that can be either true or false. (e.g. "Is the character dead?")
/// @{
IKARUS_BEGIN_HEADER
struct IkarusToggleProperty;
IKA_API IkarusToggleProperty * ikarus_toggle_property_create(
struct IkarusProject * project,
char const * name,
struct IkarusPropertySource * property_source,
struct IkarusToggleSettings * settings
);
IKARUS_END_HEADER
/// @}

View file

@ -1,79 +0,0 @@
#pragma once
/// \file property_info.h
/// \author Folling <folling@ikarus.world>
#include <ikarus/macros.h>
/// \addtogroup properties Properties
/// @{
IKARUS_BEGIN_HEADER
/// \brief Information about a property.
/// \details Property information includes their type and settings consolidated to ascertain type safety.
struct IkarusPropertyTypeInfo;
/// \brief Information about a toggle property.
struct IkarusTogglePropertyInfo;
/// \brief Information about a number property.
struct IkarusNumberPropertyInfo;
/// \brief Information about a text property.
struct IkarusTextPropertyInfo;
/// \brief Creates a new toggle property info.
/// \return The created toggle property info.
/// \remark Must be freed with #ikarus_free.
IKA_API IkarusTogglePropertyInfo * ikarus_toggle_property_info_create();
/// \brief Sets the default value of a toggle property info.
/// \param toggle_property_info The toggle property info to set the default value of.
/// \pre \li Must not be null.
/// \param default_value The default value to set.
/// \pre \li Must not be null.
IKA_API void ikarus_toggle_property_info_set_default_value(
IkarusTogglePropertyInfo * toggle_property_info, struct IkarusToggleValue * default_value
);
/// \brief Converts a toggle property info to a generic property info.
/// \param toggle_property_info The toggle property info to convert.
/// \return The converted property info.
IKA_API IkarusPropertyTypeInfo * ikarus_toggle_property_info_to_property_info(IkarusTogglePropertyInfo * toggle_property_info);
/// \brief Creates a new number property info.
/// \return The created number property info.
/// \remark Must be freed with #ikarus_free.
IKA_API IkarusNumberPropertyInfo * ikarus_number_property_info_create();
/// \brief Sets the default value of a number property info.
/// \param number_property_info The number property info to set the default value of.
/// \pre \li Must not be null.
/// \param default_value The default value to set.
/// \pre \li Must not be null.
IKA_API void ikarus_number_property_info_set_default_value(
IkarusNumberPropertyInfo * number_property_info, struct IkarusNumberValue * default_value
);
/// \brief Converts a number property info to a generic property info.
/// \param number_property_info The number property info to convert.
/// \return The converted property info.
IKA_API IkarusPropertyTypeInfo * ikarus_number_property_info_to_property_info(IkarusNumberPropertyInfo * number_property_info);
/// \brief Creates a new text property info.
/// \return The created text property info.
/// \remark Must be freed with #ikarus_free.
IKA_API IkarusTextPropertyInfo * ikarus_text_property_info_create();
/// \brief Sets the default value of a text property info.
/// \param text_property_info The text property info to set the default value of.
/// \pre \li Must not be null.
/// \param default_value The default value to set.
/// \pre \li Must not be null.
IKA_API void ikarus_text_property_info_set_default_value(
IkarusTextPropertyInfo * text_property_info, struct IkarusTextValue * default_value
);
/// \brief Converts a text property info to a generic property info.
/// \param text_property_info The text property info to convert.
/// \return The converted property info.
IKA_API IkarusPropertyTypeInfo * ikarus_text_property_info_to_property_info(IkarusTextPropertyInfo * text_property_info);
IKARUS_END_HEADER
/// @}