/[public]/psiconv/trunk/lib/psiconv/data.h
ViewVC logotype

Diff of /psiconv/trunk/lib/psiconv/data.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 160 Revision 171
32 32
33#ifdef __cplusplus 33#ifdef __cplusplus
34extern "C" { 34extern "C" {
35#endif /* __cplusplus */ 35#endif /* __cplusplus */
36 36
37/* Forward declaration (for psiconv_object) */ 37/* Forward declaration (for psiconv_embedded_object_section) */
38typedef struct psiconv_file_s *psiconv_file; 38typedef struct psiconv_file_s *psiconv_file;
39 39
40typedef double psiconv_float_t; 40typedef double psiconv_float_t;
41 41
42typedef enum psiconv_file_type { 42typedef enum psiconv_file_type {
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
247typedef struct psiconv_object_s 247typedef 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
254typedef struct psiconv_in_line_layout_s 254typedef 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
264typedef psiconv_list psiconv_in_line_layouts; /* of struct in_line_layout */ 264typedef psiconv_list psiconv_in_line_layouts; /* of struct in_line_layout */
392typedef struct psiconv_mbm_f_s 392typedef 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. */
403typedef struct psiconv_sketch_section_s 403typedef 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
420typedef struct psiconv_sketch_f_s 422typedef struct psiconv_sketch_f_s
421{ 423{
934extern void psiconv_free_sheet_line(psiconv_sheet_line line); 936extern void psiconv_free_sheet_line(psiconv_sheet_line line);
935extern void psiconv_free_sheet_name_section(psiconv_sheet_name_section section); 937extern void psiconv_free_sheet_name_section(psiconv_sheet_name_section section);
936extern void psiconv_free_sheet_variable(psiconv_sheet_variable list); 938extern void psiconv_free_sheet_variable(psiconv_sheet_variable list);
937extern void psiconv_free_sheet_variable_list(psiconv_sheet_variable_list list); 939extern void psiconv_free_sheet_variable_list(psiconv_sheet_variable_list list);
938extern void psiconv_free_sheet_info_section(psiconv_sheet_info_section section); 940extern void psiconv_free_sheet_info_section(psiconv_sheet_info_section section);
941extern void psiconv_free_sheet_workbook_section
942 (psiconv_sheet_workbook_section section);
939extern void psiconv_free_header_section(psiconv_header_section header); 943extern void psiconv_free_header_section(psiconv_header_section header);
940extern void psiconv_free_section_table_entry(psiconv_section_table_entry entry); 944extern void psiconv_free_section_table_entry(psiconv_section_table_entry entry);
941extern void psiconv_free_section_table_section 945extern void psiconv_free_section_table_section
942 (psiconv_section_table_section section); 946 (psiconv_section_table_section section);
943extern void psiconv_free_application_id_section 947extern void psiconv_free_application_id_section
944 (psiconv_application_id_section section); 948 (psiconv_application_id_section section);
945extern void psiconv_free_object_display_section 949extern void psiconv_free_object_display_section
946 (psiconv_object_display_section section); 950 (psiconv_object_display_section section);
947extern void psiconv_free_object_icon_section 951extern void psiconv_free_object_icon_section
948 (psiconv_object_icon_section section); 952 (psiconv_object_icon_section section);
949extern void psiconv_free_object(psiconv_object object); 953extern void psiconv_free_embedded_object_section
954 (psiconv_embedded_object_section object);
950extern void psiconv_free_in_line_layout(psiconv_in_line_layout layout); 955extern void psiconv_free_in_line_layout(psiconv_in_line_layout layout);
951extern void psiconv_free_in_line_layouts(psiconv_in_line_layouts layouts); 956extern void psiconv_free_in_line_layouts(psiconv_in_line_layouts layouts);
952extern void psiconv_free_replacement(psiconv_replacement replacement); 957extern void psiconv_free_replacement(psiconv_replacement replacement);
953extern void psiconv_free_replacements(psiconv_replacements replacements); 958extern void psiconv_free_replacements(psiconv_replacements replacements);
954extern void psiconv_free_paragraph(psiconv_paragraph paragraph); 959extern void psiconv_free_paragraph(psiconv_paragraph paragraph);

Legend:
Removed from v.160  
changed lines
  Added in v.171

frodo@frodo.looijaard.name
ViewVC Help
Powered by ViewVC 1.1.26