d89ef83551
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.
35 lines
692 B
C
35 lines
692 B
C
#ifndef CLAY_LAYOUT_H
|
|
#define CLAY_LAYOUT_H
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include "clay.h"
|
|
#include "clay-map.h"
|
|
#include "clay-list.h"
|
|
|
|
typedef struct clay_layout_class_s *clay_layout_class;
|
|
CLAY_LIST_TYPE(clay_layout_list, clay)
|
|
|
|
#include "color.h"
|
|
#include "context.h"
|
|
|
|
typedef void (*clay_layout_init_fn)(clay);
|
|
|
|
typedef void (*clay_layout_cleanup_fn)(clay);
|
|
|
|
struct clay_layout_class_s {
|
|
clay_layout_init_fn init;
|
|
clay_layout_cleanup_fn cleanup;
|
|
};
|
|
|
|
|
|
clay clay_layout_create(clay_ctx ctx, clay_layout_class class);
|
|
|
|
void clay_layout_cleanup(clay layout);
|
|
|
|
clay_layout_list_const clay_layout_get_children(clay layout);
|
|
|
|
clay clay_layout_get_parent(clay layout);
|
|
|
|
#endif //CLAY_LAYOUT_H
|