4 * Copyright 1996 Ulrich Schmid
5 * Copyright 2002 Sylvain Petreolle <spetreolle@yahoo.fr>
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.
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.
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
23 #define MAX_LANGUAGE_NUMBER 255
24 #define MAX_PATHNAME_LEN 1024
25 #define MAX_STRING_LEN 255
27 #define INTERNAL_BORDER_WIDTH 5
28 #define POPUP_YDISTANCE 20
42 #include "winhelp_res.h"
44 typedef struct tagHelpLinePart
47 enum {hlp_line_part_text
, hlp_line_part_bitmap
, hlp_line_part_metafile
} cookie
;
56 WORD wUnderline
; /* 0 None, 1 simple, 2 double, 3 dotted */
70 struct tagHelpLinePart
*next
;
73 typedef struct tagHelpLine
76 WINHELP_LINE_PART first_part
;
77 struct tagHelpLine
* next
;
80 typedef struct tagHelpButton
92 struct tagHelpButton
*next
;
95 typedef struct tagWinHelp
99 WINHELP_BUTTON
* first_button
;
101 WINHELP_LINE
* first_line
;
117 HLPFILE_WINDOWINFO
* info
;
119 /* FIXME: for now it's a fixed size */
120 HLPFILE_PAGE
* history
[40];
122 HLPFILE_PAGE
* back
[40];
125 struct tagWinHelp
* next
;
128 #define DC_NOMSG 0x00000000
129 #define DC_MINMAX 0x00000001
130 #define DC_INITTERM 0x00000002
131 #define DC_JUMP 0x00000004
132 #define DC_ACTIVATE 0x00000008
133 #define DC_CALLBACKS 0x00000010
141 #define DW_STARTJUMP 6
144 #define DW_ACTIVATE 9
145 #define DW_CALLBACKS 10
147 typedef long (CALLBACK
*WINHELP_LDLLHandler
)(WORD
, LONG
, LONG
);
149 typedef struct tagDll
153 WINHELP_LDLLHandler handler
;
163 UINT wStringTableOffset
;
165 WINHELP_WINDOW
* active_win
;
166 WINHELP_WINDOW
* win_list
;
171 extern WINHELP_GLOBALS Globals
;
172 extern FARPROC Callbacks
[];
174 BOOL
WINHELP_CreateHelpWindowByHash(HLPFILE
*, LONG
, HLPFILE_WINDOWINFO
*, int);
175 BOOL
WINHELP_CreateHelpWindow(HLPFILE_PAGE
*, HLPFILE_WINDOWINFO
*, int);
176 INT
WINHELP_MessageBoxIDS(UINT
, UINT
, WORD
);
177 INT
WINHELP_MessageBoxIDS_s(UINT
, LPCSTR
, UINT
, WORD
);
178 HLPFILE
* WINHELP_LookupHelpFile(LPCSTR lpszFile
);
179 HLPFILE_WINDOWINFO
* WINHELP_GetWindowInfo(HLPFILE
* hlpfile
, LPCSTR name
);
181 extern const char MAIN_WIN_CLASS_NAME
[];
182 extern const char BUTTON_BOX_WIN_CLASS_NAME
[];
183 extern const char TEXT_WIN_CLASS_NAME
[];
184 extern const char SHADOW_WIN_CLASS_NAME
[];
185 extern const char HISTORY_WIN_CLASS_NAME
[];
186 extern const char STRING_BUTTON
[];
187 extern const char STRING_MENU_Xx
[];
188 extern const char STRING_DIALOG_TEST
[];
192 #define WH_FIRST_BUTTON 500