--- psiconv/trunk/lib/psiconv/data.h 2000/12/13 16:17:54 62 +++ psiconv/trunk/lib/psiconv/data.h 2001/01/17 00:05:08 94 @@ -1,6 +1,6 @@ /* data.h - Part of psiconv, a PSION 5 file formats converter - Copyright (c) 1999 Frodo Looijaard + Copyright (c) 1999, 2000 Frodo Looijaard 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 @@ -41,7 +41,8 @@ psiconv_texted_file, psiconv_mbm_file, psiconv_sketch_file, - psiconv_clipart_file + psiconv_clipart_file, + psiconv_sheet_file } psiconv_file_type_t; /* Length indicators */ @@ -63,6 +64,13 @@ psiconv_bool_true } psiconv_bool_t; +typedef enum psiconv_triple +{ + psiconv_triple_on, + psiconv_triple_off, + psiconv_triple_auto +} psiconv_triple_t; + typedef enum psiconv_super_sub { psiconv_normalscript, psiconv_superscript, @@ -87,11 +95,19 @@ psiconv_border_solid, psiconv_border_double, psiconv_border_dotted, - psiconv_border_striped, - psiconv_border_dotstripe, - psiconv_border_dotdotstripe + psiconv_border_dashed, + psiconv_border_dotdashed, + psiconv_border_dotdotdashed } psiconv_border_kind_t; +typedef enum psiconv_screenfont +{ + psiconv_font_misc, + psiconv_font_sansserif, + psiconv_font_nonprop, + psiconv_font_serif +} psiconv_screenfont_t; + /* Colors. black: 0x00 0x00 0x00 white: 0xff 0xff 0xff */ @@ -105,7 +121,7 @@ typedef struct psiconv_font_s { char *name; - psiconv_u8 screenfont; + psiconv_screenfont_t screenfont; } *psiconv_font; typedef struct psiconv_border_s @@ -156,7 +172,7 @@ psiconv_bool_t bold; psiconv_super_sub_t super_sub; psiconv_bool_t underline; - psiconv_bool_t strike_out; + psiconv_bool_t strikethrough; psiconv_font font; } *psiconv_character_layout; @@ -168,12 +184,12 @@ psiconv_length_t indent_first; psiconv_justify_hor_t justify_hor; psiconv_justify_ver_t justify_ver; - psiconv_size_t interline; - psiconv_bool_t interline_exact; - psiconv_size_t top_space; - psiconv_size_t bottom_space; - psiconv_bool_t on_one_page; - psiconv_bool_t together_with; /* What the heck is this? */ + psiconv_size_t linespacing; + psiconv_bool_t linespacing_exact; + psiconv_size_t space_above; + psiconv_size_t space_below; + psiconv_bool_t keep_together; + psiconv_bool_t keep_with_next; psiconv_bool_t on_next_page; psiconv_bool_t no_widow_protection; psiconv_length_t border_distance; @@ -273,6 +289,7 @@ psiconv_length_t page_height; psiconv_page_header header; psiconv_page_header footer; + psiconv_bool_t landscape; } * psiconv_page_layout_section; typedef struct psiconv_word_status_section_s @@ -388,6 +405,27 @@ psiconv_cliparts sections; } *psiconv_clipart_f; +typedef struct psiconv_sheet_status_section_s +{ + psiconv_bool_t show_graph; + psiconv_u32 cursor_row; + psiconv_u32 cursor_column; + psiconv_bool_t show_top_sheet_toolbar; + psiconv_bool_t show_side_sheet_toolbar; + psiconv_bool_t show_top_graph_toolbar; + psiconv_bool_t show_side_graph_toolbar; + psiconv_u32 sheet_display_size; + psiconv_u32 graph_display_size; + psiconv_triple_t show_horizontal_scrollbar; + psiconv_triple_t show_vertical_scrollbar; +} *psiconv_sheet_status_section; + +typedef struct psiconv_sheet_f_s +{ + psiconv_page_layout_section page_sec; + psiconv_sheet_status_section status_sec; +} *psiconv_sheet_f; + typedef struct psiconv_file_s { psiconv_file_type_t type; @@ -405,6 +443,7 @@ #define PSICONV_ID_WORD 0x1000007F #define PSICONV_ID_TEXTED 0x10000085 #define PSICONV_ID_SKETCH 0x1000007D +#define PSICONV_ID_SHEET 0x10000088 /* Section table ids */ #define PSICONV_ID_WORD_STATUS_SECTION 0x10000243 @@ -415,9 +454,11 @@ #define PSICONV_ID_PAGE_LAYOUT_SECTION 0x10000105 #define PSICONV_ID_PASSWORD_SECTION 0x100000CD #define PSICONV_ID_SKETCH_SECTION 0x1000007D +#define PSICONV_ID_SHEET_STATUS_SECTION 0x1000011F /* Other ids */ -#define PSICONV_ID_PAGE_DIMENSIONS 0x100000fd +#define PSICONV_ID_PAGE_DIMENSIONS1 0x100000fd +#define PSICONV_ID_PAGE_DIMENSIONS2 0x1000010e #define PSICONV_ID_TEXTED_BODY 0x1000005c #define PSICONV_ID_TEXTED_REPLACEMENT 0x10000063 #define PSICONV_ID_TEXTED_UNKNOWN 0x10000065 @@ -458,6 +499,9 @@ extern void psiconv_free_word_style(psiconv_word_style style); extern void psiconv_free_word_styles_section (psiconv_word_styles_section styles); +extern void psiconv_free_sheet_status_section + (psiconv_sheet_status_section section); +extern void psiconv_free_sheet_f(psiconv_sheet_f file); extern void psiconv_free_header_section(psiconv_header_section header); extern void psiconv_free_section_table_entry(psiconv_section_table_entry entry); extern void psiconv_free_section_table_section @@ -489,9 +533,32 @@ extern void psiconv_free_cliparts(psiconv_cliparts section); extern void psiconv_free_clipart_f(psiconv_clipart_f file); - extern void psiconv_free_file(psiconv_file file); +extern int psiconv_compare_color(const psiconv_color value1, + const psiconv_color value2); +extern int psiconv_compare_font(const psiconv_font value1, + const psiconv_font value2); +extern int psiconv_compare_border(const psiconv_border value1, + const psiconv_border value2); +extern int psiconv_compare_bullet(const psiconv_bullet value1, + const psiconv_bullet value2); +extern int psiconv_compare_tab(const psiconv_tab value1, + const psiconv_tab value2); +extern int psiconv_compare_all_tabs(const psiconv_all_tabs value1, + const psiconv_all_tabs value2); +extern int psiconv_compare_paragraph_layout + (const psiconv_paragraph_layout value1, + const psiconv_paragraph_layout value2); + +extern int psiconv_compare_character_layout + (const psiconv_character_layout value1, + const psiconv_character_layout value2); + +/* Get a newly allocated file with sensible defaults, ready to generate. */ +extern psiconv_file psiconv_empty_file(psiconv_file_type_t type); + + #ifdef __cplusplus } #endif /* __cplusplus */