summaryrefslogtreecommitdiff
path: root/content/handlers/html/list_counter_style.h
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2021-01-31 10:49:13 +0000
committerVincent Sanders <vince@kyllikki.org>2021-01-31 10:49:13 +0000
commit83ebc3bb8ee84284e68e2cb87873c1934e1b92b5 (patch)
tree00e7e0d40282e107d5c95b6746a08fa565842c49 /content/handlers/html/list_counter_style.h
parent13c1b11317d0153af235f1f2d15798a9cd942358 (diff)
downloadnetsurf-83ebc3bb8ee84284e68e2cb87873c1934e1b92b5.tar.gz
netsurf-83ebc3bb8ee84284e68e2cb87873c1934e1b92b5.tar.bz2
split counter style handling out of the box code
Diffstat (limited to 'content/handlers/html/list_counter_style.h')
-rw-r--r--content/handlers/html/list_counter_style.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/content/handlers/html/list_counter_style.h b/content/handlers/html/list_counter_style.h
new file mode 100644
index 000000000..6446b933d
--- /dev/null
+++ b/content/handlers/html/list_counter_style.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2021 Vincent Sanders <vince@netsurf-browser.org>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * \file
+ * List counter style handling
+ *
+ * These functions provide font related services. They all work on
+ * UTF-8 strings with lengths given.
+ */
+
+#ifndef NETSURF_HTML_LIST_COUNTER_STYLE_H
+#define NETSURF_HTML_LIST_COUNTER_STYLE_H
+
+/**
+ * format value into a list marker with a style
+ *
+ * \param text The buffer to recive the output
+ * \param text_len The length available in \a text
+ * \param list_style_type The css list style type
+ * \param value The value to style
+ * \return The size of data placed in \a text
+ */
+size_t
+list_counter_style_value(char *text,
+ size_t text_len,
+ enum css_list_style_type_e list_style_type,
+ unsigned int value);
+
+#endif