implement toggle/number/text values

Signed-off-by: Folling <mail@folling.io>
This commit is contained in:
Folling 2023-11-26 13:55:14 +01:00 committed by Folling
parent fec84033af
commit 3dd30d74c5
No known key found for this signature in database
14 changed files with 280 additions and 48 deletions

View file

@ -24,21 +24,22 @@ IKA_API IkarusTextValue * ikarus_text_value_create(char const * value);
/// \remark Must be freed with #ikarus_free.
IKA_API IkarusTextValue * ikarus_text_value_create_indeterminate();
/// \brief Fetches the underlying value of a text value.
/// \param value The text value.
/// \return The underlying value.
/// \warning Undefined if the value is indeterminate.
/// \remark The value is owned by libikarus and must not be freed.
IKA_API char const * ikarus_text_value_get_underlying(IkarusTextValue const * value);
/// \brief Sets the value of a text value.
/// \param value The text value.
/// \pre \li Must not be null.
/// \param new_value The new value.
IKA_API void ikarus_text_value_set(IkarusTextValue * value, bool new_value);
/// \brief Fetches the underlying value of a text value.
/// \param value The text value.
/// \return The underlying value.
/// \warning If the value is indeterminate, false is returned.
IKA_API char const * ikarus_text_value_get_underlying(IkarusTextValue const * value);
/// \brief Converts a text value to an entity value.
/// \param text_value The text value to convert.
/// \return The converted entity value.
IKA_API struct IkarusEntityValue * ikarus_text_value_to_entity_value(IkarusTextValue * text_value);
IKA_API struct IkarusValue * ikarus_text_value_to_value(IkarusTextValue * text_value);
IKARUS_END_HEADER