annotate libmlk-core/mlk/core/drawable-stack.h @ 462:5729efd23286

core: core -> mlk_core
author David Demelier <markand@malikania.fr>
date Mon, 27 Feb 2023 09:52:55 +0100
parents f2f0e73ea9da
children 6af0524913b3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
368
15bdac29ba4b core: split drawable and drawable_stack
David Demelier <markand@malikania.fr>
parents:
diff changeset
1 /*
15bdac29ba4b core: split drawable and drawable_stack
David Demelier <markand@malikania.fr>
parents:
diff changeset
2 * drawable-stack.h -- convenient stack of drawables
15bdac29ba4b core: split drawable and drawable_stack
David Demelier <markand@malikania.fr>
parents:
diff changeset
3 *
445
773a082f0b91 misc: update copyright years
David Demelier <markand@malikania.fr>
parents: 431
diff changeset
4 * Copyright (c) 2020-2023 David Demelier <markand@malikania.fr>
368
15bdac29ba4b core: split drawable and drawable_stack
David Demelier <markand@malikania.fr>
parents:
diff changeset
5 *
15bdac29ba4b core: split drawable and drawable_stack
David Demelier <markand@malikania.fr>
parents:
diff changeset
6 * Permission to use, copy, modify, and/or distribute this software for any
15bdac29ba4b core: split drawable and drawable_stack
David Demelier <markand@malikania.fr>
parents:
diff changeset
7 * purpose with or without fee is hereby granted, provided that the above
15bdac29ba4b core: split drawable and drawable_stack
David Demelier <markand@malikania.fr>
parents:
diff changeset
8 * copyright notice and this permission notice appear in all copies.
15bdac29ba4b core: split drawable and drawable_stack
David Demelier <markand@malikania.fr>
parents:
diff changeset
9 *
15bdac29ba4b core: split drawable and drawable_stack
David Demelier <markand@malikania.fr>
parents:
diff changeset
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
15bdac29ba4b core: split drawable and drawable_stack
David Demelier <markand@malikania.fr>
parents:
diff changeset
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
15bdac29ba4b core: split drawable and drawable_stack
David Demelier <markand@malikania.fr>
parents:
diff changeset
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
15bdac29ba4b core: split drawable and drawable_stack
David Demelier <markand@malikania.fr>
parents:
diff changeset
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15bdac29ba4b core: split drawable and drawable_stack
David Demelier <markand@malikania.fr>
parents:
diff changeset
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15bdac29ba4b core: split drawable and drawable_stack
David Demelier <markand@malikania.fr>
parents:
diff changeset
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15bdac29ba4b core: split drawable and drawable_stack
David Demelier <markand@malikania.fr>
parents:
diff changeset
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15bdac29ba4b core: split drawable and drawable_stack
David Demelier <markand@malikania.fr>
parents:
diff changeset
17 */
15bdac29ba4b core: split drawable and drawable_stack
David Demelier <markand@malikania.fr>
parents:
diff changeset
18
15bdac29ba4b core: split drawable and drawable_stack
David Demelier <markand@malikania.fr>
parents:
diff changeset
19 #ifndef MLK_CORE_DRAWABLE_STACK_H
15bdac29ba4b core: split drawable and drawable_stack
David Demelier <markand@malikania.fr>
parents:
diff changeset
20 #define MLK_CORE_DRAWABLE_STACK_H
15bdac29ba4b core: split drawable and drawable_stack
David Demelier <markand@malikania.fr>
parents:
diff changeset
21
393
b172b10bbe1c core: do the same for drawables
David Demelier <markand@malikania.fr>
parents: 378
diff changeset
22 #include <stddef.h>
b172b10bbe1c core: do the same for drawables
David Demelier <markand@malikania.fr>
parents: 378
diff changeset
23
368
15bdac29ba4b core: split drawable and drawable_stack
David Demelier <markand@malikania.fr>
parents:
diff changeset
24 #include "core.h"
15bdac29ba4b core: split drawable and drawable_stack
David Demelier <markand@malikania.fr>
parents:
diff changeset
25
449
f2f0e73ea9da core: drawable -> mlk_drawable
David Demelier <markand@malikania.fr>
parents: 445
diff changeset
26 struct mlk_drawable_stack {
f2f0e73ea9da core: drawable -> mlk_drawable
David Demelier <markand@malikania.fr>
parents: 445
diff changeset
27 struct mlk_drawable **objects;
393
b172b10bbe1c core: do the same for drawables
David Demelier <markand@malikania.fr>
parents: 378
diff changeset
28 size_t objectsz;
368
15bdac29ba4b core: split drawable and drawable_stack
David Demelier <markand@malikania.fr>
parents:
diff changeset
29 };
15bdac29ba4b core: split drawable and drawable_stack
David Demelier <markand@malikania.fr>
parents:
diff changeset
30
462
5729efd23286 core: core -> mlk_core
David Demelier <markand@malikania.fr>
parents: 449
diff changeset
31 MLK_CORE_BEGIN_DECLS
368
15bdac29ba4b core: split drawable and drawable_stack
David Demelier <markand@malikania.fr>
parents:
diff changeset
32
15bdac29ba4b core: split drawable and drawable_stack
David Demelier <markand@malikania.fr>
parents:
diff changeset
33 void
449
f2f0e73ea9da core: drawable -> mlk_drawable
David Demelier <markand@malikania.fr>
parents: 445
diff changeset
34 mlk_drawable_stack_init(struct mlk_drawable_stack *, struct mlk_drawable **, size_t);
368
15bdac29ba4b core: split drawable and drawable_stack
David Demelier <markand@malikania.fr>
parents:
diff changeset
35
15bdac29ba4b core: split drawable and drawable_stack
David Demelier <markand@malikania.fr>
parents:
diff changeset
36 int
449
f2f0e73ea9da core: drawable -> mlk_drawable
David Demelier <markand@malikania.fr>
parents: 445
diff changeset
37 mlk_drawable_stack_add(struct mlk_drawable_stack *, struct mlk_drawable *);
368
15bdac29ba4b core: split drawable and drawable_stack
David Demelier <markand@malikania.fr>
parents:
diff changeset
38
15bdac29ba4b core: split drawable and drawable_stack
David Demelier <markand@malikania.fr>
parents:
diff changeset
39 int
449
f2f0e73ea9da core: drawable -> mlk_drawable
David Demelier <markand@malikania.fr>
parents: 445
diff changeset
40 mlk_drawable_stack_update(struct mlk_drawable_stack *, unsigned int);
368
15bdac29ba4b core: split drawable and drawable_stack
David Demelier <markand@malikania.fr>
parents:
diff changeset
41
15bdac29ba4b core: split drawable and drawable_stack
David Demelier <markand@malikania.fr>
parents:
diff changeset
42 void
449
f2f0e73ea9da core: drawable -> mlk_drawable
David Demelier <markand@malikania.fr>
parents: 445
diff changeset
43 mlk_drawable_stack_draw(struct mlk_drawable_stack *);
368
15bdac29ba4b core: split drawable and drawable_stack
David Demelier <markand@malikania.fr>
parents:
diff changeset
44
15bdac29ba4b core: split drawable and drawable_stack
David Demelier <markand@malikania.fr>
parents:
diff changeset
45 int
449
f2f0e73ea9da core: drawable -> mlk_drawable
David Demelier <markand@malikania.fr>
parents: 445
diff changeset
46 mlk_drawable_stack_completed(const struct mlk_drawable_stack *);
368
15bdac29ba4b core: split drawable and drawable_stack
David Demelier <markand@malikania.fr>
parents:
diff changeset
47
15bdac29ba4b core: split drawable and drawable_stack
David Demelier <markand@malikania.fr>
parents:
diff changeset
48 void
449
f2f0e73ea9da core: drawable -> mlk_drawable
David Demelier <markand@malikania.fr>
parents: 445
diff changeset
49 mlk_drawable_stack_finish(struct mlk_drawable_stack *);
368
15bdac29ba4b core: split drawable and drawable_stack
David Demelier <markand@malikania.fr>
parents:
diff changeset
50
462
5729efd23286 core: core -> mlk_core
David Demelier <markand@malikania.fr>
parents: 449
diff changeset
51 MLK_CORE_END_DECLS
368
15bdac29ba4b core: split drawable and drawable_stack
David Demelier <markand@malikania.fr>
parents:
diff changeset
52
15bdac29ba4b core: split drawable and drawable_stack
David Demelier <markand@malikania.fr>
parents:
diff changeset
53 #endif /* !MLK_CORE_DRAWABLE_STACK_H */