Mercurial > dwindows
diff android/dw.cpp @ 2707:a3f6ca621453
Android: Implement dw_mle_set_visible(). Also fix various warnings.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Fri, 19 Nov 2021 02:49:53 +0000 |
parents | 4e9eba7f7226 |
children | 3a7dcc0ae08b |
line wrap: on
line diff
--- a/android/dw.cpp Fri Nov 19 02:20:11 2021 +0000 +++ b/android/dw.cpp Fri Nov 19 02:49:53 2021 +0000 @@ -2684,6 +2684,19 @@ */ void API dw_mle_set_visible(HWND handle, int line) { + JNIEnv *env; + + if((env = (JNIEnv *)pthread_getspecific(_dw_env_key))) + { + // First get the class that contains the method you need to call + jclass clazz = _dw_find_class(env, DW_CLASS_NAME); + // Get the method that you want to call + jmethodID mleSetVisible = env->GetMethodID(clazz, "mleSetVisible", + "(Landroid/widget/EditText;I)V"); + // Call the method on the object + env->CallVoidMethod(_dw_obj, mleSetVisible, handle, line); + _dw_jni_check_exception(env); + } } /*