wined3d: Remove fake nvidia card in GetAdapterIdentifier.
[wine/dibdrv.git] / programs / winhelp / winhelp.h
blob24eb10f5eadb75ccc541aa733ed3b67326e15bd4
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
23 #define MAX_LANGUAGE_NUMBER 255
24 #define MAX_STRING_LEN 255
26 #define INTERNAL_BORDER_WIDTH 5
27 #define POPUP_YDISTANCE 20
28 #define SHADOW_DX 10
29 #define SHADOW_DY 10
30 #define BUTTON_CX 6
31 #define BUTTON_CY 6
33 #ifndef RC_INVOKED
35 #include <stdarg.h>
37 #include "hlpfile.h"
38 #include "windef.h"
39 #include "winbase.h"
40 #include "macro.h"
41 #include "winhelp_res.h"
43 typedef struct tagHelpLinePart
45 RECT rect;
46 enum {hlp_line_part_text, hlp_line_part_bitmap, hlp_line_part_metafile} cookie;
47 union
49 struct
51 LPCSTR lpsText;
52 HFONT hFont;
53 COLORREF color;
54 WORD wTextLen;
55 WORD wUnderline; /* 0 None, 1 simple, 2 double, 3 dotted */
56 } text;
57 struct
59 HBITMAP hBitmap;
60 } bitmap;
61 struct
63 HMETAFILE hMetaFile;
64 INT mm;
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 HBRUSH hBrush;
116 HLPFILE_WINDOWINFO* info;
118 /* FIXME: for now it's a fixed size */
119 HLPFILE_PAGE* history[40];
120 unsigned histIndex;
121 HLPFILE_PAGE* back[40];
122 unsigned backIndex;
124 struct tagWinHelp* next;
125 } WINHELP_WINDOW;
127 #define DC_NOMSG 0x00000000
128 #define DC_MINMAX 0x00000001
129 #define DC_INITTERM 0x00000002
130 #define DC_JUMP 0x00000004
131 #define DC_ACTIVATE 0x00000008
132 #define DC_CALLBACKS 0x00000010
134 #define DW_NOTUSED 0
135 #define DW_WHATMSG 1
136 #define DW_MINMAX 2
137 #define DW_SIZE 3
138 #define DW_INIT 4
139 #define DW_TERM 5
140 #define DW_STARTJUMP 6
141 #define DW_ENDJUMP 7
142 #define DW_CHGFILE 8
143 #define DW_ACTIVATE 9
144 #define DW_CALLBACKS 10
146 typedef long (CALLBACK *WINHELP_LDLLHandler)(WORD, LONG, LONG);
148 typedef struct tagDll
150 HANDLE hLib;
151 const char* name;
152 WINHELP_LDLLHandler handler;
153 DWORD class;
154 struct tagDll* next;
155 } WINHELP_DLL;
157 typedef struct
159 UINT wVersion;
160 HANDLE hInstance;
161 HWND hPopupWnd;
162 UINT wStringTableOffset;
163 BOOL isBook;
164 WINHELP_WINDOW* active_win;
165 WINHELP_WINDOW* win_list;
166 WNDPROC button_proc;
167 WINHELP_DLL* dlls;
168 } WINHELP_GLOBALS;
170 extern WINHELP_GLOBALS Globals;
171 extern FARPROC Callbacks[];
173 BOOL WINHELP_CreateHelpWindowByHash(HLPFILE*, LONG, HLPFILE_WINDOWINFO*, int);
174 BOOL WINHELP_CreateHelpWindowByMap(HLPFILE*, LONG, HLPFILE_WINDOWINFO*, int);
175 BOOL WINHELP_CreateHelpWindow(HLPFILE_PAGE*, HLPFILE_WINDOWINFO*, int);
176 BOOL WINHELP_GetOpenFileName(LPSTR, int);
177 INT WINHELP_MessageBoxIDS(UINT, UINT, WORD);
178 INT WINHELP_MessageBoxIDS_s(UINT, LPCSTR, UINT, WORD);
179 HLPFILE* WINHELP_LookupHelpFile(LPCSTR lpszFile);
180 HLPFILE_WINDOWINFO* WINHELP_GetWindowInfo(HLPFILE* hlpfile, LPCSTR name);
182 extern const char MAIN_WIN_CLASS_NAME[];
183 extern const char BUTTON_BOX_WIN_CLASS_NAME[];
184 extern const char TEXT_WIN_CLASS_NAME[];
185 extern const char SHADOW_WIN_CLASS_NAME[];
186 extern const char HISTORY_WIN_CLASS_NAME[];
187 extern const char STRING_BUTTON[];
188 extern const char STRING_MENU_Xx[];
189 extern const char STRING_DIALOG_TEST[];
190 #endif
192 /* Buttons */
193 #define WH_FIRST_BUTTON 500