Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygencallback.c
Go to the documentation of this file.
00001 /* 00002 * Help Viewer - DLL callback into WineHelp 00003 * 00004 * Copyright 2004 Eric Pouech 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Lesser General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2.1 of the License, or (at your option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Lesser General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public 00017 * License along with this library; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 00019 */ 00020 00021 #define WIN32_LEAN_AND_MEAN 00022 00023 #include <stdio.h> 00024 00025 #include "windows.h" 00026 #include "winhelp.h" 00027 00028 #include "wine/debug.h" 00029 00030 WINE_DEFAULT_DEBUG_CHANNEL(winhelp); 00031 00032 static WORD CALLBACK WHD_GetFSError(void) 00033 { 00034 WINE_FIXME("()\n"); 00035 return 0; 00036 } 00037 00038 static HANDLE CALLBACK WHD_Open(LPSTR name, BYTE flags) 00039 { 00040 unsigned mode = 0; 00041 00042 WINE_FIXME("(%s %x)\n", wine_dbgstr_a(name), flags); 00043 switch (flags) 00044 { 00045 case 0: mode = GENERIC_READ | GENERIC_WRITE; break; 00046 case 2: mode = GENERIC_READ; break; 00047 default: WINE_FIXME("Undocumented flags %x\n", flags); 00048 } 00049 return CreateFile(name, mode, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, 00050 OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); 00051 } 00052 00053 static WORD CALLBACK WHD_Close(HANDLE fs) 00054 { 00055 WINE_FIXME("(%p)\n", fs); 00056 CloseHandle(fs); 00057 return 0; 00058 } 00059 00060 static HANDLE CALLBACK WHD_OpenBag(HANDLE fs, LPSTR name, BYTE flags) 00061 { 00062 WINE_FIXME("(%p %s %x)\n", fs, name, flags); 00063 return NULL; 00064 } 00065 00066 static HANDLE CALLBACK WHD_CloseBag(HANDLE bag) 00067 { 00068 WINE_FIXME("()\n"); 00069 return NULL; 00070 } 00071 00072 static LONG CALLBACK WHD_ReadBag(HANDLE bag, BYTE* ptr, LONG len) 00073 { 00074 WINE_FIXME("()\n"); 00075 return 0; 00076 } 00077 00078 static LONG CALLBACK WHD_TellBag(HANDLE bag) 00079 { 00080 WINE_FIXME("()\n"); 00081 return 0; 00082 } 00083 00084 static LONG CALLBACK WHD_SeekBag(HANDLE bag, LONG offset, WORD whence) 00085 { 00086 WINE_FIXME("()\n"); 00087 return 0; 00088 } 00089 00090 static BOOL CALLBACK WHD_IsEofBag(HANDLE bag) 00091 { 00092 WINE_FIXME("()\n"); 00093 return FALSE; 00094 } 00095 00096 static LONG CALLBACK WHD_SizeBag(HANDLE bag) 00097 { 00098 WINE_FIXME("()\n"); 00099 return 0; 00100 } 00101 00102 static BOOL CALLBACK WHD_Access(HANDLE fs, LPSTR name, BYTE flags) 00103 { 00104 WINE_FIXME("()\n"); 00105 return FALSE; 00106 } 00107 00108 static WORD CALLBACK WHD_LLInfoFromBag(HANDLE bag, WORD opt, LPWORD p1, LPLONG p2, LPLONG p3) 00109 { 00110 WINE_FIXME("()\n"); 00111 return 0; 00112 } 00113 00114 static WORD CALLBACK WHD_LLInfoFromFile(HANDLE fs, LPSTR name, WORD opt, LPWORD p1, LPLONG p2, LPLONG p3) 00115 { 00116 WINE_FIXME("()\n"); 00117 return 0; 00118 } 00119 00120 static void CALLBACK WHD_Error(int err) 00121 { 00122 WINE_FIXME("()\n"); 00123 } 00124 00125 static void CALLBACK WHD_ErrorString(LPSTR err) 00126 { 00127 WINE_FIXME("()\n"); 00128 } 00129 00130 static ULONG_PTR CALLBACK WHD_GetInfo(WORD what, HWND hnd) 00131 { 00132 ULONG_PTR ret = 0; 00133 00134 WINE_TRACE("(%x %p)\n", what, hnd); 00135 switch (what) 00136 { 00137 case 0: break; 00138 case 1: /* instance */ ret = (ULONG_PTR)Globals.hInstance; break; 00139 case 3: /* current window */ ret = (ULONG_PTR)Globals.active_win->hMainWnd; break; 00140 case 2: /* main window */ 00141 case 4: /* handle to opened file */ 00142 case 5: /* foreground color */ 00143 case 6: /* background color */ 00144 case 7: /* topic number */ 00145 case 8: /* current opened file name */ 00146 WINE_FIXME("NIY %u\n", what); 00147 break; 00148 default: 00149 WINE_FIXME("Undocumented %u\n", what); 00150 break; 00151 } 00152 return ret; 00153 } 00154 00155 static LONG CALLBACK WHD_API(LPSTR x, WORD xx, DWORD xxx) 00156 { 00157 WINE_FIXME("()\n"); 00158 return 0; 00159 } 00160 00161 const struct winhelp_callbacks Callbacks = 00162 { 00163 WHD_GetFSError, 00164 WHD_Open, 00165 WHD_Close, 00166 WHD_OpenBag, 00167 WHD_CloseBag, 00168 WHD_ReadBag, 00169 WHD_TellBag, 00170 WHD_SeekBag, 00171 WHD_IsEofBag, 00172 WHD_SizeBag, 00173 WHD_Access, 00174 WHD_LLInfoFromBag, 00175 WHD_LLInfoFromFile, 00176 WHD_Error, 00177 WHD_ErrorString, 00178 WHD_GetInfo, 00179 WHD_API 00180 }; Generated on Sat May 26 2012 04:16:29 for ReactOS by
1.7.6.1
|