comparison src/syswindows.h @ 800:a5954632b187

[xemacs-hg @ 2002-03-31 08:27:14 by ben] more fixes, first crack at finishing behavior implementation TODO.ben-mule-21-5: Update. configure.in: Fix for new error-checking types. make-mswin-unicode.pl: Don't be fucked up by CRLF. Output code to force errors when nonintercepted Windows calls issued. behavior.el, dumped-lisp.el, menubar-items.el: Add support for saving using custom. Load into a dumped XEmacs. Correct :title to :short-doc in accordance with behavior-defs.el. Add a submenu under Options for turning on/off behaviors. cl-macs.el: Properly document `loop'. Fix a minor bug in keymap iteration and add support for bit-vector iteration. lisp-mode.el: Rearrange and add items for macro expanding. menubar-items.el: Document connection between these two functions. window.el: Port stuff from GNU 21.1. config.inc.samp, xemacs.mak: Separate out and add new variable for controlling error-checking. s/windowsnt.h: Use new ERROR_CHECK_ALL; not related to DEBUG_XEMACS. alloc.c, backtrace.h, buffer.c, buffer.h, bytecode.c, callproc.c, casetab.c, charset.h, chartab.c, cmdloop.c, config.h.in, console-msw.c, console-stream.c, console-tty.c, console.c, console.h, data.c, device-msw.c, device.c, device.h, dired-msw.c, dired.c, dumper.c, editfns.c, eldap.c, elhash.c, emacs.c, eval.c, event-Xt.c, event-gtk.c, event-msw.c, event-stream.c, events.c, extents.c, faces.c, file-coding.c, file-coding.h, fileio.c, frame-msw.c, frame.c, frame.h, glyphs-gtk.c, glyphs-msw.c, glyphs-shared.c, glyphs-widget.c, glyphs-x.c, glyphs.c, glyphs.h, insdel.c, intl-auto-encap-win32.c, intl-auto-encap-win32.h, intl-encap-win32.c, intl-win32.c, keymap.c, lisp-union.h, lisp.h, lread.c, lrecord.h, lstream.c, lstream.h, macros.c, marker.c, md5.c, menubar-x.c, menubar.c, mule-coding.c, ntproc.c, objects-gtk.c, objects-msw.c, objects-x.c, objects.c, opaque.c, print.c, process-nt.c, process-unix.c, process.c, rangetab.c, redisplay-msw.c, redisplay-output.c, redisplay.c, regex.c, scrollbar-msw.c, select-msw.c, signal.c, specifier.c, specifier.h, symbols.c, sysdep.c, syswindows.h, text.c, text.h, toolbar-msw.c, tooltalk.c, ui-gtk.c, unicode.c, window.c: Redo error-checking macros: ERROR_CHECK_TYPECHECK -> ERROR_CHECK_TYPES, ERROR_CHECK_CHARBPOS -> ERROR_CHECK_TEXT, add ERROR_CHECK_DISPLAY, ERROR_CHECK_STRUCTURES. Document these in config.h.in. Fix code to follow docs. Fix *_checking_assert() in accordance with new names. Attempt to fix periodic redisplay crash freeing display line structures. Add first implementation of sledgehammer redisplay check. Redo print_*() to use write_fmt_string(), write_fmt_string_lisp(). Fix bug in md5 handling. Rename character-to-unicode to char-to-unicode; same for unicode-to-char{acter}. Move chartab documentation to `make-char-table'. Some header cleanup. Clean up remaining places where nonintercepted Windows calls are being used. automated/mule-tests.el: Fix for new Unicode support.
author ben
date Sun, 31 Mar 2002 08:30:17 +0000
parents 943eaba38521
children a634e3b7acc8
comparison
equal deleted inserted replaced
799:03d9f9084848 800:a5954632b187
410 #else 410 #else
411 #define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDA 411 #define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDA
412 #endif 412 #endif
413 #endif /* not BFFM_VALIDATEFAILED */ 413 #endif /* not BFFM_VALIDATEFAILED */
414 414
415 /* winnls.h defines */
416 #ifndef LOCALE_RETURN_NUMBER
417 #define LOCALE_RETURN_NUMBER 0x20000000
418 #endif
419
415 /* OEM resources */ 420 /* OEM resources */
416 #ifndef OCR_ICOCUR 421 #ifndef OCR_ICOCUR
417 #define OCR_ICOCUR 32647 422 #define OCR_ICOCUR 32647
418 #define OIC_SAMPLE 32512 423 #define OIC_SAMPLE 32512
419 #define OIC_HAND 32513 424 #define OIC_HAND 32513
483 488
484 /* ------------------------- Unicode encapsulation ------------------------- */ 489 /* ------------------------- Unicode encapsulation ------------------------- */
485 490
486 /* See intl-encap-win32.c for more information about Unicode-encapsulation */ 491 /* See intl-encap-win32.c for more information about Unicode-encapsulation */
487 492
493 #define ERROR_WHEN_NONINTERCEPTED_FUNS_USED
494
488 #include "intl-auto-encap-win32.h" 495 #include "intl-auto-encap-win32.h"
489 496
490 /* would be encapsulatable but for parsing problems */ 497 /* would be encapsulatable but for parsing problems */
498
499 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
500 #undef DefWindowProc
501 #define DefWindowProc error use qxeDefWindowProc or DefWindowProcA/DefWindowProcW
502 #endif
491 LRESULT qxeDefWindowProc (HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); 503 LRESULT qxeDefWindowProc (HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
504
505 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
506 #undef CallWindowProc
507 #define CallWindowProc error use qxeCallWindowProc or CallWindowProcA/CallWindowProcW
508 #endif
492 LRESULT qxeCallWindowProc (WNDPROC lpPrevWndFunc, HWND hWnd, UINT Msg, 509 LRESULT qxeCallWindowProc (WNDPROC lpPrevWndFunc, HWND hWnd, UINT Msg,
493 WPARAM wParam, LPARAM lParam); 510 WPARAM wParam, LPARAM lParam);
511
512 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
513 #undef DefDlgProc
514 #define DefDlgProc error use qxeDefDlgProc or DefDlgProcA/DefDlgProcW
515 #endif
494 LRESULT qxeDefDlgProc (HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam); 516 LRESULT qxeDefDlgProc (HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam);
517
518 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
519 #undef SetWindowsHook
520 #define SetWindowsHook error use qxeSetWindowsHook or SetWindowsHookA/SetWindowsHookW
521 #endif
495 HHOOK qxeSetWindowsHook (int nFilterType, HOOKPROC pfnFilterProc); 522 HHOOK qxeSetWindowsHook (int nFilterType, HOOKPROC pfnFilterProc);
523
524 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
525 #undef DefMDIChildProc
526 #define DefMDIChildProc error use qxeDefMDIChildProc or DefMDIChildProcA/DefMDIChildProcW
527 #endif
496 LRESULT qxeDefMDIChildProc (HWND hWnd, UINT uMsg, WPARAM wParam, 528 LRESULT qxeDefMDIChildProc (HWND hWnd, UINT uMsg, WPARAM wParam,
497 LPARAM lParam); 529 LPARAM lParam);
498 530
531 #undef GetEnvironmentStrings
532 #undef GetEnvironmentStringsA
533 #define GetEnvironmentStringsA GetEnvironmentStrings
534 Extbyte * qxeGetEnvironmentStrings (void);
535
499 /* would be encapsulatable but for Cygwin problems */ 536 /* would be encapsulatable but for Cygwin problems */
537
538 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
539 #undef RegConnectRegistry
540 #define RegConnectRegistry error use qxeRegConnectRegistry or RegConnectRegistryA/RegConnectRegistryW
541 #endif
500 LONG qxeRegConnectRegistry (const Extbyte * lpMachineName, HKEY hKey, PHKEY phkResult); 542 LONG qxeRegConnectRegistry (const Extbyte * lpMachineName, HKEY hKey, PHKEY phkResult);
543
544 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
545 #undef ExtractIconEx
546 #define ExtractIconEx error use qxeExtractIconEx or ExtractIconExA/ExtractIconExW
547 #endif
501 UINT qxeExtractIconEx (const Extbyte * lpszFile, int nIconIndex, HICON FAR * phiconLarge, HICON FAR * phiconSmall, UINT nIcons); 548 UINT qxeExtractIconEx (const Extbyte * lpszFile, int nIconIndex, HICON FAR * phiconLarge, HICON FAR * phiconSmall, UINT nIcons);
549
550 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
551 #undef GetICMProfile
552 #define GetICMProfile error use qxeGetICMProfile or GetICMProfileA/GetICMProfileW
553 #endif
502 BOOL qxeGetICMProfile (HDC arg1, LPDWORD arg2, Extbyte * arg3); 554 BOOL qxeGetICMProfile (HDC arg1, LPDWORD arg2, Extbyte * arg3);
555
556 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
557 #undef UpdateICMRegKey
558 #define UpdateICMRegKey error use qxeUpdateICMRegKey or UpdateICMRegKeyA/UpdateICMRegKeyW
559 #endif
503 BOOL qxeUpdateICMRegKey (DWORD arg1, Extbyte * arg2, Extbyte * arg3, UINT arg4); 560 BOOL qxeUpdateICMRegKey (DWORD arg1, Extbyte * arg2, Extbyte * arg3, UINT arg4);
504 561
505 /* files */ 562 /* files */
563 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
564 #undef FindFirstFile
565 #define FindFirstFile error use qxeFindFirstFile or FindFirstFileA/FindFirstFileW
566 #endif
506 HANDLE qxeFindFirstFile (const Extbyte *lpFileName, 567 HANDLE qxeFindFirstFile (const Extbyte *lpFileName,
507 WIN32_FIND_DATAW *lpFindFileData); 568 WIN32_FIND_DATAW *lpFindFileData);
569
570 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
571 #undef FindNextFile
572 #define FindNextFile error use qxeFindNextFile or FindNextFileA/FindNextFileW
573 #endif
508 BOOL qxeFindNextFile (HANDLE hFindFile, WIN32_FIND_DATAW *lpFindFileData); 574 BOOL qxeFindNextFile (HANDLE hFindFile, WIN32_FIND_DATAW *lpFindFileData);
509 575
510 /* shell */ 576 /* shell */
577 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
578 #undef SHGetFileInfo
579 #define SHGetFileInfo error use qxeSHGetFileInfo or SHGetFileInfoA/SHGetFileInfoW
580 #endif
511 DWORD qxeSHGetFileInfo (const Extbyte *pszPath, DWORD dwFileAttributes, 581 DWORD qxeSHGetFileInfo (const Extbyte *pszPath, DWORD dwFileAttributes,
512 SHFILEINFOW *psfi, UINT cbFileInfo, UINT uFlags); 582 SHFILEINFOW *psfi, UINT cbFileInfo, UINT uFlags);
583
584 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
585 #undef SHBrowseForFolder
586 #define SHBrowseForFolder error use qxeSHBrowseForFolder or SHBrowseForFolderA/SHBrowseForFolderW
587 #endif
513 LPITEMIDLIST qxeSHBrowseForFolder (LPBROWSEINFOW lpbi); 588 LPITEMIDLIST qxeSHBrowseForFolder (LPBROWSEINFOW lpbi);
589
590 /* Not Unicode-split */
514 VOID qxeSHAddToRecentDocs (UINT uFlags, LPCVOID pv); 591 VOID qxeSHAddToRecentDocs (UINT uFlags, LPCVOID pv);
592
593 /* Not Unicode-split */
515 VOID qxeSHChangeNotify (LONG wEventId, UINT uFlags, LPCVOID dwItem1, 594 VOID qxeSHChangeNotify (LONG wEventId, UINT uFlags, LPCVOID dwItem1,
516 LPCVOID dwItem2); 595 LPCVOID dwItem2);
596
597 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
598 #undef SHGetDataFromIDList
599 #define SHGetDataFromIDList error use qxeSHGetDataFromIDList or SHGetDataFromIDListA/SHGetDataFromIDListW
600 #endif
517 HRESULT qxeSHGetDataFromIDList (IShellFolder *psf, LPCITEMIDLIST pidl, 601 HRESULT qxeSHGetDataFromIDList (IShellFolder *psf, LPCITEMIDLIST pidl,
518 int nFormat, PVOID pv, int cb); 602 int nFormat, PVOID pv, int cb);
519 603
520 /* devmode */ 604 /* devmode */
605 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
606 #undef CreateDC
607 #define CreateDC error use qxeCreateDC or CreateDCA/CreateDCW
608 #endif
521 HDC qxeCreateDC (const Extbyte *lpszDriver, const Extbyte *lpszDevice, 609 HDC qxeCreateDC (const Extbyte *lpszDriver, const Extbyte *lpszDevice,
522 const Extbyte *lpszOutput, CONST DEVMODEW *lpInitData); 610 const Extbyte *lpszOutput, CONST DEVMODEW *lpInitData);
611
612 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
613 #undef ResetDC
614 #define ResetDC error use qxeResetDC or ResetDCA/ResetDCW
615 #endif
523 HDC qxeResetDC (HDC hdc, CONST DEVMODEW *lpInitData); 616 HDC qxeResetDC (HDC hdc, CONST DEVMODEW *lpInitData);
617
618 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
619 #undef OpenPrinter
620 #define OpenPrinter error use qxeOpenPrinter or OpenPrinterA/OpenPrinterW
621 #endif
524 DWORD qxeOpenPrinter (Extbyte *pPrinterName, LPHANDLE phPrinter, 622 DWORD qxeOpenPrinter (Extbyte *pPrinterName, LPHANDLE phPrinter,
525 LPPRINTER_DEFAULTSW pDefaultconst); 623 LPPRINTER_DEFAULTSW pDefaultconst);
624
625 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
626 #undef DocumentProperties
627 #define DocumentProperties error use qxeDocumentProperties or DocumentPropertiesA/DocumentPropertiesW
628 #endif
526 LONG qxeDocumentProperties (HWND hWnd, HANDLE hPrinter, Extbyte *pDeviceName, 629 LONG qxeDocumentProperties (HWND hWnd, HANDLE hPrinter, Extbyte *pDeviceName,
527 DEVMODEW *pDevModeOutput, DEVMODEW *pDevModeInput, 630 DEVMODEW *pDevModeOutput, DEVMODEW *pDevModeInput,
528 DWORD fMode); 631 DWORD fMode);
632
633 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
634 #undef PrintDlg
635 #define PrintDlg error use qxePrintDlg or PrintDlgA/PrintDlgW
636 #endif
529 BOOL qxePrintDlg (PRINTDLGW *lppd); 637 BOOL qxePrintDlg (PRINTDLGW *lppd);
638
639 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
640 #undef PageSetupDlg
641 #define PageSetupDlg error use qxePageSetupDlg or PageSetupDlgA/PageSetupDlgW
642 #endif
530 BOOL qxePageSetupDlg (PAGESETUPDLGW *lppd); 643 BOOL qxePageSetupDlg (PAGESETUPDLGW *lppd);
531 644
532 /* fonts */ 645 /* fonts */
646
647 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
648 #undef EnumFontFamiliesEx
649 #define EnumFontFamiliesEx error use qxeEnumFontFamiliesEx or EnumFontFamiliesExA/EnumFontFamiliesExW
650 #endif
533 int qxeEnumFontFamiliesEx (HDC hdc, LOGFONTW *lpLogfont, 651 int qxeEnumFontFamiliesEx (HDC hdc, LOGFONTW *lpLogfont,
534 FONTENUMPROCW lpEnumFontFamProc, LPARAM lParam, 652 FONTENUMPROCW lpEnumFontFamProc, LPARAM lParam,
535 DWORD dwFlags); 653 DWORD dwFlags);
654
655 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
656 #undef CreateFontIndirect
657 #define CreateFontIndirect error use qxeCreateFontIndirect or CreateFontIndirectA/CreateFontIndirectW
658 #endif
536 HFONT qxeCreateFontIndirect (CONST LOGFONTW *lplf); 659 HFONT qxeCreateFontIndirect (CONST LOGFONTW *lplf);
660
661 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
662 #undef ImmSetCompositionFont
663 #define ImmSetCompositionFont error use qxeImmSetCompositionFont or ImmSetCompositionFontA/ImmSetCompositionFontW
664 #endif
537 BOOL qxeImmSetCompositionFont (HIMC imc, LOGFONTW *lplf); 665 BOOL qxeImmSetCompositionFont (HIMC imc, LOGFONTW *lplf);
666
667 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
668 #undef ImmGetCompositionFont
669 #define ImmGetCompositionFont error use qxeImmGetCompositionFont or ImmGetCompositionFontA/ImmGetCompositionFontW
670 #endif
538 BOOL qxeImmGetCompositionFont (HIMC imc, LOGFONTW *lplf); 671 BOOL qxeImmGetCompositionFont (HIMC imc, LOGFONTW *lplf);
672
673 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
674 #undef GetObject
675 #define GetObject error use qxeGetObject or GetObjectA/GetObjectW
676 #endif
539 int qxeGetObject (HGDIOBJ hgdiobj, int cbBuffer, LPVOID lpvObject); 677 int qxeGetObject (HGDIOBJ hgdiobj, int cbBuffer, LPVOID lpvObject);
678
679 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
680 #undef GetTextMetrics
681 #define GetTextMetrics error use qxeGetTextMetrics or GetTextMetricsA/GetTextMetricsW
682 #endif
540 BOOL qxeGetTextMetrics (HDC hdc, LPTEXTMETRICW lptm); 683 BOOL qxeGetTextMetrics (HDC hdc, LPTEXTMETRICW lptm);
541 684
542 /* COMMCTRL.H */ 685 /* COMMCTRL.H */
686
687 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
688 #undef SendMessage
689 #define SendMessage error use qxeSendMessage or SendMessageA/SendMessageW
690 #endif
543 LRESULT qxeSendMessage (HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); 691 LRESULT qxeSendMessage (HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
544 692
545 /* windows */ 693 /* windows */
694
695 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
696 #undef RegisterClass
697 #define RegisterClass error use qxeRegisterClass or RegisterClassA/RegisterClassW
698 #endif
546 ATOM qxeRegisterClass (CONST WNDCLASSW * lpWndClass); 699 ATOM qxeRegisterClass (CONST WNDCLASSW * lpWndClass);
700
701 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
702 #undef UnregisterClass
703 #define UnregisterClass error use qxeUnregisterClass or UnregisterClassA/UnregisterClassW
704 #endif
547 BOOL qxeUnregisterClass (const Extbyte * lpClassName, HINSTANCE hInstance); 705 BOOL qxeUnregisterClass (const Extbyte * lpClassName, HINSTANCE hInstance);
706
707 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
708 #undef RegisterClassEx
709 #define RegisterClassEx error use qxeRegisterClassEx or RegisterClassExA/RegisterClassExW
710 #endif
548 ATOM qxeRegisterClassEx (CONST WNDCLASSEXW * arg1); 711 ATOM qxeRegisterClassEx (CONST WNDCLASSEXW * arg1);
712
713 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
714 #undef CreateWindow
715 #define CreateWindow error use qxeCreateWindow or CreateWindowA/CreateWindowW
716 #endif
549 #define qxeCreateWindow(lpClassName, lpWindowName, dwStyle, x, y, \ 717 #define qxeCreateWindow(lpClassName, lpWindowName, dwStyle, x, y, \
550 nWidth, nHeight, hWndParent, hMenu, hInstance, \ 718 nWidth, nHeight, hWndParent, hMenu, hInstance, \
551 lpParam) \ 719 lpParam) \
552 qxeCreateWindowEx (0L, lpClassName, lpWindowName, dwStyle, x, y, \ 720 qxeCreateWindowEx (0L, lpClassName, lpWindowName, dwStyle, x, y, \
553 nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam) 721 nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam)