comparison 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
comparison
equal deleted inserted replaced
2706:4e9eba7f7226 2707:a3f6ca621453
2682 * handle: Handle to the MLE to be positioned. 2682 * handle: Handle to the MLE to be positioned.
2683 * line: Line to be visible. 2683 * line: Line to be visible.
2684 */ 2684 */
2685 void API dw_mle_set_visible(HWND handle, int line) 2685 void API dw_mle_set_visible(HWND handle, int line)
2686 { 2686 {
2687 JNIEnv *env;
2688
2689 if((env = (JNIEnv *)pthread_getspecific(_dw_env_key)))
2690 {
2691 // First get the class that contains the method you need to call
2692 jclass clazz = _dw_find_class(env, DW_CLASS_NAME);
2693 // Get the method that you want to call
2694 jmethodID mleSetVisible = env->GetMethodID(clazz, "mleSetVisible",
2695 "(Landroid/widget/EditText;I)V");
2696 // Call the method on the object
2697 env->CallVoidMethod(_dw_obj, mleSetVisible, handle, line);
2698 _dw_jni_check_exception(env);
2699 }
2687 } 2700 }
2688 2701
2689 /* 2702 /*
2690 * Sets the editablity of an MLE box. 2703 * Sets the editablity of an MLE box.
2691 * Parameters: 2704 * Parameters: