diff 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
line wrap: on
line diff
--- a/src/syswindows.h	Sat Mar 30 04:46:48 2002 +0000
+++ b/src/syswindows.h	Sun Mar 31 08:30:17 2002 +0000
@@ -412,6 +412,11 @@
 #endif
 #endif /* not BFFM_VALIDATEFAILED */
 
+/* winnls.h defines */
+#ifndef LOCALE_RETURN_NUMBER
+#define LOCALE_RETURN_NUMBER 0x20000000
+#endif
+
 /* OEM resources */
 #ifndef OCR_ICOCUR
 #define OCR_ICOCUR          32647
@@ -485,67 +490,230 @@
 
 /* See intl-encap-win32.c for more information about Unicode-encapsulation */
 
+#define ERROR_WHEN_NONINTERCEPTED_FUNS_USED
+
 #include "intl-auto-encap-win32.h"
 
 /* would be encapsulatable but for parsing problems */
+
+#ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
+#undef DefWindowProc
+#define DefWindowProc error use qxeDefWindowProc or DefWindowProcA/DefWindowProcW
+#endif
 LRESULT qxeDefWindowProc (HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
+
+#ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
+#undef CallWindowProc
+#define CallWindowProc error use qxeCallWindowProc or CallWindowProcA/CallWindowProcW
+#endif
 LRESULT qxeCallWindowProc (WNDPROC lpPrevWndFunc, HWND hWnd, UINT Msg,
 			   WPARAM wParam, LPARAM lParam);
+
+#ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
+#undef DefDlgProc
+#define DefDlgProc error use qxeDefDlgProc or DefDlgProcA/DefDlgProcW
+#endif
 LRESULT qxeDefDlgProc (HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam);
+
+#ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
+#undef SetWindowsHook
+#define SetWindowsHook error use qxeSetWindowsHook or SetWindowsHookA/SetWindowsHookW
+#endif
 HHOOK qxeSetWindowsHook (int nFilterType, HOOKPROC pfnFilterProc);
+
+#ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
+#undef DefMDIChildProc
+#define DefMDIChildProc error use qxeDefMDIChildProc or DefMDIChildProcA/DefMDIChildProcW
+#endif
 LRESULT qxeDefMDIChildProc (HWND hWnd, UINT uMsg, WPARAM wParam,
 			    LPARAM lParam);
 
+#undef GetEnvironmentStrings
+#undef GetEnvironmentStringsA
+#define GetEnvironmentStringsA GetEnvironmentStrings
+Extbyte * qxeGetEnvironmentStrings (void);
+
 /* would be encapsulatable but for Cygwin problems */
+
+#ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
+#undef RegConnectRegistry
+#define RegConnectRegistry error use qxeRegConnectRegistry or RegConnectRegistryA/RegConnectRegistryW
+#endif
 LONG qxeRegConnectRegistry (const Extbyte * lpMachineName, HKEY hKey, PHKEY phkResult);
+
+#ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
+#undef ExtractIconEx
+#define ExtractIconEx error use qxeExtractIconEx or ExtractIconExA/ExtractIconExW
+#endif
 UINT qxeExtractIconEx (const Extbyte * lpszFile, int nIconIndex, HICON FAR * phiconLarge, HICON FAR * phiconSmall, UINT nIcons);
+
+#ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
+#undef GetICMProfile
+#define GetICMProfile error use qxeGetICMProfile or GetICMProfileA/GetICMProfileW
+#endif
 BOOL qxeGetICMProfile (HDC arg1, LPDWORD arg2, Extbyte * arg3);
+
+#ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
+#undef UpdateICMRegKey
+#define UpdateICMRegKey error use qxeUpdateICMRegKey or UpdateICMRegKeyA/UpdateICMRegKeyW
+#endif
 BOOL qxeUpdateICMRegKey (DWORD arg1, Extbyte * arg2, Extbyte * arg3, UINT arg4);
 
 /* files */
+#ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
+#undef FindFirstFile
+#define FindFirstFile error use qxeFindFirstFile or FindFirstFileA/FindFirstFileW
+#endif
 HANDLE qxeFindFirstFile (const Extbyte *lpFileName,
 			 WIN32_FIND_DATAW *lpFindFileData);
+
+#ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
+#undef FindNextFile
+#define FindNextFile error use qxeFindNextFile or FindNextFileA/FindNextFileW
+#endif
 BOOL qxeFindNextFile (HANDLE hFindFile, WIN32_FIND_DATAW *lpFindFileData);
 
 /* shell */
+#ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
+#undef SHGetFileInfo
+#define SHGetFileInfo error use qxeSHGetFileInfo or SHGetFileInfoA/SHGetFileInfoW
+#endif
 DWORD qxeSHGetFileInfo (const Extbyte *pszPath, DWORD dwFileAttributes,
 			SHFILEINFOW *psfi, UINT cbFileInfo, UINT uFlags);
+
+#ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
+#undef SHBrowseForFolder
+#define SHBrowseForFolder error use qxeSHBrowseForFolder or SHBrowseForFolderA/SHBrowseForFolderW
+#endif
 LPITEMIDLIST qxeSHBrowseForFolder (LPBROWSEINFOW lpbi);
+
+/* Not Unicode-split */
 VOID qxeSHAddToRecentDocs (UINT uFlags, LPCVOID pv);
+
+/* Not Unicode-split */
 VOID qxeSHChangeNotify (LONG wEventId, UINT uFlags, LPCVOID dwItem1,
 			LPCVOID dwItem2);
+
+#ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
+#undef SHGetDataFromIDList
+#define SHGetDataFromIDList error use qxeSHGetDataFromIDList or SHGetDataFromIDListA/SHGetDataFromIDListW
+#endif
 HRESULT qxeSHGetDataFromIDList (IShellFolder *psf, LPCITEMIDLIST pidl,
 				int nFormat, PVOID pv, int cb);
 
 /* devmode */
+#ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
+#undef CreateDC
+#define CreateDC error use qxeCreateDC or CreateDCA/CreateDCW
+#endif
 HDC qxeCreateDC (const Extbyte *lpszDriver, const Extbyte *lpszDevice,
 		 const Extbyte *lpszOutput, CONST DEVMODEW *lpInitData);
+
+#ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
+#undef ResetDC
+#define ResetDC error use qxeResetDC or ResetDCA/ResetDCW
+#endif
 HDC qxeResetDC (HDC hdc, CONST DEVMODEW *lpInitData);
+
+#ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
+#undef OpenPrinter
+#define OpenPrinter error use qxeOpenPrinter or OpenPrinterA/OpenPrinterW
+#endif
 DWORD qxeOpenPrinter (Extbyte *pPrinterName, LPHANDLE phPrinter,
 		      LPPRINTER_DEFAULTSW pDefaultconst);
+
+#ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
+#undef DocumentProperties
+#define DocumentProperties error use qxeDocumentProperties or DocumentPropertiesA/DocumentPropertiesW
+#endif
 LONG qxeDocumentProperties (HWND hWnd, HANDLE hPrinter, Extbyte *pDeviceName,
 			    DEVMODEW *pDevModeOutput, DEVMODEW *pDevModeInput,
 			    DWORD fMode);
+
+#ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
+#undef PrintDlg
+#define PrintDlg error use qxePrintDlg or PrintDlgA/PrintDlgW
+#endif
 BOOL qxePrintDlg (PRINTDLGW *lppd);
+
+#ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
+#undef PageSetupDlg
+#define PageSetupDlg error use qxePageSetupDlg or PageSetupDlgA/PageSetupDlgW
+#endif
 BOOL qxePageSetupDlg (PAGESETUPDLGW *lppd);
 
 /* fonts */
+
+#ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
+#undef EnumFontFamiliesEx
+#define EnumFontFamiliesEx error use qxeEnumFontFamiliesEx or EnumFontFamiliesExA/EnumFontFamiliesExW
+#endif
 int qxeEnumFontFamiliesEx (HDC hdc, LOGFONTW *lpLogfont,
 			   FONTENUMPROCW lpEnumFontFamProc, LPARAM lParam,
 			   DWORD dwFlags);
+
+#ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
+#undef CreateFontIndirect
+#define CreateFontIndirect error use qxeCreateFontIndirect or CreateFontIndirectA/CreateFontIndirectW
+#endif
 HFONT qxeCreateFontIndirect (CONST LOGFONTW *lplf);
+
+#ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
+#undef ImmSetCompositionFont
+#define ImmSetCompositionFont error use qxeImmSetCompositionFont or ImmSetCompositionFontA/ImmSetCompositionFontW
+#endif
 BOOL qxeImmSetCompositionFont (HIMC imc, LOGFONTW *lplf);
+
+#ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
+#undef ImmGetCompositionFont
+#define ImmGetCompositionFont error use qxeImmGetCompositionFont or ImmGetCompositionFontA/ImmGetCompositionFontW
+#endif
 BOOL qxeImmGetCompositionFont (HIMC imc, LOGFONTW *lplf);
+
+#ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
+#undef GetObject
+#define GetObject error use qxeGetObject or GetObjectA/GetObjectW
+#endif
 int qxeGetObject (HGDIOBJ hgdiobj, int cbBuffer, LPVOID lpvObject);
+
+#ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
+#undef GetTextMetrics
+#define GetTextMetrics error use qxeGetTextMetrics or GetTextMetricsA/GetTextMetricsW
+#endif
 BOOL qxeGetTextMetrics (HDC hdc, LPTEXTMETRICW lptm);
 
 /* COMMCTRL.H */
+
+#ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
+#undef SendMessage
+#define SendMessage error use qxeSendMessage or SendMessageA/SendMessageW
+#endif
 LRESULT qxeSendMessage (HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
 
 /* windows */
+
+#ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
+#undef RegisterClass
+#define RegisterClass error use qxeRegisterClass or RegisterClassA/RegisterClassW
+#endif
 ATOM qxeRegisterClass (CONST WNDCLASSW * lpWndClass);
+
+#ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
+#undef UnregisterClass
+#define UnregisterClass error use qxeUnregisterClass or UnregisterClassA/UnregisterClassW
+#endif
 BOOL qxeUnregisterClass (const Extbyte * lpClassName, HINSTANCE hInstance);
+
+#ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
+#undef RegisterClassEx
+#define RegisterClassEx error use qxeRegisterClassEx or RegisterClassExA/RegisterClassExW
+#endif
 ATOM qxeRegisterClassEx (CONST WNDCLASSEXW * arg1);
+
+#ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
+#undef CreateWindow
+#define CreateWindow error use qxeCreateWindow or CreateWindowA/CreateWindowW
+#endif
 #define qxeCreateWindow(lpClassName, lpWindowName, dwStyle, x, y,	     \
                         nWidth, nHeight, hWndParent, hMenu, hInstance,	     \
 			lpParam)					     \