diff options
author | hobbs <hobbs@noemail.net> | 2001-12-28 23:43:20 (GMT) |
---|---|---|
committer | hobbs <hobbs@noemail.net> | 2001-12-28 23:43:20 (GMT) |
commit | aa0bcfb3a62d7c90026df1979db23c87bf36640d (patch) | |
tree | 268b5309eda5408a6fb55016bbb638b0a0e73731 /win/tkWinInt.h | |
parent | 9f80a51abab94e05a645c521562aa81f8af42d0d (diff) | |
download | tk-aa0bcfb3a62d7c90026df1979db23c87bf36640d.zip tk-aa0bcfb3a62d7c90026df1979db23c87bf36640d.tar.gz tk-aa0bcfb3a62d7c90026df1979db23c87bf36640d.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.
FossilOrigin-Name: 081e2c0707adca6861223d368262ad2bf2816ec5
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 |