Mercurial > molko
comparison src/libmlk-core/core/drawable-stack.h @ 393:b172b10bbe1c
core: do the same for drawables
author | David Demelier <markand@malikania.fr> |
---|---|
date | Tue, 15 Feb 2022 21:02:29 +0100 |
parents | 460c78706989 |
children |
comparison
equal
deleted
inserted
replaced
392:e6d7ebad33cc | 393:b172b10bbe1c |
---|---|
17 */ | 17 */ |
18 | 18 |
19 #ifndef MLK_CORE_DRAWABLE_STACK_H | 19 #ifndef MLK_CORE_DRAWABLE_STACK_H |
20 #define MLK_CORE_DRAWABLE_STACK_H | 20 #define MLK_CORE_DRAWABLE_STACK_H |
21 | 21 |
22 #include <stddef.h> | |
23 | |
22 #include "core.h" | 24 #include "core.h" |
23 | 25 |
24 #define DRAWABLE_STACK_MAX (128) | |
25 | |
26 struct drawable_stack { | 26 struct drawable_stack { |
27 struct drawable *objects[DRAWABLE_STACK_MAX]; | 27 struct drawable **objects; |
28 size_t objectsz; | |
28 }; | 29 }; |
29 | 30 |
30 CORE_BEGIN_DECLS | 31 CORE_BEGIN_DECLS |
31 | 32 |
32 void | 33 void |
33 drawable_stack_init(struct drawable_stack *); | 34 drawable_stack_init(struct drawable_stack *, struct drawable **, size_t); |
34 | 35 |
35 int | 36 int |
36 drawable_stack_add(struct drawable_stack *, struct drawable *); | 37 drawable_stack_add(struct drawable_stack *, struct drawable *); |
37 | 38 |
38 int | 39 int |