Mercurial > dwindows
comparison android/dw.cpp @ 2525:9fd26efff9da
Android: Implement dw_mle_delete() so that the tested output is correct.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sun, 09 May 2021 22:39:13 +0000 |
parents | 82cdb3ad7c25 |
children | d3f09b3f3703 |
comparison
equal
deleted
inserted
replaced
2524:d5c3c573c74e | 2525:9fd26efff9da |
---|---|
2107 * startpoint: Point to start deleting text. | 2107 * startpoint: Point to start deleting text. |
2108 * length: Amount of text to be deleted. | 2108 * length: Amount of text to be deleted. |
2109 */ | 2109 */ |
2110 void API dw_mle_delete(HWND handle, int startpoint, int length) | 2110 void API dw_mle_delete(HWND handle, int startpoint, int length) |
2111 { | 2111 { |
2112 JNIEnv *env; | |
2113 | |
2114 if((env = (JNIEnv *)pthread_getspecific(_dw_env_key))) | |
2115 { | |
2116 // First get the class that contains the method you need to call | |
2117 jclass clazz = _dw_find_class(env, DW_CLASS_NAME); | |
2118 // Get the method that you want to call | |
2119 jmethodID mleDelete = env->GetMethodID(clazz, "mleDelete", | |
2120 "(Landroid/widget/EditText;II)V"); | |
2121 // Call the method on the object | |
2122 env->CallVoidMethod(_dw_obj, mleDelete, handle, startpoint, length); | |
2123 } | |
2112 } | 2124 } |
2113 | 2125 |
2114 /* | 2126 /* |
2115 * Clears all text from an MLE box. | 2127 * Clears all text from an MLE box. |
2116 * Parameters: | 2128 * Parameters: |