ReactOS  0.4.12-dev-18-gf469aca
callback.c
Go to the documentation of this file.
1 /*
2  * Help Viewer - DLL callback into WineHelp
3  *
4  * Copyright 2004 Eric Pouech
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19  */
20 
21 #define WIN32_LEAN_AND_MEAN
22 
23 #include <stdio.h>
24 
25 #include "windows.h"
26 #include "winhelp.h"
27 
28 #include "wine/debug.h"
29 
31 
33 {
34  WINE_FIXME("()\n");
35  return 0;
36 }
37 
39 {
40  unsigned mode = 0;
41 
42  WINE_FIXME("(%s %x)\n", debugstr_a(name), flags);
43  switch (flags)
44  {
45  case 0: mode = GENERIC_READ | GENERIC_WRITE; break;
46  case 2: mode = GENERIC_READ; break;
47  default: WINE_FIXME("Undocumented flags %x\n", flags);
48  }
49  return CreateFileA(name, mode, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
51 }
52 
54 {
55  WINE_FIXME("(%p)\n", fs);
56  CloseHandle(fs);
57  return 0;
58 }
59 
61 {
62  WINE_FIXME("(%p %s %x)\n", fs, debugstr_a(name), flags);
63  return NULL;
64 }
65 
67 {
68  WINE_FIXME("()\n");
69  return NULL;
70 }
71 
73 {
74  WINE_FIXME("()\n");
75  return 0;
76 }
77 
79 {
80  WINE_FIXME("()\n");
81  return 0;
82 }
83 
85 {
86  WINE_FIXME("()\n");
87  return 0;
88 }
89 
91 {
92  WINE_FIXME("()\n");
93  return FALSE;
94 }
95 
97 {
98  WINE_FIXME("()\n");
99  return 0;
100 }
101 
103 {
104  WINE_FIXME("()\n");
105  return FALSE;
106 }
107 
109 {
110  WINE_FIXME("()\n");
111  return 0;
112 }
113 
115 {
116  WINE_FIXME("()\n");
117  return 0;
118 }
119 
120 static void CALLBACK WHD_Error(int err)
121 {
122  WINE_FIXME("()\n");
123 }
124 
126 {
127  WINE_FIXME("()\n");
128 }
129 
131 {
132  ULONG_PTR ret = 0;
133 
134  WINE_TRACE("(%x %p)\n", what, hnd);
135  switch (what)
136  {
137  case 0: break;
138  case 1: /* instance */ ret = (ULONG_PTR)Globals.hInstance; break;
139  case 3: /* current window */ ret = (ULONG_PTR)Globals.active_win->hMainWnd; break;
140  case 2: /* main window */
141  case 4: /* handle to opened file */
142  case 5: /* foreground color */
143  case 6: /* background color */
144  case 7: /* topic number */
145  case 8: /* current opened file name */
146  WINE_FIXME("NIY %u\n", what);
147  break;
148  default:
149  WINE_FIXME("Undocumented %u\n", what);
150  break;
151  }
152  return ret;
153 }
154 
156 {
157  WINE_FIXME("()\n");
158  return 0;
159 }
160 
162 {
164  WHD_Open,
165  WHD_Close,
166  WHD_OpenBag,
167  WHD_CloseBag,
168  WHD_ReadBag,
169  WHD_TellBag,
170  WHD_SeekBag,
171  WHD_IsEofBag,
172  WHD_SizeBag,
173  WHD_Access,
176  WHD_Error,
178  WHD_GetInfo,
179  WHD_API
180 };
#define CloseHandle
Definition: compat.h:398
static LONG CALLBACK WHD_TellBag(HANDLE bag)
Definition: callback.c:78
static WORD CALLBACK WHD_LLInfoFromBag(HANDLE bag, WORD opt, LPWORD p1, LPLONG p2, LPLONG p3)
Definition: callback.c:108
GLintptr offset
Definition: glext.h:5920
#define CALLBACK
Definition: compat.h:27
static LONG CALLBACK WHD_API(LPSTR x, WORD xx, DWORD xxx)
Definition: callback.c:155
#define WINE_TRACE
Definition: debug.h:358
static LONG CALLBACK WHD_SeekBag(HANDLE bag, LONG offset, WORD whence)
Definition: callback.c:84
static BOOL CALLBACK WHD_IsEofBag(HANDLE bag)
Definition: callback.c:90
#define FILE_SHARE_WRITE
Definition: nt_native.h:681
char * LPSTR
Definition: xmlstorage.h:182
Definition: fs.h:235
#define FILE_SHARE_READ
Definition: compat.h:125
uint32_t ULONG_PTR
Definition: typedefs.h:63
const GLfloat * p2
Definition: s_aatritemp.h:44
CLIPBOARD_GLOBALS Globals
Definition: clipbrd.c:13
long LONG
Definition: pedump.c:60
#define GENERIC_WRITE
Definition: nt_native.h:90
static PVOID ptr
Definition: dispmode.c:27
smooth NULL
Definition: ftsmooth.c:416
static LONG CALLBACK WHD_SizeBag(HANDLE bag)
Definition: callback.c:96
#define OPEN_EXISTING
Definition: compat.h:426
static HANDLE CALLBACK WHD_CloseBag(HANDLE bag)
Definition: callback.c:66
unsigned int BOOL
Definition: ntddk_ex.h:94
const struct winhelp_callbacks Callbacks
Definition: callback.c:161
#define debugstr_a
Definition: kernel32.h:31
static WORD CALLBACK WHD_Close(HANDLE fs)
Definition: callback.c:53
unsigned short WORD
Definition: ntddk_ex.h:93
int xx
Definition: npserver.c:29
unsigned long DWORD
Definition: ntddk_ex.h:95
static WORD CALLBACK WHD_GetFSError(void)
Definition: callback.c:32
GLbitfield flags
Definition: glext.h:7161
int ret
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:126
static void CALLBACK WHD_ErrorString(LPSTR err)
Definition: callback.c:125
GLenum GLsizei len
Definition: glext.h:6722
#define GENERIC_READ
Definition: compat.h:124
#define err(...)
static BOOL CALLBACK WHD_Access(HANDLE fs, LPSTR name, BYTE flags)
Definition: callback.c:102
WINE_DEFAULT_DEBUG_CHANNEL(winhelp)
unsigned char BYTE
Definition: ntddk_ex.h:96
uint16_t * LPWORD
Definition: typedefs.h:54
static ULONG_PTR CALLBACK WHD_GetInfo(WORD what, HWND hnd)
Definition: callback.c:130
int32_t * LPLONG
Definition: typedefs.h:56
INT x
Definition: msvc.h:62
static HANDLE CALLBACK WHD_OpenBag(HANDLE fs, LPSTR name, BYTE flags)
Definition: callback.c:60
static WORD CALLBACK WHD_LLInfoFromFile(HANDLE fs, LPSTR name, WORD opt, LPWORD p1, LPLONG p2, LPLONG p3)
Definition: callback.c:114
Definition: name.c:36
static void CALLBACK WHD_Error(int err)
Definition: callback.c:120
#define ULONG_PTR
Definition: config.h:101
static LONG CALLBACK WHD_ReadBag(HANDLE bag, BYTE *ptr, LONG len)
Definition: callback.c:72
static HANDLE CALLBACK WHD_Open(LPSTR name, BYTE flags)
Definition: callback.c:38
#define CreateFileA(a, b, c, d, e, f, g)
Definition: compat.h:399
const GLfloat * p1
Definition: s_aatritemp.h:43
HINSTANCE hInstance
Definition: precomp.h:43
#define WINE_FIXME
Definition: debug.h:370