comparison android/dw.cpp @ 2518:c4e90a623437

Android: Fix not actually passing the data in dw_window_set_data().
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sat, 08 May 2021 08:43:47 +0000
parents d746323f2841
children 551313c064f2
comparison
equal deleted inserted replaced
2517:d746323f2841 2518:c4e90a623437
4137 jclass clazz = _dw_find_class(env, DW_CLASS_NAME); 4137 jclass clazz = _dw_find_class(env, DW_CLASS_NAME);
4138 // Get the method that you want to call 4138 // Get the method that you want to call
4139 jmethodID windowSetData = env->GetMethodID(clazz, "windowSetData", 4139 jmethodID windowSetData = env->GetMethodID(clazz, "windowSetData",
4140 "(Landroid/view/View;Ljava/lang/String;J)V"); 4140 "(Landroid/view/View;Ljava/lang/String;J)V");
4141 // Call the method on the object 4141 // Call the method on the object
4142 env->CallVoidMethod(_dw_obj, windowSetData, window, jstr); 4142 env->CallVoidMethod(_dw_obj, windowSetData, window, jstr, (jlong)data);
4143 } 4143 }
4144 } 4144 }
4145 4145
4146 /* 4146 /*
4147 * Gets a named user data item from a window handle. 4147 * Gets a named user data item from a window handle.
4164 jclass clazz = _dw_find_class(env, DW_CLASS_NAME); 4164 jclass clazz = _dw_find_class(env, DW_CLASS_NAME);
4165 // Get the method that you want to call 4165 // Get the method that you want to call
4166 jmethodID windowGetData = env->GetMethodID(clazz, "windowGetData", 4166 jmethodID windowGetData = env->GetMethodID(clazz, "windowGetData",
4167 "(Landroid/view/View;Ljava/lang/String;)J"); 4167 "(Landroid/view/View;Ljava/lang/String;)J");
4168 // Call the method on the object 4168 // Call the method on the object
4169 retval = DW_INT_TO_POINTER(env->CallLongMethod(_dw_obj, windowGetData, window, jstr)); 4169 retval = (void *)env->CallLongMethod(_dw_obj, windowGetData, window, jstr);
4170 } 4170 }
4171 return retval; 4171 return retval;
4172 } 4172 }
4173 4173
4174 /* 4174 /*