< prev index next >

src/java.desktop/windows/native/libawt/windows/awt.h

Print this page
rev 54883 : JDK-8220154 Improve java2d rendering performance on macOS by using Metal framework


 174  */
 175 #define IS_WIN2000 (LOBYTE(LOWORD(::GetVersion())) >= 5)
 176 #define IS_WINXP ((IS_WIN2000 && HIBYTE(LOWORD(::GetVersion())) >= 1) || LOBYTE(LOWORD(::GetVersion())) > 5)
 177 #define IS_WINVISTA (LOBYTE(LOWORD(::GetVersion())) >= 6)
 178 #define IS_WIN8 (                                                              \
 179     (IS_WINVISTA && (HIBYTE(LOWORD(::GetVersion())) >= 2)) ||                  \
 180     (LOBYTE(LOWORD(::GetVersion())) > 6))
 181 
 182 #define IS_WINVER_ATLEAST(maj, min) \
 183                    ((maj) < LOBYTE(LOWORD(::GetVersion())) || \
 184                       (maj) == LOBYTE(LOWORD(::GetVersion())) && \
 185                       (min) <= HIBYTE(LOWORD(::GetVersion())))
 186 
 187 /*
 188  * macros to crack a LPARAM into two ints -- used for signed coordinates,
 189  * such as with mouse messages.
 190  */
 191 #define LO_INT(l)           ((int)(short)(l))
 192 #define HI_INT(l)           ((int)(short)(((DWORD)(l) >> 16) & 0xFFFF))
 193 
 194 extern JavaVM *jvm;
 195 
 196 // Platform encoding is Unicode (UTF-16), re-define JNU_ functions
 197 // to proper JNI functions.
 198 #define JNU_NewStringPlatform(env, x) env->NewString(reinterpret_cast<const jchar*>(x), static_cast<jsize>(_tcslen(x)))
 199 #define JNU_GetStringPlatformChars(env, x, y) reinterpret_cast<LPCWSTR>(env->GetStringChars(x, y))
 200 #define JNU_ReleaseStringPlatformChars(env, x, y) env->ReleaseStringChars(x, reinterpret_cast<const jchar*>(y))
 201 
 202 /*
 203  * Itanium symbols needed for 64-bit compilation.
 204  * These are defined in winuser.h in the August 2001 MSDN update.
 205  */
 206 #ifndef GCLP_HBRBACKGROUND
 207     #ifdef _WIN64
 208         #error Macros for GetClassLongPtr, etc. are for 32-bit windows only
 209     #endif /* !_WIN64 */
 210     #define GetClassLongPtr GetClassLong
 211     #define SetClassLongPtr SetClassLong
 212     #define GCLP_HBRBACKGROUND GCL_HBRBACKGROUND
 213     #define GCLP_HCURSOR GCL_HCURSOR
 214     #define GCLP_HICON GCL_HICON




 174  */
 175 #define IS_WIN2000 (LOBYTE(LOWORD(::GetVersion())) >= 5)
 176 #define IS_WINXP ((IS_WIN2000 && HIBYTE(LOWORD(::GetVersion())) >= 1) || LOBYTE(LOWORD(::GetVersion())) > 5)
 177 #define IS_WINVISTA (LOBYTE(LOWORD(::GetVersion())) >= 6)
 178 #define IS_WIN8 (                                                              \
 179     (IS_WINVISTA && (HIBYTE(LOWORD(::GetVersion())) >= 2)) ||                  \
 180     (LOBYTE(LOWORD(::GetVersion())) > 6))
 181 
 182 #define IS_WINVER_ATLEAST(maj, min) \
 183                    ((maj) < LOBYTE(LOWORD(::GetVersion())) || \
 184                       (maj) == LOBYTE(LOWORD(::GetVersion())) && \
 185                       (min) <= HIBYTE(LOWORD(::GetVersion())))
 186 
 187 /*
 188  * macros to crack a LPARAM into two ints -- used for signed coordinates,
 189  * such as with mouse messages.
 190  */
 191 #define LO_INT(l)           ((int)(short)(l))
 192 #define HI_INT(l)           ((int)(short)(((DWORD)(l) >> 16) & 0xFFFF))
 193 
 194 extern "C" JavaVM *jvm;
 195 
 196 // Platform encoding is Unicode (UTF-16), re-define JNU_ functions
 197 // to proper JNI functions.
 198 #define JNU_NewStringPlatform(env, x) env->NewString(reinterpret_cast<const jchar*>(x), static_cast<jsize>(_tcslen(x)))
 199 #define JNU_GetStringPlatformChars(env, x, y) reinterpret_cast<LPCWSTR>(env->GetStringChars(x, y))
 200 #define JNU_ReleaseStringPlatformChars(env, x, y) env->ReleaseStringChars(x, reinterpret_cast<const jchar*>(y))
 201 
 202 /*
 203  * Itanium symbols needed for 64-bit compilation.
 204  * These are defined in winuser.h in the August 2001 MSDN update.
 205  */
 206 #ifndef GCLP_HBRBACKGROUND
 207     #ifdef _WIN64
 208         #error Macros for GetClassLongPtr, etc. are for 32-bit windows only
 209     #endif /* !_WIN64 */
 210     #define GetClassLongPtr GetClassLong
 211     #define SetClassLongPtr SetClassLong
 212     #define GCLP_HBRBACKGROUND GCL_HBRBACKGROUND
 213     #define GCLP_HCURSOR GCL_HCURSOR
 214     #define GCLP_HICON GCL_HICON


< prev index next >