wine/programs/winhelp/macro.c
Alexandre Julliard 54c2711ff6 Release 980329
Sun Mar 29 15:18:57 1998  Uwe Bonnes <elektron.ikp.physik.tu-darmstadt.de>

	* [msdos/int21.c]
	More verbose Trace messages

Sun Mar 29 15:03:30 1998  Alexandre Julliard  <julliard@lrc.epfl.ch>

	* [loader/ne_image.c]
	Terminate relocation chains on 0 offset.

Sun Mar 29 02:35:45 1998  James Juran  <jrj120@psu.edu>

	* [windows/caret.c] [windows/class.c] [windows/clipboard.c]
	Fixed more USER32 ordinal numbers in function documentation.

Sat Mar 28 22:40:23 1997  Andreas Mohr <100.30936@germany.net>

	* [controls/desktop.c]
	Return 1 for WM_NCCREATE in DesktopWndProc.

	* [controls/menu.c]
	Fixed crash when destroying a top popup win that was only created
	but not shown.

	* [ole/typelib.c] [if1632/typelib.spec]
	Implemented OABuildVersion.

	* [windows/win.c]
	Finally fixed ugly bug in GetParent32 that affected window placement:
	Didn't return 0 for windows that have neither WS_POPUP nor
	WS_CHILD set. Now it acts exactly like Windows (at least I hope so ;)

Sat Mar 28 02:26:43 1998  Dimitrie O. Paun  <dimi@mail.cs.toronto.edu>

	* [DEVELOPERS-HINTS] [documentation/debug-msgs]
	Updated documentation on debug messages

	* [include/button.h] [controls/button.c] [include/windows.h]
	[include/combo.h] [controls/combo.c] [controls/commctrl.c]
	[controls/icontitle.c] [controls/listbox.c]	[controls/menu.c]
	[controls/scroll.c] [controls/widgets.c] 
	Changed some 16-bit code to 32-bit code. I am positive this will
	not break anything.

	* [controls/uitools.c] 
	Renamed the prefix of some functions from UITOOLS_ to UITOOLS95_
	to reflect the fact that they implement Win95 look. Maybe we will
	have a UITOOLS31_ in the future. Anyhow, the change is completely
	internal to this file.

	* [*/*.c]
	Changed a lot of [f]printf into appropriate debug messages.

Fri Mar 27 19:56:12 1998  Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
	* [documentation/status/]
	Added directdraw and directsound status.

	* [if1632/thunk.c][ole/*.c][win32/kernel32.c]
	Added some documentation.
	Moved FUNC004 to thunk.c since it seems to be a 16->32 thunk
	(calling conventions and the like still unknown).

Fri Mar 27 09:59:32 1998  Morten Eriksen  <mortene@pvv.org>

	* [loader/resource.c][windows/keyboard.c]
	Implemented CopyAcceleratorTable() and CreateAcceleratorTable().
	
	* [include/compobj.h][ole/compobj.c][relay32/ole32.spec]
	Added implementation of StringFromGUID2(). 

Tue Mar 26 23:12:05 1998  Eric Kohl <ekohl@abo.rhein-zeitung.de>

	* [misc/imagelist.c][relay32/comctl32.spec]
	Implemented new debugging interface.
	Added missing functions (some are empty stubs).
	Changed ordinals in comctl32.spec (now dll version 4.72 comatible).

	* [objects/oembitmaps.c][include/windows.h]
	  [include/bitmaps/*]
	Added missing restore bitmaps for Win95 look.
	Added missing Win95 cursors.

Thu Mar 26 10:18:20 1998  Douglas Ridgway  <ridgway@winehq.com>

	* [programs/view/Makefile.in] [programs/view/view.c]
	Fix compilation, Aldus placeable metafile loading.

	* [graphics/metafiledrv/init.c] [relay32/gdi32.spec] 
	  [objects/metafile.c]
	Implemented various 32 bit versions of regular metafile API.

	* [objects/enhmetafile.c]
	Implemented rendering of a couple of dozen records.

Tue Mar 24 20:06:39 1998  Matthew Becker <mbecker@glasscity.net>

	* [memory/*.c]
	Updated documentation for API manpages.

Mon Mar 23 09:09:00 1998  Alex Korobka <alex@pharm.sunysb.edu>

	* [misc/winsock.c]
	Fixed 32-bit DNS lookup.

Mon Mar 23 23:54:47 1998  Luiz Otavio L. Zorzella  <zorzella@nr.conexware.com>

	* [multimedia/init.c]
	New code for the initialization and gathering of information about
	the MIDI devices, for future use.

Thu Mar 19 00:59:29 1998  Jim Peterson <jspeter@nospam.birch.ee.vt.edu>

	* [windows/win.c]
	Eliminated inaccurate setting of cs->hMenu in
	WIN_CreateWindowEx, along with superfluous SetMenu32 call.

Mon Mar 16 17:40:53 1998  Petter Reinholdtsen <pere@td.org.uit.no>

	* [debugger/dbg.y] [debugger/Makefile.in] [Makefile.in]
	Install wine.sym in $(exec_prefix)/lib and make sure the debugger
	finds it.

Sun Mar 15 22:36:35 1998  Michael Veksler <mveksler@tx.technion.ac.il>

	* [dummy.c] [if1632/gdi.spec]
	Fixed stub declaration of GDI_532, so Hebrew-Word2 kind of works.
1998-03-29 19:44:57 +00:00

580 lines
13 KiB
C

/*
* Help Viewer
*
* Copyright 1996 Ulrich Schmid
*/
#include <stdio.h>
#include "windows.h"
#include "commdlg.h"
#ifdef WINELIB
#include "shell.h"
#endif
#include "winhelp.h"
#include "macro.h"
#include "debug.h"
VOID MACRO_About(VOID)
{
fprintf(stderr, "About()\n");
}
VOID MACRO_AddAccelerator(LONG u1, LONG u2, LPCSTR str)
{
fprintf(stderr, "AddAccelerator(%lu, %lu, \"%s\")\n", u1, u2, str);
}
VOID MACRO_ALink(LPCSTR str1, LONG u, LPCSTR str2)
{
fprintf(stderr, "ALink(\"%s\", %lu, \"%s\")\n", str1, u, str2);
}
VOID MACRO_Annotate(VOID)
{
fprintf(stderr, "Annotate()\n");
}
VOID MACRO_AppendItem(LPCSTR str1, LPCSTR str2, LPCSTR str3, LPCSTR str4)
{
fprintf(stderr, "AppendItem(\"%s\", \"%s\", \"%s\", \"%s\")\n", str1, str2, str3, str4);
}
VOID MACRO_Back(VOID)
{
fprintf(stderr, "Back()\n");
}
VOID MACRO_BackFlush(VOID)
{
fprintf(stderr, "BackFlush()\n");
}
VOID MACRO_BookmarkDefine(VOID)
{
fprintf(stderr, "BookmarkDefine()\n");
}
VOID MACRO_BookmarkMore(VOID)
{
fprintf(stderr, "BookmarkMore()\n");
}
VOID MACRO_BrowseButtons(VOID)
{
MACRO_CreateButton("BTN_PREV", "&<<", "Prev()");
MACRO_CreateButton("BTN_NEXT", "&>>", "Next()");
}
VOID MACRO_ChangeButtonBinding(LPCSTR str1, LPCSTR str2)
{
fprintf(stderr, "ChangeButtonBinding(\"%s\", \"%s\")\n", str1, str2);
}
VOID MACRO_ChangeEnable(LPCSTR str1, LPCSTR str2)
{
fprintf(stderr, "ChangeEnable(\"%s\", \"%s\")\n", str1, str2);
}
VOID MACRO_ChangeItemBinding(LPCSTR str1, LPCSTR str2)
{
fprintf(stderr, "ChangeItemBinding(\"%s\", \"%s\")\n", str1, str2);
}
VOID MACRO_CheckItem(LPCSTR str)
{
fprintf(stderr, "CheckItem(\"%s\")\n", str);
}
VOID MACRO_CloseSecondarys(VOID)
{
WINHELP_WINDOW *win;
for (win = Globals.win_list; win; win = win->next)
if (win->lpszName && lstrcmpi(win->lpszName, "main"))
DestroyWindow(win->hMainWnd);
}
VOID MACRO_CloseWindow(LPCSTR lpszWindow)
{
WINHELP_WINDOW *win;
if (!lpszWindow || !lpszWindow[0]) lpszWindow = "main";
for (win = Globals.win_list; win; win = win->next)
if (win->lpszName && !lstrcmpi(win->lpszName, lpszWindow))
DestroyWindow(win->hMainWnd);
}
VOID MACRO_Compare(LPCSTR str)
{
fprintf(stderr, "Compare(\"%s\")\n", str);
}
VOID MACRO_Contents(VOID)
{
if (Globals.active_win->page)
MACRO_JumpContents(Globals.active_win->page->file->lpszPath, NULL);
}
VOID MACRO_ControlPanel(LPCSTR str1, LPCSTR str2, LONG u)
{
fprintf(stderr, "ControlPanel(\"%s\", \"%s\", %lu)\n", str1, str2, u);
}
VOID MACRO_CopyDialog(VOID)
{
fprintf(stderr, "CopyDialog()\n");
}
VOID MACRO_CopyTopic(VOID)
{
fprintf(stderr, "CopyTopic()\n");
}
VOID MACRO_CreateButton(LPCSTR id, LPCSTR name, LPCSTR macro)
{
WINHELP_WINDOW *win = Globals.active_win;
WINHELP_BUTTON *button, **b;
LONG size;
HGLOBAL handle;
LPSTR ptr;
size = sizeof(WINHELP_BUTTON) + lstrlen(id) + lstrlen(name) + lstrlen(macro) + 3;
handle = GlobalAlloc(GMEM_FIXED, size);
if (!handle) return;
button = GlobalLock(handle);
button->hSelf = handle;
button->next = 0;
button->hWnd = 0;
ptr = GlobalLock(handle);
ptr += sizeof(WINHELP_BUTTON);
lstrcpy(ptr, (LPSTR) id);
button->lpszID = ptr;
ptr += lstrlen(id) + 1;
lstrcpy(ptr, (LPSTR) name);
button->lpszName = ptr;
ptr += lstrlen(name) + 1;
lstrcpy(ptr, (LPSTR) macro);
button->lpszMacro = ptr;
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);
}
VOID MACRO_DeleteItem(LPCSTR str)
{
fprintf(stderr, "DeleteItem(\"%s\")\n", str);
}
VOID MACRO_DeleteMark(LPCSTR str)
{
fprintf(stderr, "DeleteMark(\"%s\")\n", str);
}
VOID MACRO_DestroyButton(LPCSTR str)
{
fprintf(stderr, "DestroyButton(\"%s\")\n", str);
}
VOID MACRO_DisableButton(LPCSTR str)
{
fprintf(stderr, "DisableButton(\"%s\")\n", str);
}
VOID MACRO_DisableItem(LPCSTR str)
{
fprintf(stderr, "DisableItem(\"%s\")\n", str);
}
VOID MACRO_EnableButton(LPCSTR str)
{
fprintf(stderr, "EnableButton(\"%s\")\n", str);
}
VOID MACRO_EnableItem(LPCSTR str)
{
fprintf(stderr, "EnableItem(\"%s\")\n", str);
}
VOID MACRO_EndMPrint(VOID)
{
fprintf(stderr, "EndMPrint()\n");
}
VOID MACRO_ExecFile(LPCSTR str1, LPCSTR str2, LONG u, LPCSTR str3)
{
fprintf(stderr, "ExecFile(\"%s\", \"%s\", %lu, \"%s\")\n", str1, str2, u, str3);
}
VOID MACRO_ExecProgram(LPCSTR str, LONG u)
{
fprintf(stderr, "ExecProgram(\"%s\", %lu)\n", str, u);
}
VOID MACRO_Exit(VOID)
{
while(Globals.win_list)
DestroyWindow(Globals.win_list->hMainWnd);
}
VOID MACRO_ExtAbleItem(LPCSTR str, LONG u)
{
fprintf(stderr, "ExtAbleItem(\"%s\", %lu)\n", str, u);
}
VOID MACRO_ExtInsertItem(LPCSTR str1, LPCSTR str2, LPCSTR str3, LPCSTR str4, LONG u1, LONG u2)
{
fprintf(stderr, "ExtInsertItem(\"%s\", \"%s\", \"%s\", \"%s\", %lu, %lu)\n", str1, str2, str3, str4, u1, u2);
}
VOID MACRO_ExtInsertMenu(LPCSTR str1, LPCSTR str2, LPCSTR str3, LONG u1, LONG u2)
{
fprintf(stderr, "ExtInsertMenu(\"%s\", \"%s\", \"%s\", %lu, %lu)\n", str1, str2, str3, u1, u2);
}
BOOL MACRO_FileExist(LPCSTR str)
{
fprintf(stderr, "FileExist(\"%s\")\n", str);
return TRUE;
}
VOID MACRO_FileOpen(VOID)
{
OPENFILENAME openfilename;
CHAR szPath[MAX_PATHNAME_LEN];
CHAR szDir[MAX_PATHNAME_LEN];
CHAR szzFilter[2 * MAX_STRING_LEN + 100];
LPSTR p = szzFilter;
LoadString(Globals.hInstance, IDS_HELP_FILES_HLP, p, MAX_STRING_LEN);
p += strlen(p) + 1;
lstrcpy(p, "*.hlp");
p += strlen(p) + 1;
LoadString(Globals.hInstance, IDS_ALL_FILES, p, MAX_STRING_LEN);
p += strlen(p) + 1;
lstrcpy(p, "*.*");
p += strlen(p) + 1;
*p = '\0';
GetWindowsDirectory(szDir, sizeof(szDir));
openfilename.lStructSize = 0;
openfilename.hwndOwner = Globals.active_win->hMainWnd;
openfilename.hInstance = Globals.hInstance;
openfilename.lpstrFilter = szzFilter;
openfilename.lpstrCustomFilter = 0;
openfilename.nMaxCustFilter = 0;
openfilename.nFilterIndex = 0;
openfilename.lpstrFile = szPath;
openfilename.nMaxFile = sizeof(szPath);
openfilename.lpstrFileTitle = 0;
openfilename.nMaxFileTitle = 0;
openfilename.lpstrInitialDir = szDir;
openfilename.lpstrTitle = 0;
openfilename.Flags = 0;
openfilename.nFileOffset = 0;
openfilename.nFileExtension = 0;
openfilename.lpstrDefExt = 0;
openfilename.lCustData = 0;
openfilename.lpfnHook = 0;
openfilename.lpTemplateName = 0;
if (GetOpenFileName(&openfilename))
WINHELP_CreateHelpWindow(szPath, 0, "main", FALSE, NULL, NULL, SW_SHOWNORMAL);
}
VOID MACRO_Find(VOID)
{
fprintf(stderr, "Find()\n");
}
VOID MACRO_Finder(VOID)
{
fprintf(stderr, "Finder()\n");
}
VOID MACRO_FloatingMenu(VOID)
{
fprintf(stderr, "FloatingMenu()\n");
}
VOID MACRO_Flush(VOID)
{
fprintf(stderr, "Flush()\n");
}
VOID MACRO_FocusWindow(LPCSTR str)
{
fprintf(stderr, "FocusWindow(\"%s\")\n", str);
}
VOID MACRO_Generate(LPCSTR str, WPARAM w, LPARAM l)
{
fprintf(stderr, "Generate(\"%s\", %x, %lx)\n", str, w, l);
}
VOID MACRO_GotoMark(LPCSTR str)
{
fprintf(stderr, "GotoMark(\"%s\")\n", str);
}
VOID MACRO_HelpOn(VOID)
{
MACRO_JumpContents((Globals.wVersion > 4) ? "winhelp32.hlp" : "winhelp.hlp", NULL);
}
VOID MACRO_HelpOnTop(VOID)
{
fprintf(stderr, "HelpOnTop()\n");
}
VOID MACRO_History(VOID)
{
fprintf(stderr, "History()\n");
}
BOOL MACRO_InitMPrint(VOID)
{
fprintf(stderr, "InitMPrint()\n");
return FALSE;
}
VOID MACRO_InsertItem(LPCSTR str1, LPCSTR str2, LPCSTR str3, LPCSTR str4, LONG u)
{
fprintf(stderr, "InsertItem(\"%s\", \"%s\", \"%s\", \"%s\", %lu)\n", str1, str2, str3, str4, u);
}
VOID MACRO_InsertMenu(LPCSTR str1, LPCSTR str2, LONG u)
{
fprintf(stderr, "InsertMenu(\"%s\", \"%s\", %lu)\n", str1, str2, u);
}
BOOL MACRO_IsBook(VOID)
{
fprintf(stderr, "IsBook()\n");
return TRUE;
}
BOOL MACRO_IsMark(LPCSTR str)
{
fprintf(stderr, "IsMark(\"%s\")\n", str);
return FALSE;
}
BOOL MACRO_IsNotMark(LPCSTR str)
{
fprintf(stderr, "IsNotMark(\"%s\")\n", str);
return TRUE;
}
VOID MACRO_JumpContents(LPCSTR lpszPath, LPCSTR lpszWindow)
{
WINHELP_CreateHelpWindow(lpszPath, 0, lpszWindow, FALSE, NULL, NULL, SW_NORMAL);
}
VOID MACRO_JumpContext(LPCSTR lpszPath, LPCSTR lpszWindow, LONG context)
{
fprintf(stderr, "JumpContext(\"%s\", \"%s\", %lu)\n", lpszPath, lpszWindow, context);
}
VOID MACRO_JumpHash(LPCSTR lpszPath, LPCSTR lpszWindow, LONG lHash)
{
WINHELP_CreateHelpWindow(lpszPath, lHash, lpszWindow, FALSE, NULL, NULL, SW_NORMAL);
}
VOID MACRO_JumpHelpOn(VOID)
{
fprintf(stderr, "JumpHelpOn()\n");
}
VOID MACRO_JumpID(LPCSTR lpszPath, LPCSTR lpszWindow, LPCSTR topic_id)
{
MACRO_JumpHash(lpszPath, lpszWindow, HLPFILE_Hash(topic_id));
}
VOID MACRO_JumpKeyword(LPCSTR lpszPath, LPCSTR lpszWindow, LPCSTR keyword)
{
fprintf(stderr, "JumpKeyword(\"%s\", \"%s\", \"%s\")\n", lpszPath, lpszWindow, keyword);
}
VOID MACRO_KLink(LPCSTR str1, LONG u, LPCSTR str2, LPCSTR str3)
{
fprintf(stderr, "KLink(\"%s\", %lu, \"%s\", \"%s\")\n", str1, u, str2, str3);
}
VOID MACRO_Menu(VOID)
{
fprintf(stderr, "Menu()\n");
}
VOID MACRO_MPrintHash(LONG u)
{
fprintf(stderr, "MPrintHash(%lu)\n", u);
}
VOID MACRO_MPrintID(LPCSTR str)
{
fprintf(stderr, "MPrintID(\"%s\")\n", str);
}
VOID MACRO_Next(VOID)
{
fprintf(stderr, "Next()\n");
}
VOID MACRO_NoShow(VOID)
{
fprintf(stderr, "NoShow()\n");
}
VOID MACRO_PopupContext(LPCSTR str, LONG u)
{
fprintf(stderr, "PopupContext(\"%s\", %lu)\n", str, u);
}
VOID MACRO_PopupHash(LPCSTR str, LONG u)
{
fprintf(stderr, "PopupHash(\"%s\", %lu)\n", str, u);
}
VOID MACRO_PopupId(LPCSTR str1, LPCSTR str2)
{
fprintf(stderr, "PopupId(\"%s\", \"%s\")\n", str1, str2);
}
VOID MACRO_PositionWindow(LONG i1, LONG i2, LONG u1, LONG u2, LONG u3, LPCSTR str)
{
fprintf(stderr, "PositionWindow(%li, %li, %lu, %lu, %lu, \"%s\")\n", i1, i2, u1, u2, u3, str);
}
VOID MACRO_Prev(VOID)
{
fprintf(stderr, "Prev()\n");
}
VOID MACRO_Print(VOID)
{
PRINTDLG printer;
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;
if (PrintDlg16(&printer)) {
fprintf(stderr, "Print()\n");
};
}
VOID MACRO_PrinterSetup(VOID)
{
fprintf(stderr, "PrinterSetup()\n");
}
VOID MACRO_RegisterRoutine(LPCSTR str1, LPCSTR str2, LPCSTR str3)
{
fprintf(stderr, "RegisterRoutine(\"%s\", \"%s\", \"%s\")\n", str1, str2, str3);
}
VOID MACRO_RemoveAccelerator(LONG u1, LONG u2)
{
fprintf(stderr, "RemoveAccelerator(%lu, %lu)\n", u1, u2);
}
VOID MACRO_ResetMenu(VOID)
{
fprintf(stderr, "ResetMenu()\n");
}
VOID MACRO_SaveMark(LPCSTR str)
{
fprintf(stderr, "SaveMark(\"%s\")\n", str);
}
VOID MACRO_Search(VOID)
{
fprintf(stderr, "Search()\n");
}
VOID MACRO_SetContents(LPCSTR str, LONG u)
{
fprintf(stderr, "SetContents(\"%s\", %lu)\n", str, u);
}
VOID MACRO_SetHelpOnFile(LPCSTR str)
{
fprintf(stderr, "SetHelpOnFile(\"%s\")\n", str);
}
VOID MACRO_SetPopupColor(LONG u1, LONG u2, LONG u3)
{
fprintf(stderr, "SetPopupColor(%lu, %lu, %lu)\n", u1, u2, u3);
}
VOID MACRO_ShellExecute(LPCSTR str1, LPCSTR str2, LONG u1, LONG u2, LPCSTR str3, LPCSTR str4)
{
fprintf(stderr, "ShellExecute(\"%s\", \"%s\", %lu, %lu, \"%s\", \"%s\")\n", str1, str2, u1, u2, str3, str4);
}
VOID MACRO_ShortCut(LPCSTR str1, LPCSTR str2, WPARAM w, LPARAM l, LPCSTR str)
{
fprintf(stderr, "ShortCut(\"%s\", \"%s\", %x, %lx, \"%s\")\n", str1, str2, w, l, str);
}
VOID MACRO_TCard(LONG u)
{
fprintf(stderr, "TCard(%lu)\n", u);
}
VOID MACRO_Test(LONG u)
{
fprintf(stderr, "Test(%lu)\n", u);
}
BOOL MACRO_TestALink(LPCSTR str)
{
fprintf(stderr, "TestALink(\"%s\")\n", str);
return FALSE;
}
BOOL MACRO_TestKLink(LPCSTR str)
{
fprintf(stderr, "TestKLink(\"%s\")\n", str);
return FALSE;
}
VOID MACRO_UncheckItem(LPCSTR str)
{
fprintf(stderr, "UncheckItem(\"%s\")\n", str);
}
VOID MACRO_UpdateWindow(LPCSTR str1, LPCSTR str2)
{
fprintf(stderr, "UpdateWindow(\"%s\", \"%s\")\n", str1, str2);
}
/* Local Variables: */
/* c-file-style: "GNU" */
/* End: */