ReactOS 0.4.15-dev-5666-gc548b97
winhelp.h
Go to the documentation of this file.
1/*
2 * Help Viewer
3 *
4 * Copyright 1996 Ulrich Schmid
5 * Copyright 2002 Sylvain Petreolle <spetreolle@yahoo.fr>
6 * 2002 Eric Pouech
7 *
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.
12 *
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.
17 *
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
21 */
22
23#pragma once
24
25#define MAX_LANGUAGE_NUMBER 255
26#define MAX_STRING_LEN 255
27
28#define INTERNAL_BORDER_WIDTH 5
29#define POPUP_YDISTANCE 20
30#define SHADOW_DX 10
31#define SHADOW_DY 10
32#define BUTTON_CX 6
33#define BUTTON_CY 6
34
35#ifndef RC_INVOKED
36
37#include <stdarg.h>
38
39#include "hlpfile.h"
40#include "windef.h"
41#include "winbase.h"
42#include "macro.h"
43#include "winhelp_res.h"
44
45typedef struct tagHelpButton
46{
48
52
54
56
59
60typedef struct
61{
66
67typedef struct tagPageSet
68{
69 /* FIXME: for now it's a fixed size */
71 unsigned index;
73
74typedef struct tagWinHelp
75{
76 unsigned ref_count;
79
82
84
87
89
90 HBRUSH hBrush;
91
93
95 unsigned font_scale; /* 0 = small, 1 = normal, 2 = large */
96
99
100#define DC_NOMSG 0x00000000
101#define DC_MINMAX 0x00000001
102#define DC_INITTERM 0x00000002
103#define DC_JUMP 0x00000004
104#define DC_ACTIVATE 0x00000008
105#define DC_CALLBACKS 0x00000010
106
107#define DW_NOTUSED 0
108#define DW_WHATMSG 1
109#define DW_MINMAX 2
110#define DW_SIZE 3
111#define DW_INIT 4
112#define DW_TERM 5
113#define DW_STARTJUMP 6
114#define DW_ENDJUMP 7
115#define DW_CHGFILE 8
116#define DW_ACTIVATE 9
117#define DW_CALLBACKS 10
118
120
121typedef struct tagDll
122{
124 const char* name;
126 DWORD class;
127 struct tagDll* next;
129
130typedef struct
131{
143
144extern const struct winhelp_callbacks
145{
146 WORD (WINAPI *GetFSError)(void);
147 HANDLE (WINAPI *HfsOpenSz)(LPSTR,BYTE);
148 WORD (WINAPI *RcCloseHfs)(HANDLE);
150 HANDLE (WINAPI *RcCloseHf)(HANDLE);
151 LONG (WINAPI *LcbReadHf)(HANDLE,BYTE*,LONG);
152 LONG (WINAPI *LTellHf)(HANDLE);
154 BOOL (WINAPI *FEofHf)(HANDLE);
155 LONG (WINAPI *LcbSizeHf)(HANDLE);
156 BOOL (WINAPI *FAccessHfs)(HANDLE,LPSTR,BYTE);
160 void (WINAPI *ErrorSz)(LPSTR);
164
166
178
179extern const char MAIN_WIN_CLASS_NAME[];
180extern const char BUTTON_BOX_WIN_CLASS_NAME[];
181extern const char TEXT_WIN_CLASS_NAME[];
182extern const char SHADOW_WIN_CLASS_NAME[];
183extern const char HISTORY_WIN_CLASS_NAME[];
184extern const char STRING_BUTTON[];
185extern const char STRING_MENU_Xx[];
186extern const char STRING_DIALOG_TEST[];
187#endif
188
189/* Buttons */
190#define WH_FIRST_BUTTON 500
#define API
Definition: atlimage.h:848
Definition: _set.h:50
#define CALLBACK
Definition: compat.h:35
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
#define ULONG_PTR
Definition: config.h:101
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
static const WCHAR ErrorW[]
Definition: global.c:39
static real win[4][36]
unsigned int ULONG
Definition: retypes.h:1
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
static LRESULT GetInfo(const CodecInfo *pi, ICINFO *icinfo, DWORD dwSize)
Definition: msrle32.c:1168
unsigned int UINT
Definition: ndis.h:50
long LONG
Definition: pedump.c:60
HANDLE hInstance
Definition: winhelp.h:133
WNDPROC button_proc
Definition: winhelp.h:138
WINHELP_WINDOW * active_popup
Definition: winhelp.h:136
WINHELP_DLL * dlls
Definition: winhelp.h:139
WINHELP_PAGESET history
Definition: winhelp.h:140
WINHELP_WINDOW * active_win
Definition: winhelp.h:135
WINHELP_WINDOW * win_list
Definition: winhelp.h:137
HFONT hButtonFont
Definition: winhelp.h:141
ULONG relative
Definition: winhelp.h:64
HLPFILE_WINDOWINFO * wininfo
Definition: winhelp.h:63
HLPFILE_PAGE * page
Definition: winhelp.h:62
Definition: name.c:39
HANDLE hLib
Definition: winhelp.h:123
const char * name
Definition: winhelp.h:124
struct tagDll * next
Definition: winhelp.h:127
WINHELP_LDLLHandler handler
Definition: winhelp.h:125
LPCSTR lpszMacro
Definition: winhelp.h:51
struct tagHelpButton * next
Definition: winhelp.h:57
WPARAM wParam
Definition: winhelp.h:53
HWND hWnd
Definition: winhelp.h:47
RECT rect
Definition: winhelp.h:55
LPCSTR lpszName
Definition: winhelp.h:50
LPCSTR lpszID
Definition: winhelp.h:49
unsigned index
Definition: winhelp.h:71
WNDPROC origRicheditWndProc
Definition: winhelp.h:83
HWND hMainWnd
Definition: winhelp.h:80
HLPFILE_PAGE * page
Definition: winhelp.h:78
HBRUSH hBrush
Definition: winhelp.h:90
unsigned font_scale
Definition: winhelp.h:95
HWND hHistoryWnd
Definition: winhelp.h:81
struct tagWinHelp * next
Definition: winhelp.h:97
HFONT * fonts
Definition: winhelp.h:85
WINHELP_BUTTON * first_button
Definition: winhelp.h:77
HLPFILE_WINDOWINFO * info
Definition: winhelp.h:92
UINT fonts_len
Definition: winhelp.h:86
WINHELP_PAGESET back
Definition: winhelp.h:94
HCURSOR hHandCur
Definition: winhelp.h:88
unsigned ref_count
Definition: winhelp.h:76
void(WINAPI *ErrorW)(int)
BOOL(WINAPI *FEofHf)(HANDLE)
HANDLE(WINAPI *RcCloseHf)(HANDLE)
BOOL(WINAPI *FAccessHfs)(HANDLE
WORD(WINAPI *GetFSError)(void)
void(WINAPI *ErrorSz)(LPSTR)
WORD(WINAPI *RcCloseHfs)(HANDLE)
WORD(WINAPI *RcLLInfoFromHfs)(HANDLE
LONG(WINAPI *LTellHf)(HANDLE)
HANDLE(WINAPI *HfOpenHfs)(HANDLE
LONG(WINAPI *LcbSizeHf)(HANDLE)
#define LONG_PTR
Definition: treelist.c:79
PVOID HANDLE
Definition: typedefs.h:73
UINT_PTR WPARAM
Definition: windef.h:207
HICON HCURSOR
Definition: windef.h:299
#define WINAPI
Definition: msvc.h:6
LONG(CALLBACK * WINHELP_LDLLHandler)(WORD, LONG_PTR, LONG_PTR)
Definition: winhelp.h:119
const char STRING_MENU_Xx[]
HLPFILE * WINHELP_LookupHelpFile(LPCSTR lpszFile)
Definition: winhelp.c:211
const char STRING_DIALOG_TEST[]
Definition: string.c:29
const char MAIN_WIN_CLASS_NAME[]
Definition: string.c:23
WINHELP_WINDOW * WINHELP_GrabWindow(WINHELP_WINDOW *)
Definition: winhelp.c:512
const char STRING_BUTTON[]
Definition: string.c:26
WINHELP_GLOBALS Globals
Definition: clipbrd.c:13
BOOL WINHELP_CreateHelpWindow(WINHELP_WNDPAGE *, int, BOOL)
Definition: winhelp.c:697
BOOL WINHELP_CreateIndexWindow(BOOL)
Definition: winhelp.c:1541
const char HISTORY_WIN_CLASS_NAME[]
Definition: string.c:25
struct tagHelpButton WINHELP_BUTTON
struct tagDll WINHELP_DLL
void WINHELP_LayoutMainWindow(WINHELP_WINDOW *win)
Definition: winhelp.c:433
BOOL WINHELP_ReleaseWindow(WINHELP_WINDOW *)
Definition: winhelp.c:523
void WINHELP_DeleteBackSet(WINHELP_WINDOW *)
Definition: winhelp.c:480
BOOL WINHELP_GetOpenFileName(LPSTR, int)
Definition: winhelp.c:145
BOOL WINHELP_OpenHelpWindow(HLPFILE_PAGE *(*)(HLPFILE *, LONG, ULONG *), HLPFILE *, LONG, HLPFILE_WINDOWINFO *, int)
const struct winhelp_callbacks Callbacks
const char SHADOW_WIN_CLASS_NAME[]
struct tagPageSet WINHELP_PAGESET
const char TEXT_WIN_CLASS_NAME[]
struct tagWinHelp WINHELP_WINDOW
HLPFILE_WINDOWINFO * WINHELP_GetWindowInfo(HLPFILE *hlpfile, LPCSTR name)
Definition: winhelp.c:253
const char BUTTON_BOX_WIN_CLASS_NAME[]
Definition: string.c:24
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2896
const char * LPCSTR
Definition: xmlstorage.h:183
char * LPSTR
Definition: xmlstorage.h:182
unsigned char BYTE
Definition: xxhash.c:193