summaryrefslogtreecommitdiff
path: root/include/util/array.h
diff options
context:
space:
mode:
authorWilliam McKinnon <[email protected]>2023-07-11 00:44:26 -0400
committerWilliam McKinnon <[email protected]>2023-07-11 00:44:26 -0400
commit9eaa07a4b141bc80a46cb7ab2dc94048f126fa8c (patch)
treec78cb64199476b94d9ee2f403f1e31ff4d3c5a69 /include/util/array.h
parent74e85d896e4e0964a93113cd9ef31bfb10747b28 (diff)
added more scene dependencies, added tinywl
Diffstat (limited to 'include/util/array.h')
-rw-r--r--include/util/array.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/util/array.h b/include/util/array.h
new file mode 100644
index 0000000..a51bdb6
--- /dev/null
+++ b/include/util/array.h
@@ -0,0 +1,18 @@
+#ifndef UTIL_ARRAY_H
+#define UTIL_ARRAY_H
+
+#include <stdlib.h>
+#include <stdbool.h>
+#include <wayland-util.h>
+
+/**
+ * Remove a chunk of memory of the specified size at the specified offset.
+ */
+void array_remove_at(struct wl_array *arr, size_t offset, size_t size);
+
+/**
+ * Grow or shrink the array to fit the specifized size.
+ */
+bool array_realloc(struct wl_array *arr, size_t size);
+
+#endif