comparison android/dw.cpp @ 2505:a149dabf6a1f

Android: HTML touchups, implement DW_SIGNAL_HTML_CHANGED: STARTED and COMPLETE. Make sure Javascript is enabled and that links open in the same WebView.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Thu, 06 May 2021 22:02:49 +0000
parents 1c2a79313b04
children f54051c3f2a5
comparison
equal deleted inserted replaced
2504:25c56d77d016 2505:a149dabf6a1f
375 375
376 params[3] = DW_INT_TO_POINTER(pageID); 376 params[3] = DW_INT_TO_POINTER(pageID);
377 _dw_event_handler(obj1, params, message); 377 _dw_event_handler(obj1, params, message);
378 } 378 }
379 379
380 /* Handler for HTML events */ 380 /* Handlers for HTML events */
381 JNIEXPORT void JNICALL 381 JNIEXPORT void JNICALL
382 Java_org_dbsoft_dwindows_DWindows_eventHandlerHTMLResult(JNIEnv* env, jobject obj, jobject obj1, 382 Java_org_dbsoft_dwindows_DWindows_eventHandlerHTMLResult(JNIEnv* env, jobject obj, jobject obj1,
383 jint message, jstring htmlResult, jlong data) { 383 jint message, jstring htmlResult, jlong data) {
384 const char *result = env->GetStringUTFChars(htmlResult, NULL); 384 const char *result = env->GetStringUTFChars(htmlResult, NULL);
385 void *params[8] = { NULL, DW_POINTER(result), NULL, 0, 0, 0, 0, DW_INT_TO_POINTER(data) }; 385 void *params[8] = { NULL, DW_POINTER(result), NULL, 0, 0, 0, 0, DW_INT_TO_POINTER(data) };
386
387 _dw_event_handler(obj1, params, message);
388 }
389
390 JNIEXPORT void JNICALL
391 Java_org_dbsoft_dwindows_DWWebViewClient_eventHandlerHTMLChanged(JNIEnv* env, jobject obj, jobject obj1,
392 jint message, jstring URI, jint status) {
393 const char *uri = env->GetStringUTFChars(URI, NULL);
394 void *params[8] = { NULL, DW_POINTER(uri), NULL, DW_INT_TO_POINTER(status), 0, 0, 0, 0 };
386 395
387 _dw_event_handler(obj1, params, message); 396 _dw_event_handler(obj1, params, message);
388 } 397 }
389 398
390 JNIEXPORT void JNICALL 399 JNIEXPORT void JNICALL