summaryrefslogtreecommitdiff
path: root/src/select/arena.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/select/arena.h')
-rw-r--r--src/select/arena.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/select/arena.h b/src/select/arena.h
new file mode 100644
index 0000000..af06050
--- /dev/null
+++ b/src/select/arena.h
@@ -0,0 +1,45 @@
+/*
+ * This file is part of LibCSS
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ * Copyright 2015 Michael Drake <tlsa@netsurf-browser.org>
+ */
+
+#ifndef css_select_arena_h_
+#define css_select_arena_h_
+
+struct css_computed_style;
+struct css_computed_uncommon;
+
+/*
+ * Add computed style to the style sharing arena, or exchange for existing
+ *
+ * This takes a computed style. Note that the original computed style
+ * may be freed by this call and all future usage should be via the
+ * updated computed style parameter.
+ *
+ * \params style The style to intern; possibly freed and updated
+ * \return CSS_OK on success or appropriate error otherwise.
+ */
+enum css_error css__arena_intern_style(struct css_computed_style **style);
+
+/*
+ * Remove a computed style from the style sharing arena
+ *
+ * \params style The style to remove from the style sharing arena
+ * \return CSS_OK on success or appropriate error otherwise.
+ */
+enum css_error css__arena_remove_style(struct css_computed_style *style);
+
+/*
+ * Remove a computed style's uncommon block from the style sharing arena
+ *
+ * \params uncommon The uncommon style to remove from the style sharing arena
+ * \return CSS_OK on success or appropriate error otherwise.
+ */
+enum css_error css__arena_remove_uncommon_style(
+ struct css_computed_uncommon *uncommon);
+
+#endif
+