clay/src/context.h
Gwendolyn d89ef83551 Reworked property system completely.
Properties can now have values of different types, and they are registered with their name, either to a layout class or globally.
Layout classes are also registered with their name.
2023-02-08 01:09:21 +01:00

31 lines
937 B
C

#ifndef CLAY_CONTEXT_H
#define CLAY_CONTEXT_H
#include <stdbool.h>
#include "clay-list.h"
#include "property.h"
#include "layout.h"
void clay_ctx_register_layout(clay_ctx ctx, clay layout);
void clay_ctx_unregister_layout(clay_ctx ctx, clay layout);
const clay_prop_definition *clay_ctx_get_property_definition(clay_ctx ctx, clay_layout_class class, const char *name);
void clay_ctx_register_layout_class(clay_ctx ctx, const char *name, clay_layout_class class);
clay_layout_class clay_ctx_get_layout_class(clay_ctx ctx, const char *name);
const char * clay_ctx_get_layout_class_name(clay_ctx ctx, clay_layout_class class);
void clay_ctx_register_global_property(clay_ctx ctx, const char *name, clay_prop_definition_in *prop_def);
void clay_ctx_register_class_property(clay_ctx ctx, const char *class_name, const char *name,
clay_prop_definition_in *prop_def);
#endif //CLAY_CONTEXT_H