macro.c 26.9 KB
Newer Older
Alexandre Julliard's avatar
Alexandre Julliard committed
1 2 3 4
/*
 * Help Viewer
 *
 * Copyright 1996 Ulrich Schmid
5
 * Copyright 2002 Eric Pouech
6 7 8 9 10 11 12 13 14 15 16 17 18
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
19
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
Alexandre Julliard's avatar
Alexandre Julliard committed
20 21
 */

22 23
#define WIN32_LEAN_AND_MEAN

24 25
#include <stdio.h>

Alexandre Julliard's avatar
Alexandre Julliard committed
26 27
#include "windows.h"
#include "commdlg.h"
Alexandre Julliard's avatar
Alexandre Julliard committed
28 29
#include "winhelp.h"

30 31 32 33
#include "wine/debug.h"

WINE_DEFAULT_DEBUG_CHANNEL(winhelp);

34 35 36 37
/**************************************************/
/*               Macro table                      */
/**************************************************/
struct MacroDesc {
38 39
    const char* name;
    const char* alias;
40
    BOOL        isBool;
41
    const char* arguments;
42
    FARPROC     fn;
43 44 45 46 47 48 49 50 51 52
};

/* types:
 *      U:      32 bit unsigned int
 *      I:      32 bit signed int
 *      S:      string
 *      v:      unknown (32 bit entity)
 */

static struct MacroDesc MACRO_Builtins[] = {
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
    {"About",               NULL, 0, "",       (FARPROC)MACRO_About},
    {"AddAccelerator",      "AA", 0, "UUS",    (FARPROC)MACRO_AddAccelerator},
    {"ALink",               "AL", 0, "SUS",    (FARPROC)MACRO_ALink},
    {"Annotate",            NULL, 0, "",       (FARPROC)MACRO_Annotate},
    {"AppendItem",          NULL, 0, "SSSS",   (FARPROC)MACRO_AppendItem},
    {"Back",                NULL, 0, "",       (FARPROC)MACRO_Back},
    {"BackFlush",           "BF", 0, "",       (FARPROC)MACRO_BackFlush},
    {"BookmarkDefine",      NULL, 0, "",       (FARPROC)MACRO_BookmarkDefine},
    {"BookmarkMore",        NULL, 0, "",       (FARPROC)MACRO_BookmarkMore},
    {"BrowseButtons",       NULL, 0, "",       (FARPROC)MACRO_BrowseButtons},
    {"ChangeButtonBinding", "CBB",0, "SS",     (FARPROC)MACRO_ChangeButtonBinding},
    {"ChangeEnable",        "CE", 0, "SS",     (FARPROC)MACRO_ChangeEnable},
    {"ChangeItemBinding",   "CIB",0, "SS",     (FARPROC)MACRO_ChangeItemBinding},
    {"CheckItem",           "CI", 0, "S",      (FARPROC)MACRO_CheckItem},
    {"CloseSecondarys",     "CS", 0, "",       (FARPROC)MACRO_CloseSecondarys},
    {"CloseWindow",         "CW", 0, "S",      (FARPROC)MACRO_CloseWindow},
    {"Compare",             NULL, 0, "S",      (FARPROC)MACRO_Compare},
    {"Contents",            NULL, 0, "",       (FARPROC)MACRO_Contents},
    {"ControlPanel",        NULL, 0, "SSU",    (FARPROC)MACRO_ControlPanel},
    {"CopyDialog",          NULL, 0, "",       (FARPROC)MACRO_CopyDialog},
    {"CopyTopic",           "CT", 0, "",       (FARPROC)MACRO_CopyTopic},
    {"CreateButton",        "CB", 0, "SSS",    (FARPROC)MACRO_CreateButton},
    {"DeleteItem",          NULL, 0, "S",      (FARPROC)MACRO_DeleteItem},
    {"DeleteMark",          NULL, 0, "S",      (FARPROC)MACRO_DeleteMark},
    {"DestroyButton",       NULL, 0, "S",      (FARPROC)MACRO_DestroyButton},
    {"DisableButton",       "DB", 0, "S",      (FARPROC)MACRO_DisableButton},
    {"DisableItem",         "DI", 0, "S",      (FARPROC)MACRO_DisableItem},
    {"EnableButton",        "EB", 0, "S",      (FARPROC)MACRO_EnableButton},
    {"EnableItem",          "EI", 0, "S",      (FARPROC)MACRO_EnableItem},
    {"EndMPrint",           NULL, 0, "",       (FARPROC)MACRO_EndMPrint},
    {"ExecFile",            "EF", 0, "SSUS",   (FARPROC)MACRO_ExecFile},
    {"ExecProgram",         "EP", 0, "SU",     (FARPROC)MACRO_ExecProgram},
    {"Exit",                NULL, 0, "",       (FARPROC)MACRO_Exit},
    {"ExtAbleItem",         NULL, 0, "SU",     (FARPROC)MACRO_ExtAbleItem},
    {"ExtInsertItem",       NULL, 0, "SSSSUU", (FARPROC)MACRO_ExtInsertItem},
    {"ExtInsertMenu",       NULL, 0, "SSSUU",  (FARPROC)MACRO_ExtInsertMenu},
    {"FileExist",           "FE", 1, "S",      (FARPROC)MACRO_FileExist},
    {"FileOpen",            "FO", 0, "",       (FARPROC)MACRO_FileOpen},
    {"Find",                NULL, 0, "",       (FARPROC)MACRO_Find},
    {"Finder",              "FD", 0, "",       (FARPROC)MACRO_Finder},
    {"FloatingMenu",        NULL, 0, "",       (FARPROC)MACRO_FloatingMenu},
    {"Flush",               "FH", 0, "",       (FARPROC)MACRO_Flush},
    {"FocusWindow",         NULL, 0, "S",      (FARPROC)MACRO_FocusWindow},
    {"Generate",            NULL, 0, "SUU",    (FARPROC)MACRO_Generate},
    {"GotoMark",            NULL, 0, "S",      (FARPROC)MACRO_GotoMark},
    {"HelpOn",              NULL, 0, "",       (FARPROC)MACRO_HelpOn},
    {"HelpOnTop",           NULL, 0, "",       (FARPROC)MACRO_HelpOnTop},
    {"History",             NULL, 0, "",       (FARPROC)MACRO_History},
    {"InitMPrint",          NULL, 1, "",       (FARPROC)MACRO_InitMPrint},
    {"InsertItem",          NULL, 0, "SSSSU",  (FARPROC)MACRO_InsertItem},
    {"InsertMenu",          NULL, 0, "SSU",    (FARPROC)MACRO_InsertMenu},
    {"IfThen",              "IF", 0, "BS",     (FARPROC)MACRO_IfThen},
    {"IfThenElse",          "IE", 0, "BSS",    (FARPROC)MACRO_IfThenElse},
    {"IsBook",              NULL, 1, "",       (FARPROC)MACRO_IsBook},
    {"IsMark",              NULL, 1, "S",      (FARPROC)MACRO_IsMark},
    {"IsNotMark",           "NM", 1, "S",      (FARPROC)MACRO_IsNotMark},
    {"JumpContents",        NULL, 0, "SS",     (FARPROC)MACRO_JumpContents},
    {"JumpContext",         "JC", 0, "SSU",    (FARPROC)MACRO_JumpContext},
    {"JumpHash",            "JH", 0, "SSU",    (FARPROC)MACRO_JumpHash},
    {"JumpHelpOn",          NULL, 0, "",       (FARPROC)MACRO_JumpHelpOn},
    {"JumpID",              "JI", 0, "SSS",    (FARPROC)MACRO_JumpID},
    {"JumpKeyword",         "JK", 0, "SSS",    (FARPROC)MACRO_JumpKeyword},
    {"KLink",               "KL", 0, "SUSS",   (FARPROC)MACRO_KLink},
    {"Menu",                "MU", 0, "",       (FARPROC)MACRO_Menu},
    {"MPrintHash",          NULL, 0, "U",      (FARPROC)MACRO_MPrintHash},
    {"MPrintID",            NULL, 0, "S",      (FARPROC)MACRO_MPrintID},
    {"Next",                NULL, 0, "",       (FARPROC)MACRO_Next},
    {"NoShow",              NULL, 0, "",       (FARPROC)MACRO_NoShow},
    {"PopupContext",        "PC", 0, "SU",     (FARPROC)MACRO_PopupContext},
    {"PopupHash",           NULL, 0, "SU",     (FARPROC)MACRO_PopupHash},
    {"PopupId",             "PI", 0, "SS",     (FARPROC)MACRO_PopupId},
    {"PositionWindow",      "PW", 0, "IIUUUS", (FARPROC)MACRO_PositionWindow},
    {"Prev",                NULL, 0, "",       (FARPROC)MACRO_Prev},
    {"Print",               NULL, 0, "",       (FARPROC)MACRO_Print},
    {"PrinterSetup",        NULL, 0, "",       (FARPROC)MACRO_PrinterSetup},
    {"RegisterRoutine",     "RR", 0, "SSS",    (FARPROC)MACRO_RegisterRoutine},
    {"RemoveAccelerator",   "RA", 0, "UU",     (FARPROC)MACRO_RemoveAccelerator},
    {"ResetMenu",           NULL, 0, "",       (FARPROC)MACRO_ResetMenu},
    {"SaveMark",            NULL, 0, "S",      (FARPROC)MACRO_SaveMark},
    {"Search",              NULL, 0, "",       (FARPROC)MACRO_Search},
    {"SetContents",         NULL, 0, "SU",     (FARPROC)MACRO_SetContents},
    {"SetHelpOnFile",       NULL, 0, "S",      (FARPROC)MACRO_SetHelpOnFile},
    {"SetPopupColor",       "SPC",0, "UUU",    (FARPROC)MACRO_SetPopupColor},
    {"ShellExecute",        "SE", 0, "SSUUSS", (FARPROC)MACRO_ShellExecute},
    {"ShortCut",            "SH", 0, "SSUUS",  (FARPROC)MACRO_ShortCut},
    {"TCard",               NULL, 0, "U",      (FARPROC)MACRO_TCard},
    {"Test",                NULL, 0, "U",      (FARPROC)MACRO_Test},
    {"TestALink",           NULL, 1, "S",      (FARPROC)MACRO_TestALink},
    {"TestKLink",           NULL, 1, "S",      (FARPROC)MACRO_TestKLink},
    {"UncheckItem",         "UI", 0, "S",      (FARPROC)MACRO_UncheckItem},
    {"UpdateWindow",        "UW", 0, "SS",     (FARPROC)MACRO_UpdateWindow},
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158
    {NULL,                  NULL, 0, NULL,     NULL}
};

static struct MacroDesc*MACRO_Loaded /* = NULL */;
static unsigned         MACRO_NumLoaded /* = 0 */;

static int MACRO_DoLookUp(struct MacroDesc* start, const char* name, struct lexret* lr, unsigned len)
{
    struct MacroDesc*   md;

    for (md = start; md->name && len != 0; md++, len--)
    {
        if (strcasecmp(md->name, name) == 0 || (md->alias != NULL && strcasecmp(md->alias, name) == 0))
        {
            lr->proto = md->arguments;
159 160
            lr->function = md->fn;
            return md->isBool ? BOOL_FUNCTION : VOID_FUNCTION;
161 162 163 164 165 166 167 168
        }
    }
    return EMPTY;
}

int MACRO_Lookup(const char* name, struct lexret* lr)
{
    int ret;
169

170 171 172 173 174 175 176 177 178
    if ((ret = MACRO_DoLookUp(MACRO_Builtins, name, lr, -1)) != EMPTY)
        return ret;
    if (MACRO_Loaded && (ret = MACRO_DoLookUp(MACRO_Loaded, name, lr, MACRO_NumLoaded)) != EMPTY)
        return ret;

    lr->string = name;
    return IDENTIFIER;
}

179
/*******      helper functions     *******/
180

181
static WINHELP_BUTTON**        MACRO_LookupButton(WINHELP_WINDOW* win, LPCSTR name)
182 183 184 185 186 187 188 189 190 191
{
    WINHELP_BUTTON**    b;

    for (b = &win->first_button; *b; b = &(*b)->next)
        if (!lstrcmpi(name, (*b)->lpszID)) break;
    return b;
}

/******* real macro implementation *******/

192
void CALLBACK MACRO_About(void)
Alexandre Julliard's avatar
Alexandre Julliard committed
193
{
194
    WINE_FIXME("()\n");
Alexandre Julliard's avatar
Alexandre Julliard committed
195 196
}

197
void CALLBACK MACRO_AddAccelerator(LONG u1, LONG u2, LPCSTR str)
Alexandre Julliard's avatar
Alexandre Julliard committed
198
{
199
    WINE_FIXME("(%u, %u, \"%s\")\n", u1, u2, str);
Alexandre Julliard's avatar
Alexandre Julliard committed
200 201
}

202
void CALLBACK MACRO_ALink(LPCSTR str1, LONG u, LPCSTR str2)
Alexandre Julliard's avatar
Alexandre Julliard committed
203
{
204
    WINE_FIXME("(\"%s\", %u, \"%s\")\n", str1, u, str2);
Alexandre Julliard's avatar
Alexandre Julliard committed
205 206
}

207
void CALLBACK MACRO_Annotate(void)
Alexandre Julliard's avatar
Alexandre Julliard committed
208
{
209
    WINE_FIXME("()\n");
Alexandre Julliard's avatar
Alexandre Julliard committed
210 211
}

212
void CALLBACK MACRO_AppendItem(LPCSTR str1, LPCSTR str2, LPCSTR str3, LPCSTR str4)
Alexandre Julliard's avatar
Alexandre Julliard committed
213
{
214
    WINE_FIXME("(\"%s\", \"%s\", \"%s\", \"%s\")\n", str1, str2, str3, str4);
Alexandre Julliard's avatar
Alexandre Julliard committed
215 216
}

217
void CALLBACK MACRO_Back(void)
Alexandre Julliard's avatar
Alexandre Julliard committed
218
{
219 220 221 222 223 224 225
    WINHELP_WINDOW* win = Globals.active_win;

    WINE_TRACE("()\n");

    if (win && win->backIndex >= 2)
        WINHELP_CreateHelpWindow(win->back[--win->backIndex - 1],
                                 win->info, SW_SHOW);
Alexandre Julliard's avatar
Alexandre Julliard committed
226 227
}

228
void CALLBACK MACRO_BackFlush(void)
Alexandre Julliard's avatar
Alexandre Julliard committed
229
{
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244
    WINHELP_WINDOW* win = Globals.active_win;

    WINE_TRACE("()\n");

    if (win)
    {
        int     i;

        for (i = 0; i < win->backIndex; i++)
        {
            HLPFILE_FreeHlpFile(win->back[i]->file);
            win->back[i] = NULL;
        }
        win->backIndex = 0;
    }
Alexandre Julliard's avatar
Alexandre Julliard committed
245 246
}

247
void CALLBACK MACRO_BookmarkDefine(void)
Alexandre Julliard's avatar
Alexandre Julliard committed
248
{
249
    WINE_FIXME("()\n");
Alexandre Julliard's avatar
Alexandre Julliard committed
250 251
}

252
void CALLBACK MACRO_BookmarkMore(void)
Alexandre Julliard's avatar
Alexandre Julliard committed
253
{
254
    WINE_FIXME("()\n");
Alexandre Julliard's avatar
Alexandre Julliard committed
255 256
}

257
void CALLBACK MACRO_BrowseButtons(void)
Alexandre Julliard's avatar
Alexandre Julliard committed
258
{
259 260
    WINE_TRACE("()\n");

261 262
    MACRO_CreateButton("BTN_PREV", "&<<", "Prev()");
    MACRO_CreateButton("BTN_NEXT", "&>>", "Next()");
Alexandre Julliard's avatar
Alexandre Julliard committed
263 264
}

265
void CALLBACK MACRO_ChangeButtonBinding(LPCSTR id, LPCSTR macro)
Alexandre Julliard's avatar
Alexandre Julliard committed
266
{
267 268 269 270 271 272
    WINHELP_WINDOW*     win = Globals.active_win;
    WINHELP_BUTTON*     button;
    WINHELP_BUTTON**    b;
    LONG                size;
    LPSTR               ptr;

273 274
    WINE_TRACE("(\"%s\", \"%s\")\n", id, macro);

275 276 277
    b = MACRO_LookupButton(win, id);
    if (!*b) {WINE_FIXME("Couldn't find button '%s'\n", id); return;}

278
    size = sizeof(WINHELP_BUTTON) + lstrlen(id) +
279 280 281 282 283 284 285 286 287 288 289
        lstrlen((*b)->lpszName) + lstrlen(macro) + 3;

    button = HeapAlloc(GetProcessHeap(), 0, size);
    if (!button) return;

    button->next  = (*b)->next;
    button->hWnd  = (*b)->hWnd;
    button->wParam = (*b)->wParam;

    ptr = (char*)button + sizeof(WINHELP_BUTTON);

290
    lstrcpy(ptr, id);
291 292 293
    button->lpszID = ptr;
    ptr += lstrlen(id) + 1;

294
    lstrcpy(ptr, (*b)->lpszName);
295 296 297
    button->lpszName = ptr;
    ptr += lstrlen((*b)->lpszName) + 1;

298
    lstrcpy(ptr, macro);
299 300 301 302 303
    button->lpszMacro = ptr;

    *b = button;

    SendMessage(win->hMainWnd, WM_USER, 0, 0);
Alexandre Julliard's avatar
Alexandre Julliard committed
304 305
}

306
void CALLBACK MACRO_ChangeEnable(LPCSTR id, LPCSTR macro)
Alexandre Julliard's avatar
Alexandre Julliard committed
307
{
308 309
    WINE_TRACE("(\"%s\", \"%s\")\n", id, macro);

310 311
    MACRO_ChangeButtonBinding(id, macro);
    MACRO_EnableButton(id);
Alexandre Julliard's avatar
Alexandre Julliard committed
312 313
}

314
void CALLBACK MACRO_ChangeItemBinding(LPCSTR str1, LPCSTR str2)
Alexandre Julliard's avatar
Alexandre Julliard committed
315
{
316
    WINE_FIXME("(\"%s\", \"%s\")\n", str1, str2);
Alexandre Julliard's avatar
Alexandre Julliard committed
317 318
}

319
void CALLBACK MACRO_CheckItem(LPCSTR str)
Alexandre Julliard's avatar
Alexandre Julliard committed
320
{
321
    WINE_FIXME("(\"%s\")\n", str);
Alexandre Julliard's avatar
Alexandre Julliard committed
322 323
}

324
void CALLBACK MACRO_CloseSecondarys(void)
Alexandre Julliard's avatar
Alexandre Julliard committed
325
{
326
    WINHELP_WINDOW *win;
327 328

    WINE_TRACE("()\n");
329 330 331
    for (win = Globals.win_list; win; win = win->next)
        if (win->lpszName && lstrcmpi(win->lpszName, "main"))
            DestroyWindow(win->hMainWnd);
Alexandre Julliard's avatar
Alexandre Julliard committed
332 333
}

334
void CALLBACK MACRO_CloseWindow(LPCSTR lpszWindow)
Alexandre Julliard's avatar
Alexandre Julliard committed
335
{
336
    WINHELP_WINDOW *win;
337 338 339

    WINE_TRACE("(\"%s\")\n", lpszWindow);

340
    if (!lpszWindow || !lpszWindow[0]) lpszWindow = "main";
Alexandre Julliard's avatar
Alexandre Julliard committed
341

342 343 344
    for (win = Globals.win_list; win; win = win->next)
        if (win->lpszName && !lstrcmpi(win->lpszName, lpszWindow))
            DestroyWindow(win->hMainWnd);
Alexandre Julliard's avatar
Alexandre Julliard committed
345 346
}

347
void CALLBACK MACRO_Compare(LPCSTR str)
Alexandre Julliard's avatar
Alexandre Julliard committed
348
{
349
    WINE_FIXME("(\"%s\")\n", str);
Alexandre Julliard's avatar
Alexandre Julliard committed
350 351
}

352
void CALLBACK MACRO_Contents(void)
Alexandre Julliard's avatar
Alexandre Julliard committed
353
{
354 355
    WINE_TRACE("()\n");

356 357
    if (Globals.active_win->page)
        MACRO_JumpContents(Globals.active_win->page->file->lpszPath, NULL);
Alexandre Julliard's avatar
Alexandre Julliard committed
358 359
}

360
void CALLBACK MACRO_ControlPanel(LPCSTR str1, LPCSTR str2, LONG u)
Alexandre Julliard's avatar
Alexandre Julliard committed
361
{
362
    WINE_FIXME("(\"%s\", \"%s\", %u)\n", str1, str2, u);
Alexandre Julliard's avatar
Alexandre Julliard committed
363 364
}

365
void CALLBACK MACRO_CopyDialog(void)
Alexandre Julliard's avatar
Alexandre Julliard committed
366
{
367
    WINE_FIXME("()\n");
Alexandre Julliard's avatar
Alexandre Julliard committed
368 369
}

370
void CALLBACK MACRO_CopyTopic(void)
Alexandre Julliard's avatar
Alexandre Julliard committed
371
{
372
    WINE_FIXME("()\n");
Alexandre Julliard's avatar
Alexandre Julliard committed
373 374
}

375
void CALLBACK MACRO_CreateButton(LPCSTR id, LPCSTR name, LPCSTR macro)
Alexandre Julliard's avatar
Alexandre Julliard committed
376
{
377 378 379 380
    WINHELP_WINDOW *win = Globals.active_win;
    WINHELP_BUTTON *button, **b;
    LONG            size;
    LPSTR           ptr;
Alexandre Julliard's avatar
Alexandre Julliard committed
381

382 383
    WINE_TRACE("(\"%s\", \"%s\", %s)\n", id, name, macro);

384
    size = sizeof(WINHELP_BUTTON) + lstrlen(id) + lstrlen(name) + lstrlen(macro) + 3;
Alexandre Julliard's avatar
Alexandre Julliard committed
385

386 387
    button = HeapAlloc(GetProcessHeap(), 0, size);
    if (!button) return;
Alexandre Julliard's avatar
Alexandre Julliard committed
388

389 390
    button->next  = 0;
    button->hWnd  = 0;
Alexandre Julliard's avatar
Alexandre Julliard committed
391

392
    ptr = (char*)button + sizeof(WINHELP_BUTTON);
Alexandre Julliard's avatar
Alexandre Julliard committed
393

394
    lstrcpy(ptr, id);
395 396
    button->lpszID = ptr;
    ptr += lstrlen(id) + 1;
Alexandre Julliard's avatar
Alexandre Julliard committed
397

398
    lstrcpy(ptr, name);
399 400
    button->lpszName = ptr;
    ptr += lstrlen(name) + 1;
Alexandre Julliard's avatar
Alexandre Julliard committed
401

402
    lstrcpy(ptr, macro);
403
    button->lpszMacro = ptr;
Alexandre Julliard's avatar
Alexandre Julliard committed
404

405 406 407 408 409 410
    button->wParam = WH_FIRST_BUTTON;
    for (b = &win->first_button; *b; b = &(*b)->next)
        button->wParam = max(button->wParam, (*b)->wParam + 1);
    *b = button;

    SendMessage(win->hMainWnd, WM_USER, 0, 0);
Alexandre Julliard's avatar
Alexandre Julliard committed
411 412
}

413
void CALLBACK MACRO_DeleteItem(LPCSTR str)
Alexandre Julliard's avatar
Alexandre Julliard committed
414
{
415
    WINE_FIXME("(\"%s\")\n", str);
Alexandre Julliard's avatar
Alexandre Julliard committed
416 417
}

418
void CALLBACK MACRO_DeleteMark(LPCSTR str)
Alexandre Julliard's avatar
Alexandre Julliard committed
419
{
420
    WINE_FIXME("(\"%s\")\n", str);
Alexandre Julliard's avatar
Alexandre Julliard committed
421 422
}

423
void CALLBACK MACRO_DestroyButton(LPCSTR str)
Alexandre Julliard's avatar
Alexandre Julliard committed
424
{
425
    WINE_FIXME("(\"%s\")\n", str);
Alexandre Julliard's avatar
Alexandre Julliard committed
426 427
}

428
void CALLBACK MACRO_DisableButton(LPCSTR id)
Alexandre Julliard's avatar
Alexandre Julliard committed
429
{
430 431
    WINHELP_BUTTON**    b;

432 433
    WINE_FIXME("(\"%s\")\n", id);

434 435 436 437
    b = MACRO_LookupButton(Globals.active_win, id);
    if (!*b) {WINE_FIXME("Couldn't find button '%s'\n", id); return;}

    EnableWindow((*b)->hWnd, FALSE);
Alexandre Julliard's avatar
Alexandre Julliard committed
438 439
}

440
void CALLBACK MACRO_DisableItem(LPCSTR str)
Alexandre Julliard's avatar
Alexandre Julliard committed
441
{
442
    WINE_FIXME("(\"%s\")\n", str);
Alexandre Julliard's avatar
Alexandre Julliard committed
443 444
}

445
void CALLBACK MACRO_EnableButton(LPCSTR id)
Alexandre Julliard's avatar
Alexandre Julliard committed
446
{
447 448
    WINHELP_BUTTON**    b;

449 450
    WINE_TRACE("(\"%s\")\n", id);

451 452 453 454
    b = MACRO_LookupButton(Globals.active_win, id);
    if (!*b) {WINE_FIXME("Couldn't find button '%s'\n", id); return;}

    EnableWindow((*b)->hWnd, TRUE);
Alexandre Julliard's avatar
Alexandre Julliard committed
455 456
}

457
void CALLBACK MACRO_EnableItem(LPCSTR str)
Alexandre Julliard's avatar
Alexandre Julliard committed
458
{
459
    WINE_FIXME("(\"%s\")\n", str);
Alexandre Julliard's avatar
Alexandre Julliard committed
460 461
}

462
void CALLBACK MACRO_EndMPrint(void)
Alexandre Julliard's avatar
Alexandre Julliard committed
463
{
464
    WINE_FIXME("()\n");
Alexandre Julliard's avatar
Alexandre Julliard committed
465 466
}

467
void CALLBACK MACRO_ExecFile(LPCSTR str1, LPCSTR str2, LONG u, LPCSTR str3)
Alexandre Julliard's avatar
Alexandre Julliard committed
468
{
469
    WINE_FIXME("(\"%s\", \"%s\", %u, \"%s\")\n", str1, str2, u, str3);
Alexandre Julliard's avatar
Alexandre Julliard committed
470 471
}

472
void CALLBACK MACRO_ExecProgram(LPCSTR str, LONG u)
Alexandre Julliard's avatar
Alexandre Julliard committed
473
{
474
    WINE_FIXME("(\"%s\", %u)\n", str, u);
Alexandre Julliard's avatar
Alexandre Julliard committed
475 476
}

477
void CALLBACK MACRO_Exit(void)
Alexandre Julliard's avatar
Alexandre Julliard committed
478
{
479 480
    WINE_TRACE("()\n");

481 482
    while (Globals.win_list)
        DestroyWindow(Globals.win_list->hMainWnd);
Alexandre Julliard's avatar
Alexandre Julliard committed
483 484
}

485
void CALLBACK MACRO_ExtAbleItem(LPCSTR str, LONG u)
Alexandre Julliard's avatar
Alexandre Julliard committed
486
{
487
    WINE_FIXME("(\"%s\", %u)\n", str, u);
Alexandre Julliard's avatar
Alexandre Julliard committed
488 489
}

490
void CALLBACK MACRO_ExtInsertItem(LPCSTR str1, LPCSTR str2, LPCSTR str3, LPCSTR str4, LONG u1, LONG u2)
Alexandre Julliard's avatar
Alexandre Julliard committed
491
{
492
    WINE_FIXME("(\"%s\", \"%s\", \"%s\", \"%s\", %u, %u)\n", str1, str2, str3, str4, u1, u2);
Alexandre Julliard's avatar
Alexandre Julliard committed
493 494
}

495
void CALLBACK MACRO_ExtInsertMenu(LPCSTR str1, LPCSTR str2, LPCSTR str3, LONG u1, LONG u2)
Alexandre Julliard's avatar
Alexandre Julliard committed
496
{
497
    WINE_FIXME("(\"%s\", \"%s\", \"%s\", %u, %u)\n", str1, str2, str3, u1, u2);
Alexandre Julliard's avatar
Alexandre Julliard committed
498 499
}

500
BOOL CALLBACK MACRO_FileExist(LPCSTR str)
Alexandre Julliard's avatar
Alexandre Julliard committed
501
{
502
    WINE_TRACE("(\"%s\")\n", str);
503
    return GetFileAttributes(str) != INVALID_FILE_ATTRIBUTES;
Alexandre Julliard's avatar
Alexandre Julliard committed
504 505
}

506
void CALLBACK MACRO_FileOpen(void)
Alexandre Julliard's avatar
Alexandre Julliard committed
507
{
508
    char szFile[MAX_PATH];
Alexandre Julliard's avatar
Alexandre Julliard committed
509

510
    if (WINHELP_GetOpenFileName(szFile, MAX_PATH))
511
    {
512
        HLPFILE*        hlpfile = WINHELP_LookupHelpFile(szFile);
513

514
        WINHELP_CreateHelpWindowByHash(hlpfile, 0,
515 516
                                       WINHELP_GetWindowInfo(hlpfile, "main"), SW_SHOWNORMAL);
    }
Alexandre Julliard's avatar
Alexandre Julliard committed
517 518
}

519
void CALLBACK MACRO_Find(void)
Alexandre Julliard's avatar
Alexandre Julliard committed
520
{
521
    WINE_FIXME("()\n");
Alexandre Julliard's avatar
Alexandre Julliard committed
522 523
}

524
void CALLBACK MACRO_Finder(void)
Alexandre Julliard's avatar
Alexandre Julliard committed
525
{
526
    WINE_FIXME("()\n");
Alexandre Julliard's avatar
Alexandre Julliard committed
527 528
}

529
void CALLBACK MACRO_FloatingMenu(void)
Alexandre Julliard's avatar
Alexandre Julliard committed
530
{
531
    WINE_FIXME("()\n");
Alexandre Julliard's avatar
Alexandre Julliard committed
532 533
}

534
void CALLBACK MACRO_Flush(void)
Alexandre Julliard's avatar
Alexandre Julliard committed
535
{
536
    WINE_FIXME("()\n");
Alexandre Julliard's avatar
Alexandre Julliard committed
537 538
}

539
void CALLBACK MACRO_FocusWindow(LPCSTR lpszWindow)
Alexandre Julliard's avatar
Alexandre Julliard committed
540
{
541 542 543 544 545 546 547 548 549
    WINHELP_WINDOW *win;

    WINE_TRACE("(\"%s\")\n", lpszWindow);

    if (!lpszWindow || !lpszWindow[0]) lpszWindow = "main";

    for (win = Globals.win_list; win; win = win->next)
        if (win->lpszName && !lstrcmpi(win->lpszName, lpszWindow))
            SetFocus(win->hMainWnd);
Alexandre Julliard's avatar
Alexandre Julliard committed
550 551
}

552
void CALLBACK MACRO_Generate(LPCSTR str, LONG w, LONG l)
Alexandre Julliard's avatar
Alexandre Julliard committed
553
{
554
    WINE_FIXME("(\"%s\", %x, %x)\n", str, w, l);
Alexandre Julliard's avatar
Alexandre Julliard committed
555 556
}

557
void CALLBACK MACRO_GotoMark(LPCSTR str)
Alexandre Julliard's avatar
Alexandre Julliard committed
558
{
559
    WINE_FIXME("(\"%s\")\n", str);
Alexandre Julliard's avatar
Alexandre Julliard committed
560 561
}

562
void CALLBACK MACRO_HelpOn(void)
Alexandre Julliard's avatar
Alexandre Julliard committed
563
{
564
    WINE_TRACE("()\n");
565
    MACRO_JumpContents((Globals.wVersion > 4) ? "winhelp32.hlp" : "winhelp.hlp", NULL);
Alexandre Julliard's avatar
Alexandre Julliard committed
566 567
}

568
void CALLBACK MACRO_HelpOnTop(void)
Alexandre Julliard's avatar
Alexandre Julliard committed
569
{
570
    WINE_FIXME("()\n");
Alexandre Julliard's avatar
Alexandre Julliard committed
571 572
}

573
void CALLBACK MACRO_History(void)
Alexandre Julliard's avatar
Alexandre Julliard committed
574
{
575 576 577 578 579 580 581 582
    WINE_TRACE("()\n");

    if (Globals.active_win && !Globals.active_win->hHistoryWnd)
    {
        HWND hWnd = CreateWindow(HISTORY_WIN_CLASS_NAME, "History", WS_OVERLAPPEDWINDOW,
                                 0, 0, 0, 0, 0, 0, Globals.hInstance, Globals.active_win);
        ShowWindow(hWnd, SW_NORMAL);
    }
583 584
}

585
void CALLBACK MACRO_IfThen(BOOL b, LPCSTR t)
586 587 588 589
{
    if (b) MACRO_ExecuteMacro(t);
}

590
void CALLBACK MACRO_IfThenElse(BOOL b, LPCSTR t, LPCSTR f)
591 592
{
    if (b) MACRO_ExecuteMacro(t); else MACRO_ExecuteMacro(f);
Alexandre Julliard's avatar
Alexandre Julliard committed
593 594
}

595
BOOL CALLBACK MACRO_InitMPrint(void)
Alexandre Julliard's avatar
Alexandre Julliard committed
596
{
597
    WINE_FIXME("()\n");
598
    return FALSE;
Alexandre Julliard's avatar
Alexandre Julliard committed
599 600
}

601
void CALLBACK MACRO_InsertItem(LPCSTR str1, LPCSTR str2, LPCSTR str3, LPCSTR str4, LONG u)
Alexandre Julliard's avatar
Alexandre Julliard committed
602
{
603
    WINE_FIXME("(\"%s\", \"%s\", \"%s\", \"%s\", %u)\n", str1, str2, str3, str4, u);
Alexandre Julliard's avatar
Alexandre Julliard committed
604 605
}

606
void CALLBACK MACRO_InsertMenu(LPCSTR str1, LPCSTR str2, LONG u)
Alexandre Julliard's avatar
Alexandre Julliard committed
607
{
608
    WINE_FIXME("(\"%s\", \"%s\", %u)\n", str1, str2, u);
Alexandre Julliard's avatar
Alexandre Julliard committed
609 610
}

611
BOOL CALLBACK MACRO_IsBook(void)
Alexandre Julliard's avatar
Alexandre Julliard committed
612
{
613 614
    WINE_TRACE("()\n");
    return Globals.isBook;
Alexandre Julliard's avatar
Alexandre Julliard committed
615 616
}

617
BOOL CALLBACK MACRO_IsMark(LPCSTR str)
Alexandre Julliard's avatar
Alexandre Julliard committed
618
{
619
    WINE_FIXME("(\"%s\")\n", str);
620
    return FALSE;
Alexandre Julliard's avatar
Alexandre Julliard committed
621 622
}

623
BOOL CALLBACK MACRO_IsNotMark(LPCSTR str)
Alexandre Julliard's avatar
Alexandre Julliard committed
624
{
625
    WINE_FIXME("(\"%s\")\n", str);
626
    return TRUE;
Alexandre Julliard's avatar
Alexandre Julliard committed
627 628
}

629
void CALLBACK MACRO_JumpContents(LPCSTR lpszPath, LPCSTR lpszWindow)
Alexandre Julliard's avatar
Alexandre Julliard committed
630
{
631 632
    HLPFILE*    hlpfile;

633
    WINE_TRACE("(\"%s\", \"%s\")\n", lpszPath, lpszWindow);
634
    hlpfile = WINHELP_LookupHelpFile(lpszPath);
635
    WINHELP_CreateHelpWindowByHash(hlpfile, 0,
636 637
                                   WINHELP_GetWindowInfo(hlpfile, lpszWindow),
                                   SW_NORMAL);
Alexandre Julliard's avatar
Alexandre Julliard committed
638 639
}

640
void CALLBACK MACRO_JumpContext(LPCSTR lpszPath, LPCSTR lpszWindow, LONG context)
Alexandre Julliard's avatar
Alexandre Julliard committed
641
{
642 643
    HLPFILE*    hlpfile;

644
    WINE_TRACE("(\"%s\", \"%s\", %d)\n", lpszPath, lpszWindow, context);
645 646 647 648 649
    hlpfile = WINHELP_LookupHelpFile(lpszPath);
    /* Some madness: what user calls 'context', hlpfile calls 'map' */
    WINHELP_CreateHelpWindowByMap(hlpfile, context,
                                  WINHELP_GetWindowInfo(hlpfile, lpszWindow),
                                  SW_NORMAL);
Alexandre Julliard's avatar
Alexandre Julliard committed
650 651
}

652
void CALLBACK MACRO_JumpHash(LPCSTR lpszPath, LPCSTR lpszWindow, LONG lHash)
Alexandre Julliard's avatar
Alexandre Julliard committed
653
{
654 655
    HLPFILE*    hlpfile;

656
    WINE_TRACE("(\"%s\", \"%s\", %u)\n", lpszPath, lpszWindow, lHash);
657
    hlpfile = WINHELP_LookupHelpFile(lpszPath);
658
    WINHELP_CreateHelpWindowByHash(hlpfile, lHash,
659 660
                                   WINHELP_GetWindowInfo(hlpfile, lpszWindow),
                                   SW_NORMAL);
Alexandre Julliard's avatar
Alexandre Julliard committed
661 662
}

663
void CALLBACK MACRO_JumpHelpOn(void)
Alexandre Julliard's avatar
Alexandre Julliard committed
664
{
665
    WINE_FIXME("()\n");
Alexandre Julliard's avatar
Alexandre Julliard committed
666 667
}

668 669 670
/* FIXME: those two macros are wrong
 * they should only contain 2 strings, path & window are coded as path>window
 */
671
void CALLBACK MACRO_JumpID(LPCSTR lpszPath, LPCSTR lpszWindow, LPCSTR topic_id)
Alexandre Julliard's avatar
Alexandre Julliard committed
672
{
673
    WINE_TRACE("(\"%s\", \"%s\", \"%s\")\n", lpszPath, lpszWindow, topic_id);
674
    MACRO_JumpHash(lpszPath, lpszWindow, HLPFILE_Hash(topic_id));
Alexandre Julliard's avatar
Alexandre Julliard committed
675 676
}

677
void CALLBACK MACRO_JumpKeyword(LPCSTR lpszPath, LPCSTR lpszWindow, LPCSTR keyword)
Alexandre Julliard's avatar
Alexandre Julliard committed
678
{
679
    WINE_FIXME("(\"%s\", \"%s\", \"%s\")\n", lpszPath, lpszWindow, keyword);
Alexandre Julliard's avatar
Alexandre Julliard committed
680 681
}

682
void CALLBACK MACRO_KLink(LPCSTR str1, LONG u, LPCSTR str2, LPCSTR str3)
Alexandre Julliard's avatar
Alexandre Julliard committed
683
{
684
    WINE_FIXME("(\"%s\", %u, \"%s\", \"%s\")\n", str1, u, str2, str3);
Alexandre Julliard's avatar
Alexandre Julliard committed
685 686
}

687
void CALLBACK MACRO_Menu(void)
Alexandre Julliard's avatar
Alexandre Julliard committed
688
{
689
    WINE_FIXME("()\n");
Alexandre Julliard's avatar
Alexandre Julliard committed
690 691
}

692
void CALLBACK MACRO_MPrintHash(LONG u)
Alexandre Julliard's avatar
Alexandre Julliard committed
693
{
694
    WINE_FIXME("(%u)\n", u);
Alexandre Julliard's avatar
Alexandre Julliard committed
695 696
}

697
void CALLBACK MACRO_MPrintID(LPCSTR str)
Alexandre Julliard's avatar
Alexandre Julliard committed
698
{
699
    WINE_FIXME("(\"%s\")\n", str);
Alexandre Julliard's avatar
Alexandre Julliard committed
700 701
}

702
void CALLBACK MACRO_Next(void)
Alexandre Julliard's avatar
Alexandre Julliard committed
703
{
704 705
    HLPFILE_PAGE*   page;

706
    WINE_TRACE("()\n");
707 708 709
    page = Globals.active_win->page;
    page = HLPFILE_PageByOffset(page->file, page->browse_fwd);
    if (page)
710 711 712 713
    {
        page->file->wRefCount++;
        WINHELP_CreateHelpWindow(page, Globals.active_win->info, SW_NORMAL);
    }
Alexandre Julliard's avatar
Alexandre Julliard committed
714 715
}

716
void CALLBACK MACRO_NoShow(void)
Alexandre Julliard's avatar
Alexandre Julliard committed
717
{
718
    WINE_FIXME("()\n");
Alexandre Julliard's avatar
Alexandre Julliard committed
719 720
}

721
void CALLBACK MACRO_PopupContext(LPCSTR str, LONG u)
Alexandre Julliard's avatar
Alexandre Julliard committed
722
{
723
    WINE_FIXME("(\"%s\", %u)\n", str, u);
Alexandre Julliard's avatar
Alexandre Julliard committed
724 725
}

726
void CALLBACK MACRO_PopupHash(LPCSTR str, LONG u)
Alexandre Julliard's avatar
Alexandre Julliard committed
727
{
728
    WINE_FIXME("(\"%s\", %u)\n", str, u);
Alexandre Julliard's avatar
Alexandre Julliard committed
729 730
}

731
void CALLBACK MACRO_PopupId(LPCSTR str1, LPCSTR str2)
Alexandre Julliard's avatar
Alexandre Julliard committed
732
{
733
    WINE_FIXME("(\"%s\", \"%s\")\n", str1, str2);
Alexandre Julliard's avatar
Alexandre Julliard committed
734 735
}

736
void CALLBACK MACRO_PositionWindow(LONG i1, LONG i2, LONG u1, LONG u2, LONG u3, LPCSTR str)
Alexandre Julliard's avatar
Alexandre Julliard committed
737
{
738
    WINE_FIXME("(%i, %i, %u, %u, %u, \"%s\")\n", i1, i2, u1, u2, u3, str);
Alexandre Julliard's avatar
Alexandre Julliard committed
739 740
}

741
void CALLBACK MACRO_Prev(void)
Alexandre Julliard's avatar
Alexandre Julliard committed
742
{
743 744
    HLPFILE_PAGE*   page;

745
    WINE_TRACE("()\n");
746 747 748
    page = Globals.active_win->page;
    page = HLPFILE_PageByOffset(page->file, page->browse_bwd);
    if (page)
749 750 751 752
    {
        page->file->wRefCount++;
        WINHELP_CreateHelpWindow(page, Globals.active_win->info, SW_NORMAL);
    }
Alexandre Julliard's avatar
Alexandre Julliard committed
753 754
}

755
void CALLBACK MACRO_Print(void)
Alexandre Julliard's avatar
Alexandre Julliard committed
756
{
Alexandre Julliard's avatar
Alexandre Julliard committed
757
    PRINTDLG printer;
758

759 760
    WINE_TRACE("()\n");

Alexandre Julliard's avatar
Alexandre Julliard committed
761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779
    printer.lStructSize         = sizeof(printer);
    printer.hwndOwner           = Globals.active_win->hMainWnd;
    printer.hInstance           = Globals.hInstance;
    printer.hDevMode            = 0;
    printer.hDevNames           = 0;
    printer.hDC                 = 0;
    printer.Flags               = 0;
    printer.nFromPage           = 0;
    printer.nToPage             = 0;
    printer.nMinPage            = 0;
    printer.nMaxPage            = 0;
    printer.nCopies             = 0;
    printer.lCustData           = 0;
    printer.lpfnPrintHook       = 0;
    printer.lpfnSetupHook       = 0;
    printer.lpPrintTemplateName = 0;
    printer.lpSetupTemplateName = 0;
    printer.hPrintTemplate      = 0;
    printer.hSetupTemplate      = 0;
780

Alexandre Julliard's avatar
Alexandre Julliard committed
781
    if (PrintDlgA(&printer)) {
782 783
        WINE_FIXME("Print()\n");
    }
Alexandre Julliard's avatar
Alexandre Julliard committed
784 785
}

786
void CALLBACK MACRO_PrinterSetup(void)
Alexandre Julliard's avatar
Alexandre Julliard committed
787
{
788
    WINE_FIXME("()\n");
Alexandre Julliard's avatar
Alexandre Julliard committed
789 790
}

791
void CALLBACK MACRO_RegisterRoutine(LPCSTR dll_name, LPCSTR proc, LPCSTR args)
Alexandre Julliard's avatar
Alexandre Julliard committed
792
{
793 794 795
    FARPROC             fn = NULL;
    int                 size;
    WINHELP_DLL*        dll;
796

797
    WINE_TRACE("(\"%s\", \"%s\", \"%s\")\n", dll_name, proc, args);
798

799 800 801 802
    /* FIXME: are the registered DLLs global or linked to the current file ???
     * We assume globals (as we did for macros, but is this really the case ???)
     */
    for (dll = Globals.dlls; dll; dll = dll->next)
803
    {
804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829
        if (!strcmp(dll->name, dll_name)) break;
    }
    if (!dll)
    {
        HANDLE hLib = LoadLibrary(dll_name);

        /* FIXME: the library will not be unloaded until exit of program 
         * We don't send the DW_TERM message
         */
        WINE_TRACE("Loading %s\n", dll_name);
        /* FIXME: should look in the directory where current hlpfile
         * is loaded from
         */
        if (hLib == NULL)
        {
            /* FIXME: internationalisation for error messages */
            WINE_FIXME("Cannot find dll %s\n", dll_name);
        }
        else if ((dll = HeapAlloc(GetProcessHeap(), 0, sizeof(*dll))))
        {
            dll->hLib = hLib;
            dll->name = strdup(dll_name); /* FIXME */
            dll->next = Globals.dlls;
            Globals.dlls = dll;
            dll->handler = (WINHELP_LDLLHandler)GetProcAddress(dll->hLib, "LDLLHandler");
            dll->class = dll->handler ? (dll->handler)(DW_WHATMSG, 0, 0) : DC_NOMSG;
830
            WINE_TRACE("Got class %x for DLL %s\n", dll->class, dll_name);
831 832 833 834
            if (dll->class & DC_INITTERM) dll->handler(DW_INIT, 0, 0);
            if (dll->class & DC_CALLBACKS) dll->handler(DW_CALLBACKS, (DWORD)Callbacks, 0);
        }
        else WINE_WARN("OOM\n");
835
    }
836
    if (dll && !(fn = GetProcAddress(dll->hLib, proc)))
837 838
    {
        /* FIXME: internationalisation for error messages */
839
        WINE_FIXME("Cannot find proc %s in dll %s\n", dll_name, proc);
840 841
    }

842 843 844
    size = ++MACRO_NumLoaded * sizeof(struct MacroDesc);
    if (!MACRO_Loaded) MACRO_Loaded = HeapAlloc(GetProcessHeap(), 0, size);
    else MACRO_Loaded = HeapReAlloc(GetProcessHeap(), 0, MACRO_Loaded, size);
845 846 847 848 849
    MACRO_Loaded[MACRO_NumLoaded - 1].name      = strdup(proc); /* FIXME */
    MACRO_Loaded[MACRO_NumLoaded - 1].alias     = NULL;
    MACRO_Loaded[MACRO_NumLoaded - 1].isBool    = 0;
    MACRO_Loaded[MACRO_NumLoaded - 1].arguments = strdup(args); /* FIXME */
    MACRO_Loaded[MACRO_NumLoaded - 1].fn        = fn;
850
    WINE_TRACE("Added %s(%s) at %p\n", proc, args, fn);
Alexandre Julliard's avatar
Alexandre Julliard committed
851 852
}

853
void CALLBACK MACRO_RemoveAccelerator(LONG u1, LONG u2)
Alexandre Julliard's avatar
Alexandre Julliard committed
854
{
855
    WINE_FIXME("(%u, %u)\n", u1, u2);
Alexandre Julliard's avatar
Alexandre Julliard committed
856 857
}

858
void CALLBACK MACRO_ResetMenu(void)
Alexandre Julliard's avatar
Alexandre Julliard committed
859
{
860
    WINE_FIXME("()\n");
Alexandre Julliard's avatar
Alexandre Julliard committed
861 862
}

863
void CALLBACK MACRO_SaveMark(LPCSTR str)
Alexandre Julliard's avatar
Alexandre Julliard committed
864
{
865
    WINE_FIXME("(\"%s\")\n", str);
Alexandre Julliard's avatar
Alexandre Julliard committed
866 867
}

868
void CALLBACK MACRO_Search(void)
Alexandre Julliard's avatar
Alexandre Julliard committed
869
{
870
    WINE_FIXME("()\n");
Alexandre Julliard's avatar
Alexandre Julliard committed
871 872
}

873
void CALLBACK MACRO_SetContents(LPCSTR str, LONG u)
Alexandre Julliard's avatar
Alexandre Julliard committed
874
{
875
    WINE_FIXME("(\"%s\", %u)\n", str, u);
Alexandre Julliard's avatar
Alexandre Julliard committed
876 877
}

878
void CALLBACK MACRO_SetHelpOnFile(LPCSTR str)
Alexandre Julliard's avatar
Alexandre Julliard committed
879
{
880
    WINE_FIXME("(\"%s\")\n", str);
Alexandre Julliard's avatar
Alexandre Julliard committed
881 882
}

883
void CALLBACK MACRO_SetPopupColor(LONG u1, LONG u2, LONG u3)
Alexandre Julliard's avatar
Alexandre Julliard committed
884
{
885
    WINE_FIXME("(%u, %u, %u)\n", u1, u2, u3);
Alexandre Julliard's avatar
Alexandre Julliard committed
886 887
}

888
void CALLBACK MACRO_ShellExecute(LPCSTR str1, LPCSTR str2, LONG u1, LONG u2, LPCSTR str3, LPCSTR str4)
Alexandre Julliard's avatar
Alexandre Julliard committed
889
{
890
    WINE_FIXME("(\"%s\", \"%s\", %u, %u, \"%s\", \"%s\")\n", str1, str2, u1, u2, str3, str4);
Alexandre Julliard's avatar
Alexandre Julliard committed
891 892
}

893
void CALLBACK MACRO_ShortCut(LPCSTR str1, LPCSTR str2, LONG w, LONG l, LPCSTR str)
Alexandre Julliard's avatar
Alexandre Julliard committed
894
{
895
    WINE_FIXME("(\"%s\", \"%s\", %x, %x, \"%s\")\n", str1, str2, w, l, str);
Alexandre Julliard's avatar
Alexandre Julliard committed
896 897
}

898
void CALLBACK MACRO_TCard(LONG u)
Alexandre Julliard's avatar
Alexandre Julliard committed
899
{
900
    WINE_FIXME("(%u)\n", u);
Alexandre Julliard's avatar
Alexandre Julliard committed
901 902
}

903
void CALLBACK MACRO_Test(LONG u)
Alexandre Julliard's avatar
Alexandre Julliard committed
904
{
905
    WINE_FIXME("(%u)\n", u);
Alexandre Julliard's avatar
Alexandre Julliard committed
906 907
}

908
BOOL CALLBACK MACRO_TestALink(LPCSTR str)
Alexandre Julliard's avatar
Alexandre Julliard committed
909
{
910
    WINE_FIXME("(\"%s\")\n", str);
911
    return FALSE;
Alexandre Julliard's avatar
Alexandre Julliard committed
912 913
}

914
BOOL CALLBACK MACRO_TestKLink(LPCSTR str)
Alexandre Julliard's avatar
Alexandre Julliard committed
915
{
916
    WINE_FIXME("(\"%s\")\n", str);
917
    return FALSE;
Alexandre Julliard's avatar
Alexandre Julliard committed
918 919
}

920
void CALLBACK MACRO_UncheckItem(LPCSTR str)
Alexandre Julliard's avatar
Alexandre Julliard committed
921
{
922
    WINE_FIXME("(\"%s\")\n", str);
Alexandre Julliard's avatar
Alexandre Julliard committed
923 924
}

925
void CALLBACK MACRO_UpdateWindow(LPCSTR str1, LPCSTR str2)
Alexandre Julliard's avatar
Alexandre Julliard committed
926
{
927
    WINE_FIXME("(\"%s\", \"%s\")\n", str1, str2);
Alexandre Julliard's avatar
Alexandre Julliard committed
928
}