1/**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6#ifndef __HTMLHELP_H__
7#define __HTMLHELP_H__
8
9#include <_mingw_unicode.h>
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15#define HH_DISPLAY_TOPIC 0x0000
16#define HH_HELP_FINDER 0x0000
17#define HH_DISPLAY_TOC 0x0001
18#define HH_DISPLAY_INDEX 0x0002
19#define HH_DISPLAY_SEARCH 0x0003
20#define HH_SET_WIN_TYPE 0x0004
21#define HH_GET_WIN_TYPE 0x0005
22#define HH_GET_WIN_HANDLE 0x0006
23#define HH_ENUM_INFO_TYPE 0x0007
24#define HH_SET_INFO_TYPE 0x0008
25#define HH_SYNC 0x0009
26#define HH_RESERVED1 0x000A
27#define HH_RESERVED2 0x000B
28#define HH_RESERVED3 0x000C
29#define HH_KEYWORD_LOOKUP 0x000D
30#define HH_DISPLAY_TEXT_POPUP 0x000E
31#define HH_HELP_CONTEXT 0x000F
32#define HH_TP_HELP_CONTEXTMENU 0x0010
33#define HH_TP_HELP_WM_HELP 0x0011
34#define HH_CLOSE_ALL 0x0012
35#define HH_ALINK_LOOKUP 0x0013
36#define HH_GET_LAST_ERROR 0x0014
37#define HH_ENUM_CATEGORY 0x0015
38#define HH_ENUM_CATEGORY_IT 0x0016
39#define HH_RESET_IT_FILTER 0x0017
40#define HH_SET_INCLUSIVE_FILTER 0x0018
41#define HH_SET_EXCLUSIVE_FILTER 0x0019
42#define HH_INITIALIZE 0x001C
43#define HH_UNINITIALIZE 0x001D
44#define HH_SET_QUERYSERVICE 0x001E
45#define HH_PRETRANSLATEMESSAGE 0x00fd
46#define HH_SET_GLOBAL_PROPERTY 0x00fc
47#define HH_SAFE_DISPLAY_TOPIC 0x0020
48
49#define HHWIN_PROP_TAB_AUTOHIDESHOW (1 << 0)
50#define HHWIN_PROP_ONTOP (1 << 1)
51#define HHWIN_PROP_NOTITLEBAR (1 << 2)
52#define HHWIN_PROP_NODEF_STYLES (1 << 3)
53#define HHWIN_PROP_NODEF_EXSTYLES (1 << 4)
54#define HHWIN_PROP_TRI_PANE (1 << 5)
55#define HHWIN_PROP_NOTB_TEXT (1 << 6)
56#define HHWIN_PROP_POST_QUIT (1 << 7)
57#define HHWIN_PROP_AUTO_SYNC (1 << 8)
58#define HHWIN_PROP_TRACKING (1 << 9)
59#define HHWIN_PROP_TAB_SEARCH (1 << 10)
60#define HHWIN_PROP_TAB_HISTORY (1 << 11)
61#define HHWIN_PROP_TAB_FAVORITES (1 << 12)
62#define HHWIN_PROP_CHANGE_TITLE (1 << 13)
63#define HHWIN_PROP_NAV_ONLY_WIN (1 << 14)
64#define HHWIN_PROP_NO_TOOLBAR (1 << 15)
65#define HHWIN_PROP_MENU (1 << 16)
66#define HHWIN_PROP_TAB_ADVSEARCH (1 << 17)
67#define HHWIN_PROP_USER_POS (1 << 18)
68#define HHWIN_PROP_TAB_CUSTOM1 (1 << 19)
69#define HHWIN_PROP_TAB_CUSTOM2 (1 << 20)
70#define HHWIN_PROP_TAB_CUSTOM3 (1 << 21)
71#define HHWIN_PROP_TAB_CUSTOM4 (1 << 22)
72#define HHWIN_PROP_TAB_CUSTOM5 (1 << 23)
73#define HHWIN_PROP_TAB_CUSTOM6 (1 << 24)
74#define HHWIN_PROP_TAB_CUSTOM7 (1 << 25)
75#define HHWIN_PROP_TAB_CUSTOM8 (1 << 26)
76#define HHWIN_PROP_TAB_CUSTOM9 (1 << 27)
77#define HHWIN_TB_MARGIN (1 << 28)
78
79#define HHWIN_PARAM_PROPERTIES (1 << 1)
80#define HHWIN_PARAM_STYLES (1 << 2)
81#define HHWIN_PARAM_EXSTYLES (1 << 3)
82#define HHWIN_PARAM_RECT (1 << 4)
83#define HHWIN_PARAM_NAV_WIDTH (1 << 5)
84#define HHWIN_PARAM_SHOWSTATE (1 << 6)
85#define HHWIN_PARAM_INFOTYPES (1 << 7)
86#define HHWIN_PARAM_TB_FLAGS (1 << 8)
87#define HHWIN_PARAM_EXPANSION (1 << 9)
88#define HHWIN_PARAM_TABPOS (1 << 10)
89#define HHWIN_PARAM_TABORDER (1 << 11)
90#define HHWIN_PARAM_HISTORY_COUNT (1 << 12)
91#define HHWIN_PARAM_CUR_TAB (1 << 13)
92
93#define HHWIN_BUTTON_EXPAND (1 << 1)
94#define HHWIN_BUTTON_BACK (1 << 2)
95#define HHWIN_BUTTON_FORWARD (1 << 3)
96#define HHWIN_BUTTON_STOP (1 << 4)
97#define HHWIN_BUTTON_REFRESH (1 << 5)
98#define HHWIN_BUTTON_HOME (1 << 6)
99#define HHWIN_BUTTON_BROWSE_FWD (1 << 7)
100#define HHWIN_BUTTON_BROWSE_BCK (1 << 8)
101#define HHWIN_BUTTON_NOTES (1 << 9)
102#define HHWIN_BUTTON_CONTENTS (1 << 10)
103#define HHWIN_BUTTON_SYNC (1 << 11)
104#define HHWIN_BUTTON_OPTIONS (1 << 12)
105#define HHWIN_BUTTON_PRINT (1 << 13)
106#define HHWIN_BUTTON_INDEX (1 << 14)
107#define HHWIN_BUTTON_SEARCH (1 << 15)
108#define HHWIN_BUTTON_HISTORY (1 << 16)
109#define HHWIN_BUTTON_FAVORITES (1 << 17)
110#define HHWIN_BUTTON_JUMP1 (1 << 18)
111#define HHWIN_BUTTON_JUMP2 (1 << 19)
112#define HHWIN_BUTTON_ZOOM (1 << 20)
113#define HHWIN_BUTTON_TOC_NEXT (1 << 21)
114#define HHWIN_BUTTON_TOC_PREV (1 << 22)
115
116#define HHWIN_DEF_BUTTONS (HHWIN_BUTTON_EXPAND | HHWIN_BUTTON_BACK | HHWIN_BUTTON_OPTIONS | HHWIN_BUTTON_PRINT)
117
118#define IDTB_EXPAND 200
119#define IDTB_CONTRACT 201
120#define IDTB_STOP 202
121#define IDTB_REFRESH 203
122#define IDTB_BACK 204
123#define IDTB_HOME 205
124#define IDTB_SYNC 206
125#define IDTB_PRINT 207
126#define IDTB_OPTIONS 208
127#define IDTB_FORWARD 209
128#define IDTB_NOTES 210
129#define IDTB_BROWSE_FWD 211
130#define IDTB_BROWSE_BACK 212
131#define IDTB_CONTENTS 213
132#define IDTB_INDEX 214
133#define IDTB_SEARCH 215
134#define IDTB_HISTORY 216
135#define IDTB_FAVORITES 217
136#define IDTB_JUMP1 218
137#define IDTB_JUMP2 219
138#define IDTB_CUSTOMIZE 221
139#define IDTB_ZOOM 222
140#define IDTB_TOC_NEXT 223
141#define IDTB_TOC_PREV 224
142
143#define HHN_FIRST (0U-860U)
144#define HHN_LAST (0U-879U)
145
146#define HHN_NAVCOMPLETE (HHN_FIRST-0)
147#define HHN_TRACK (HHN_FIRST-1)
148#define HHN_WINDOW_CREATE (HHN_FIRST-2)
149
150  typedef struct tagHHN_NOTIFY {
151    NMHDR hdr;
152    PCSTR pszUrl;
153  } HHN_NOTIFY;
154
155  typedef struct tagHH_POPUP {
156    int cbStruct;
157    HINSTANCE hinst;
158    UINT idString;
159    LPCTSTR pszText;
160    POINT pt;
161    COLORREF clrForeground;
162    COLORREF clrBackground;
163    RECT rcMargins;
164    LPCTSTR pszFont;
165  } HH_POPUP;
166
167  typedef struct tagHH_AKLINK {
168    int cbStruct;
169    WINBOOL fReserved;
170    LPCTSTR pszKeywords;
171    LPCTSTR pszUrl;
172    LPCTSTR pszMsgText;
173    LPCTSTR pszMsgTitle;
174    LPCTSTR pszWindow;
175    WINBOOL fIndexOnFail;
176  } HH_AKLINK;
177
178  enum {
179    HHWIN_NAVTYPE_TOC,HHWIN_NAVTYPE_INDEX,HHWIN_NAVTYPE_SEARCH,HHWIN_NAVTYPE_FAVORITES,HHWIN_NAVTYPE_HISTORY,HHWIN_NAVTYPE_AUTHOR,
180    HHWIN_NAVTYPE_CUSTOM_FIRST = 11
181  };
182
183  enum {
184    IT_INCLUSIVE,IT_EXCLUSIVE,IT_HIDDEN
185  };
186
187  typedef struct tagHH_ENUM_IT {
188    int cbStruct;
189    int iType;
190    LPCSTR pszCatName;
191    LPCSTR pszITName;
192    LPCSTR pszITDescription;
193  } HH_ENUM_IT,*PHH_ENUM_IT;
194
195  typedef struct tagHH_ENUM_CAT {
196    int cbStruct;
197    LPCSTR pszCatName;
198    LPCSTR pszCatDescription;
199  } HH_ENUM_CAT,*PHH_ENUM_CAT;
200
201  typedef struct tagHH_SET_INFOTYPE {
202    int cbStruct;
203    LPCSTR pszCatName;
204    LPCSTR pszInfoTypeName;
205  } HH_SET_INFOTYPE,*PHH_SET_INFOTYPE;
206
207  typedef DWORD HH_INFOTYPE;
208  typedef HH_INFOTYPE *PHH_INFOTYPE;
209
210  enum {
211    HHWIN_NAVTAB_TOP,HHWIN_NAVTAB_LEFT,HHWIN_NAVTAB_BOTTOM
212  };
213
214#define HH_MAX_TABS 19
215
216  enum {
217    HH_TAB_CONTENTS,HH_TAB_INDEX,HH_TAB_SEARCH,HH_TAB_FAVORITES,HH_TAB_HISTORY,HH_TAB_AUTHOR,HH_TAB_CUSTOM_FIRST = 11,
218    HH_TAB_CUSTOM_LAST = HH_MAX_TABS
219  };
220
221#define HH_MAX_TABS_CUSTOM (HH_TAB_CUSTOM_LAST - HH_TAB_CUSTOM_FIRST + 1)
222
223#define HH_FTS_DEFAULT_PROXIMITY (-1)
224
225  typedef struct tagHH_FTS_QUERY {
226    int cbStruct;
227    WINBOOL fUniCodeStrings;
228    LPCTSTR pszSearchQuery;
229    LONG iProximity;
230    WINBOOL fStemmedSearch;
231    WINBOOL fTitleOnly;
232    WINBOOL fExecute;
233    LPCTSTR pszWindow;
234  } HH_FTS_QUERY;
235
236  typedef struct tagHH_WINTYPE {
237    int cbStruct;
238    WINBOOL fUniCodeStrings;
239    LPCTSTR pszType;
240    DWORD fsValidMembers;
241    DWORD fsWinProperties;
242    LPCTSTR pszCaption;
243    DWORD dwStyles;
244    DWORD dwExStyles;
245    RECT rcWindowPos;
246    int nShowState;
247    HWND hwndHelp;
248    HWND hwndCaller;
249    HH_INFOTYPE *paInfoTypes;
250    HWND hwndToolBar;
251    HWND hwndNavigation;
252    HWND hwndHTML;
253    int iNavWidth;
254    RECT rcHTML;
255    LPCTSTR pszToc;
256    LPCTSTR pszIndex;
257    LPCTSTR pszFile;
258    LPCTSTR pszHome;
259    DWORD fsToolBarFlags;
260    WINBOOL fNotExpanded;
261    int curNavType;
262    int tabpos;
263    int idNotify;
264    BYTE tabOrder[HH_MAX_TABS + 1];
265    int cHistory;
266    LPCTSTR pszJump1;
267    LPCTSTR pszJump2;
268    LPCTSTR pszUrlJump1;
269    LPCTSTR pszUrlJump2;
270    RECT rcMinSize;
271    int cbInfoTypes;
272    LPCTSTR pszCustomTabs;
273  } HH_WINTYPE,*PHH_WINTYPE;
274
275  enum {
276    HHACT_TAB_CONTENTS,HHACT_TAB_INDEX,HHACT_TAB_SEARCH,HHACT_TAB_HISTORY,HHACT_TAB_FAVORITES,HHACT_EXPAND,HHACT_CONTRACT,
277    HHACT_BACK,HHACT_FORWARD,HHACT_STOP,HHACT_REFRESH,HHACT_HOME,HHACT_SYNC,HHACT_OPTIONS,HHACT_PRINT,HHACT_HIGHLIGHT,HHACT_CUSTOMIZE,
278    HHACT_JUMP1,HHACT_JUMP2,HHACT_ZOOM,HHACT_TOC_NEXT,HHACT_TOC_PREV,HHACT_NOTES,HHACT_LAST_ENUM
279  };
280
281  typedef struct tagHHNTRACK {
282    NMHDR hdr;
283    PCSTR pszCurUrl;
284    int idAction;
285    HH_WINTYPE *phhWinType;
286  } HHNTRACK;
287
288#define HtmlHelp __MINGW_NAME_AW(HtmlHelp)
289
290  HWND WINAPI HtmlHelpA(HWND hwndCaller,LPCSTR pszFile,UINT uCommand,DWORD_PTR dwData);
291  HWND WINAPI HtmlHelpW(HWND hwndCaller,LPCWSTR pszFile,UINT uCommand,DWORD_PTR dwData);
292
293#define ATOM_HTMLHELP_API_ANSI (LPTSTR)((DWORD)((WORD)(14)))
294#define ATOM_HTMLHELP_API_UNICODE (LPTSTR)((DWORD)((WORD)(15)))
295
296  typedef enum tagHH_GPROPID {
297    HH_GPROPID_SINGLETHREAD=1,HH_GPROPID_TOOLBAR_MARGIN=2,HH_GPROPID_UI_LANGUAGE=3,HH_GPROPID_CURRENT_SUBSET=4,HH_GPROPID_CONTENT_LANGUAGE=5
298  } HH_GPROPID;
299
300#ifdef __oaidl_h__
301#pragma pack(push,8)
302
303  typedef struct tagHH_GLOBAL_PROPERTY {
304    HH_GPROPID id;
305    VARIANT var;
306  } HH_GLOBAL_PROPERTY;
307
308#pragma pack(pop)
309#endif
310
311#ifdef __cplusplus
312}
313#endif
314#endif
315