… | |
… | |
27 | #include "general.h" |
27 | #include "general.h" |
28 | #include "list.h" |
28 | #include "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 | |
|
|
33 | #ifdef __cplusplus |
|
|
34 | extern "C" { |
|
|
35 | #endif /* __cplusplus */ |
|
|
36 | |
32 | |
37 | |
33 | typedef enum psiconv_file_type { |
38 | typedef enum psiconv_file_type { |
34 | psiconv_unknown_file, |
39 | psiconv_unknown_file, |
35 | psiconv_word_file, |
40 | psiconv_word_file, |
36 | psiconv_texted_file, |
41 | psiconv_texted_file, |
37 | psiconv_mbm_file, |
42 | psiconv_mbm_file, |
38 | psiconv_sketch_file |
43 | psiconv_sketch_file, |
|
|
44 | psiconv_clipart_file |
39 | } psiconv_file_type_t; |
45 | } psiconv_file_type_t; |
40 | |
46 | |
41 | /* Length indicators */ |
47 | /* Length indicators */ |
42 | typedef psiconv_u32 psiconv_S_t; |
48 | typedef psiconv_u32 psiconv_S_t; |
43 | typedef psiconv_u32 psiconv_X_t; |
49 | typedef psiconv_u32 psiconv_X_t; |
… | |
… | |
291 | psiconv_character_layout character; |
297 | psiconv_character_layout character; |
292 | psiconv_paragraph_layout paragraph; |
298 | psiconv_paragraph_layout paragraph; |
293 | psiconv_u8 hotkey; |
299 | psiconv_u8 hotkey; |
294 | psiconv_string_t name; |
300 | psiconv_string_t name; |
295 | psiconv_bool_t built_in; |
301 | psiconv_bool_t built_in; |
|
|
302 | psiconv_u32 outline_level; |
296 | } *psiconv_word_style; |
303 | } *psiconv_word_style; |
297 | |
304 | |
298 | typedef psiconv_list psiconv_word_style_list; /* Of style */ |
305 | typedef psiconv_list psiconv_word_style_list; /* Of style */ |
299 | |
306 | |
300 | typedef struct psiconv_word_styles_section |
307 | typedef struct psiconv_word_styles_section |
… | |
… | |
313 | typedef struct psiconv_texted_f { |
320 | typedef struct psiconv_texted_f { |
314 | psiconv_page_layout_section page_sec; |
321 | psiconv_page_layout_section page_sec; |
315 | psiconv_texted_section texted_sec; |
322 | psiconv_texted_section texted_sec; |
316 | } *psiconv_texted_f; |
323 | } *psiconv_texted_f; |
317 | |
324 | |
318 | typedef psiconv_list psiconv_mbm_jumptable_section; /* of psiconv_u32 */ |
325 | typedef psiconv_list psiconv_jumptable_section; /* of psiconv_u32 */ |
319 | |
326 | |
320 | /* Normalized values [0..1] for each component |
327 | /* Normalized values [0..1] for each component |
321 | Origin is (x,y)=(0,0), to get pixel at (X,Y) use index [Y*xsize+X] */ |
328 | Origin is (x,y)=(0,0), to get pixel at (X,Y) use index [Y*xsize+X] */ |
322 | typedef struct psiconv_paint_data_section { |
329 | typedef struct psiconv_paint_data_section { |
323 | psiconv_u32 xsize; |
330 | psiconv_u32 xsize; |
… | |
… | |
360 | |
367 | |
361 | typedef struct psiconv_sketch_f { |
368 | typedef struct psiconv_sketch_f { |
362 | psiconv_sketch_section sketch_sec; |
369 | psiconv_sketch_section sketch_sec; |
363 | } *psiconv_sketch_f; |
370 | } *psiconv_sketch_f; |
364 | |
371 | |
|
|
372 | typedef struct psiconv_clipart_section { |
|
|
373 | /* Perhaps later on some currently unknown stuff. */ |
|
|
374 | psiconv_paint_data_section picture; |
|
|
375 | } * psiconv_clipart_section; |
|
|
376 | |
|
|
377 | typedef psiconv_list psiconv_cliparts; /* of struct psiconv_clipart_section */ |
|
|
378 | |
|
|
379 | typedef struct psiconv_clipart_f { |
|
|
380 | psiconv_cliparts sections; |
|
|
381 | } *psiconv_clipart_f; |
|
|
382 | |
365 | typedef struct psiconv_file { |
383 | typedef struct psiconv_file { |
366 | psiconv_file_type_t type; |
384 | psiconv_file_type_t type; |
367 | void *file; |
385 | void *file; |
368 | } *psiconv_file; |
386 | } *psiconv_file; |
369 | |
387 | |
370 | |
388 | |
371 | /* UID1 */ |
389 | /* UID1 */ |
372 | #define PSICONV_ID_PSION5 0x10000037 |
390 | #define PSICONV_ID_PSION5 0x10000037 |
|
|
391 | #define PSICONV_ID_CLIPART 0x10000041 |
373 | /* UID2 */ |
392 | /* UID2 */ |
374 | #define PSICONV_ID_DATA_FILE 0x1000006D |
393 | #define PSICONV_ID_DATA_FILE 0x1000006D |
375 | #define PSICONV_ID_MBM_FILE 0x10000042 |
394 | #define PSICONV_ID_MBM_FILE 0x10000042 |
376 | /* UID3 */ |
395 | /* UID3 */ |
377 | #define PSICONV_ID_WORD 0x1000007F |
396 | #define PSICONV_ID_WORD 0x1000007F |
… | |
… | |
395 | #define PSICONV_ID_TEXTED_UNKNOWN 0x10000065 |
414 | #define PSICONV_ID_TEXTED_UNKNOWN 0x10000065 |
396 | #define PSICONV_ID_TEXTED_LAYOUT 0x10000066 |
415 | #define PSICONV_ID_TEXTED_LAYOUT 0x10000066 |
397 | #define PSICONV_ID_TEXTED_TEXT 0x10000064 |
416 | #define PSICONV_ID_TEXTED_TEXT 0x10000064 |
398 | #define PSICONV_ID_STYLE_REMOVABLE 0x1000004F |
417 | #define PSICONV_ID_STYLE_REMOVABLE 0x1000004F |
399 | #define PSICONV_ID_STYLE_BUILT_IN 0x1000004C |
418 | #define PSICONV_ID_STYLE_BUILT_IN 0x1000004C |
|
|
419 | #define PSICONV_ID_CLIPART_ITEM 0x10000040 |
400 | |
420 | |
401 | |
421 | |
402 | /* Return a clean layout_status. You can modify it at will */ |
422 | /* Return a clean layout_status. You can modify it at will */ |
403 | extern psiconv_character_layout psiconv_basic_character_layout(void); |
423 | extern psiconv_character_layout psiconv_basic_character_layout(void); |
404 | |
424 | |
… | |
… | |
447 | (psiconv_word_status_section section); |
467 | (psiconv_word_status_section section); |
448 | extern void psiconv_free_word_f(psiconv_word_f file); |
468 | extern void psiconv_free_word_f(psiconv_word_f file); |
449 | extern void psiconv_free_texted_f(psiconv_texted_f file); |
469 | extern void psiconv_free_texted_f(psiconv_texted_f file); |
450 | extern void psiconv_free_paint_data_section(psiconv_paint_data_section section); |
470 | extern void psiconv_free_paint_data_section(psiconv_paint_data_section section); |
451 | extern void psiconv_free_pictures(psiconv_pictures section); |
471 | extern void psiconv_free_pictures(psiconv_pictures section); |
452 | extern void psiconv_free_mbm_jumptable_section |
472 | extern void psiconv_free_jumptable_section |
453 | (psiconv_mbm_jumptable_section section); |
473 | (psiconv_jumptable_section section); |
454 | extern void psiconv_free_mbm_f(psiconv_mbm_f file); |
474 | extern void psiconv_free_mbm_f(psiconv_mbm_f file); |
455 | extern void psiconv_free_sketch_section(psiconv_sketch_section sec); |
475 | extern void psiconv_free_sketch_section(psiconv_sketch_section sec); |
456 | extern void psiconv_free_sketch_f(psiconv_sketch_f file); |
476 | extern void psiconv_free_sketch_f(psiconv_sketch_f file); |
|
|
477 | extern void psiconv_free_clipart_section(psiconv_clipart_section section); |
|
|
478 | extern void psiconv_free_cliparts(psiconv_cliparts section); |
|
|
479 | extern void psiconv_free_clipart_f(psiconv_clipart_f file); |
|
|
480 | |
457 | |
481 | |
458 | extern void psiconv_free_file(psiconv_file file); |
482 | extern void psiconv_free_file(psiconv_file file); |
459 | |
483 | |
|
|
484 | #ifdef __cplusplus |
|
|
485 | } |
|
|
486 | #endif /* __cplusplus */ |
460 | |
487 | |
461 | #endif /* def PSICONV_DATA_H */ |
488 | #endif /* def PSICONV_DATA_H */ |