Mercurial > dwindows
comparison android/dw.cpp @ 2578:a36448beb7f7
Android: Implement dw_window_set_style() for static text widgets.
Clean up a number of warnings reported by Android Studio.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sat, 22 May 2021 21:53:41 +0000 |
parents | 6fdab466d7a2 |
children | 473eb9ff3f04 |
comparison
equal
deleted
inserted
replaced
2577:6fdab466d7a2 | 2578:a36448beb7f7 |
---|---|
5042 * style: Style features enabled or disabled. | 5042 * style: Style features enabled or disabled. |
5043 * mask: Corresponding bitmask of features to be changed. | 5043 * mask: Corresponding bitmask of features to be changed. |
5044 */ | 5044 */ |
5045 void API dw_window_set_style(HWND handle, ULONG style, ULONG mask) | 5045 void API dw_window_set_style(HWND handle, ULONG style, ULONG mask) |
5046 { | 5046 { |
5047 JNIEnv *env; | |
5048 | |
5049 if(handle && (env = (JNIEnv *)pthread_getspecific(_dw_env_key))) | |
5050 { | |
5051 // First get the class that contains the method you need to call | |
5052 jclass clazz = _dw_find_class(env, DW_CLASS_NAME); | |
5053 // Get the method that you want to call | |
5054 jmethodID windowSetStyle = env->GetMethodID(clazz, "windowSetStyle", | |
5055 "(Landroid/view/View;II)V"); | |
5056 // Call the method on the object | |
5057 env->CallVoidMethod(_dw_obj, windowSetStyle, handle, (jint)style, (jint)mask); | |
5058 _dw_jni_check_exception(env); | |
5059 } | |
5047 } | 5060 } |
5048 | 5061 |
5049 /* | 5062 /* |
5050 * Sets the current focus item for a window/dialog. | 5063 * Sets the current focus item for a window/dialog. |
5051 * Parameters: | 5064 * Parameters: |