Fixed typo in BITMAPV4HEADER stucture.
[wine/wine64.git] / programs / winhelp / winhelp.h
blobe6cd58df63c1af0d6d5cb623a6bff6a0c8dd48fc
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 "hlpfile.h"
37 #include "macro.h"
38 #include "winhelp_res.h"
40 typedef struct tagHelpLinePart
42 RECT rect;
43 enum {hlp_line_part_text, hlp_line_part_image} cookie;
44 union
46 struct
48 LPCSTR lpsText;
49 HFONT hFont;
50 COLORREF color;
51 WORD wTextLen;
52 WORD wUnderline; /* 0 None, 1 simple, 2 double, 3 dotted */
53 } text;
54 struct
56 HBITMAP hBitmap;
57 } image;
58 } u;
60 struct
62 LPCSTR lpszPath;
63 LONG lHash;
64 BOOL bPopup;
65 } link;
67 struct tagHelpLinePart *next;
68 } WINHELP_LINE_PART;
70 typedef struct tagHelpLine
72 RECT rect;
73 WINHELP_LINE_PART first_part;
74 struct tagHelpLine* next;
75 } WINHELP_LINE;
77 typedef struct tagHelpButton
79 HWND hWnd;
81 LPCSTR lpszID;
82 LPCSTR lpszName;
83 LPCSTR lpszMacro;
85 WPARAM wParam;
87 RECT rect;
89 struct tagHelpButton*next;
90 } WINHELP_BUTTON;
92 typedef struct tagWinHelp
94 LPCSTR lpszName;
96 WINHELP_BUTTON* first_button;
97 HLPFILE_PAGE* page;
98 WINHELP_LINE* first_line;
100 HWND hMainWnd;
101 HWND hButtonBoxWnd;
102 HWND hTextWnd;
103 HWND hShadowWnd;
105 HFONT* fonts;
106 UINT fonts_len;
108 HCURSOR hArrowCur;
109 HCURSOR hHandCur;
111 struct tagWinHelp* next;
112 } WINHELP_WINDOW;
114 typedef struct
116 UINT wVersion;
117 HANDLE hInstance;
118 HWND hPopupWnd;
119 UINT wStringTableOffset;
120 WINHELP_WINDOW* active_win;
121 WINHELP_WINDOW* win_list;
122 } WINHELP_GLOBALS;
124 extern WINHELP_GLOBALS Globals;
126 BOOL WINHELP_CreateHelpWindowByHash(LPCSTR, LONG, LPCSTR, BOOL, HWND, LPPOINT, INT);
127 BOOL WINHELP_CreateHelpWindowByPage(HLPFILE_PAGE*, LPCSTR, BOOL, HWND, LPPOINT, INT);
128 INT WINHELP_MessageBoxIDS(UINT, UINT, WORD);
129 INT WINHELP_MessageBoxIDS_s(UINT, LPCSTR, UINT, WORD);
131 extern CHAR MAIN_WIN_CLASS_NAME[];
132 extern CHAR BUTTON_BOX_WIN_CLASS_NAME[];
133 extern CHAR TEXT_WIN_CLASS_NAME[];
134 extern CHAR SHADOW_WIN_CLASS_NAME[];
135 extern CHAR STRING_BUTTON[];
136 extern CHAR STRING_MENU_Xx[];
137 extern CHAR STRING_DIALOG_TEST[];
138 #endif
140 /* Buttons */
141 #define WH_FIRST_BUTTON 500