crypt32: Partially implement decoding of signed messages.
[wine/testsucceed.git] / programs / winhelp / hlpfile.h
blob4d62cdd22ed4ab983c35a366a83b14750bb92a3e
1 /*
2 * Help Viewer
4 * Copyright 1996 Ulrich Schmid
5 * 2002 Eric Pouech
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 struct tagHelpFile;
24 typedef struct
26 char type[10];
27 char name[9];
28 char caption[51];
29 POINT origin;
30 SIZE size;
31 int style;
32 DWORD win_style;
33 COLORREF sr_color; /* color for scrollable region */
34 COLORREF nsr_color; /* color for non scrollable region */
35 } HLPFILE_WINDOWINFO;
37 typedef struct
39 enum {hlp_link_link, hlp_link_popup, hlp_link_macro} cookie;
40 LPCSTR lpszString; /* name of the file to for the link (NULL if same file) */
41 LONG lHash; /* topic index */
42 unsigned bClrChange : 1, /* true if the link is green & underlined */
43 wRefCount; /* number of internal references to this object */
44 unsigned window; /* window number for displaying the link (-1 is current) */
45 } HLPFILE_LINK;
47 enum para_type {para_normal_text, para_debug_text, para_bitmap, para_metafile};
49 typedef struct tagHlpFileParagraph
51 enum para_type cookie;
53 union
55 struct
57 LPSTR lpszText;
58 unsigned wFont;
59 unsigned wIndent;
60 unsigned wHSpace;
61 unsigned wVSpace;
62 } text;
63 struct
65 unsigned pos; /* 0: center, 1: left, 2: right */
66 union
68 struct
70 HBITMAP hBitmap;
71 } bmp;
72 METAFILEPICT mfp;
73 } u;
74 } gfx; /* for bitmaps and metafiles */
75 } u;
77 HLPFILE_LINK* link;
79 struct tagHlpFileParagraph* next;
80 } HLPFILE_PARAGRAPH;
82 typedef struct tagHlpFileMacro
84 LPCSTR lpszMacro;
85 struct tagHlpFileMacro* next;
86 } HLPFILE_MACRO;
88 typedef struct tagHlpFilePage
90 LPSTR lpszTitle;
91 HLPFILE_PARAGRAPH* first_paragraph;
92 HLPFILE_MACRO* first_macro;
94 unsigned wNumber;
95 unsigned offset;
96 struct tagHlpFilePage* next;
97 struct tagHlpFilePage* prev;
99 DWORD browse_bwd;
100 DWORD browse_fwd;
102 struct tagHlpFileFile* file;
103 } HLPFILE_PAGE;
105 typedef struct
107 LONG lHash;
108 unsigned long offset;
109 } HLPFILE_CONTEXT;
111 typedef struct
113 LONG lMap;
114 unsigned long offset;
115 } HLPFILE_MAP;
117 typedef struct
119 LOGFONT LogFont;
120 HFONT hFont;
121 COLORREF color;
122 } HLPFILE_FONT;
124 typedef struct tagHlpFileFile
126 LPSTR lpszPath;
127 LPSTR lpszTitle;
128 LPSTR lpszCopyright;
129 HLPFILE_PAGE* first_page;
130 HLPFILE_MACRO* first_macro;
131 unsigned wContextLen;
132 HLPFILE_CONTEXT* Context;
133 unsigned wMapLen;
134 HLPFILE_MAP* Map;
135 unsigned long contents_start;
137 struct tagHlpFileFile* prev;
138 struct tagHlpFileFile* next;
140 unsigned wRefCount;
142 unsigned short version;
143 unsigned short flags;
144 unsigned hasPhrases; /* Phrases or PhrIndex/PhrImage */
146 unsigned numBmps;
147 HBITMAP* bmps;
149 unsigned numFonts;
150 HLPFILE_FONT* fonts;
152 unsigned numWindows;
153 HLPFILE_WINDOWINFO* windows;
154 } HLPFILE;
156 HLPFILE* HLPFILE_ReadHlpFile(LPCSTR lpszPath);
157 HLPFILE_PAGE* HLPFILE_Contents(HLPFILE* hlpfile);
158 HLPFILE_PAGE* HLPFILE_PageByHash(HLPFILE* hlpfile, LONG lHash);
159 HLPFILE_PAGE* HLPFILE_PageByMap(HLPFILE* hlpfile, LONG lMap);
160 HLPFILE_PAGE* HLPFILE_PageByOffset(HLPFILE* hlpfile, LONG offset);
161 LONG HLPFILE_Hash(LPCSTR lpszContext);
162 void HLPFILE_FreeLink(HLPFILE_LINK* link);
163 void HLPFILE_FreeHlpFile(HLPFILE*);