… | |
… | |
32 | |
32 | |
33 | #ifdef __cplusplus |
33 | #ifdef __cplusplus |
34 | extern "C" { |
34 | extern "C" { |
35 | #endif /* __cplusplus */ |
35 | #endif /* __cplusplus */ |
36 | |
36 | |
37 | /* Forward declaration (for psiconv_object) */ |
37 | /* Forward declaration (for psiconv_embedded_object_section) */ |
38 | typedef struct psiconv_file_s *psiconv_file; |
38 | typedef struct psiconv_file_s *psiconv_file; |
39 | |
39 | |
40 | typedef double psiconv_float_t; |
40 | typedef double psiconv_float_t; |
41 | |
41 | |
42 | typedef enum psiconv_file_type { |
42 | typedef enum psiconv_file_type { |
… | |
… | |
122 | psiconv_u8 blue; |
122 | psiconv_u8 blue; |
123 | } * psiconv_color; |
123 | } * psiconv_color; |
124 | |
124 | |
125 | typedef struct psiconv_font_s |
125 | typedef struct psiconv_font_s |
126 | { |
126 | { |
127 | char *name; |
127 | psiconv_string_t name; |
128 | psiconv_screenfont_t screenfont; |
128 | psiconv_screenfont_t screenfont; |
129 | } *psiconv_font; |
129 | } *psiconv_font; |
130 | |
130 | |
131 | typedef struct psiconv_border_s |
131 | typedef struct psiconv_border_s |
132 | { |
132 | { |
… | |
… | |
242 | psiconv_bool_t show_icon; |
242 | psiconv_bool_t show_icon; |
243 | psiconv_length_t width; |
243 | psiconv_length_t width; |
244 | psiconv_length_t height; |
244 | psiconv_length_t height; |
245 | } *psiconv_object_display_section; |
245 | } *psiconv_object_display_section; |
246 | |
246 | |
247 | typedef struct psiconv_object_s |
247 | typedef struct psiconv_embedded_object_section_s |
248 | { |
248 | { |
249 | psiconv_object_icon_section icon; |
249 | psiconv_object_icon_section icon; |
250 | psiconv_object_display_section display; |
250 | psiconv_object_display_section display; |
251 | psiconv_file object; |
251 | psiconv_file object; |
252 | } *psiconv_object; |
252 | } *psiconv_embedded_object_section; |
253 | |
253 | |
254 | typedef struct psiconv_in_line_layout_s |
254 | typedef struct psiconv_in_line_layout_s |
255 | { |
255 | { |
256 | psiconv_character_layout layout; |
256 | psiconv_character_layout layout; |
257 | int length; |
257 | int length; |
258 | /* If object is NULL, this does not apply to an object */ |
258 | /* If object is NULL, this does not apply to an object */ |
259 | psiconv_object object; |
259 | psiconv_embedded_object_section object; |
260 | psiconv_length_t object_width; |
260 | psiconv_length_t object_width; |
261 | psiconv_length_t object_height; |
261 | psiconv_length_t object_height; |
262 | } *psiconv_in_line_layout; |
262 | } *psiconv_in_line_layout; |
263 | |
263 | |
264 | typedef psiconv_list psiconv_in_line_layouts; /* of struct in_line_layout */ |
264 | typedef psiconv_list psiconv_in_line_layouts; /* of struct in_line_layout */ |
… | |
… | |
392 | typedef struct psiconv_mbm_f_s |
392 | typedef struct psiconv_mbm_f_s |
393 | { |
393 | { |
394 | psiconv_pictures sections; |
394 | psiconv_pictures sections; |
395 | } *psiconv_mbm_f; |
395 | } *psiconv_mbm_f; |
396 | |
396 | |
397 | /* This is a little intricated. A picture may be embedded in a larger form. |
397 | /* Read the Psiconv file format documentation for a complete discription. |
398 | A form is empty, except for the picture. The form has size form_{x,y}size, |
398 | Basic idea: a picture has a certain display size. Within it, the pixel |
399 | and the picture is at offset picture_{x,y}_offset within the form. The |
399 | data begins at a certain offset. Around it, there is an empty form. |
400 | picture itself has size picture_{x,y}size. |
400 | The first eight values are before magnification and cuts. |
401 | Cuts are always <= 1.0; a cut of 0.0 cuts nothing away, a cut of 1.0 |
401 | Cuts are always <= 1.0; a cut of 0.0 cuts nothing away, a cut of 1.0 |
402 | cuts everything away. */ |
402 | cuts everything away. */ |
403 | typedef struct psiconv_sketch_section_s |
403 | typedef struct psiconv_sketch_section_s |
404 | { |
404 | { |
|
|
405 | psiconv_u16 displayed_xsize; |
|
|
406 | psiconv_u16 displayed_ysize; |
|
|
407 | psiconv_u16 picture_data_x_offset; |
|
|
408 | psiconv_u16 picture_data_y_offset; |
405 | psiconv_u16 form_xsize; |
409 | psiconv_u16 form_xsize; |
406 | psiconv_u16 form_ysize; |
410 | psiconv_u16 form_ysize; |
407 | psiconv_u16 picture_x_offset; |
411 | psiconv_u16 displayed_size_x_offset; |
408 | psiconv_u16 picture_y_offset; |
412 | psiconv_u16 displayed_size_y_offset; |
409 | psiconv_u16 picture_xsize; |
|
|
410 | psiconv_u16 picture_ysize; |
|
|
411 | float magnification_x; /* computed relative to first six values */ |
413 | float magnification_x; /* computed relative to first eight values */ |
412 | float magnification_y; /* computed relative to first six values */ |
414 | float magnification_y; /* computed relative to first eight values */ |
413 | float cut_left; /* computed relative to first six values */ |
415 | float cut_left; /* computed relative to first eight values */ |
414 | float cut_right; /* computed relative to first six values */ |
416 | float cut_right; /* computed relative to first eight values */ |
415 | float cut_top; /* computed relative to first six values */ |
417 | float cut_top; /* computed relative to first eight values */ |
416 | float cut_bottom; /* computed relative to first six values */ |
418 | float cut_bottom; /* computed relative to first eight values */ |
417 | psiconv_paint_data_section picture; |
419 | psiconv_paint_data_section picture; |
418 | } *psiconv_sketch_section; |
420 | } *psiconv_sketch_section; |
419 | |
421 | |
420 | typedef struct psiconv_sketch_f_s |
422 | typedef struct psiconv_sketch_f_s |
421 | { |
423 | { |
… | |
… | |
934 | extern void psiconv_free_sheet_line(psiconv_sheet_line line); |
936 | extern void psiconv_free_sheet_line(psiconv_sheet_line line); |
935 | extern void psiconv_free_sheet_name_section(psiconv_sheet_name_section section); |
937 | extern void psiconv_free_sheet_name_section(psiconv_sheet_name_section section); |
936 | extern void psiconv_free_sheet_variable(psiconv_sheet_variable list); |
938 | extern void psiconv_free_sheet_variable(psiconv_sheet_variable list); |
937 | extern void psiconv_free_sheet_variable_list(psiconv_sheet_variable_list list); |
939 | extern void psiconv_free_sheet_variable_list(psiconv_sheet_variable_list list); |
938 | extern void psiconv_free_sheet_info_section(psiconv_sheet_info_section section); |
940 | extern void psiconv_free_sheet_info_section(psiconv_sheet_info_section section); |
|
|
941 | extern void psiconv_free_sheet_workbook_section |
|
|
942 | (psiconv_sheet_workbook_section section); |
939 | extern void psiconv_free_header_section(psiconv_header_section header); |
943 | extern void psiconv_free_header_section(psiconv_header_section header); |
940 | extern void psiconv_free_section_table_entry(psiconv_section_table_entry entry); |
944 | extern void psiconv_free_section_table_entry(psiconv_section_table_entry entry); |
941 | extern void psiconv_free_section_table_section |
945 | extern void psiconv_free_section_table_section |
942 | (psiconv_section_table_section section); |
946 | (psiconv_section_table_section section); |
943 | extern void psiconv_free_application_id_section |
947 | extern void psiconv_free_application_id_section |
944 | (psiconv_application_id_section section); |
948 | (psiconv_application_id_section section); |
945 | extern void psiconv_free_object_display_section |
949 | extern void psiconv_free_object_display_section |
946 | (psiconv_object_display_section section); |
950 | (psiconv_object_display_section section); |
947 | extern void psiconv_free_object_icon_section |
951 | extern void psiconv_free_object_icon_section |
948 | (psiconv_object_icon_section section); |
952 | (psiconv_object_icon_section section); |
949 | extern void psiconv_free_object(psiconv_object object); |
953 | extern void psiconv_free_embedded_object_section |
|
|
954 | (psiconv_embedded_object_section object); |
950 | extern void psiconv_free_in_line_layout(psiconv_in_line_layout layout); |
955 | extern void psiconv_free_in_line_layout(psiconv_in_line_layout layout); |
951 | extern void psiconv_free_in_line_layouts(psiconv_in_line_layouts layouts); |
956 | extern void psiconv_free_in_line_layouts(psiconv_in_line_layouts layouts); |
952 | extern void psiconv_free_replacement(psiconv_replacement replacement); |
957 | extern void psiconv_free_replacement(psiconv_replacement replacement); |
953 | extern void psiconv_free_replacements(psiconv_replacements replacements); |
958 | extern void psiconv_free_replacements(psiconv_replacements replacements); |
954 | extern void psiconv_free_paragraph(psiconv_paragraph paragraph); |
959 | extern void psiconv_free_paragraph(psiconv_paragraph paragraph); |