4 * Copyright 1996 Ulrich Schmid
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.
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.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27 VOID MACRO_About(VOID)
29 fprintf(stderr, "About()\n");
32 VOID MACRO_AddAccelerator(LONG u1, LONG u2, LPCSTR str)
34 fprintf(stderr, "AddAccelerator(%lu, %lu, \"%s\")\n", u1, u2, str);
37 VOID MACRO_ALink(LPCSTR str1, LONG u, LPCSTR str2)
39 fprintf(stderr, "ALink(\"%s\", %lu, \"%s\")\n", str1, u, str2);
42 VOID MACRO_Annotate(VOID)
44 fprintf(stderr, "Annotate()\n");
47 VOID MACRO_AppendItem(LPCSTR str1, LPCSTR str2, LPCSTR str3, LPCSTR str4)
49 fprintf(stderr, "AppendItem(\"%s\", \"%s\", \"%s\", \"%s\")\n", str1, str2, str3, str4);
54 fprintf(stderr, "Back()\n");
57 VOID MACRO_BackFlush(VOID)
59 fprintf(stderr, "BackFlush()\n");
62 VOID MACRO_BookmarkDefine(VOID)
64 fprintf(stderr, "BookmarkDefine()\n");
67 VOID MACRO_BookmarkMore(VOID)
69 fprintf(stderr, "BookmarkMore()\n");
72 VOID MACRO_BrowseButtons(VOID)
74 MACRO_CreateButton("BTN_PREV", "&<<", "Prev()");
75 MACRO_CreateButton("BTN_NEXT", "&>>", "Next()");
78 VOID MACRO_ChangeButtonBinding(LPCSTR str1, LPCSTR str2)
80 fprintf(stderr, "ChangeButtonBinding(\"%s\", \"%s\")\n", str1, str2);
83 VOID MACRO_ChangeEnable(LPCSTR str1, LPCSTR str2)
85 fprintf(stderr, "ChangeEnable(\"%s\", \"%s\")\n", str1, str2);
88 VOID MACRO_ChangeItemBinding(LPCSTR str1, LPCSTR str2)
90 fprintf(stderr, "ChangeItemBinding(\"%s\", \"%s\")\n", str1, str2);
93 VOID MACRO_CheckItem(LPCSTR str)
95 fprintf(stderr, "CheckItem(\"%s\")\n", str);
98 VOID MACRO_CloseSecondarys(VOID)
101 for (win = Globals.win_list; win; win = win->next)
102 if (win->lpszName && lstrcmpi(win->lpszName, "main"))
103 DestroyWindow(win->hMainWnd);
106 VOID MACRO_CloseWindow(LPCSTR lpszWindow)
109 if (!lpszWindow || !lpszWindow[0]) lpszWindow = "main";
111 for (win = Globals.win_list; win; win = win->next)
112 if (win->lpszName && !lstrcmpi(win->lpszName, lpszWindow))
113 DestroyWindow(win->hMainWnd);
116 VOID MACRO_Compare(LPCSTR str)
118 fprintf(stderr, "Compare(\"%s\")\n", str);
121 VOID MACRO_Contents(VOID)
123 if (Globals.active_win->page)
124 MACRO_JumpContents(Globals.active_win->page->file->lpszPath, NULL);
127 VOID MACRO_ControlPanel(LPCSTR str1, LPCSTR str2, LONG u)
129 fprintf(stderr, "ControlPanel(\"%s\", \"%s\", %lu)\n", str1, str2, u);
132 VOID MACRO_CopyDialog(VOID)
134 fprintf(stderr, "CopyDialog()\n");
137 VOID MACRO_CopyTopic(VOID)
139 fprintf(stderr, "CopyTopic()\n");
142 VOID MACRO_CreateButton(LPCSTR id, LPCSTR name, LPCSTR macro)
144 WINHELP_WINDOW *win = Globals.active_win;
145 WINHELP_BUTTON *button, **b;
150 size = sizeof(WINHELP_BUTTON) + lstrlen(id) + lstrlen(name) + lstrlen(macro) + 3;
151 handle = GlobalAlloc(GMEM_FIXED, size);
154 button = GlobalLock(handle);
155 button->hSelf = handle;
159 ptr = GlobalLock(handle);
160 ptr += sizeof(WINHELP_BUTTON);
162 lstrcpy(ptr, (LPSTR) id);
163 button->lpszID = ptr;
164 ptr += lstrlen(id) + 1;
166 lstrcpy(ptr, (LPSTR) name);
167 button->lpszName = ptr;
168 ptr += lstrlen(name) + 1;
170 lstrcpy(ptr, (LPSTR) macro);
171 button->lpszMacro = ptr;
173 button->wParam = WH_FIRST_BUTTON;
174 for (b = &win->first_button; *b; b = &(*b)->next)
175 button->wParam = max(button->wParam, (*b)->wParam + 1);
178 SendMessage(win->hMainWnd, WM_USER, 0, 0);
181 VOID MACRO_DeleteItem(LPCSTR str)
183 fprintf(stderr, "DeleteItem(\"%s\")\n", str);
186 VOID MACRO_DeleteMark(LPCSTR str)
188 fprintf(stderr, "DeleteMark(\"%s\")\n", str);
191 VOID MACRO_DestroyButton(LPCSTR str)
193 fprintf(stderr, "DestroyButton(\"%s\")\n", str);
196 VOID MACRO_DisableButton(LPCSTR str)
198 fprintf(stderr, "DisableButton(\"%s\")\n", str);
201 VOID MACRO_DisableItem(LPCSTR str)
203 fprintf(stderr, "DisableItem(\"%s\")\n", str);
206 VOID MACRO_EnableButton(LPCSTR str)
208 fprintf(stderr, "EnableButton(\"%s\")\n", str);
211 VOID MACRO_EnableItem(LPCSTR str)
213 fprintf(stderr, "EnableItem(\"%s\")\n", str);
216 VOID MACRO_EndMPrint(VOID)
218 fprintf(stderr, "EndMPrint()\n");
221 VOID MACRO_ExecFile(LPCSTR str1, LPCSTR str2, LONG u, LPCSTR str3)
223 fprintf(stderr, "ExecFile(\"%s\", \"%s\", %lu, \"%s\")\n", str1, str2, u, str3);
226 VOID MACRO_ExecProgram(LPCSTR str, LONG u)
228 fprintf(stderr, "ExecProgram(\"%s\", %lu)\n", str, u);
231 VOID MACRO_Exit(VOID)
233 while(Globals.win_list)
234 DestroyWindow(Globals.win_list->hMainWnd);
237 VOID MACRO_ExtAbleItem(LPCSTR str, LONG u)
239 fprintf(stderr, "ExtAbleItem(\"%s\", %lu)\n", str, u);
242 VOID MACRO_ExtInsertItem(LPCSTR str1, LPCSTR str2, LPCSTR str3, LPCSTR str4, LONG u1, LONG u2)
244 fprintf(stderr, "ExtInsertItem(\"%s\", \"%s\", \"%s\", \"%s\", %lu, %lu)\n", str1, str2, str3, str4, u1, u2);
247 VOID MACRO_ExtInsertMenu(LPCSTR str1, LPCSTR str2, LPCSTR str3, LONG u1, LONG u2)
249 fprintf(stderr, "ExtInsertMenu(\"%s\", \"%s\", \"%s\", %lu, %lu)\n", str1, str2, str3, u1, u2);
252 BOOL MACRO_FileExist(LPCSTR str)
254 fprintf(stderr, "FileExist(\"%s\")\n", str);
258 VOID MACRO_FileOpen(VOID)
260 OPENFILENAME openfilename;
261 CHAR szPath[MAX_PATHNAME_LEN];
262 CHAR szDir[MAX_PATHNAME_LEN];
263 CHAR szzFilter[2 * MAX_STRING_LEN + 100];
266 LoadString(Globals.hInstance, 0X12B, p, MAX_STRING_LEN);
270 LoadString(Globals.hInstance, 0x12A, p, MAX_STRING_LEN);
276 GetCurrentDirectory(sizeof(szDir), szDir);
280 openfilename.lStructSize = 0;
281 openfilename.hwndOwner = Globals.active_win->hMainWnd;
282 openfilename.hInstance = Globals.hInstance;
283 openfilename.lpstrFilter = szzFilter;
284 openfilename.lpstrCustomFilter = 0;
285 openfilename.nMaxCustFilter = 0;
286 openfilename.nFilterIndex = 1;
287 openfilename.lpstrFile = szPath;
288 openfilename.nMaxFile = sizeof(szPath);
289 openfilename.lpstrFileTitle = 0;
290 openfilename.nMaxFileTitle = 0;
291 openfilename.lpstrInitialDir = szDir;
292 openfilename.lpstrTitle = 0;
293 openfilename.Flags = 0;
294 openfilename.nFileOffset = 0;
295 openfilename.nFileExtension = 0;
296 openfilename.lpstrDefExt = 0;
297 openfilename.lCustData = 0;
298 openfilename.lpfnHook = 0;
299 openfilename.lpTemplateName = 0;
301 if (GetOpenFileName(&openfilename))
302 WINHELP_CreateHelpWindow(szPath, 0, "main", FALSE, 0, NULL, SW_SHOWNORMAL);
305 VOID MACRO_Find(VOID)
307 fprintf(stderr, "Find()\n");
310 VOID MACRO_Finder(VOID)
312 fprintf(stderr, "Finder()\n");
315 VOID MACRO_FloatingMenu(VOID)
317 fprintf(stderr, "FloatingMenu()\n");
320 VOID MACRO_Flush(VOID)
322 fprintf(stderr, "Flush()\n");
325 VOID MACRO_FocusWindow(LPCSTR str)
327 fprintf(stderr, "FocusWindow(\"%s\")\n", str);
330 VOID MACRO_Generate(LPCSTR str, WPARAM w, LPARAM l)
332 fprintf(stderr, "Generate(\"%s\", %x, %lx)\n", str, w, l);
335 VOID MACRO_GotoMark(LPCSTR str)
337 fprintf(stderr, "GotoMark(\"%s\")\n", str);
340 VOID MACRO_HelpOn(VOID)
342 MACRO_JumpContents((Globals.wVersion > 4) ? "winhelp32.hlp" : "winhelp.hlp", NULL);
345 VOID MACRO_HelpOnTop(VOID)
347 fprintf(stderr, "HelpOnTop()\n");
350 VOID MACRO_History(VOID)
352 fprintf(stderr, "History()\n");
355 BOOL MACRO_InitMPrint(VOID)
357 fprintf(stderr, "InitMPrint()\n");
361 VOID MACRO_InsertItem(LPCSTR str1, LPCSTR str2, LPCSTR str3, LPCSTR str4, LONG u)
363 fprintf(stderr, "InsertItem(\"%s\", \"%s\", \"%s\", \"%s\", %lu)\n", str1, str2, str3, str4, u);
366 VOID MACRO_InsertMenu(LPCSTR str1, LPCSTR str2, LONG u)
368 fprintf(stderr, "InsertMenu(\"%s\", \"%s\", %lu)\n", str1, str2, u);
371 BOOL MACRO_IsBook(VOID)
373 fprintf(stderr, "IsBook()\n");
377 BOOL MACRO_IsMark(LPCSTR str)
379 fprintf(stderr, "IsMark(\"%s\")\n", str);
383 BOOL MACRO_IsNotMark(LPCSTR str)
385 fprintf(stderr, "IsNotMark(\"%s\")\n", str);
389 VOID MACRO_JumpContents(LPCSTR lpszPath, LPCSTR lpszWindow)
391 WINHELP_CreateHelpWindow(lpszPath, 0, lpszWindow, FALSE, 0, NULL, SW_NORMAL);
394 VOID MACRO_JumpContext(LPCSTR lpszPath, LPCSTR lpszWindow, LONG context)
396 fprintf(stderr, "JumpContext(\"%s\", \"%s\", %lu)\n", lpszPath, lpszWindow, context);
399 VOID MACRO_JumpHash(LPCSTR lpszPath, LPCSTR lpszWindow, LONG lHash)
401 WINHELP_CreateHelpWindow(lpszPath, lHash, lpszWindow, FALSE, 0, NULL, SW_NORMAL);
404 VOID MACRO_JumpHelpOn(VOID)
406 fprintf(stderr, "JumpHelpOn()\n");
409 VOID MACRO_JumpID(LPCSTR lpszPath, LPCSTR lpszWindow, LPCSTR topic_id)
411 MACRO_JumpHash(lpszPath, lpszWindow, HLPFILE_Hash(topic_id));
414 VOID MACRO_JumpKeyword(LPCSTR lpszPath, LPCSTR lpszWindow, LPCSTR keyword)
416 fprintf(stderr, "JumpKeyword(\"%s\", \"%s\", \"%s\")\n", lpszPath, lpszWindow, keyword);
419 VOID MACRO_KLink(LPCSTR str1, LONG u, LPCSTR str2, LPCSTR str3)
421 fprintf(stderr, "KLink(\"%s\", %lu, \"%s\", \"%s\")\n", str1, u, str2, str3);
424 VOID MACRO_Menu(VOID)
426 fprintf(stderr, "Menu()\n");
429 VOID MACRO_MPrintHash(LONG u)
431 fprintf(stderr, "MPrintHash(%lu)\n", u);
434 VOID MACRO_MPrintID(LPCSTR str)
436 fprintf(stderr, "MPrintID(\"%s\")\n", str);
439 VOID MACRO_Next(VOID)
441 fprintf(stderr, "Next()\n");
444 VOID MACRO_NoShow(VOID)
446 fprintf(stderr, "NoShow()\n");
449 VOID MACRO_PopupContext(LPCSTR str, LONG u)
451 fprintf(stderr, "PopupContext(\"%s\", %lu)\n", str, u);
454 VOID MACRO_PopupHash(LPCSTR str, LONG u)
456 fprintf(stderr, "PopupHash(\"%s\", %lu)\n", str, u);
459 VOID MACRO_PopupId(LPCSTR str1, LPCSTR str2)
461 fprintf(stderr, "PopupId(\"%s\", \"%s\")\n", str1, str2);
464 VOID MACRO_PositionWindow(LONG i1, LONG i2, LONG u1, LONG u2, LONG u3, LPCSTR str)
466 fprintf(stderr, "PositionWindow(%li, %li, %lu, %lu, %lu, \"%s\")\n", i1, i2, u1, u2, u3, str);
469 VOID MACRO_Prev(VOID)
471 fprintf(stderr, "Prev()\n");
474 VOID MACRO_Print(VOID)
478 printer.lStructSize = sizeof(printer);
479 printer.hwndOwner = Globals.active_win->hMainWnd;
480 printer.hInstance = Globals.hInstance;
481 printer.hDevMode = 0;
482 printer.hDevNames = 0;
485 printer.nFromPage = 0;
487 printer.nMinPage = 0;
488 printer.nMaxPage = 0;
490 printer.lCustData = 0;
491 printer.lpfnPrintHook = 0;
492 printer.lpfnSetupHook = 0;
493 printer.lpPrintTemplateName = 0;
494 printer.lpSetupTemplateName = 0;
495 printer.hPrintTemplate = 0;
496 printer.hSetupTemplate = 0;
498 if (PrintDlgA(&printer)) {
499 fprintf(stderr, "Print()\n");
503 VOID MACRO_PrinterSetup(VOID)
505 fprintf(stderr, "PrinterSetup()\n");
508 VOID MACRO_RegisterRoutine(LPCSTR str1, LPCSTR str2, LPCSTR str3)
510 fprintf(stderr, "RegisterRoutine(\"%s\", \"%s\", \"%s\")\n", str1, str2, str3);
513 VOID MACRO_RemoveAccelerator(LONG u1, LONG u2)
515 fprintf(stderr, "RemoveAccelerator(%lu, %lu)\n", u1, u2);
518 VOID MACRO_ResetMenu(VOID)
520 fprintf(stderr, "ResetMenu()\n");
523 VOID MACRO_SaveMark(LPCSTR str)
525 fprintf(stderr, "SaveMark(\"%s\")\n", str);
528 VOID MACRO_Search(VOID)
530 fprintf(stderr, "Search()\n");
533 VOID MACRO_SetContents(LPCSTR str, LONG u)
535 fprintf(stderr, "SetContents(\"%s\", %lu)\n", str, u);
538 VOID MACRO_SetHelpOnFile(LPCSTR str)
540 fprintf(stderr, "SetHelpOnFile(\"%s\")\n", str);
543 VOID MACRO_SetPopupColor(LONG u1, LONG u2, LONG u3)
545 fprintf(stderr, "SetPopupColor(%lu, %lu, %lu)\n", u1, u2, u3);
548 VOID MACRO_ShellExecute(LPCSTR str1, LPCSTR str2, LONG u1, LONG u2, LPCSTR str3, LPCSTR str4)
550 fprintf(stderr, "ShellExecute(\"%s\", \"%s\", %lu, %lu, \"%s\", \"%s\")\n", str1, str2, u1, u2, str3, str4);
553 VOID MACRO_ShortCut(LPCSTR str1, LPCSTR str2, WPARAM w, LPARAM l, LPCSTR str)
555 fprintf(stderr, "ShortCut(\"%s\", \"%s\", %x, %lx, \"%s\")\n", str1, str2, w, l, str);
558 VOID MACRO_TCard(LONG u)
560 fprintf(stderr, "TCard(%lu)\n", u);
563 VOID MACRO_Test(LONG u)
565 fprintf(stderr, "Test(%lu)\n", u);
568 BOOL MACRO_TestALink(LPCSTR str)
570 fprintf(stderr, "TestALink(\"%s\")\n", str);
574 BOOL MACRO_TestKLink(LPCSTR str)
576 fprintf(stderr, "TestKLink(\"%s\")\n", str);
580 VOID MACRO_UncheckItem(LPCSTR str)
582 fprintf(stderr, "UncheckItem(\"%s\")\n", str);
585 VOID MACRO_UpdateWindow(LPCSTR str1, LPCSTR str2)
587 fprintf(stderr, "UpdateWindow(\"%s\", \"%s\")\n", str1, str2);
590 /* Local Variables: */
591 /* c-file-style: "GNU" */