diff options
author | Richard Wilson <rjw@netsurf-browser.org> | 2005-01-15 22:11:53 +0000 |
---|---|---|
committer | Richard Wilson <rjw@netsurf-browser.org> | 2005-01-15 22:11:53 +0000 |
commit | 1487697cb3d69c8eb86b50b441f4c44fe0a0ff12 (patch) | |
tree | c33ccb65fdc3e418c6181e4b2b5efd3f13b6ab40 /render/list.h | |
parent | f0b264670e57d1eefd6f7e297b87cedf38d8be9a (diff) | |
download | netsurf-1487697cb3d69c8eb86b50b441f4c44fe0a0ff12.tar.gz netsurf-1487697cb3d69c8eb86b50b441f4c44fe0a0ff12.tar.bz2 |
[project @ 2005-01-15 22:11:53 by rjw]
Background work for CSS counters (CSS 2.1/12.4)
svn path=/import/netsurf/; revision=1449
Diffstat (limited to 'render/list.h')
-rw-r--r-- | render/list.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/render/list.h b/render/list.h new file mode 100644 index 000000000..f168bd043 --- /dev/null +++ b/render/list.h @@ -0,0 +1,39 @@ +/* + * This file is part of NetSurf, http://netsurf.sourceforge.net/ + * Licensed under the GNU General Public License, + * http://www.opensource.org/licenses/gpl-license + * Copyright 2005 Richard Wilson <info@tinct.net> + */ + +/** \file + * HTML lists (interface). + */ + +#ifndef _NETSURF_RENDER_LIST_H_ +#define _NETSURF_RENDER_LIST_H_ + +#include <stdbool.h> + +struct list_counter { + char *name; /** Counter name */ + struct list_counter_state *first; /** First counter state */ + struct list_counter_state *state; /** Current counter state */ + struct list_counter *next; /** Next counter */ +}; + +struct list_counter_state { + int count; /** Current count */ + struct list_counter_state *parent; /** Parent counter, or NULL */ + struct list_counter_state *next; /** Next counter, or NULL */ +}; + + +void render_list_destroy_counters(void); +bool render_list_counter_reset(const char *name, int value); +bool render_list_counter_increment(const char *name, int value); +bool render_list_counter_end_scope(const char *name); +char *render_list_counter(struct css_counter *css_counter); + +void render_list_test(void); + +#endif |