ReactOS 0.4.15-dev-7906-g1b85a5f
hlpfile.h
Go to the documentation of this file.
1/*
2 * Help Viewer
3 *
4 * Copyright 1996 Ulrich Schmid
5 * 2002, 2008 Eric Pouech
6 * 2007 Kirill K. Smirnov
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 */
22
23#pragma once
24
25struct tagHelpFile;
26
27typedef struct
28{
29 char type[10];
30 char name[9];
31 char caption[51];
34 int style;
36 COLORREF sr_color; /* color for scrollable region */
37 COLORREF nsr_color; /* color for non scrollable region */
39
40typedef struct tagHlpFileLink
41{
43 LPCSTR string; /* name of the file to for the link (NULL if same file) */
44 LONG hash; /* topic index */
45 unsigned bClrChange : 1; /* true if the link is green & underlined */
46 unsigned bHotSpot : 1; /* true if the link is an hotspot (actually HLPFILE_HOTSPOTLINK) */
47 unsigned window; /* window number for displaying the link (-1 is current) */
52
54{
56 unsigned x;
57 unsigned y;
58 unsigned width;
59 unsigned height;
61
62typedef struct tagHlpFileMacro
63{
67
68typedef struct tagHlpFilePage
69{
72
74
75 unsigned wNumber;
76 unsigned offset;
80
83
86
87typedef struct
88{
90 unsigned long offset;
92
93typedef struct
94{
99
100typedef struct tagHlpFileFile
101{
113 unsigned wMapLen;
115 unsigned wTOMapLen;
116 unsigned* TOMap;
117 unsigned long contents_start;
118
121
122 unsigned wRefCount;
123
124 unsigned short version;
125 unsigned short flags;
126 unsigned short charset;
127 unsigned short tbsize; /* topic block size */
128 unsigned short dsize; /* decompress size */
130 BOOL hasPhrases; /* file has |Phrases */
131 BOOL hasPhrases40; /* file has |PhrIndex/|PhrImage */
135
139
140 unsigned numBmps;
142
143 unsigned numFonts;
145
146 unsigned numWindows;
149
152
154
155 int scale;
158
159/*
160 * Compare function type for HLPFILE_BPTreeSearch function.
161 *
162 * PARAMS
163 * p [I] pointer to testing block (key + data)
164 * key [I] pointer to key value to look for
165 * leaf [I] whether this function called for index of leaf page
166 * next [O] pointer to pointer to next block
167 */
168typedef int (*HLPFILE_BPTreeCompare)(void *p, const void *key,
169 int leaf, void **next);
170
171/*
172 * Callback function type for HLPFILE_BPTreeEnum function.
173 *
174 * PARAMS
175 * p [I] pointer to data block
176 * next [O] pointer to pointer to next block
177 * cookie [IO] cookie data
178 */
179typedef void (*HLPFILE_BPTreeCallback)(void *p, void **next, void *cookie);
180
182HLPFILE_PAGE* HLPFILE_PageByHash(HLPFILE* hlpfile, LONG lHash, ULONG* relative);
183HLPFILE_PAGE* HLPFILE_PageByMap(HLPFILE* hlpfile, LONG lMap, ULONG* relative);
185LONG HLPFILE_Hash(LPCSTR lpszContext);
187
189
190struct RtfData {
192 char* data; /* RTF stream start */
193 char* ptr; /* current position in stream */
194 unsigned allocated; /* overall allocated size */
195 unsigned char_pos; /* current char position (in richedit) */
196 char* where; /* pointer to feed back richedit */
197 unsigned font_scale; /* how to scale fonts */
201 unsigned relative; /* offset within page to lookup for */
202 unsigned char_pos_rel; /* char_pos correspondinf to relative */
203};
204
206 unsigned font_scale, unsigned relative);
207
208#define HLP_DISPLAY30 0x01 /* version 3.0 displayable information */
209#define HLP_TOPICHDR 0x02 /* topic header information */
210#define HLP_DISPLAY 0x20 /* version 3.1 displayable information */
211#define HLP_TABLE 0x23 /* version 3.1 table */
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLfloat GLfloat p
Definition: glext.h:8902
GLintptr offset
Definition: glext.h:5920
BOOL HLPFILE_BrowsePage(HLPFILE_PAGE *, struct RtfData *rd, unsigned font_scale, unsigned relative)
Definition: hlpfile.c:1703
struct tagHlpFileMacro HLPFILE_MACRO
HLPFILE_PAGE * HLPFILE_PageByMap(HLPFILE *hlpfile, LONG lMap, ULONG *relative)
Definition: hlpfile.c:467
struct tagHlpFilePage HLPFILE_PAGE
HLPFILE_PAGE * HLPFILE_PageByHash(HLPFILE *hlpfile, LONG lHash, ULONG *relative)
Definition: hlpfile.c:437
LONG HLPFILE_Hash(LPCSTR lpszContext)
Definition: hlpfile.c:547
void HLPFILE_BPTreeEnum(BYTE *, HLPFILE_BPTreeCallback cb, void *cookie)
Definition: hlpfile.c:125
struct tagHlpFileFile HLPFILE
HLPFILE_PAGE * HLPFILE_PageByOffset(HLPFILE *hlpfile, LONG offset, ULONG *relative)
Definition: hlpfile.c:369
struct tagHlpFileLink HLPFILE_LINK
void HLPFILE_FreeHlpFile(HLPFILE *)
Definition: hlpfile.c:2297
HLPFILE * HLPFILE_ReadHlpFile(LPCSTR lpszPath)
Definition: hlpfile.c:2759
struct tagHlpFileHotSpotLink HLPFILE_HOTSPOTLINK
int(* HLPFILE_BPTreeCompare)(void *p, const void *key, int leaf, void **next)
Definition: hlpfile.h:168
void(* HLPFILE_BPTreeCallback)(void *p, void **next, void *cookie)
Definition: hlpfile.h:179
static HBITMAP
Definition: button.c:44
static HICON
Definition: imagelist.c:84
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
static HMODULE MODULEINFO DWORD cb
Definition: module.c:33
unsigned int UINT
Definition: ndis.h:50
long LONG
Definition: pedump.c:60
static unsigned __int64 next
Definition: rand_nt.c:6
int rd
Definition: scanf.h:134
COLORREF color
Definition: hlpfile.h:97
HFONT hFont
Definition: hlpfile.h:96
LOGFONTA LogFont
Definition: hlpfile.h:95
LONG lMap
Definition: hlpfile.h:89
unsigned long offset
Definition: hlpfile.h:90
COLORREF nsr_color
Definition: hlpfile.h:37
COLORREF sr_color
Definition: hlpfile.h:36
char * where
Definition: hlpfile.h:196
unsigned char_pos_rel
Definition: hlpfile.h:202
unsigned char_pos
Definition: hlpfile.h:195
HLPFILE_LINK * current_link
Definition: hlpfile.h:199
unsigned font_scale
Definition: hlpfile.h:197
char * data
Definition: hlpfile.h:192
BOOL force_color
Definition: hlpfile.h:200
BOOL in_text
Definition: hlpfile.h:191
HLPFILE_LINK * first_link
Definition: hlpfile.h:198
char * ptr
Definition: hlpfile.h:193
unsigned relative
Definition: hlpfile.h:201
unsigned allocated
Definition: hlpfile.h:194
Definition: cookie.c:34
Definition: copy.c:22
Definition: name.c:39
UINT topic_maplen
Definition: hlpfile.h:138
unsigned * phrases_offsets
Definition: hlpfile.h:133
struct tagHlpFileFile * prev
Definition: hlpfile.h:119
LPSTR lpszTitle
Definition: hlpfile.h:105
HLPFILE_PAGE * first_page
Definition: hlpfile.h:107
HLPFILE_PAGE * last_page
Definition: hlpfile.h:108
unsigned wTOMapLen
Definition: hlpfile.h:115
unsigned long contents_start
Definition: hlpfile.h:117
HLPFILE_WINDOWINFO * windows
Definition: hlpfile.h:147
unsigned wMapLen
Definition: hlpfile.h:113
unsigned * TOMap
Definition: hlpfile.h:116
HICON hIcon
Definition: hlpfile.h:148
BYTE * kwbtree
Definition: hlpfile.h:111
UINT file_buffer_size
Definition: hlpfile.h:103
HLPFILE_MACRO * first_macro
Definition: hlpfile.h:109
HLPFILE_MAP * Map
Definition: hlpfile.h:114
unsigned short charset
Definition: hlpfile.h:126
BYTE * Context
Definition: hlpfile.h:110
COLORREF popup_color
Definition: hlpfile.h:151
BYTE * kwdata
Definition: hlpfile.h:112
unsigned numWindows
Definition: hlpfile.h:146
BOOL has_popup_color
Definition: hlpfile.h:150
LPSTR lpszCopyright
Definition: hlpfile.h:106
LPSTR lpszPath
Definition: hlpfile.h:104
BOOL compressed
Definition: hlpfile.h:129
unsigned numBmps
Definition: hlpfile.h:140
BOOL hasPhrases40
Definition: hlpfile.h:131
BYTE * file_buffer
Definition: hlpfile.h:102
char * phrases_buffer
Definition: hlpfile.h:134
unsigned short version
Definition: hlpfile.h:124
UINT num_phrases
Definition: hlpfile.h:132
unsigned short tbsize
Definition: hlpfile.h:127
struct tagHlpFileFile * next
Definition: hlpfile.h:120
unsigned numFonts
Definition: hlpfile.h:143
BYTE ** topic_map
Definition: hlpfile.h:136
unsigned wRefCount
Definition: hlpfile.h:122
unsigned short flags
Definition: hlpfile.h:125
HLPFILE_FONT * fonts
Definition: hlpfile.h:144
HBITMAP * bmps
Definition: hlpfile.h:141
BYTE * topic_end
Definition: hlpfile.h:137
LPSTR help_on_file
Definition: hlpfile.h:153
unsigned short dsize
Definition: hlpfile.h:128
BOOL hasPhrases
Definition: hlpfile.h:130
LPCSTR lpszMacro
Definition: hlpfile.h:64
struct tagHlpFileMacro * next
Definition: hlpfile.h:65
HLPFILE_LINK * first_link
Definition: hlpfile.h:73
HLPFILE_MACRO * first_macro
Definition: hlpfile.h:71
DWORD reference
Definition: hlpfile.h:77
unsigned wNumber
Definition: hlpfile.h:75
struct tagHlpFileFile * file
Definition: hlpfile.h:84
unsigned offset
Definition: hlpfile.h:76
DWORD browse_bwd
Definition: hlpfile.h:81
DWORD browse_fwd
Definition: hlpfile.h:82
struct tagHlpFilePage * prev
Definition: hlpfile.h:79
struct tagHlpFilePage * next
Definition: hlpfile.h:78
LPSTR lpszTitle
Definition: hlpfile.h:70
uint32_t ULONG
Definition: typedefs.h:59
DWORD COLORREF
Definition: windef.h:300
const char * LPCSTR
Definition: xmlstorage.h:183
char * LPSTR
Definition: xmlstorage.h:182
unsigned char BYTE
Definition: xxhash.c:193