… | |
… | |
32 | |
32 | |
33 | typedef enum psiconv_file_type { |
33 | typedef 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_mfm_file, |
37 | psiconv_mbm_file, |
38 | psiconv_sketch_file |
38 | psiconv_sketch_file |
39 | } psiconv_file_type_t; |
39 | } psiconv_file_type_t; |
40 | |
40 | |
41 | /* Length indicators */ |
41 | /* Length indicators */ |
42 | typedef psiconv_u32 psiconv_S_t; |
42 | typedef psiconv_u32 psiconv_S_t; |
… | |
… | |
183 | { |
183 | { |
184 | psiconv_u32 uid1; |
184 | psiconv_u32 uid1; |
185 | psiconv_u32 uid2; |
185 | psiconv_u32 uid2; |
186 | psiconv_u32 uid3; |
186 | psiconv_u32 uid3; |
187 | psiconv_u32 checksum; |
187 | psiconv_u32 checksum; |
188 | psiconv_u32 section_table_offset; |
|
|
189 | psiconv_file_type_t file; |
188 | psiconv_file_type_t file; |
190 | } *psiconv_header_section; |
189 | } *psiconv_header_section; |
191 | |
190 | |
192 | typedef struct psiconv_section_table_entry |
191 | typedef struct psiconv_section_table_entry |
193 | { |
192 | { |
… | |
… | |
314 | typedef struct psiconv_texted_f { |
313 | typedef struct psiconv_texted_f { |
315 | psiconv_page_layout_section page_sec; |
314 | psiconv_page_layout_section page_sec; |
316 | psiconv_texted_section texted_sec; |
315 | psiconv_texted_section texted_sec; |
317 | } *psiconv_texted_f; |
316 | } *psiconv_texted_f; |
318 | |
317 | |
|
|
318 | typedef psiconv_list psiconv_mbm_jumptable_section; /* of psiconv_u32 */ |
|
|
319 | |
|
|
320 | /* 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] */ |
|
|
322 | typedef struct psiconv_paint_data_section { |
|
|
323 | psiconv_u32 xsize; |
|
|
324 | psiconv_u32 ysize; |
|
|
325 | float *red; |
|
|
326 | float *green; |
|
|
327 | float *blue; |
|
|
328 | } *psiconv_paint_data_section; |
|
|
329 | |
|
|
330 | typedef psiconv_list psiconv_pictures; |
|
|
331 | /* of struct psiconv_paint_data_section */ |
|
|
332 | |
|
|
333 | typedef struct psiconv_mbm_f { |
|
|
334 | psiconv_pictures sections; |
|
|
335 | } *psiconv_mbm_f; |
|
|
336 | |
319 | typedef struct psiconv_file { |
337 | typedef struct psiconv_file { |
320 | psiconv_file_type_t type; |
338 | psiconv_file_type_t type; |
321 | void *file; |
339 | void *file; |
322 | } *psiconv_file; |
340 | } *psiconv_file; |
323 | |
341 | |
324 | |
342 | |
325 | /* UID1 */ |
343 | /* UID1 */ |
326 | #define PSICONV_ID_PSION5 0x10000037 |
344 | #define PSICONV_ID_PSION5 0x10000037 |
327 | /* UID2 */ |
345 | /* UID2 */ |
328 | #define PSICONV_ID_DATA_FILE 0x1000006D |
346 | #define PSICONV_ID_DATA_FILE 0x1000006D |
|
|
347 | #define PSICONV_ID_MBM_FILE 0x10000042 |
329 | /* UID3 */ |
348 | /* UID3 */ |
330 | #define PSICONV_ID_WORD 0x1000007F |
349 | #define PSICONV_ID_WORD 0x1000007F |
331 | #define PSICONV_ID_TEXTED 0x10000085 |
350 | #define PSICONV_ID_TEXTED 0x10000085 |
332 | |
351 | |
333 | /* Section table ids */ |
352 | /* Section table ids */ |
… | |
… | |
395 | extern void psiconv_free_page_layout_section |
414 | extern void psiconv_free_page_layout_section |
396 | (psiconv_page_layout_section section); |
415 | (psiconv_page_layout_section section); |
397 | extern void psiconv_free_word_status_section |
416 | extern void psiconv_free_word_status_section |
398 | (psiconv_word_status_section section); |
417 | (psiconv_word_status_section section); |
399 | extern void psiconv_free_word_f(psiconv_word_f file); |
418 | extern void psiconv_free_word_f(psiconv_word_f file); |
|
|
419 | extern void psiconv_free_texted_f(psiconv_texted_f file); |
|
|
420 | extern void psiconv_free_paint_data_section(psiconv_paint_data_section section); |
|
|
421 | extern void psiconv_free_pictures(psiconv_pictures section); |
|
|
422 | extern void psiconv_free_mbm_jumptable_section |
|
|
423 | (psiconv_mbm_jumptable_section section); |
|
|
424 | extern void psiconv_free_mbm_f(psiconv_mbm_f file); |
400 | extern void psiconv_free_file(psiconv_file file); |
425 | extern void psiconv_free_file(psiconv_file file); |
401 | |
426 | |
402 | |
427 | |
403 | #endif /* def PSICONV_DATA_H */ |
428 | #endif /* def PSICONV_DATA_H */ |