- Document completeness.
[wine.git] / programs / winhelp / winhelp.h
blob99e86ee13fdaabdd9e53d3efbb2a4d1e4c127d79
1 /*
2 * Help Viewer
4 * Copyright 1996 Ulrich Schmid
5 * Copyright 2002 Sylvain Petreolle <spetreolle@yahoo.fr>
6 * 2002 Eric Pouech
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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
29 #define SHADOW_DX 10
30 #define SHADOW_DY 10
31 #define BUTTON_CX 6
32 #define BUTTON_CY 6
34 #ifndef RC_INVOKED
36 #include <stdarg.h>
38 #include "hlpfile.h"
39 #include "windef.h"
40 #include "winbase.h"
41 #include "macro.h"
42 #include "winhelp_res.h"
44 typedef struct tagHelpLinePart
46 RECT rect;
47 enum {hlp_line_part_text, hlp_line_part_bitmap, hlp_line_part_metafile} cookie;
48 union
50 struct
52 LPCSTR lpsText;
53 HFONT hFont;
54 COLORREF color;
55 WORD wTextLen;
56 WORD wUnderline; /* 0 None, 1 simple, 2 double, 3 dotted */
57 } text;
58 struct
60 HBITMAP hBitmap;
61 } bitmap;
62 struct
64 HMETAFILE hMetaFile;
65 } metafile;
66 } u;
67 HLPFILE_LINK* link;
69 struct tagHelpLinePart *next;
70 } WINHELP_LINE_PART;
72 typedef struct tagHelpLine
74 RECT rect;
75 WINHELP_LINE_PART first_part;
76 struct tagHelpLine* next;
77 } WINHELP_LINE;
79 typedef struct tagHelpButton
81 HWND hWnd;
83 LPCSTR lpszID;
84 LPCSTR lpszName;
85 LPCSTR lpszMacro;
87 WPARAM wParam;
89 RECT rect;
91 struct tagHelpButton*next;
92 } WINHELP_BUTTON;
94 typedef struct tagWinHelp
96 LPCSTR lpszName;
98 WINHELP_BUTTON* first_button;
99 HLPFILE_PAGE* page;
100 WINHELP_LINE* first_line;
102 HWND hMainWnd;
103 HWND hButtonBoxWnd;
104 HWND hTextWnd;
105 HWND hShadowWnd;
106 HWND hHistoryWnd;
108 HFONT* fonts;
109 UINT fonts_len;
111 HCURSOR hArrowCur;
112 HCURSOR hHandCur;
114 HLPFILE_WINDOWINFO* info;
116 /* FIXME: for now it's a fixed size */
117 HLPFILE_PAGE* history[40];
118 unsigned histIndex;
119 HLPFILE_PAGE* back[40];
120 unsigned backIndex;
122 struct tagWinHelp* next;
123 } WINHELP_WINDOW;
125 typedef struct
127 UINT wVersion;
128 HANDLE hInstance;
129 HWND hPopupWnd;
130 UINT wStringTableOffset;
131 BOOL isBook;
132 WINHELP_WINDOW* active_win;
133 WINHELP_WINDOW* win_list;
134 } WINHELP_GLOBALS;
136 extern WINHELP_GLOBALS Globals;
138 BOOL WINHELP_CreateHelpWindowByHash(HLPFILE*, LONG, HLPFILE_WINDOWINFO*, int);
139 BOOL WINHELP_CreateHelpWindow(HLPFILE_PAGE*, HLPFILE_WINDOWINFO*, int);
140 INT WINHELP_MessageBoxIDS(UINT, UINT, WORD);
141 INT WINHELP_MessageBoxIDS_s(UINT, LPCSTR, UINT, WORD);
142 HLPFILE* WINHELP_LookupHelpFile(LPCSTR lpszFile);
143 HLPFILE_WINDOWINFO* WINHELP_GetWindowInfo(HLPFILE* hlpfile, LPCSTR name);
145 extern char MAIN_WIN_CLASS_NAME[];
146 extern char BUTTON_BOX_WIN_CLASS_NAME[];
147 extern char TEXT_WIN_CLASS_NAME[];
148 extern char SHADOW_WIN_CLASS_NAME[];
149 extern char HISTORY_WIN_CLASS_NAME[];
150 extern char STRING_BUTTON[];
151 extern char STRING_MENU_Xx[];
152 extern char STRING_DIALOG_TEST[];
153 #endif
155 /* Buttons */
156 #define WH_FIRST_BUTTON 500