diff options
| author | Robert Bieber <robby@bieberphoto.com> | 2010-06-10 21:02:44 +0000 |
|---|---|---|
| committer | Robert Bieber <robby@bieberphoto.com> | 2010-06-10 21:02:44 +0000 |
| commit | 64321adf4331a97201321f5a37d17aa90fa5d5db (patch) | |
| tree | 4ab86b70f8b4059432e713a1ef7c03613fa9ad0e /utils/themeeditor/skin_parser.h | |
| parent | 6c522624b364b3d85ac7f95d55061d4677246dad (diff) | |
| download | rockbox-64321adf4331a97201321f5a37d17aa90fa5d5db.zip rockbox-64321adf4331a97201321f5a37d17aa90fa5d5db.tar.gz rockbox-64321adf4331a97201321f5a37d17aa90fa5d5db.tar.bz2 rockbox-64321adf4331a97201321f5a37d17aa90fa5d5db.tar.xz | |
Theme Editor: Applied FS#11389, switched conditional elements to use tag fields along with children, instead of holding the tag as the first child
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26751 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/skin_parser.h')
| -rw-r--r-- | utils/themeeditor/skin_parser.h | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/utils/themeeditor/skin_parser.h b/utils/themeeditor/skin_parser.h index d3821c0..c15ba9d 100644 --- a/utils/themeeditor/skin_parser.h +++ b/utils/themeeditor/skin_parser.h @@ -26,14 +26,7 @@ extern "C" { #endif - - -#define SKIN_MAX_MEMORY 1048576 - -/******************************************************************** - ****** A global buffer will be used to store the parse tree ******* - *******************************************************************/ -extern char skin_parse_tree[]; +#include <stdlib.h> /******************************************************************** ****** Data Structures ********************************************* @@ -98,8 +91,11 @@ struct skin_element /* The line on which it's defined in the source file */ int line; - /* Text for comments and plaintext */ - char* text; + /* Placeholder for element data + * TEXT and COMMENT uses it for the text string + * TAG, VIEWPORT, LINE, etc may use it for post parse extra storage + */ + void* data; /* The tag or conditional name */ struct tag_info *tag; @@ -125,6 +121,7 @@ struct skin_element struct skin_element* skin_parse(const char* document); /* Memory management functions */ +char *skin_alloc(size_t size); struct skin_element* skin_alloc_element(); struct skin_element** skin_alloc_children(int count); struct skin_tag_parameter* skin_alloc_params(int count); @@ -132,6 +129,7 @@ char* skin_alloc_string(int length); void skin_free_tree(struct skin_element* root); + #ifdef __cplusplus } #endif |