add src/ikarus subdir and make names unique for objects per scope

Signed-off-by: Folling <mail@folling.io>
This commit is contained in:
Folling 2024-01-30 09:31:08 +01:00 committed by Folling
parent 70fca82425
commit dc8b7712b0
Signed by: folling
SSH key fingerprint: SHA256:S9qEx5WCFFLK49tE/LKnKuJYM5sw+++Dn6qJbbyxnCY
51 changed files with 590 additions and 735 deletions

View file

@ -0,0 +1,32 @@
#include "toggle_property.hpp"
#include <cppbase/result.hpp>
#include <ikarus/objects/properties/property.h>
#include <ikarus/objects/properties/property_scope.hpp>
#include <ikarus/objects/properties/util.hpp>
#include <ikarus/values/value.hpp>
IkarusToggleProperty::IkarusToggleProperty(IkarusProject * project, IkarusId id):
IkarusProperty{project, id, this} {}
IkarusToggleProperty * ikarus_toggle_property_create(
struct IkarusProject * project,
char const * name,
struct IkarusPropertyScope * property_source,
IkarusErrorData * error_out
) {
return ikarus::util::create_property<IkarusToggleProperty>(project, name, property_source, error_out);
}
IkarusToggleValue * ikarus_toggle_property_get_default_value(struct IkarusToggleProperty * property, IkarusErrorData * error_out) {
return ikarus::util::get_default_value<IkarusToggleProperty>(property, error_out);
}
void ikarus_toggle_property_set_default_value(
struct IkarusToggleProperty * property,
struct IkarusToggleValue * new_default_value,
IkarusErrorData * error_out
) {
ikarus::util::set_default_value<IkarusToggleProperty>(property, new_default_value, error_out);
}