Imported from antiword-0.30.tar.gz.
[antiword.git] / wordtypes.h
blobebe67c0b44d213b171cf3b6d9f09998ab6cc05a3
1 /*
2 * wordtypes.h
3 * Copyright (C) 1998,1999 A.J. van Os
5 * Description:
6 * Typedefs for the interpretation of MS Word files
7 */
9 #if !defined(__wordtypes_h)
10 #define __wordtypes_h 1
12 #if defined(__riscos)
13 typedef int off_t;
14 typedef struct diagram_tag {
15 draw_diag tInfo;
16 wimp_w tMainWindow;
17 wimp_w tScaleWindow;
18 int iScaleFactorCurr; /* In percentage */
19 int iScaleFactorTemp; /* In percentage */
20 int iMemorySize;
21 int iXleft; /* In DrawUnits */
22 int iYtop; /* In DrawUnits */
23 char szFilename[19+1];
24 } diagram_type;
25 #else
26 typedef struct diagram_tag {
27 FILE *pFile;
28 int iXleft; /* In DrawUnits */
29 int iYtop; /* In DrawUnits */
30 } diagram_type;
31 typedef unsigned char draw_fontref;
32 #endif /* __riscos */
34 typedef struct output_tag {
35 char *szStorage;
36 int iStorageSize;
37 int iNextFree;
38 int iStringWidth; /* In millipoints */
39 int iColour;
40 unsigned char ucFontstyle;
41 draw_fontref tFontRef;
42 unsigned char ucFontsize;
43 struct output_tag *pPrev;
44 struct output_tag *pNext;
45 } output_type;
47 /* Fonts */
48 typedef struct font_table_tag {
49 unsigned char ucWordFontnumber;
50 unsigned char ucFontstyle;
51 unsigned char ucInUse;
52 char szWordFontname[21];
53 char szOurFontname[33];
54 } font_table_type;
56 /* Options */
57 typedef struct options_tag {
58 int iParagraphBreak;
59 BOOL bAutofiletypeAllowed;
60 BOOL bUseOutlineFonts;
61 BOOL bUseColour;
62 BOOL bHideHiddenText;
63 int iPageHeight; /* In DrawUnits */
64 } options_type;
66 /* Property Set Storage */
67 typedef struct pps_tag {
68 int iSb;
69 int iSize;
70 } pps_type;
71 typedef struct pps_info_tag {
72 pps_type tWordDocument;
73 pps_type t0Table;
74 pps_type t1Table;
75 } pps_info_type;
77 /* Record of text block information */
78 typedef struct text_block_tag {
79 int iFileOffset;
80 int iTextOffset;
81 int iLength;
82 BOOL bUsesUnicode; /* Uses 16 bits per character */
83 } text_block_type;
85 /* Record of table-row block information */
86 typedef struct row_block_tag {
87 int iOffsetStart;
88 int iOffsetEnd;
89 int iColumnWidthSum; /* In twips */
90 short asColumnWidth[TABLE_COLUMN_MAX+1]; /* In twips */
91 unsigned char ucNumberOfColumns;
92 } row_block_type;
94 /* Linked list of style description information */
95 typedef struct style_block_tag {
96 int iOffset;
97 BOOL bInList;
98 BOOL bUnmarked;
99 short sLeftIndent; /* Left indentation in twips */
100 short sRightIndent; /* Right indentation in twips */
101 unsigned char ucStyle;
102 unsigned char ucAlignment;
103 unsigned char ucListType;
104 unsigned char ucListLevel;
105 unsigned char ucListCharacter;
106 } style_block_type;
107 typedef struct style_desc_tag {
108 style_block_type tInfo;
109 struct style_desc_tag *pNext;
110 } style_desc_type;
112 /* Linked list of font description information */
113 typedef struct font_block_tag {
114 int iOffset;
115 unsigned char ucFontnumber;
116 unsigned char ucFontsize;
117 unsigned char ucFontcolour;
118 unsigned char ucFontstyle;
119 } font_block_type;
120 typedef struct font_desc_tag {
121 font_block_type tInfo;
122 struct font_desc_tag *pNext;
123 } font_desc_type;
125 typedef enum text_info_tag {
126 text_success,
127 text_failure,
128 text_no_information
129 } text_info_enum;
131 typedef enum list_id_tag {
132 text_list,
133 footnote_list,
134 endnote_list,
135 end_of_lists
136 } list_id_enum;
138 typedef enum notetype_tag {
139 notetype_is_footnote,
140 notetype_is_endnote,
141 notetype_is_unknown
142 } notetype_enum;
144 #endif /* __wordtypes_h */