Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenwinhelp.h
Go to the documentation of this file.
00001 /* 00002 * Help Viewer 00003 * 00004 * Copyright 1996 Ulrich Schmid 00005 * Copyright 2002 Sylvain Petreolle <spetreolle@yahoo.fr> 00006 * 2002 Eric Pouech 00007 * 00008 * This library is free software; you can redistribute it and/or 00009 * modify it under the terms of the GNU Lesser General Public 00010 * License as published by the Free Software Foundation; either 00011 * version 2.1 of the License, or (at your option) any later version. 00012 * 00013 * This library is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 * Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public 00019 * License along with this library; if not, write to the Free Software 00020 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 00021 */ 00022 00023 #define MAX_LANGUAGE_NUMBER 255 00024 #define MAX_STRING_LEN 255 00025 00026 #define INTERNAL_BORDER_WIDTH 5 00027 #define POPUP_YDISTANCE 20 00028 #define SHADOW_DX 10 00029 #define SHADOW_DY 10 00030 #define BUTTON_CX 6 00031 #define BUTTON_CY 6 00032 00033 #ifndef RC_INVOKED 00034 00035 #include <stdarg.h> 00036 00037 #include "hlpfile.h" 00038 #include "windef.h" 00039 #include "winbase.h" 00040 #include "macro.h" 00041 #include "winhelp_res.h" 00042 00043 typedef struct tagHelpButton 00044 { 00045 HWND hWnd; 00046 00047 LPCSTR lpszID; 00048 LPCSTR lpszName; 00049 LPCSTR lpszMacro; 00050 00051 WPARAM wParam; 00052 00053 RECT rect; 00054 00055 struct tagHelpButton*next; 00056 } WINHELP_BUTTON; 00057 00058 typedef struct 00059 { 00060 HLPFILE_PAGE* page; 00061 HLPFILE_WINDOWINFO* wininfo; 00062 ULONG relative; 00063 } WINHELP_WNDPAGE; 00064 00065 typedef struct tagPageSet 00066 { 00067 /* FIXME: for now it's a fixed size */ 00068 WINHELP_WNDPAGE set[40]; 00069 unsigned index; 00070 } WINHELP_PAGESET; 00071 00072 typedef struct tagWinHelp 00073 { 00074 unsigned ref_count; 00075 WINHELP_BUTTON* first_button; 00076 HLPFILE_PAGE* page; 00077 00078 HWND hMainWnd; 00079 HWND hHistoryWnd; 00080 00081 WNDPROC origRicheditWndProc; 00082 00083 HFONT* fonts; 00084 UINT fonts_len; 00085 00086 HCURSOR hHandCur; 00087 00088 HBRUSH hBrush; 00089 00090 HLPFILE_WINDOWINFO* info; 00091 00092 WINHELP_PAGESET back; 00093 unsigned font_scale; /* 0 = small, 1 = normal, 2 = large */ 00094 00095 struct tagWinHelp* next; 00096 } WINHELP_WINDOW; 00097 00098 #define DC_NOMSG 0x00000000 00099 #define DC_MINMAX 0x00000001 00100 #define DC_INITTERM 0x00000002 00101 #define DC_JUMP 0x00000004 00102 #define DC_ACTIVATE 0x00000008 00103 #define DC_CALLBACKS 0x00000010 00104 00105 #define DW_NOTUSED 0 00106 #define DW_WHATMSG 1 00107 #define DW_MINMAX 2 00108 #define DW_SIZE 3 00109 #define DW_INIT 4 00110 #define DW_TERM 5 00111 #define DW_STARTJUMP 6 00112 #define DW_ENDJUMP 7 00113 #define DW_CHGFILE 8 00114 #define DW_ACTIVATE 9 00115 #define DW_CALLBACKS 10 00116 00117 typedef LONG (CALLBACK *WINHELP_LDLLHandler)(WORD, LONG_PTR, LONG_PTR); 00118 00119 typedef struct tagDll 00120 { 00121 HANDLE hLib; 00122 const char* name; 00123 WINHELP_LDLLHandler handler; 00124 DWORD class; 00125 struct tagDll* next; 00126 } WINHELP_DLL; 00127 00128 typedef struct 00129 { 00130 UINT wVersion; 00131 HANDLE hInstance; 00132 BOOL isBook; 00133 WINHELP_WINDOW* active_win; 00134 WINHELP_WINDOW* active_popup; 00135 WINHELP_WINDOW* win_list; 00136 WNDPROC button_proc; 00137 WINHELP_DLL* dlls; 00138 WINHELP_PAGESET history; 00139 HFONT hButtonFont; 00140 } WINHELP_GLOBALS; 00141 00142 extern const struct winhelp_callbacks 00143 { 00144 WORD (WINAPI *GetFSError)(void); 00145 HANDLE (WINAPI *HfsOpenSz)(LPSTR,BYTE); 00146 WORD (WINAPI *RcCloseHfs)(HANDLE); 00147 HANDLE (WINAPI *HfOpenHfs)(HANDLE,LPSTR,BYTE); 00148 HANDLE (WINAPI *RcCloseHf)(HANDLE); 00149 LONG (WINAPI *LcbReadHf)(HANDLE,BYTE*,LONG); 00150 LONG (WINAPI *LTellHf)(HANDLE); 00151 LONG (WINAPI *LSeekHf)(HANDLE,LONG,WORD); 00152 BOOL (WINAPI *FEofHf)(HANDLE); 00153 LONG (WINAPI *LcbSizeHf)(HANDLE); 00154 BOOL (WINAPI *FAccessHfs)(HANDLE,LPSTR,BYTE); 00155 WORD (WINAPI *RcLLInfoFromHf)(HANDLE,WORD,LPWORD,LPLONG,LPLONG); 00156 WORD (WINAPI *RcLLInfoFromHfs)(HANDLE,LPSTR,WORD,LPWORD,LPLONG,LPLONG); 00157 void (WINAPI *ErrorW)(int); 00158 void (WINAPI *ErrorSz)(LPSTR); 00159 ULONG_PTR (WINAPI *GetInfo)(WORD,HWND); 00160 LONG (WINAPI *API)(LPSTR,WORD,DWORD); 00161 } Callbacks; 00162 00163 extern WINHELP_GLOBALS Globals; 00164 00165 BOOL WINHELP_CreateHelpWindow(WINHELP_WNDPAGE*, int, BOOL); 00166 BOOL WINHELP_OpenHelpWindow(HLPFILE_PAGE* (*)(HLPFILE*, LONG, ULONG*), 00167 HLPFILE*, LONG, HLPFILE_WINDOWINFO*, int); 00168 BOOL WINHELP_GetOpenFileName(LPSTR, int); 00169 BOOL WINHELP_CreateIndexWindow(BOOL); 00170 void WINHELP_DeleteBackSet(WINHELP_WINDOW*); 00171 HLPFILE* WINHELP_LookupHelpFile(LPCSTR lpszFile); 00172 HLPFILE_WINDOWINFO* WINHELP_GetWindowInfo(HLPFILE* hlpfile, LPCSTR name); 00173 void WINHELP_LayoutMainWindow(WINHELP_WINDOW* win); 00174 WINHELP_WINDOW* WINHELP_GrabWindow(WINHELP_WINDOW*); 00175 BOOL WINHELP_ReleaseWindow(WINHELP_WINDOW*); 00176 00177 extern const char MAIN_WIN_CLASS_NAME[]; 00178 extern const char BUTTON_BOX_WIN_CLASS_NAME[]; 00179 extern const char TEXT_WIN_CLASS_NAME[]; 00180 extern const char SHADOW_WIN_CLASS_NAME[]; 00181 extern const char HISTORY_WIN_CLASS_NAME[]; 00182 extern const char STRING_BUTTON[]; 00183 extern const char STRING_MENU_Xx[]; 00184 extern const char STRING_DIALOG_TEST[]; 00185 #endif 00186 00187 /* Buttons */ 00188 #define WH_FIRST_BUTTON 500 Generated on Sat May 26 2012 04:16:32 for ReactOS by
1.7.6.1
|