ReactOS 0.4.15-dev-7906-g1b85a5f
macro.c
Go to the documentation of this file.
1/*
2 * Help Viewer
3 *
4 * Copyright 1996 Ulrich Schmid
5 * Copyright 2002, 2008 Eric Pouech
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * 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
20 */
21
22#define WIN32_LEAN_AND_MEAN
23
24#include <stdio.h>
25
26#include "windows.h"
27#include "commdlg.h"
28#include "shellapi.h"
29#include "winhelp.h"
30
31#include "wine/debug.h"
32
34
35/**************************************************/
36/* Macro table */
37/**************************************************/
38struct MacroDesc {
39 const char* name;
40 const char* alias;
42 const char* arguments;
43 void *fn;
44};
45
46static struct MacroDesc*MACRO_Loaded /* = NULL */;
47static unsigned MACRO_NumLoaded /* = 0 */;
48
49/******* helper functions *******/
50
51static char* StrDup(const char* str)
52{
53 char* dst;
55 strcpy(dst, str);
56 return dst;
57}
58
60{
62
63 for (b = &win->first_button; *b; b = &(*b)->next)
64 if (!lstrcmpiA(name, (*b)->lpszID)) break;
65 return b;
66}
67
68/******* some forward declarations *******/
69static void CALLBACK MACRO_JumpID(LPCSTR lpszPathWindow, LPCSTR topic_id);
70
71/******* real macro implementation *******/
72
74{
77 LONG size;
78 LPSTR ptr;
79
80 WINE_TRACE("(%s, %s, %s)\n", debugstr_a(id), debugstr_a(name), debugstr_a(macro));
81
82 size = sizeof(WINHELP_BUTTON) + strlen(id) + strlen(name) + strlen(macro) + 3;
83
85 if (!button) return;
86
87 button->next = 0;
88 button->hWnd = 0;
89
90 ptr = (char*)button + sizeof(WINHELP_BUTTON);
91
92 strcpy(ptr, id);
93 button->lpszID = ptr;
94 ptr += strlen(id) + 1;
95
96 strcpy(ptr, name);
97 button->lpszName = ptr;
98 ptr += strlen(name) + 1;
99
100 strcpy(ptr, macro);
101 button->lpszMacro = ptr;
102
103 button->wParam = WH_FIRST_BUTTON;
104 for (b = &win->first_button; *b; b = &(*b)->next)
105 button->wParam = max(button->wParam, (*b)->wParam + 1);
106 *b = button;
107
109}
110
112{
113 WINE_FIXME("(%s)\n", debugstr_a(str));
114}
115
117{
119
120 WINE_TRACE("(%s)\n", debugstr_a(id));
121
123 if (!*b) {WINE_FIXME("Couldn't find button %s\n", debugstr_a(id)); return;}
124
125 EnableWindow((*b)->hWnd, FALSE);
126}
127
129{
131
132 WINE_TRACE("(%s)\n", debugstr_a(id));
133
135 if (!*b) {WINE_FIXME("Couldn't find button %s\n", debugstr_a(id)); return;}
136
137 EnableWindow((*b)->hWnd, TRUE);
138}
139
140void CALLBACK MACRO_JumpContents(LPCSTR lpszPath, LPCSTR lpszWindow)
141{
142 HLPFILE* hlpfile;
143
144 WINE_TRACE("(%s, %s)\n", debugstr_a(lpszPath), debugstr_a(lpszWindow));
145 if ((hlpfile = WINHELP_LookupHelpFile(lpszPath)))
147 WINHELP_GetWindowInfo(hlpfile, lpszWindow),
148 SW_NORMAL);
149}
150
151
153{
154 WCHAR name[256];
156 IMAGE_ICON, 48, 48, LR_SHARED );
159}
160
162{
163 WINE_FIXME("(%u, %u, %s)\n", u1, u2, debugstr_a(str));
164}
165
166static void CALLBACK MACRO_ALink(LPCSTR str1, LONG u, LPCSTR str2)
167{
168 WINE_FIXME("(%s, %u, %s)\n", debugstr_a(str1), u, debugstr_a(str2));
169}
170
172{
173 WINE_FIXME("()\n");
174}
175
176static void CALLBACK MACRO_AppendItem(LPCSTR str1, LPCSTR str2, LPCSTR str3, LPCSTR str4)
177{
178 WINE_FIXME("(%s, %s, %s, %s)\n", debugstr_a(str1), debugstr_a(str2), debugstr_a(str3), debugstr_a(str4));
179}
180
181static void CALLBACK MACRO_Back(void)
182{
184
185 WINE_TRACE("()\n");
186
187 if (win && win->back.index >= 2)
188 WINHELP_CreateHelpWindow(&win->back.set[--win->back.index - 1], SW_SHOW, FALSE);
189}
190
191static void CALLBACK MACRO_BackFlush(void)
192{
194
195 WINE_TRACE("()\n");
196
198}
199
201{
202 WINE_FIXME("()\n");
203}
204
206{
207 WINE_FIXME("()\n");
208}
209
211{
213 ULONG relative;
214
215 WINE_TRACE("()\n");
216
217 MACRO_CreateButton("BTN_PREV", "&<<", "Prev()");
218 MACRO_CreateButton("BTN_NEXT", "&>>", "Next()");
219
220 if (!HLPFILE_PageByOffset(page->file, page->browse_bwd, &relative))
221 MACRO_DisableButton("BTN_PREV");
222 if (!HLPFILE_PageByOffset(page->file, page->browse_fwd, &relative))
223 MACRO_DisableButton("BTN_NEXT");
224}
225
227{
231 LONG size;
232 LPSTR ptr;
233
234 WINE_TRACE("(%s, %s)\n", debugstr_a(id), debugstr_a(macro));
235
236 b = MACRO_LookupButton(win, id);
237 if (!*b) {WINE_FIXME("Couldn't find button %s\n", debugstr_a(id)); return;}
238
239 size = sizeof(WINHELP_BUTTON) + strlen(id) +
240 strlen((*b)->lpszName) + strlen(macro) + 3;
241
243 if (!button) return;
244
245 button->next = (*b)->next;
246 button->hWnd = (*b)->hWnd;
247 button->wParam = (*b)->wParam;
248
249 ptr = (char*)button + sizeof(WINHELP_BUTTON);
250
251 strcpy(ptr, id);
252 button->lpszID = ptr;
253 ptr += strlen(id) + 1;
254
255 strcpy(ptr, (*b)->lpszName);
256 button->lpszName = ptr;
257 ptr += strlen((*b)->lpszName) + 1;
258
259 strcpy(ptr, macro);
260 button->lpszMacro = ptr;
261
262 *b = button;
263
265}
266
268{
269 WINE_TRACE("(%s, %s)\n", debugstr_a(id), debugstr_a(macro));
270
271 MACRO_ChangeButtonBinding(id, macro);
273}
274
276{
277 WINE_FIXME("(%s, %s)\n", debugstr_a(str1), debugstr_a(str2));
278}
279
281{
282 WINE_FIXME("(%s)\n", debugstr_a(str));
283}
284
286{
289
290 WINE_TRACE("()\n");
291 for (win = Globals.win_list; win; win = next)
292 {
293 next = win->next;
294 if (lstrcmpiA(win->info->name, "main"))
296 }
297}
298
299static void CALLBACK MACRO_CloseWindow(LPCSTR lpszWindow)
300{
303
304 WINE_TRACE("(%s)\n", debugstr_a(lpszWindow));
305
306 if (!lpszWindow || !lpszWindow[0]) lpszWindow = "main";
307
308 for (win = Globals.win_list; win; win = next)
309 {
310 next = win->next;
311 if (!lstrcmpiA(win->info->name, lpszWindow))
313 }
314}
315
317{
318 WINE_FIXME("(%s)\n", debugstr_a(str));
319}
320
321static void CALLBACK MACRO_Contents(void)
322{
324
325 WINE_TRACE("()\n");
326
327 if (page)
328 MACRO_JumpContents(page->file->lpszPath, NULL);
329}
330
332{
333 WINE_FIXME("(%s, %s, %u)\n", debugstr_a(str1), debugstr_a(str2), u);
334}
335
337{
338 WINE_FIXME("()\n");
339}
340
341static void CALLBACK MACRO_CopyTopic(void)
342{
343 WINE_FIXME("()\n");
344}
345
347{
348 WINE_FIXME("(%s)\n", debugstr_a(str));
349}
350
352{
353 WINE_FIXME("(%s)\n", debugstr_a(str));
354}
355
357{
358 WINE_FIXME("(%s)\n", debugstr_a(str));
359}
360
362{
363 WINE_FIXME("(%s)\n", debugstr_a(str));
364}
365
366static void CALLBACK MACRO_EndMPrint(void)
367{
368 WINE_FIXME("()\n");
369}
370
372{
374
375 WINE_TRACE("(%s, %s, %u, %s)\n",
376 debugstr_a(pgm), debugstr_a(args), cmd_show, debugstr_a(topic));
377
378 ret = ShellExecuteA(Globals.active_win ? Globals.active_win->hMainWnd : NULL, "open",
379 pgm, args, ".", cmd_show);
380 if ((DWORD_PTR)ret < 32)
381 {
382 WINE_WARN("Failed with %p\n", ret);
384 }
385}
386
388{
389 WINE_FIXME("(%s, %u)\n", debugstr_a(str), u);
390}
391
393{
394 WINE_TRACE("()\n");
395
396 while (Globals.win_list)
398}
399
401{
402 WINE_FIXME("(%s, %u)\n", debugstr_a(str), u);
403}
404
405static void CALLBACK MACRO_ExtInsertItem(LPCSTR str1, LPCSTR str2, LPCSTR str3, LPCSTR str4, LONG u1, LONG u2)
406{
407 WINE_FIXME("(%s, %s, %s, %s, %u, %u)\n", debugstr_a(str1), debugstr_a(str2), debugstr_a(str3), debugstr_a(str4), u1, u2);
408}
409
411{
412 WINE_FIXME("(%s, %s, %s, %u, %u)\n", debugstr_a(str1), debugstr_a(str2), debugstr_a(str3), u1, u2);
413}
414
416{
417 WINE_TRACE("(%s)\n", debugstr_a(str));
419}
420
422{
423 char szFile[MAX_PATH];
424
426 {
427 MACRO_JumpContents(szFile, "main");
428 }
429}
430
431static void CALLBACK MACRO_Find(void)
432{
433 WINE_FIXME("()\n");
434}
435
436static void CALLBACK MACRO_Finder(void)
437{
439}
440
442{
443 WINE_FIXME("()\n");
444}
445
446static void CALLBACK MACRO_Flush(void)
447{
448 WINE_FIXME("()\n");
449}
450
451static void CALLBACK MACRO_FocusWindow(LPCSTR lpszWindow)
452{
454
455 WINE_TRACE("(%s)\n", debugstr_a(lpszWindow));
456
457 if (!lpszWindow || !lpszWindow[0]) lpszWindow = "main";
458
459 for (win = Globals.win_list; win; win = win->next)
460 if (!lstrcmpiA(win->info->name, lpszWindow))
461 SetFocus(win->hMainWnd);
462}
463
465{
466 WINE_FIXME("(%s, %x, %x)\n", debugstr_a(str), w, l);
467}
468
470{
471 WINE_FIXME("(%s)\n", debugstr_a(str));
472}
473
475{
477 LPCSTR file = NULL;
478
479 WINE_TRACE("()\n");
480 if (win && win->page && win->page->file)
481 file = win->page->file->help_on_file;
482
483 if (!file)
484 file = (Globals.wVersion > 4) ? "winhlp32.hlp" : "winhelp.hlp";
485
487}
488
490{
491 static BOOL on_top = FALSE;
493 HWND main_wnd = NULL;
494 HMENU menu;
495
496 for (win = Globals.win_list; win; win = win->next)
497 if (!lstrcmpiA(win->info->name, "main"))
498 main_wnd = win->hMainWnd;
499 if (!main_wnd)
500 {
501 WINE_ERR("could not find the main window!\n");
502 return;
503 }
504 menu = GetMenu(main_wnd);
505
506 on_top = !on_top;
507 if (on_top) {
509 SetWindowPos(main_wnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE);
510 } else {
512 SetWindowPos(main_wnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE);
513 }
514}
515
517{
518 WINE_TRACE("()\n");
519
520 if (Globals.active_win && !Globals.active_win->hHistoryWnd)
521 {
523 0, 0, 0, 0, 0, 0, Globals.hInstance, Globals.active_win);
525 }
526}
527
529{
531}
532
534{
537}
538
540{
541 WINE_FIXME("()\n");
542 return FALSE;
543}
544
545static void CALLBACK MACRO_InsertItem(LPCSTR str1, LPCSTR str2, LPCSTR str3, LPCSTR str4, LONG u)
546{
547 WINE_FIXME("(%s, %s, %s, %s, %u)\n", debugstr_a(str1), debugstr_a(str2), debugstr_a(str3), debugstr_a(str4), u);
548}
549
550static void CALLBACK MACRO_InsertMenu(LPCSTR str1, LPCSTR str2, LONG u)
551{
552 WINE_FIXME("(%s, %s, %u)\n", debugstr_a(str1), debugstr_a(str2), u);
553}
554
556{
557 WINE_TRACE("()\n");
558 return Globals.isBook;
559}
560
562{
563 WINE_FIXME("(%s)\n", debugstr_a(str));
564 return FALSE;
565}
566
568{
569 WINE_FIXME("(%s)\n", debugstr_a(str));
570 return TRUE;
571}
572
574{
575 HLPFILE* hlpfile;
576
577 WINE_TRACE("(%s, %s, %d)\n", debugstr_a(lpszPath), debugstr_a(lpszWindow), context);
578 if ((hlpfile = WINHELP_LookupHelpFile(lpszPath)))
579 /* Some madness: what user calls 'context', hlpfile calls 'map' */
581 WINHELP_GetWindowInfo(hlpfile, lpszWindow),
582 SW_NORMAL);
583}
584
585void CALLBACK MACRO_JumpHash(LPCSTR lpszPath, LPCSTR lpszWindow, LONG lHash)
586{
587 HLPFILE* hlpfile;
588
589 WINE_TRACE("(%s, %s, %u)\n", debugstr_a(lpszPath), debugstr_a(lpszWindow), lHash);
590 if (!lpszPath || !lpszPath[0])
591 hlpfile = MACRO_CurrentWindow()->page->file;
592 else
593 hlpfile = WINHELP_LookupHelpFile(lpszPath);
594 if (hlpfile)
596 WINHELP_GetWindowInfo(hlpfile, lpszWindow),
597 SW_NORMAL);
598}
599
600static void CALLBACK MACRO_JumpHelpOn(void)
601{
602 WINE_FIXME("()\n");
603}
604
605static void CALLBACK MACRO_JumpID(LPCSTR lpszPathWindow, LPCSTR topic_id)
606{
607 LPSTR ptr;
608
609 WINE_TRACE("(%s, %s)\n", debugstr_a(lpszPathWindow), debugstr_a(topic_id));
610 if (lpszPathWindow && (ptr = strchr(lpszPathWindow, '>')) != NULL)
611 {
612 LPSTR tmp;
613 size_t sz;
614
615 tmp = HeapAlloc(GetProcessHeap(), 0, strlen(lpszPathWindow) + 1);
616 if (tmp)
617 {
618 strcpy(tmp, lpszPathWindow);
619 tmp[ptr - lpszPathWindow] = '\0';
620 ptr += tmp - lpszPathWindow; /* ptr now points to '>' in tmp buffer */
621 /* in some cases, we have a trailing space that we need to get rid of */
622 /* FIXME: check if it has to be done in lexer rather than here */
623 for (sz = strlen(ptr + 1); sz >= 1 && ptr[sz] == ' '; sz--) ptr[sz] = '\0';
624 MACRO_JumpHash(tmp, ptr + 1, HLPFILE_Hash(topic_id));
625 HeapFree(GetProcessHeap(), 0, tmp);
626 }
627 }
628 else
629 MACRO_JumpHash(lpszPathWindow, NULL, HLPFILE_Hash(topic_id));
630}
631
632/* FIXME: this macros is wrong
633 * it should only contain 2 strings, path & window are coded as path>window
634 */
635static void CALLBACK MACRO_JumpKeyword(LPCSTR lpszPath, LPCSTR lpszWindow, LPCSTR keyword)
636{
637 WINE_FIXME("(%s, %s, %s)\n", debugstr_a(lpszPath), debugstr_a(lpszWindow), debugstr_a(keyword));
638}
639
640static void CALLBACK MACRO_KLink(LPCSTR str1, LONG u, LPCSTR str2, LPCSTR str3)
641{
642 WINE_FIXME("(%s, %u, %s, %s)\n", debugstr_a(str1), u, debugstr_a(str2), debugstr_a(str3));
643}
644
645static void CALLBACK MACRO_Menu(void)
646{
647 WINE_FIXME("()\n");
648}
649
651{
652 WINE_FIXME("(%u)\n", u);
653}
654
656{
657 WINE_FIXME("(%s)\n", debugstr_a(str));
658}
659
660static void CALLBACK MACRO_Next(void)
661{
663
664 WINE_TRACE("()\n");
665 wp.page = MACRO_CurrentWindow()->page;
667 if (wp.page)
668 {
669 wp.page->file->wRefCount++;
670 wp.wininfo = MACRO_CurrentWindow()->info;
672 }
673}
674
675static void CALLBACK MACRO_NoShow(void)
676{
677 WINE_FIXME("()\n");
678}
679
681{
682 WINE_FIXME("(%s, %u)\n", debugstr_a(str), u);
683}
684
686{
687 WINE_FIXME("(%s, %u)\n", debugstr_a(str), u);
688}
689
690static void CALLBACK MACRO_PopupId(LPCSTR str1, LPCSTR str2)
691{
692 WINE_FIXME("(%s, %s)\n", debugstr_a(str1), debugstr_a(str2));
693}
694
696{
697 WINE_FIXME("(%i, %i, %u, %u, %u, %s)\n", i1, i2, u1, u2, u3, debugstr_a(str));
698}
699
700static void CALLBACK MACRO_Prev(void)
701{
703
704 WINE_TRACE("()\n");
705 wp.page = MACRO_CurrentWindow()->page;
707 if (wp.page)
708 {
709 wp.page->file->wRefCount++;
710 wp.wininfo = MACRO_CurrentWindow()->info;
712 }
713}
714
716{
717 PRINTDLGW printer;
718
719 WINE_TRACE("()\n");
720
721 printer.lStructSize = sizeof(printer);
722 printer.hwndOwner = MACRO_CurrentWindow()->hMainWnd;
723 printer.hInstance = Globals.hInstance;
724 printer.hDevMode = 0;
725 printer.hDevNames = 0;
726 printer.hDC = 0;
727 printer.Flags = 0;
728 printer.nFromPage = 0;
729 printer.nToPage = 0;
730 printer.nMinPage = 0;
731 printer.nMaxPage = 0;
732 printer.nCopies = 0;
733 printer.lCustData = 0;
734 printer.lpfnPrintHook = 0;
735 printer.lpfnSetupHook = 0;
736 printer.lpPrintTemplateName = 0;
737 printer.lpSetupTemplateName = 0;
738 printer.hPrintTemplate = 0;
739 printer.hSetupTemplate = 0;
740
741 if (PrintDlgW(&printer)) {
742 WINE_FIXME("Print()\n");
743 }
744}
745
747{
748 WINE_FIXME("()\n");
749}
750
752{
753 void *fn = NULL;
754 int size;
756
757 WINE_TRACE("(%s, %s, %s)\n", debugstr_a(dll_name), debugstr_a(proc), debugstr_a(args));
758
759 /* FIXME: are the registered DLLs global or linked to the current file ???
760 * We assume globals (as we did for macros, but is this really the case ???)
761 */
762 for (dll = Globals.dlls; dll; dll = dll->next)
763 {
764 if (!strcmp(dll->name, dll_name)) break;
765 }
766 if (!dll)
767 {
768 HANDLE hLib = LoadLibraryA(dll_name);
769
770 /* FIXME: the library will not be unloaded until exit of program
771 * We don't send the DW_TERM message
772 */
773 WINE_TRACE("Loading %s\n", debugstr_a(dll_name));
774 /* FIXME: should look in the directory where current hlpfile
775 * is loaded from
776 */
777 if (hLib == NULL)
778 {
779 /* FIXME: internationalisation for error messages */
780 WINE_FIXME("Cannot find dll %s\n", debugstr_a(dll_name));
781 }
782 else if ((dll = HeapAlloc(GetProcessHeap(), 0, sizeof(*dll))))
783 {
784 dll->hLib = hLib;
785 dll->name = StrDup(dll_name); /* FIXME: never freed */
786 dll->next = Globals.dlls;
787 Globals.dlls = dll;
788 dll->handler = (WINHELP_LDLLHandler)GetProcAddress(dll->hLib, "LDLLHandler");
789 dll->class = dll->handler ? (dll->handler)(DW_WHATMSG, 0, 0) : DC_NOMSG;
790 WINE_TRACE("Got class %x for DLL %s\n", dll->class, debugstr_a(dll_name));
791 if (dll->class & DC_INITTERM) dll->handler(DW_INIT, 0, 0);
792 if (dll->class & DC_CALLBACKS) dll->handler(DW_CALLBACKS, (LONG_PTR)&Callbacks, 0);
793 }
794 else WINE_WARN("OOM\n");
795 }
796 if (dll && !(fn = GetProcAddress(dll->hLib, proc)))
797 {
798 /* FIXME: internationalisation for error messages */
799 WINE_FIXME("Cannot find proc %s in dll %s\n", debugstr_a(dll_name), debugstr_a(proc));
800 }
801
802 size = ++MACRO_NumLoaded * sizeof(struct MacroDesc);
805 MACRO_Loaded[MACRO_NumLoaded - 1].name = StrDup(proc); /* FIXME: never freed */
806 MACRO_Loaded[MACRO_NumLoaded - 1].alias = NULL;
807 MACRO_Loaded[MACRO_NumLoaded - 1].isBool = FALSE;
808 MACRO_Loaded[MACRO_NumLoaded - 1].arguments = StrDup(args); /* FIXME: never freed */
810 WINE_TRACE("Added %s(%s) at %p\n", debugstr_a(proc), debugstr_a(args), fn);
811}
812
814{
815 WINE_FIXME("(%u, %u)\n", u1, u2);
816}
817
818static void CALLBACK MACRO_ResetMenu(void)
819{
820 WINE_FIXME("()\n");
821}
822
824{
825 WINE_FIXME("(%s)\n", debugstr_a(str));
826}
827
828static void CALLBACK MACRO_Search(void)
829{
831}
832
834{
835 WINE_FIXME("(%s, %u)\n", debugstr_a(str), u);
836}
837
839{
841
842 WINE_TRACE("(%s)\n", debugstr_a(str));
843
844 HeapFree(GetProcessHeap(), 0, page->file->help_on_file);
845 page->file->help_on_file = HeapAlloc(GetProcessHeap(), 0, strlen(str) + 1);
846 if (page->file->help_on_file)
847 strcpy(page->file->help_on_file, str);
848}
849
851{
853
854 WINE_TRACE("(%x, %x, %x)\n", r, g, b);
855 page->file->has_popup_color = TRUE;
856 page->file->popup_color = RGB(r, g, b);
857}
858
859static void CALLBACK MACRO_ShellExecute(LPCSTR str1, LPCSTR str2, LONG u1, LONG u2, LPCSTR str3, LPCSTR str4)
860{
861 WINE_FIXME("(%s, %s, %u, %u, %s, %s)\n", debugstr_a(str1), debugstr_a(str2), u1, u2, debugstr_a(str3), debugstr_a(str4));
862}
863
865{
866 WINE_FIXME("(%s, %s, %x, %x, %s)\n", debugstr_a(str1), debugstr_a(str2), w, l, debugstr_a(str));
867}
868
870{
871 WINE_FIXME("(%u)\n", u);
872}
873
875{
876 WINE_FIXME("(%u)\n", u);
877}
878
880{
881 WINE_FIXME("(%s)\n", debugstr_a(str));
882 return FALSE;
883}
884
886{
887 WINE_FIXME("(%s)\n", debugstr_a(str));
888 return FALSE;
889}
890
892{
893 WINE_FIXME("(%s)\n", debugstr_a(str));
894}
895
897{
898 WINE_FIXME("(%s, %s)\n", debugstr_a(str1), debugstr_a(str2));
899}
900
901
902/**************************************************/
903/* Macro table */
904/**************************************************/
905
906/* types:
907 * U: 32 bit unsigned int
908 * I: 32 bit signed int
909 * S: string
910 * v: unknown (32 bit entity)
911 */
912
913static struct MacroDesc MACRO_Builtins[] = {
914 {"About", NULL, 0, "", MACRO_About},
915 {"AddAccelerator", "AA", 0, "UUS", MACRO_AddAccelerator},
916 {"ALink", "AL", 0, "SUS", MACRO_ALink},
917 {"Annotate", NULL, 0, "", MACRO_Annotate},
918 {"AppendItem", NULL, 0, "SSSS", MACRO_AppendItem},
919 {"Back", NULL, 0, "", MACRO_Back},
920 {"BackFlush", "BF", 0, "", MACRO_BackFlush},
921 {"BookmarkDefine", NULL, 0, "", MACRO_BookmarkDefine},
922 {"BookmarkMore", NULL, 0, "", MACRO_BookmarkMore},
923 {"BrowseButtons", NULL, 0, "", MACRO_BrowseButtons},
924 {"ChangeButtonBinding", "CBB",0, "SS", MACRO_ChangeButtonBinding},
925 {"ChangeEnable", "CE", 0, "SS", MACRO_ChangeEnable},
926 {"ChangeItemBinding", "CIB",0, "SS", MACRO_ChangeItemBinding},
927 {"CheckItem", "CI", 0, "S", MACRO_CheckItem},
928 {"CloseSecondarys", "CS", 0, "", MACRO_CloseSecondarys},
929 {"CloseWindow", "CW", 0, "S", MACRO_CloseWindow},
930 {"Compare", NULL, 0, "S", MACRO_Compare},
931 {"Contents", NULL, 0, "", MACRO_Contents},
932 {"ControlPanel", NULL, 0, "SSU", MACRO_ControlPanel},
933 {"CopyDialog", NULL, 0, "", MACRO_CopyDialog},
934 {"CopyTopic", "CT", 0, "", MACRO_CopyTopic},
935 {"CreateButton", "CB", 0, "SSS", MACRO_CreateButton},
936 {"DeleteItem", NULL, 0, "S", MACRO_DeleteItem},
937 {"DeleteMark", NULL, 0, "S", MACRO_DeleteMark},
938 {"DestroyButton", NULL, 0, "S", MACRO_DestroyButton},
939 {"DisableButton", "DB", 0, "S", MACRO_DisableButton},
940 {"DisableItem", "DI", 0, "S", MACRO_DisableItem},
941 {"EnableButton", "EB", 0, "S", MACRO_EnableButton},
942 {"EnableItem", "EI", 0, "S", MACRO_EnableItem},
943 {"EndMPrint", NULL, 0, "", MACRO_EndMPrint},
944 {"ExecFile", "EF", 0, "SSUS", MACRO_ExecFile},
945 {"ExecProgram", "EP", 0, "SU", MACRO_ExecProgram},
946 {"Exit", NULL, 0, "", MACRO_Exit},
947 {"ExtAbleItem", NULL, 0, "SU", MACRO_ExtAbleItem},
948 {"ExtInsertItem", NULL, 0, "SSSSUU", MACRO_ExtInsertItem},
949 {"ExtInsertMenu", NULL, 0, "SSSUU", MACRO_ExtInsertMenu},
950 {"FileExist", "FE", 1, "S", MACRO_FileExist},
951 {"FileOpen", "FO", 0, "", MACRO_FileOpen},
952 {"Find", NULL, 0, "", MACRO_Find},
953 {"Finder", "FD", 0, "", MACRO_Finder},
954 {"FloatingMenu", NULL, 0, "", MACRO_FloatingMenu},
955 {"Flush", "FH", 0, "", MACRO_Flush},
956 {"FocusWindow", NULL, 0, "S", MACRO_FocusWindow},
957 {"Generate", NULL, 0, "SUU", MACRO_Generate},
958 {"GotoMark", NULL, 0, "S", MACRO_GotoMark},
959 {"HelpOn", NULL, 0, "", MACRO_HelpOn},
960 {"HelpOnTop", NULL, 0, "", MACRO_HelpOnTop},
961 {"History", NULL, 0, "", MACRO_History},
962 {"InitMPrint", NULL, 1, "", MACRO_InitMPrint},
963 {"InsertItem", NULL, 0, "SSSSU", MACRO_InsertItem},
964 {"InsertMenu", NULL, 0, "SSU", MACRO_InsertMenu},
965 {"IfThen", "IF", 0, "BS", MACRO_IfThen},
966 {"IfThenElse", "IE", 0, "BSS", MACRO_IfThenElse},
967 {"IsBook", NULL, 1, "", MACRO_IsBook},
968 {"IsMark", NULL, 1, "S", MACRO_IsMark},
969 {"IsNotMark", "NM", 1, "S", MACRO_IsNotMark},
970 {"JumpContents", NULL, 0, "SS", MACRO_JumpContents},
971 {"JumpContext", "JC", 0, "SSU", MACRO_JumpContext},
972 {"JumpHash", "JH", 0, "SSU", MACRO_JumpHash},
973 {"JumpHelpOn", NULL, 0, "", MACRO_JumpHelpOn},
974 {"JumpID", "JI", 0, "SS", MACRO_JumpID},
975 {"JumpKeyword", "JK", 0, "SSS", MACRO_JumpKeyword},
976 {"KLink", "KL", 0, "SUSS", MACRO_KLink},
977 {"Menu", "MU", 0, "", MACRO_Menu},
978 {"MPrintHash", NULL, 0, "U", MACRO_MPrintHash},
979 {"MPrintID", NULL, 0, "S", MACRO_MPrintID},
980 {"Next", NULL, 0, "", MACRO_Next},
981 {"NoShow", "NS", 0, "", MACRO_NoShow},
982 {"PopupContext", "PC", 0, "SU", MACRO_PopupContext},
983 {"PopupHash", NULL, 0, "SU", MACRO_PopupHash},
984 {"PopupId", "PI", 0, "SS", MACRO_PopupId},
985 {"PositionWindow", "PW", 0, "IIUUUS", MACRO_PositionWindow},
986 {"Prev", NULL, 0, "", MACRO_Prev},
987 {"Print", NULL, 0, "", MACRO_Print},
988 {"PrinterSetup", NULL, 0, "", MACRO_PrinterSetup},
989 {"RegisterRoutine", "RR", 0, "SSS", MACRO_RegisterRoutine},
990 {"RemoveAccelerator", "RA", 0, "UU", MACRO_RemoveAccelerator},
991 {"ResetMenu", NULL, 0, "", MACRO_ResetMenu},
992 {"SaveMark", NULL, 0, "S", MACRO_SaveMark},
993 {"Search", NULL, 0, "", MACRO_Search},
994 {"SetContents", NULL, 0, "SU", MACRO_SetContents},
995 {"SetHelpOnFile", NULL, 0, "S", MACRO_SetHelpOnFile},
996 {"SetPopupColor", "SPC",0, "UUU", MACRO_SetPopupColor},
997 {"ShellExecute", "SE", 0, "SSUUSS", MACRO_ShellExecute},
998 {"ShortCut", "SH", 0, "SSUUS", MACRO_ShortCut},
999 {"TCard", NULL, 0, "U", MACRO_TCard},
1000 {"Test", NULL, 0, "U", MACRO_Test},
1001 {"TestALink", NULL, 1, "S", MACRO_TestALink},
1002 {"TestKLink", NULL, 1, "S", MACRO_TestKLink},
1003 {"UncheckItem", "UI", 0, "S", MACRO_UncheckItem},
1004 {"UpdateWindow", "UW", 0, "SS", MACRO_UpdateWindow},
1005 {NULL, NULL, 0, NULL, NULL}
1006};
1007
1008static int MACRO_DoLookUp(struct MacroDesc* start, const char* name, struct lexret* lr, unsigned len)
1009{
1010 struct MacroDesc* md;
1011
1012 for (md = start; md->name && len != 0; md++, len--)
1013 {
1014 if (strcasecmp(md->name, name) == 0 || (md->alias != NULL && strcasecmp(md->alias, name) == 0))
1015 {
1016 lr->proto = md->arguments;
1017 lr->function = md->fn;
1018 return md->isBool ? BOOL_FUNCTION : VOID_FUNCTION;
1019 }
1020 }
1021 return EMPTY;
1022}
1023
1024int MACRO_Lookup(const char* name, struct lexret* lr)
1025{
1026 int ret;
1027
1028 if ((ret = MACRO_DoLookUp(MACRO_Builtins, name, lr, -1)) != EMPTY)
1029 return ret;
1031 return ret;
1032 if (!strcmp(name, "hwndApp"))
1033 {
1035 lr->integer = 0;
1036 for (win = Globals.win_list; win; win = win->next)
1037 {
1038 if (!strcmp(win->info->name, "main"))
1039 {
1040 lr->integer = (LONG_PTR)win->hMainWnd;
1041 break;
1042 }
1043 }
1044 return INTEGER;
1045 }
1046 if (!strcmp(name, "hwndContext"))
1047 {
1048 lr->integer = Globals.active_win ?
1049 (LONG_PTR)Globals.active_win->hMainWnd : 0;
1050 return INTEGER;
1051 }
1052 if (!strcmp(name, "qchPath") || !strcmp(name, "qError") || !strcmp(name, "lTopicNo") ||
1053 !strcmp(name, "hfs") || !strcmp(name, "coForeground") || !strcmp(name, "coBackground"))
1054 {
1055 WINE_FIXME("keyword %s not substituted in macro parsing\n", debugstr_a(name));
1056 return EMPTY;
1057 }
1058
1059 lr->string = name;
1060 return IDENTIFIER;
1061}
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
char * strchr(const char *String, int ch)
Definition: utclib.c:501
HWND hWnd
Definition: settings.c:17
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define ARRAY_SIZE(A)
Definition: main.h:33
const struct winhelp_callbacks Callbacks
Definition: callback.c:161
const char HISTORY_WIN_CLASS_NAME[]
Definition: string.c:25
BOOL WINHELP_CreateHelpWindow(WINHELP_WNDPAGE *wpage, int nCmdShow, BOOL remember)
Definition: winhelp.c:701
HLPFILE * WINHELP_LookupHelpFile(LPCSTR lpszFile)
Definition: winhelp.c:211
BOOL WINHELP_OpenHelpWindow(HLPFILE_PAGE *(*lookup)(HLPFILE *, LONG, ULONG *), HLPFILE *hlpfile, LONG val, HLPFILE_WINDOWINFO *wi, int nCmdShow)
Definition: winhelp.c:882
BOOL WINHELP_ReleaseWindow(WINHELP_WINDOW *win)
Definition: winhelp.c:527
BOOL WINHELP_CreateIndexWindow(BOOL is_search)
Definition: winhelp.c:1545
void WINHELP_LayoutMainWindow(WINHELP_WINDOW *win)
Definition: winhelp.c:437
void WINHELP_DeleteBackSet(WINHELP_WINDOW *win)
Definition: winhelp.c:484
HLPFILE_WINDOWINFO * WINHELP_GetWindowInfo(HLPFILE *hlpfile, LPCSTR name)
Definition: winhelp.c:253
BOOL WINHELP_GetOpenFileName(LPSTR lpszFile, int len)
Definition: winhelp.c:145
r l[0]
Definition: byte_order.h:168
CLIPBOARD_GLOBALS Globals
Definition: clipbrd.c:13
#define md
Definition: compat-1.3.h:2013
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
BOOL WINAPI PrintDlgW(LPPRINTDLGW lppd)
Definition: printdlg.c:2403
#define GetProcessHeap()
Definition: compat.h:736
#define GetProcAddress(x, y)
Definition: compat.h:753
#define HeapAlloc
Definition: compat.h:733
#define HeapReAlloc
Definition: compat.h:734
#define MAX_PATH
Definition: compat.h:34
#define HeapFree(x, y, z)
Definition: compat.h:735
#define CALLBACK
Definition: compat.h:35
DWORD WINAPI GetFileAttributesA(LPCSTR lpFileName)
Definition: fileinfo.c:636
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
Definition: loader.c:111
#define RGB(r, g, b)
Definition: precomp.h:71
#define strcasecmp
Definition: fake.h:9
unsigned int BOOL
Definition: ntddk_ex.h:94
GLuint start
Definition: gl.h:1545
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLdouble GLdouble t
Definition: gl.h:2047
GLsizeiptr size
Definition: glext.h:5919
GLfloat f
Definition: glext.h:7540
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLenum GLenum dst
Definition: glext.h:6340
GLboolean GLboolean g
Definition: glext.h:6204
GLdouble GLdouble u2
Definition: glext.h:8308
GLenum GLsizei len
Definition: glext.h:6722
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:6102
GLdouble u1
Definition: glext.h:8308
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
Definition: glfuncs.h:240
HLPFILE_PAGE * HLPFILE_PageByMap(HLPFILE *hlpfile, LONG lMap, ULONG *relative)
Definition: hlpfile.c:467
HLPFILE_PAGE * HLPFILE_PageByHash(HLPFILE *hlpfile, LONG lHash, ULONG *relative)
Definition: hlpfile.c:437
LONG HLPFILE_Hash(LPCSTR lpszContext)
Definition: hlpfile.c:547
HLPFILE_PAGE * HLPFILE_PageByOffset(HLPFILE *hlpfile, LONG offset, ULONG *relative)
Definition: hlpfile.c:369
#define b
Definition: ke_i.h:79
#define debugstr_a
Definition: kernel32.h:31
static real win[4][36]
int WINAPI lstrcmpiA(LPCSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:42
static void CALLBACK MACRO_InsertItem(LPCSTR str1, LPCSTR str2, LPCSTR str3, LPCSTR str4, LONG u)
Definition: macro.c:545
static void CALLBACK MACRO_DeleteItem(LPCSTR str)
Definition: macro.c:346
static void CALLBACK MACRO_JumpKeyword(LPCSTR lpszPath, LPCSTR lpszWindow, LPCSTR keyword)
Definition: macro.c:635
static void CALLBACK MACRO_SaveMark(LPCSTR str)
Definition: macro.c:823
void CALLBACK MACRO_Print(void)
Definition: macro.c:715
void CALLBACK MACRO_SetContents(LPCSTR str, LONG u)
Definition: macro.c:833
void CALLBACK MACRO_BookmarkDefine(void)
Definition: macro.c:200
static void CALLBACK MACRO_CopyTopic(void)
Definition: macro.c:341
static void CALLBACK MACRO_Find(void)
Definition: macro.c:431
static struct MacroDesc MACRO_Builtins[]
Definition: macro.c:913
void CALLBACK MACRO_CopyDialog(void)
Definition: macro.c:336
void CALLBACK MACRO_JumpContents(LPCSTR lpszPath, LPCSTR lpszWindow)
Definition: macro.c:140
static BOOL CALLBACK MACRO_TestKLink(LPCSTR str)
Definition: macro.c:885
static void CALLBACK MACRO_RegisterRoutine(LPCSTR dll_name, LPCSTR proc, LPCSTR args)
Definition: macro.c:751
static void CALLBACK MACRO_ExtInsertMenu(LPCSTR str1, LPCSTR str2, LPCSTR str3, LONG u1, LONG u2)
Definition: macro.c:410
static void CALLBACK MACRO_ExecFile(LPCSTR pgm, LPCSTR args, LONG cmd_show, LPCSTR topic)
Definition: macro.c:371
void CALLBACK MACRO_CreateButton(LPCSTR id, LPCSTR name, LPCSTR macro)
Definition: macro.c:73
static void CALLBACK MACRO_EndMPrint(void)
Definition: macro.c:366
void CALLBACK MACRO_Exit(void)
Definition: macro.c:392
static int MACRO_DoLookUp(struct MacroDesc *start, const char *name, struct lexret *lr, unsigned len)
Definition: macro.c:1008
static void CALLBACK MACRO_FocusWindow(LPCSTR lpszWindow)
Definition: macro.c:451
static BOOL CALLBACK MACRO_IsBook(void)
Definition: macro.c:555
void CALLBACK MACRO_PopupContext(LPCSTR str, LONG u)
Definition: macro.c:680
static BOOL CALLBACK MACRO_FileExist(LPCSTR str)
Definition: macro.c:415
static void CALLBACK MACRO_PopupHash(LPCSTR str, LONG u)
Definition: macro.c:685
static void CALLBACK MACRO_RemoveAccelerator(LONG u1, LONG u2)
Definition: macro.c:813
static void CALLBACK MACRO_FloatingMenu(void)
Definition: macro.c:441
static void CALLBACK MACRO_GotoMark(LPCSTR str)
Definition: macro.c:469
static void CALLBACK MACRO_ControlPanel(LPCSTR str1, LPCSTR str2, LONG u)
Definition: macro.c:331
static void CALLBACK MACRO_Menu(void)
Definition: macro.c:645
static void CALLBACK MACRO_Prev(void)
Definition: macro.c:700
static void CALLBACK MACRO_Back(void)
Definition: macro.c:181
static void CALLBACK MACRO_ExecProgram(LPCSTR str, LONG u)
Definition: macro.c:387
static void CALLBACK MACRO_CloseSecondarys(void)
Definition: macro.c:285
static void CALLBACK MACRO_UncheckItem(LPCSTR str)
Definition: macro.c:891
static void CALLBACK MACRO_Generate(LPCSTR str, LONG w, LONG l)
Definition: macro.c:464
void CALLBACK MACRO_JumpContext(LPCSTR lpszPath, LPCSTR lpszWindow, LONG context)
Definition: macro.c:573
static void CALLBACK MACRO_InsertMenu(LPCSTR str1, LPCSTR str2, LONG u)
Definition: macro.c:550
static void CALLBACK MACRO_Flush(void)
Definition: macro.c:446
static void CALLBACK MACRO_DeleteMark(LPCSTR str)
Definition: macro.c:351
static void CALLBACK MACRO_IfThen(BOOL b, LPCSTR t)
Definition: macro.c:528
void CALLBACK MACRO_PrinterSetup(void)
Definition: macro.c:746
static void CALLBACK MACRO_DisableItem(LPCSTR str)
Definition: macro.c:356
static void CALLBACK MACRO_ShortCut(LPCSTR str1, LPCSTR str2, LONG w, LONG l, LPCSTR str)
Definition: macro.c:864
static void CALLBACK MACRO_Finder(void)
Definition: macro.c:436
static void CALLBACK MACRO_KLink(LPCSTR str1, LONG u, LPCSTR str2, LPCSTR str3)
Definition: macro.c:640
static void CALLBACK MACRO_CloseWindow(LPCSTR lpszWindow)
Definition: macro.c:299
static void CALLBACK MACRO_TCard(LONG u)
Definition: macro.c:869
void CALLBACK MACRO_FileOpen(void)
Definition: macro.c:421
static void CALLBACK MACRO_BookmarkMore(void)
Definition: macro.c:205
void CALLBACK MACRO_HelpOnTop(void)
Definition: macro.c:489
static WINHELP_BUTTON ** MACRO_LookupButton(WINHELP_WINDOW *win, LPCSTR name)
Definition: macro.c:59
static void CALLBACK MACRO_JumpHelpOn(void)
Definition: macro.c:600
void CALLBACK MACRO_About(void)
Definition: macro.c:152
static void CALLBACK MACRO_JumpID(LPCSTR lpszPathWindow, LPCSTR topic_id)
Definition: macro.c:605
static void CALLBACK MACRO_EnableItem(LPCSTR str)
Definition: macro.c:361
static BOOL CALLBACK MACRO_IsMark(LPCSTR str)
Definition: macro.c:561
static BOOL CALLBACK MACRO_InitMPrint(void)
Definition: macro.c:539
void CALLBACK MACRO_JumpHash(LPCSTR lpszPath, LPCSTR lpszWindow, LONG lHash)
Definition: macro.c:585
static void CALLBACK MACRO_SetHelpOnFile(LPCSTR str)
Definition: macro.c:838
static void CALLBACK MACRO_ResetMenu(void)
Definition: macro.c:818
static void CALLBACK MACRO_EnableButton(LPCSTR id)
Definition: macro.c:128
static void CALLBACK MACRO_BackFlush(void)
Definition: macro.c:191
static void CALLBACK MACRO_Contents(void)
Definition: macro.c:321
void CALLBACK MACRO_History(void)
Definition: macro.c:516
static BOOL CALLBACK MACRO_IsNotMark(LPCSTR str)
Definition: macro.c:567
static void CALLBACK MACRO_IfThenElse(BOOL b, LPCSTR t, LPCSTR f)
Definition: macro.c:533
int MACRO_Lookup(const char *name, struct lexret *lr)
Definition: macro.c:1024
static unsigned MACRO_NumLoaded
Definition: macro.c:47
static void CALLBACK MACRO_DestroyButton(LPCSTR str)
Definition: macro.c:111
static struct MacroDesc * MACRO_Loaded
Definition: macro.c:46
static void CALLBACK MACRO_Search(void)
Definition: macro.c:828
static void CALLBACK MACRO_ExtInsertItem(LPCSTR str1, LPCSTR str2, LPCSTR str3, LPCSTR str4, LONG u1, LONG u2)
Definition: macro.c:405
static void CALLBACK MACRO_MPrintHash(LONG u)
Definition: macro.c:650
void CALLBACK MACRO_Annotate(void)
Definition: macro.c:171
static void CALLBACK MACRO_NoShow(void)
Definition: macro.c:675
static void CALLBACK MACRO_ExtAbleItem(LPCSTR str, LONG u)
Definition: macro.c:400
static void CALLBACK MACRO_PopupId(LPCSTR str1, LPCSTR str2)
Definition: macro.c:690
static void CALLBACK MACRO_ChangeItemBinding(LPCSTR str1, LPCSTR str2)
Definition: macro.c:275
static void CALLBACK MACRO_ChangeEnable(LPCSTR id, LPCSTR macro)
Definition: macro.c:267
static void CALLBACK MACRO_SetPopupColor(LONG r, LONG g, LONG b)
Definition: macro.c:850
static void CALLBACK MACRO_AddAccelerator(LONG u1, LONG u2, LPCSTR str)
Definition: macro.c:161
static void CALLBACK MACRO_AppendItem(LPCSTR str1, LPCSTR str2, LPCSTR str3, LPCSTR str4)
Definition: macro.c:176
void CALLBACK MACRO_HelpOn(void)
Definition: macro.c:474
static void CALLBACK MACRO_ShellExecute(LPCSTR str1, LPCSTR str2, LONG u1, LONG u2, LPCSTR str3, LPCSTR str4)
Definition: macro.c:859
static void CALLBACK MACRO_PositionWindow(LONG i1, LONG i2, LONG u1, LONG u2, LONG u3, LPCSTR str)
Definition: macro.c:695
static void CALLBACK MACRO_Next(void)
Definition: macro.c:660
static void CALLBACK MACRO_MPrintID(LPCSTR str)
Definition: macro.c:655
static void CALLBACK MACRO_CheckItem(LPCSTR str)
Definition: macro.c:280
static void CALLBACK MACRO_Compare(LPCSTR str)
Definition: macro.c:316
static void CALLBACK MACRO_ALink(LPCSTR str1, LONG u, LPCSTR str2)
Definition: macro.c:166
static void CALLBACK MACRO_BrowseButtons(void)
Definition: macro.c:210
static void CALLBACK MACRO_UpdateWindow(LPCSTR str1, LPCSTR str2)
Definition: macro.c:896
void CALLBACK MACRO_DisableButton(LPCSTR id)
Definition: macro.c:116
static void CALLBACK MACRO_Test(LONG u)
Definition: macro.c:874
static BOOL CALLBACK MACRO_TestALink(LPCSTR str)
Definition: macro.c:879
static void CALLBACK MACRO_ChangeButtonBinding(LPCSTR id, LPCSTR macro)
Definition: macro.c:226
BOOL MACRO_ExecuteMacro(struct tagWinHelp *, LPCSTR)
struct tagWinHelp * MACRO_CurrentWindow(void)
@ INTEGER
Definition: macro.h:44
@ VOID_FUNCTION
Definition: macro.h:44
@ BOOL_FUNCTION
Definition: macro.h:44
HWND hMainWnd
Definition: magnifier.c:32
static PVOID ptr
Definition: dispmode.c:27
DWORD button
Definition: button.c:166
static HICON
Definition: imagelist.c:84
static BYTE u3[]
Definition: msg.c:580
static HMODULE dll
Definition: str.c:188
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
#define EMPTY(rect)
Definition: text.c:32
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
static HANDLE proc()
Definition: pdb.c:34
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637
long LONG
Definition: pedump.c:60
static const char topic[]
Definition: propsys.c:44
static unsigned __int64 next
Definition: rand_nt.c:6
const WCHAR * str
#define WINE_TRACE
Definition: debug.h:354
#define WINE_WARN
Definition: debug.h:360
#define WINE_FIXME
Definition: debug.h:366
#define WINE_ERR
Definition: debug.h:371
BOOL WINAPI ShellAboutW(HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff, HICON hIcon)
HINSTANCE WINAPI ShellExecuteA(HWND hWnd, LPCSTR lpVerb, LPCSTR lpFile, LPCSTR lpParameters, LPCSTR lpDirectory, INT iShowCmd)
Definition: shlexec.cpp:2307
#define StrDup
Definition: shlwapi.h:1533
const char * alias
Definition: macro.c:40
const char * arguments
Definition: macro.c:42
void * fn
Definition: macro.c:43
const char * name
Definition: macro.c:39
BOOL isBool
Definition: macro.c:41
ULONG relative
Definition: winhelp.h:64
HLPFILE_WINDOWINFO * wininfo
Definition: winhelp.h:63
HLPFILE_PAGE * page
Definition: winhelp.h:62
HINSTANCE hInstance
Definition: precomp.h:43
Definition: match.c:390
Definition: http.c:7252
char * name
Definition: compiler.c:66
Definition: fci.c:127
Definition: macro.h:29
FARPROC function
Definition: macro.h:34
LPCSTR proto
Definition: macro.h:30
LONG integer
Definition: macro.h:32
LPCSTR string
Definition: macro.h:33
Definition: name.c:39
Definition: module.h:576
struct tagHlpFileFile * file
Definition: hlpfile.h:84
DWORD browse_bwd
Definition: hlpfile.h:81
DWORD browse_fwd
Definition: hlpfile.h:82
HGLOBAL hSetupTemplate
Definition: commdlg.h:504
LPPRINTHOOKPROC lpfnPrintHook
Definition: commdlg.h:499
HGLOBAL hDevMode
Definition: commdlg.h:488
LPSETUPHOOKPROC lpfnSetupHook
Definition: commdlg.h:500
LPCWSTR lpPrintTemplateName
Definition: commdlg.h:501
DWORD Flags
Definition: commdlg.h:491
HWND hwndOwner
Definition: commdlg.h:487
HINSTANCE hInstance
Definition: commdlg.h:497
LPCWSTR lpSetupTemplateName
Definition: commdlg.h:502
WORD nToPage
Definition: commdlg.h:493
HGLOBAL hPrintTemplate
Definition: commdlg.h:503
HGLOBAL hDevNames
Definition: commdlg.h:489
WORD nMaxPage
Definition: commdlg.h:495
WORD nMinPage
Definition: commdlg.h:494
HDC hDC
Definition: commdlg.h:490
DWORD lStructSize
Definition: commdlg.h:486
WORD nCopies
Definition: commdlg.h:496
LPARAM lCustData
Definition: commdlg.h:498
WORD nFromPage
Definition: commdlg.h:492
#define max(a, b)
Definition: svc.c:63
#define LONG_PTR
Definition: treelist.c:79
uint32_t DWORD_PTR
Definition: typedefs.h:65
uint32_t ULONG
Definition: typedefs.h:59
#define INVALID_FILE_ATTRIBUTES
Definition: vfdcmd.c:23
int ret
static GLenum _GLUfuncptr fn
Definition: wgl_font.c:159
LONG(CALLBACK * WINHELP_LDLLHandler)(WORD, LONG_PTR, LONG_PTR)
Definition: winhelp.h:119
#define DW_INIT
Definition: winhelp.h:111
#define DC_CALLBACKS
Definition: winhelp.h:105
#define DW_WHATMSG
Definition: winhelp.h:108
struct tagHelpButton WINHELP_BUTTON
#define DC_NOMSG
Definition: winhelp.h:100
#define DW_CALLBACKS
Definition: winhelp.h:117
#define WH_FIRST_BUTTON
Definition: winhelp.h:190
#define DC_INITTERM
Definition: winhelp.h:102
#define MNID_HELP_HELPTOP
Definition: winhelp_res.h:22
#define IDI_WINHELP
Definition: winhelp_res.h:56
#define STID_WINE_HELP
Definition: winhelp_res.h:36
#define MF_BYCOMMAND
Definition: winuser.h:202
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define HWND_TOPMOST
Definition: winuser.h:1208
#define IMAGE_ICON
Definition: winuser.h:212
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4315
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define SWP_NOMOVE
Definition: winuser.h:1244
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE hInst, _In_ LPCWSTR name, _In_ UINT type, _In_ int cx, _In_ int cy, _In_ UINT fuLoad)
Definition: cursoricon.c:2203
#define MF_CHECKED
Definition: winuser.h:132
#define SWP_NOSIZE
Definition: winuser.h:1245
#define MF_UNCHECKED
Definition: winuser.h:204
DWORD WINAPI CheckMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
HWND WINAPI SetFocus(_In_opt_ HWND)
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
#define LR_SHARED
Definition: winuser.h:1100
#define SW_SHOW
Definition: winuser.h:775
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define HWND_NOTOPMOST
Definition: winuser.h:1206
#define SW_NORMAL
Definition: winuser.h:769
HMENU WINAPI GetMenu(_In_ HWND)
const char * LPCSTR
Definition: xmlstorage.h:183
char * LPSTR
Definition: xmlstorage.h:182
__wchar_t WCHAR
Definition: xmlstorage.h:180