/[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 12 Revision 41
33typedef enum psiconv_file_type { 33typedef enum psiconv_file_type {
34 psiconv_unknown_file, 34 psiconv_unknown_file,
35 psiconv_word_file, 35 psiconv_word_file,
36 psiconv_texted_file, 36 psiconv_texted_file,
37 psiconv_mbm_file, 37 psiconv_mbm_file,
38 psiconv_sketch_file 38 psiconv_sketch_file,
39 psiconv_clipart_file
39} psiconv_file_type_t; 40} psiconv_file_type_t;
40 41
41/* Length indicators */ 42/* Length indicators */
42typedef psiconv_u32 psiconv_S_t; 43typedef psiconv_u32 psiconv_S_t;
43typedef psiconv_u32 psiconv_X_t; 44typedef psiconv_u32 psiconv_X_t;
183{ 184{
184 psiconv_u32 uid1; 185 psiconv_u32 uid1;
185 psiconv_u32 uid2; 186 psiconv_u32 uid2;
186 psiconv_u32 uid3; 187 psiconv_u32 uid3;
187 psiconv_u32 checksum; 188 psiconv_u32 checksum;
188 psiconv_u32 section_table_offset;
189 psiconv_file_type_t file; 189 psiconv_file_type_t file;
190} *psiconv_header_section; 190} *psiconv_header_section;
191 191
192typedef struct psiconv_section_table_entry 192typedef struct psiconv_section_table_entry
193{ 193{
292 psiconv_character_layout character; 292 psiconv_character_layout character;
293 psiconv_paragraph_layout paragraph; 293 psiconv_paragraph_layout paragraph;
294 psiconv_u8 hotkey; 294 psiconv_u8 hotkey;
295 psiconv_string_t name; 295 psiconv_string_t name;
296 psiconv_bool_t built_in; 296 psiconv_bool_t built_in;
297 psiconv_u32 outline_level;
297} *psiconv_word_style; 298} *psiconv_word_style;
298 299
299typedef psiconv_list psiconv_word_style_list; /* Of style */ 300typedef psiconv_list psiconv_word_style_list; /* Of style */
300 301
301typedef struct psiconv_word_styles_section 302typedef struct psiconv_word_styles_section
321/* Normalized values [0..1] for each component 322/* Normalized values [0..1] for each component
322 Origin is (x,y)=(0,0), to get pixel at (X,Y) use index [Y*xsize+X] */ 323 Origin is (x,y)=(0,0), to get pixel at (X,Y) use index [Y*xsize+X] */
323typedef struct psiconv_paint_data_section { 324typedef struct psiconv_paint_data_section {
324 psiconv_u32 xsize; 325 psiconv_u32 xsize;
325 psiconv_u32 ysize; 326 psiconv_u32 ysize;
327 psiconv_length_t pic_xsize; /* 0 if not specified */
328 psiconv_length_t pic_ysize; /* 0 if not specified */
326 float *red; 329 float *red;
327 float *green; 330 float *green;
328 float *blue; 331 float *blue;
329} *psiconv_paint_data_section; 332} *psiconv_paint_data_section;
330 333
333 336
334typedef struct psiconv_mbm_f { 337typedef struct psiconv_mbm_f {
335 psiconv_pictures sections; 338 psiconv_pictures sections;
336} *psiconv_mbm_f; 339} *psiconv_mbm_f;
337 340
341/* This is a little intricated. A picture may be embedded in a larger form.
342 A form is empty, except for the picture. The form has size form_{x,y}size,
343 and the picture is at offset picture_{x,y}_offset within the form. The
344 picture itself has size picture_{x,y}size.
345 Cuts are always <= 1.0; a cut of 0.0 cuts nothing away, a cut of 1.0
346 cuts everything away. */
347typedef struct psiconv_sketch_section {
348 psiconv_u16 form_xsize;
349 psiconv_u16 form_ysize;
350 psiconv_u16 picture_x_offset;
351 psiconv_u16 picture_y_offset;
352 psiconv_u16 picture_xsize;
353 psiconv_u16 picture_ysize;
354 float magnification_x; /* computed relative to first six values */
355 float magnification_y; /* computed relative to first six values */
356 float cut_left; /* computed relative to first six values */
357 float cut_right; /* computed relative to first six values */
358 float cut_top; /* computed relative to first six values */
359 float cut_bottom; /* computed relative to first six values */
360 psiconv_paint_data_section picture;
361} *psiconv_sketch_section;
362
363typedef struct psiconv_sketch_f {
364 psiconv_sketch_section sketch_sec;
365} *psiconv_sketch_f;
366
367typedef struct psiconv_clipart_section {
368 /* Perhaps later on some currently unknown stuff. */
369 psiconv_paint_data_section picture;
370} * psiconv_clipart_section;
371
372typedef psiconv_list psiconv_cliparts; /* of struct psiconv_clipart_section */
373
374typedef struct psiconv_clipart_f {
375 psiconv_cliparts sections;
376} *psiconv_clipart_f;
377
338typedef struct psiconv_file { 378typedef struct psiconv_file {
339 psiconv_file_type_t type; 379 psiconv_file_type_t type;
340 void *file; 380 void *file;
341} *psiconv_file; 381} *psiconv_file;
342 382
343 383
344/* UID1 */ 384/* UID1 */
345#define PSICONV_ID_PSION5 0x10000037 385#define PSICONV_ID_PSION5 0x10000037
386#define PSICONV_ID_CLIPART 0x10000041
346/* UID2 */ 387/* UID2 */
347#define PSICONV_ID_DATA_FILE 0x1000006D 388#define PSICONV_ID_DATA_FILE 0x1000006D
348#define PSICONV_ID_MBM_FILE 0x10000042 389#define PSICONV_ID_MBM_FILE 0x10000042
349/* UID3 */ 390/* UID3 */
350#define PSICONV_ID_WORD 0x1000007F 391#define PSICONV_ID_WORD 0x1000007F
351#define PSICONV_ID_TEXTED 0x10000085 392#define PSICONV_ID_TEXTED 0x10000085
393#define PSICONV_ID_SKETCH 0x1000007D
352 394
353/* Section table ids */ 395/* Section table ids */
354#define PSICONV_ID_WORD_STATUS_SECTION 0x10000243 396#define PSICONV_ID_WORD_STATUS_SECTION 0x10000243
355#define PSICONV_ID_APPL_ID_SECTION 0x10000089 397#define PSICONV_ID_APPL_ID_SECTION 0x10000089
356#define PSICONV_ID_TEXT_SECTION 0x10000106 398#define PSICONV_ID_TEXT_SECTION 0x10000106
357#define PSICONV_ID_LAYOUT_SECTION 0x10000143 399#define PSICONV_ID_LAYOUT_SECTION 0x10000143
358#define PSICONV_ID_WORD_STYLES_SECTION 0x10000104 400#define PSICONV_ID_WORD_STYLES_SECTION 0x10000104
359#define PSICONV_ID_PAGE_LAYOUT_SECTION 0x10000105 401#define PSICONV_ID_PAGE_LAYOUT_SECTION 0x10000105
360#define PSICONV_ID_PASSWORD_SECTION 0x100000CD 402#define PSICONV_ID_PASSWORD_SECTION 0x100000CD
403#define PSICONV_ID_SKETCH_SECTION 0x1000007D
361 404
362/* Other ids */ 405/* Other ids */
363#define PSICONV_ID_PAGE_DIMENSIONS 0x100000fd 406#define PSICONV_ID_PAGE_DIMENSIONS 0x100000fd
364#define PSICONV_ID_TEXTED_BODY 0x1000005c 407#define PSICONV_ID_TEXTED_BODY 0x1000005c
365#define PSICONV_ID_TEXTED_REPLACEMENT 0x10000063 408#define PSICONV_ID_TEXTED_REPLACEMENT 0x10000063
421extern void psiconv_free_paint_data_section(psiconv_paint_data_section section); 464extern void psiconv_free_paint_data_section(psiconv_paint_data_section section);
422extern void psiconv_free_pictures(psiconv_pictures section); 465extern void psiconv_free_pictures(psiconv_pictures section);
423extern void psiconv_free_mbm_jumptable_section 466extern void psiconv_free_mbm_jumptable_section
424 (psiconv_mbm_jumptable_section section); 467 (psiconv_mbm_jumptable_section section);
425extern void psiconv_free_mbm_f(psiconv_mbm_f file); 468extern void psiconv_free_mbm_f(psiconv_mbm_f file);
469extern void psiconv_free_sketch_section(psiconv_sketch_section sec);
470extern void psiconv_free_sketch_f(psiconv_sketch_f file);
471extern void psiconv_free_clipart_section(psiconv_clipart_section section);
472extern void psiconv_free_cliparts(psiconv_cliparts section);
473extern void psiconv_free_clipart_f(psiconv_clipart_f file);
474
475
426extern void psiconv_free_file(psiconv_file file); 476extern void psiconv_free_file(psiconv_file file);
427 477
428 478
429#endif /* def PSICONV_DATA_H */ 479#endif /* def PSICONV_DATA_H */

Legend:
Removed from v.12  
changed lines
  Added in v.41

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