diff options
author | Thomas White <taw@bitwiz.org.uk> | 2012-09-08 11:07:54 +0200 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2012-09-08 11:07:54 +0200 |
commit | 017121b0816250ddcc8a08746a6f140e48ca2d9e (patch) | |
tree | 15ccd482f6ee023c954905b3c89c385db8c61bbb /src/stylesheet.h | |
parent | 0a6d0255787a7b95a31ab317ed83463109c9fc01 (diff) |
Plug in stylesheets and load/save
Diffstat (limited to 'src/stylesheet.h')
-rw-r--r-- | src/stylesheet.h | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/src/stylesheet.h b/src/stylesheet.h index f2f72b2..58f4c13 100644 --- a/src/stylesheet.h +++ b/src/stylesheet.h @@ -3,7 +3,7 @@ * * Colloquium - A tiny presentation program * - * Copyright (c) 2011 Thomas White <taw@bitwiz.org.uk> + * Copyright (c) 2012 Thomas White <taw@bitwiz.org.uk> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -30,6 +30,7 @@ struct frame; #include "layout.h" +#include "loadsave.h" struct style @@ -50,13 +51,35 @@ struct slide_template struct frame_class **frame_classes; int n_frame_classes; +}; + - struct bgblock **bgblocks; - int n_bgblocks; +struct _stylesheet +{ + struct style **styles; + int n_styles; }; typedef struct _stylesheet StyleSheet; struct presentation; +extern StyleSheet *new_stylesheet(); +extern StyleSheet *load_stylesheet(const char *filename); +extern void free_stylesheet(StyleSheet *ss); +extern void default_stylesheet(StyleSheet *ss); + +extern struct style *new_style(StyleSheet *ss, const char *name); + +extern int save_stylesheet(StyleSheet *ss, const char *filename); + +extern struct style *find_style(StyleSheet *ss, const char *name); + +extern enum justify str_to_halign(char *halign); +extern enum vert_pos str_to_valign(char *valign); + +extern StyleSheet *tree_to_stylesheet(struct ds_node *root); +extern void write_stylesheet(StyleSheet *ss, struct serializer *ser); + + #endif /* STYLESHEET_H */ |