diff options
author | hobbs <hobbs> | 2001-12-28 23:43:21 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2001-12-28 23:43:21 (GMT) |
commit | 7b1529cc14e1ea3e8b766e74e6cc0ead467dd887 (patch) | |
tree | 268b5309eda5408a6fb55016bbb638b0a0e73731 /win/tkWinInt.h | |
parent | 65eb91e24d86d9e7ad1bd55dec69b13e1c28b1d0 (diff) | |
download | tk-7b1529cc14e1ea3e8b766e74e6cc0ead467dd887.zip tk-7b1529cc14e1ea3e8b766e74e6cc0ead467dd887.tar.gz tk-7b1529cc14e1ea3e8b766e74e6cc0ead467dd887.tar.bz2 |
* win/tkWinInt.h:
* win/tkWinX.c: added TkWinProcs that represent a function table
to switch between unicode and ansi procs on Windows. This is
analogous to the TclWinProcs. Using Tcl_WinUtfToTChar, we can
easily take advantage of using unicode functions where available
without having to switch on the platform id each time.
Diffstat (limited to 'win/tkWinInt.h')
-rw-r--r-- | win/tkWinInt.h | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/win/tkWinInt.h b/win/tkWinInt.h index 57eef8d..49c3267 100644 --- a/win/tkWinInt.h +++ b/win/tkWinInt.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinInt.h,v 1.11 2001/03/30 23:50:17 hobbs Exp $ + * RCS: @(#) $Id: tkWinInt.h,v 1.12 2001/12/28 23:43:21 hobbs Exp $ */ #ifndef _TKWININT @@ -164,6 +164,32 @@ EXTERN LRESULT CALLBACK TkWinChildProc _ANSI_ARGS_((HWND hwnd, UINT message, */ EXTERN void TkWinUpdatingClipboard(int mode); +/* + * The following structure keeps track of whether we are using the + * multi-byte or the wide-character interfaces to the operating system. + * System calls should be made through the following function table. + * + * While some system calls need to use this A/W jump-table, it is not + * necessary for all calls to do it, which is why you won't see this + * used throughout the Tk code, but only in key areas. -- hobbs + */ + +typedef struct TkWinProcs { + int useWide; + LRESULT (WINAPI *callWindowProc)(WNDPROC lpPrevWndFunc, HWND hWnd, + UINT Msg, WPARAM wParam, LPARAM lParam); + LRESULT (WINAPI *defWindowProc)(HWND hWnd, UINT Msg, WPARAM wParam, + LPARAM lParam); + ATOM (WINAPI *registerClass)(CONST WNDCLASS *lpWndClass); + BOOL (WINAPI *setWindowText)(HWND hWnd, LPCTSTR lpString); + HWND (WINAPI *createWindowEx)(DWORD dwExStyle, LPCTSTR lpClassName, + LPCTSTR lpWindowName, DWORD dwStyle, int x, int y, + int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, + HINSTANCE hInstance, LPVOID lpParam); +} TkWinProcs; + +EXTERN TkWinProcs *tkWinProcs; + #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLIMPORT |