summaryrefslogtreecommitdiff
path: root/content/handlers/html/list_counter_style.h
blob: 2b1e79ab945020cf677b77d9e41a3fea0d229c6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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 buffer to recive the result
 * \param text_len The length of the \a text buffer
 * \param list_style_type the css list style.
 * \param value The value to format.
 * \return The length of the complete output which may exceed \a text_len
 */
size_t
list_counter_style_value(char *text,
			 size_t text_len,
			 enum css_list_style_type_e list_style_type,
			 int value);

#endif