summaryrefslogtreecommitdiffstats
path: root/win/tkWinInt.h
diff options
context:
space:
mode:
authorpatthoyts <patthoyts@users.sourceforge.net>2007-12-14 15:56:08 (GMT)
committerpatthoyts <patthoyts@users.sourceforge.net>2007-12-14 15:56:08 (GMT)
commitf590d202080c26d797acadcbe6ba072adf79b3e3 (patch)
tree4bb5b056ddecb200ee7354aec22717f50ba8d156 /win/tkWinInt.h
parent1e2cc34c8fe57acaaf8376477933f36338c316c2 (diff)
downloadtk-f590d202080c26d797acadcbe6ba072adf79b3e3.zip
tk-f590d202080c26d797acadcbe6ba072adf79b3e3.tar.gz
tk-f590d202080c26d797acadcbe6ba072adf79b3e3.tar.bz2
Add in missing function definitions to support plain MSVC6 and use
INT_PTR rather than LONG_PTR which isn'tr defined in the msvc6 headers.
Diffstat (limited to 'win/tkWinInt.h')
-rw-r--r--win/tkWinInt.h49
1 files changed, 48 insertions, 1 deletions
diff --git a/win/tkWinInt.h b/win/tkWinInt.h
index 8d72db2..aa35ed0 100644
--- a/win/tkWinInt.h
+++ b/win/tkWinInt.h
@@ -10,7 +10,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.30 2007/12/13 15:28:55 dgp Exp $
+ * RCS: @(#) $Id: tkWinInt.h,v 1.31 2007/12/14 15:56:09 patthoyts Exp $
*/
#ifndef _TKWININT
@@ -248,4 +248,51 @@ long TkpWinToplevelOverrideRedirect(TkWindow *winPtr,
void TkpWinToplevelDetachWindow(TkWindow *winPtr);
int TkpWmGetState(TkWindow *winPtr);
+/*
+ * The following functions are not present in old versions of Windows
+ * API headers but are used in the Tk source to ensure 64bit
+ * compatability.
+ */
+
+#ifndef GetClassLongPtr
+# define GetClassLongPtrA GetClassLongA
+# define GetClassLongPtrW GetClassLongW
+# define SetClassLongPtrA SetClassLongA
+# define SetClassLongPtrW SetClassLongW
+# ifdef UNICODE
+# define GetClassLongPtr GetClassLongPtrW
+# define SetClassLongPtr SetClassLongPtrW
+# else
+# define GetClassLongPtr GetClassLongPtrA
+# define SetClassLongPtr SetClassLongPtrA
+# endif /* !UNICODE */
+#endif /* !GetClassLongPtr */
+#ifndef GCLP_HICON
+# define GCLP_HICON GCL_HICON
+#endif /* !GCLP_HICON */
+#ifndef GCLP_HICONSM
+# define GCLP_HICONSM (-34)
+#endif /* !GCLP_HICONSM */
+
+#ifndef GetWindowLongPtr
+# define GetWindowLongPtrA GetWindowLongA
+# define GetWindowLongPtrW GetWindowLongW
+# define SetWindowLongPtrA SetWindowLongA
+# define SetWindowLongPtrW SetWindowLongW
+# ifdef UNICODE
+# define GetWindowLongPtr GetWindowLongPtrW
+# define SetWindowLongPtr SetWindowLongPtrW
+# else
+# define GetWindowLongPtr GetWindowLongPtrW
+# define SetWindowLongPtr SetWindowLongPtrW
+# endif /* !UNICODE */
+#endif /* !GetWindowLongPtr */
+#ifndef GWLP_WNDPROC
+#define GWLP_WNDPROC GWL_WNDPROC
+#define GWLP_HINSTANCE GWL_HINSTANCE
+#define GWLP_HWNDPARENT GWL_HWNDPARENT
+#define GWLP_USERDATA GWL_USERDATA
+#define GWLP_ID GWL_ID
+#endif /* !GWLP_WNDPROC */
+
#endif /* _TKWININT */