4 * Copyright 1996 Ulrich Schmid
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
33 COLORREF sr_color
; /* color for scrollable region */
34 COLORREF nsr_color
; /* color for non scrollable region */
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) */
47 enum para_type
{para_normal_text
, para_debug_text
, para_bitmap
, para_metafile
};
49 typedef struct tagHlpFileParagraph
51 enum para_type cookie
;
65 unsigned pos
; /* 0: center, 1: left, 2: right */
74 } gfx
; /* for bitmaps and metafiles */
79 struct tagHlpFileParagraph
* next
;
82 typedef struct tagHlpFileMacro
85 struct tagHlpFileMacro
* next
;
88 typedef struct tagHlpFilePage
91 HLPFILE_PARAGRAPH
* first_paragraph
;
92 HLPFILE_MACRO
* first_macro
;
96 struct tagHlpFilePage
* next
;
97 struct tagHlpFilePage
* prev
;
102 struct tagHlpFileFile
* file
;
108 unsigned long offset
;
118 typedef struct tagHlpFileFile
123 HLPFILE_PAGE
* first_page
;
124 HLPFILE_MACRO
* first_macro
;
125 unsigned wContextLen
;
126 HLPFILE_CONTEXT
* Context
;
127 unsigned long contents_start
;
129 struct tagHlpFileFile
* prev
;
130 struct tagHlpFileFile
* next
;
134 unsigned short version
;
135 unsigned short flags
;
136 unsigned hasPhrases
; /* Phrases or PhrIndex/PhrImage */
145 HLPFILE_WINDOWINFO
* windows
;
148 HLPFILE
* HLPFILE_ReadHlpFile(LPCSTR lpszPath
);
149 HLPFILE_PAGE
* HLPFILE_Contents(HLPFILE
* hlpfile
);
150 HLPFILE_PAGE
* HLPFILE_PageByHash(HLPFILE
* hlpfile
, LONG lHash
);
151 HLPFILE_PAGE
* HLPFILE_PageByOffset(HLPFILE
* hlpfile
, LONG offset
);
152 LONG
HLPFILE_Hash(LPCSTR lpszContext
);
153 void HLPFILE_FreeLink(HLPFILE_LINK
* link
);
154 void HLPFILE_FreeHlpFile(HLPFILE
*);