< prev index next >

jdk/src/jdk.accessibility/windows/native/libjavaaccessbridge/JavaAccessBridge.cpp

Print this page

        

@@ -1724,11 +1724,11 @@
     // common setup
     char buffer[sizeof(PackageType) + sizeof(PropertyCaretChangePackage)];
     PackageType *type = (PackageType *) buffer;
     PropertyCaretChangePackage *pkg = (PropertyCaretChangePackage *) (buffer + sizeof(PackageType));
     *type = cPropertyCaretChangePackage;
-    pkg->vmID = (long) dialogWindow;
+    pkg->vmID = (long)(uintptr_t) dialogWindow;
 
     // make new Global Refs and send events only to those ATs that want 'em
     AccessBridgeATInstance *ati = ATs;
     while (ati != (AccessBridgeATInstance *) 0) {
         if (ati->accessibilityEventMask & cPropertyCaretChangeEvent) {

@@ -1779,11 +1779,11 @@
     const wchar_t *stringBytes;
     char buffer[sizeof(PackageType) + sizeof(PropertyDescriptionChangePackage)];
     PackageType *type = (PackageType *) buffer;
     PropertyDescriptionChangePackage *pkg = (PropertyDescriptionChangePackage *) (buffer + sizeof(PackageType));
     *type = cPropertyDescriptionChangePackage;
-    pkg->vmID = (long) dialogWindow;
+    pkg->vmID = (long)(uintptr_t) dialogWindow;
 
     // make new Global Refs and send events only to those ATs that want 'em
     AccessBridgeATInstance *ati = ATs;
     while (ati != (AccessBridgeATInstance *) 0) {
         if (ati->accessibilityEventMask & cPropertyCaretChangeEvent) {

@@ -1865,11 +1865,11 @@
     const wchar_t *stringBytes;
     char buffer[sizeof(PackageType) + sizeof(PropertyNameChangePackage)];
     PackageType *type = (PackageType *) buffer;
     PropertyNameChangePackage *pkg = (PropertyNameChangePackage *) (buffer + sizeof(PackageType));
     *type = cPropertyNameChangePackage;
-    pkg->vmID = (long) dialogWindow;
+    pkg->vmID = (long)(uintptr_t) dialogWindow;
 
     // make new Global Refs and send events only to those ATs that want 'em
     AccessBridgeATInstance *ati = ATs;
     while (ati != (AccessBridgeATInstance *) 0) {
         if (ati->accessibilityEventMask & cPropertyNameChangeEvent) {

@@ -1949,11 +1949,11 @@
     // common setup
     char buffer[sizeof(PackageType) + sizeof(PropertySelectionChangePackage)];
     PackageType *type = (PackageType *) buffer;
     PropertySelectionChangePackage *pkg = (PropertySelectionChangePackage *) (buffer + sizeof(PackageType));
     *type = cPropertySelectionChangePackage;
-    pkg->vmID = (long) dialogWindow;
+    pkg->vmID = (long)(uintptr_t) dialogWindow;
 
     // make new Global Refs and send events only to those ATs that want 'em
     AccessBridgeATInstance *ati = ATs;
     while (ati != (AccessBridgeATInstance *) 0) {
         if (ati->accessibilityEventMask & cPropertySelectionChangeEvent) {

@@ -2002,11 +2002,11 @@
     const wchar_t *stringBytes;
     char buffer[sizeof(PackageType) + sizeof(PropertyStateChangePackage)];
     PackageType *type = (PackageType *) buffer;
     PropertyStateChangePackage *pkg = (PropertyStateChangePackage *) (buffer + sizeof(PackageType));
     *type = cPropertyStateChangePackage;
-    pkg->vmID = (long) dialogWindow;
+    pkg->vmID = (long)(uintptr_t) dialogWindow;
 
     // make new Global Refs and send events only to those ATs that want 'em
     AccessBridgeATInstance *ati = ATs;
     while (ati != (AccessBridgeATInstance *) 0) {
         if (ati->accessibilityEventMask & cPropertyStateChangeEvent) {

@@ -2086,11 +2086,11 @@
     // common setup
     char buffer[sizeof(PackageType) + sizeof(PropertyTextChangePackage)];
     PackageType *type = (PackageType *) buffer;
     PropertyTextChangePackage *pkg = (PropertyTextChangePackage *) (buffer + sizeof(PackageType));
     *type = cPropertyTextChangePackage;
-    pkg->vmID = (long) dialogWindow;
+    pkg->vmID = (long)(uintptr_t) dialogWindow;
 
     // make new Global Refs and send events only to those ATs that want 'em
     AccessBridgeATInstance *ati = ATs;
     while (ati != (AccessBridgeATInstance *) 0) {
         if (ati->accessibilityEventMask & cPropertyTextChangeEvent) {

@@ -2139,11 +2139,11 @@
     const wchar_t *stringBytes;
     char buffer[sizeof(PackageType) + sizeof(PropertyValueChangePackage)];
     PackageType *type = (PackageType *) buffer;
     PropertyValueChangePackage *pkg = (PropertyValueChangePackage *) (buffer + sizeof(PackageType));
     *type = cPropertyValueChangePackage;
-    pkg->vmID = (long) dialogWindow;
+    pkg->vmID = (long)(uintptr_t) dialogWindow;
 
     // make new Global Refs and send events only to those ATs that want 'em
     AccessBridgeATInstance *ati = ATs;
     while (ati != (AccessBridgeATInstance *) 0) {
         if (ati->accessibilityEventMask & cPropertyValueChangeEvent) {

@@ -2222,11 +2222,11 @@
     // common setup
     char buffer[sizeof(PackageType) + sizeof(PropertyVisibleDataChangePackage)];
     PackageType *type = (PackageType *) buffer;
     PropertyVisibleDataChangePackage *pkg = (PropertyVisibleDataChangePackage *) (buffer + sizeof(PackageType));
     *type = cPropertyVisibleDataChangePackage;
-    pkg->vmID = (long) dialogWindow;
+    pkg->vmID = (long)(uintptr_t) dialogWindow;
 
     // make new Global Refs and send events only to those ATs that want 'em
     AccessBridgeATInstance *ati = ATs;
     while (ati != (AccessBridgeATInstance *) 0) {
         if (ati->accessibilityEventMask & cPropertyVisibleDataChangeEvent) {

@@ -2274,11 +2274,11 @@
     // common setup
     char buffer[sizeof(PackageType) + sizeof(PropertyChildChangePackage)];
     PackageType *type = (PackageType *) buffer;
     PropertyChildChangePackage *pkg = (PropertyChildChangePackage *) (buffer + sizeof(PackageType));
     *type = cPropertyChildChangePackage;
-    pkg->vmID = (long) dialogWindow;
+    pkg->vmID = (long)(uintptr_t) dialogWindow;
 
     // make new Global Refs and send events only to those ATs that want 'em
     AccessBridgeATInstance *ati = ATs;
     while (ati != (AccessBridgeATInstance *) 0) {
         if (ati->accessibilityEventMask & cPropertyChildChangeEvent) {

@@ -2332,11 +2332,11 @@
     // common setup
     char buffer[sizeof(PackageType) + sizeof(PropertyActiveDescendentChangePackage)];
     PackageType *type = (PackageType *) buffer;
     PropertyActiveDescendentChangePackage *pkg = (PropertyActiveDescendentChangePackage *) (buffer + sizeof(PackageType));
     *type = cPropertyActiveDescendentChangePackage;
-    pkg->vmID = (long) dialogWindow;
+    pkg->vmID = (long)(uintptr_t) dialogWindow;
 
     // make new Global Refs and send events only to those ATs that want 'em
     AccessBridgeATInstance *ati = ATs;
     while (ati != (AccessBridgeATInstance *) 0) {
         if (ati->accessibilityEventMask & cPropertyActiveDescendentChangeEvent) {

@@ -2390,11 +2390,11 @@
     const wchar_t *stringBytes;
     char buffer[sizeof(PackageType) + sizeof(PropertyTableModelChangePackage)];
     PackageType *type = (PackageType *) buffer;
     PropertyTableModelChangePackage *pkg = (PropertyTableModelChangePackage *) (buffer + sizeof(PackageType));
     *type = cPropertyTableModelChangePackage;
-    pkg->vmID = (long) dialogWindow;
+    pkg->vmID = (long)(uintptr_t) dialogWindow;
 
     // make new Global Refs and send events only to those ATs that want 'em
     AccessBridgeATInstance *ati = ATs;
     while (ati != (AccessBridgeATInstance *) 0) {
         if (ati->accessibilityEventMask & cPropertyTableModelChangeEvent) {

@@ -2481,11 +2481,11 @@
         /* common setup */                                                              \
         char buffer[sizeof(PackageType) + sizeof(packageStruct)];                       \
         PackageType *type = (PackageType *) buffer;                                     \
         packageStruct *pkg = (packageStruct *) (buffer + sizeof(PackageType));          \
         *type = packageConstant;                                                        \
-        pkg->vmID = (long) dialogWindow;                                                \
+        pkg->vmID = (long)(uintptr_t) dialogWindow;                                     \
                                                                                         \
         /* make new Global Refs, send events only to those ATs that want 'em */         \
         AccessBridgeATInstance *ati = ATs;                                              \
         while (ati != (AccessBridgeATInstance *) 0) {                                   \
             PrintDebugString("\r\njavaEventMask = %X eventConstant=%d pkg->vmID=%X",    \

@@ -2519,11 +2519,11 @@
         /* common setup */
         char buffer[sizeof(PackageType) + sizeof(JavaShutdownPackage)];
         PackageType *type = (PackageType *) buffer;
         JavaShutdownPackage *pkg = (JavaShutdownPackage *) (buffer + sizeof(PackageType));
         *type = cJavaShutdownPackage;
-        pkg->vmID = (long) dialogWindow;
+        pkg->vmID = (long)(uintptr_t) dialogWindow;
 
         /* make new Global Refs, send events only to those ATs that want 'em */
         AccessBridgeATInstance *ati = ATs;
         while (ati != (AccessBridgeATInstance *) 0) {
             if (ati->javaEventMask & cJavaShutdownEvent) {

@@ -2717,11 +2717,11 @@
     if (result == JNI_FALSE) {
         return (jobject)0;
     }
 
     // Get the component
-    return awt.GetComponent(env, (void *)windowHandle);
+    return awt.GetComponent(env, (void *)(uintptr_t) windowHandle);
     }
 
 
     /*
      * Map a Java component to a HWND

@@ -2760,11 +2760,11 @@
 
         // Get the platform-specific drawing info
         dsi_win = (JAWT_Win32DrawingSurfaceInfo *)dsi->platformInfo;
 
         // Get the window handle
-        windowHandle = (jint)dsi_win->hwnd;
+        windowHandle = (jint)(uintptr_t)dsi_win->hwnd;
 
         // Free the drawing surface info
         ds->FreeDrawingSurfaceInfo(dsi);
 
         // Free the drawing surface
< prev index next >