OSDN Git Service

Updated to tk 8.4.1
[pf3gnuchains/sourceware.git] / tk / win / tkWinInt.h
index 37f5dda..bf58e18 100644 (file)
@@ -164,9 +164,42 @@ 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
 
-#endif /* _TKWININT */
+/*
+ * The following allows us to cache these encoding for multiple functions.
+ */
+
 
+extern Tcl_Encoding TkWinGetKeyInputEncoding _ANSI_ARGS_((void));
+extern Tcl_Encoding TkWinGetUnicodeEncoding _ANSI_ARGS_((void));
+
+#endif /* _TKWININT */