1 | /* |
1 | /* |
2 | data.h - Part of psiconv, a PSION 5 file formats converter |
2 | data.h - Part of psiconv, a PSION 5 file formats converter |
3 | Copyright (c) 1999 Frodo Looijaard <frodol@dds.nl> |
3 | Copyright (c) 1999, 2000 Frodo Looijaard <frodol@dds.nl> |
4 | |
4 | |
5 | This program is free software; you can redistribute it and/or modify |
5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by |
6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or |
7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. |
8 | (at your option) any later version. |
… | |
… | |
22 | parse routines, and read by the generation routines. */ |
22 | parse routines, and read by the generation routines. */ |
23 | |
23 | |
24 | #ifndef PSICONV_DATA_H |
24 | #ifndef PSICONV_DATA_H |
25 | #define PSICONV_DATA_H |
25 | #define PSICONV_DATA_H |
26 | |
26 | |
27 | #include "general.h" |
27 | #include <psiconv/general.h> |
28 | #include "list.h" |
28 | #include <psiconv/list.h> |
29 | |
29 | |
30 | /* All types which end on _t are plain types; all other types are pointers |
30 | /* All types which end on _t are plain types; all other types are pointers |
31 | to structs */ |
31 | to structs */ |
32 | |
32 | |
33 | #ifdef __cplusplus |
33 | #ifdef __cplusplus |
… | |
… | |
85 | typedef enum psiconv_border_kind |
85 | typedef enum psiconv_border_kind |
86 | { psiconv_border_none, |
86 | { psiconv_border_none, |
87 | psiconv_border_solid, |
87 | psiconv_border_solid, |
88 | psiconv_border_double, |
88 | psiconv_border_double, |
89 | psiconv_border_dotted, |
89 | psiconv_border_dotted, |
90 | psiconv_border_striped, |
90 | psiconv_border_dashed, |
91 | psiconv_border_dotstripe, |
91 | psiconv_border_dotdashed, |
92 | psiconv_border_dotdotstripe |
92 | psiconv_border_dotdotdashed |
93 | } psiconv_border_kind_t; |
93 | } psiconv_border_kind_t; |
94 | |
94 | |
95 | /* Colors. |
95 | /* Colors. |
96 | black: 0x00 0x00 0x00 |
96 | black: 0x00 0x00 0x00 |
97 | white: 0xff 0xff 0xff */ |
97 | white: 0xff 0xff 0xff */ |
… | |
… | |
154 | psiconv_size_t font_size; |
154 | psiconv_size_t font_size; |
155 | psiconv_bool_t italic; |
155 | psiconv_bool_t italic; |
156 | psiconv_bool_t bold; |
156 | psiconv_bool_t bold; |
157 | psiconv_super_sub_t super_sub; |
157 | psiconv_super_sub_t super_sub; |
158 | psiconv_bool_t underline; |
158 | psiconv_bool_t underline; |
159 | psiconv_bool_t strike_out; |
159 | psiconv_bool_t strikethrough; |
160 | psiconv_font font; |
160 | psiconv_font font; |
161 | } *psiconv_character_layout; |
161 | } *psiconv_character_layout; |
162 | |
162 | |
163 | typedef struct psiconv_paragraph_layout_s |
163 | typedef struct psiconv_paragraph_layout_s |
164 | { |
164 | { |
… | |
… | |
166 | psiconv_length_t indent_left; |
166 | psiconv_length_t indent_left; |
167 | psiconv_length_t indent_right; |
167 | psiconv_length_t indent_right; |
168 | psiconv_length_t indent_first; |
168 | psiconv_length_t indent_first; |
169 | psiconv_justify_hor_t justify_hor; |
169 | psiconv_justify_hor_t justify_hor; |
170 | psiconv_justify_ver_t justify_ver; |
170 | psiconv_justify_ver_t justify_ver; |
171 | psiconv_size_t interline; |
171 | psiconv_size_t linespacing; |
172 | psiconv_bool_t interline_exact; |
172 | psiconv_bool_t linespacing_exact; |
173 | psiconv_size_t top_space; |
173 | psiconv_size_t space_above; |
174 | psiconv_size_t bottom_space; |
174 | psiconv_size_t space_below; |
175 | psiconv_bool_t on_one_page; |
175 | psiconv_bool_t keep_together; |
176 | psiconv_bool_t together_with; /* What the heck is this? */ |
176 | psiconv_bool_t keep_with_next; |
177 | psiconv_bool_t on_next_page; |
177 | psiconv_bool_t on_next_page; |
178 | psiconv_bool_t no_widow_protection; |
178 | psiconv_bool_t no_widow_protection; |
179 | psiconv_length_t border_distance; |
179 | psiconv_length_t border_distance; |
180 | psiconv_bullet bullet; |
180 | psiconv_bullet bullet; |
181 | psiconv_border left_border; |
181 | psiconv_border left_border; |
… | |
… | |
426 | #define PSICONV_ID_STYLE_REMOVABLE 0x1000004F |
426 | #define PSICONV_ID_STYLE_REMOVABLE 0x1000004F |
427 | #define PSICONV_ID_STYLE_BUILT_IN 0x1000004C |
427 | #define PSICONV_ID_STYLE_BUILT_IN 0x1000004C |
428 | #define PSICONV_ID_CLIPART_ITEM 0x10000040 |
428 | #define PSICONV_ID_CLIPART_ITEM 0x10000040 |
429 | |
429 | |
430 | |
430 | |
431 | /* Return a clean layout_status. You can modify it at will */ |
431 | /* Return a clean layout_status. You can modify it at will. Returns NULL |
|
|
432 | if there is not enough memory. */ |
432 | extern psiconv_character_layout psiconv_basic_character_layout(void); |
433 | extern psiconv_character_layout psiconv_basic_character_layout(void); |
433 | |
434 | |
434 | /* Return a clean layout_status. You can modify it at will */ |
435 | /* Return a clean layout_status. You can modify it at will. Returns NULL |
|
|
436 | if there is not enough memory. */ |
435 | extern psiconv_paragraph_layout psiconv_basic_paragraph_layout(void); |
437 | extern psiconv_paragraph_layout psiconv_basic_paragraph_layout(void); |
436 | |
438 | |
437 | /* Clone a layout_status: the new copy is completely independent of the |
439 | /* Clone a layout_status: the new copy is completely independent of the |
438 | original one */ |
440 | original one. Returns NULL if there is not enough memory. */ |
439 | extern psiconv_paragraph_layout psiconv_clone_paragraph_layout |
441 | extern psiconv_paragraph_layout psiconv_clone_paragraph_layout |
440 | (psiconv_paragraph_layout ls); |
442 | (psiconv_paragraph_layout ls); |
441 | |
443 | |
442 | extern psiconv_character_layout psiconv_clone_character_layout |
444 | extern psiconv_character_layout psiconv_clone_character_layout |
443 | (psiconv_character_layout ls); |
445 | (psiconv_character_layout ls); |
444 | |
446 | |
445 | /* Get a numbered style */ |
447 | /* Get a numbered style. Returns NULL if the style is unknown. */ |
446 | extern psiconv_word_style psiconv_get_style (psiconv_word_styles_section ss, int nr); |
448 | extern psiconv_word_style psiconv_get_style (psiconv_word_styles_section ss, int nr); |
447 | |
449 | |
448 | extern void psiconv_free_color(psiconv_color color); |
450 | extern void psiconv_free_color(psiconv_color color); |
449 | extern void psiconv_free_border(psiconv_border border); |
451 | extern void psiconv_free_border(psiconv_border border); |
450 | extern void psiconv_free_bullet(psiconv_bullet bullet); |
452 | extern void psiconv_free_bullet(psiconv_bullet bullet); |