{
jmethodID method;
jobject window;
+ jint pixel;
window = android_resolve_handle (handle, ANDROID_HANDLE_WINDOW);
if (value_mask & ANDROID_CW_BACK_PIXEL)
{
method = window_class.change_window_background;
- (*android_java_env)->CallVoidMethod (android_java_env,
- window, method,
- (jint) attrs->background_pixel);
+ pixel = (jint) attrs->background_pixel;
+ (*android_java_env)->CallNonvirtualVoidMethod (android_java_env,
+ window,
+ window_class.class,
+ method, pixel);
+ android_exception_check ();
}
}
values->ts_y_origin);
if (mask)
- (*android_java_env)->CallVoidMethod (android_java_env,
- gcontext,
- emacs_gc_mark_dirty,
- (jboolean) clip_changed);
+ {
+ (*android_java_env)->CallNonvirtualVoidMethod (android_java_env,
+ gcontext,
+ emacs_gc_class,
+ emacs_gc_mark_dirty,
+ (jboolean) clip_changed);
+ android_exception_check ();
+ }
}
void
emacs_gc_clip_y_origin,
clip_y_origin);
- (*android_java_env)->CallVoidMethod (android_java_env,
- gcontext,
- emacs_gc_mark_dirty,
- (jboolean) true);
+ (*android_java_env)->CallNonvirtualVoidMethod (android_java_env,
+ gcontext,
+ emacs_gc_class,
+ emacs_gc_mark_dirty,
+ (jboolean) true);
+ android_exception_check ();
/* Cache the clip rectangles on the C side for
sfntfont-android.c. */
ANDROID_HANDLE_WINDOW);
method = window_class.reparent_to;
- (*android_java_env)->CallVoidMethod (android_java_env, window,
- method,
- parent, (jint) x, (jint) y);
+ (*android_java_env)->CallNonvirtualVoidMethod (android_java_env, window,
+ window_class.class, method,
+ parent, (jint) x, (jint) y);
+ android_exception_check ();
}
void
window = android_resolve_handle (handle, ANDROID_HANDLE_WINDOW);
- (*android_java_env)->CallVoidMethod (android_java_env,
- emacs_service,
- service_class.clear_window,
- window);
+ (*android_java_env)->CallNonvirtualVoidMethod (android_java_env,
+ emacs_service,
+ service_class.class,
+ service_class.clear_window,
+ window);
+ android_exception_check ();
}
void
window = android_resolve_handle (handle, ANDROID_HANDLE_WINDOW);
map_window = window_class.map_window;
- (*android_java_env)->CallVoidMethod (android_java_env,
- window, map_window);
+ (*android_java_env)->CallNonvirtualVoidMethod (android_java_env,
+ window,
+ window_class.class,
+ map_window);
+ android_exception_check ();
}
void
window = android_resolve_handle (handle, ANDROID_HANDLE_WINDOW);
unmap_window = window_class.unmap_window;
- (*android_java_env)->CallVoidMethod (android_java_env,
- window, unmap_window);
+ (*android_java_env)->CallNonvirtualVoidMethod (android_java_env,
+ window,
+ window_class.class,
+ unmap_window);
+ android_exception_check ();
}
void
window = android_resolve_handle (handle, ANDROID_HANDLE_WINDOW);
resize_window = window_class.resize_window;
- (*android_java_env)->CallVoidMethod (android_java_env,
- window, resize_window,
- (jint) width, (jint) height);
+ (*android_java_env)->CallNonvirtualVoidMethod (android_java_env,
+ window,
+ window_class.class,
+ resize_window,
+ (jint) width,
+ (jint) height);
+ android_exception_check ();
}
void
window = android_resolve_handle (handle, ANDROID_HANDLE_WINDOW);
move_window = window_class.move_window;
- (*android_java_env)->CallVoidMethod (android_java_env,
- window, move_window,
- (jint) x, (jint) y);
+ (*android_java_env)->CallNonvirtualVoidMethod (android_java_env,
+ window,
+ window_class.class,
+ move_window,
+ (jint) x, (jint) y);
+ android_exception_check ();
}
void
{
window = android_resolve_handle (swap_info[i].swap_window,
ANDROID_HANDLE_WINDOW);
- (*android_java_env)->CallVoidMethod (android_java_env,
- window,
- window_class.swap_buffers);
+ (*android_java_env)->CallNonvirtualVoidMethod (android_java_env,
+ window,
+ window_class.class,
+ window_class.swap_buffers);
+ android_exception_check ();
}
}
gcontext = android_resolve_handle (gc->gcontext,
ANDROID_HANDLE_GCONTEXT);
- (*android_java_env)->CallVoidMethod (android_java_env,
- emacs_service,
- service_class.fill_rectangle,
- drawable,
- gcontext,
- (jint) x, (jint) y,
- (jint) width,
- (jint) height);
+ (*android_java_env)->CallNonvirtualVoidMethod (android_java_env,
+ emacs_service,
+ service_class.class,
+ service_class.fill_rectangle,
+ drawable,
+ gcontext,
+ (jint) x, (jint) y,
+ (jint) width,
+ (jint) height);
}
android_pixmap
gcontext = android_resolve_handle (gc->gcontext,
ANDROID_HANDLE_GCONTEXT);
- (*android_java_env)->CallVoidMethod (android_java_env,
- emacs_service,
- service_class.copy_area,
- src_object,
- dest_object,
- gcontext,
- (jint) src_x, (jint) src_y,
- (jint) width, (jint) height,
- (jint) dest_x, (jint) dest_y);
+ (*android_java_env)->CallNonvirtualVoidMethod (android_java_env,
+ emacs_service,
+ service_class.class,
+ service_class.copy_area,
+ src_object,
+ dest_object,
+ gcontext,
+ (jint) src_x, (jint) src_y,
+ (jint) width, (jint) height,
+ (jint) dest_x, (jint) dest_y);
}
void
ANDROID_DELETE_LOCAL_REF (point);
}
- (*android_java_env)->CallVoidMethod (android_java_env,
- emacs_service,
- service_class.fill_polygon,
- drawable_object,
- gcontext, array);
+ (*android_java_env)->CallNonvirtualVoidMethod (android_java_env,
+ emacs_service,
+ service_class.class,
+ service_class.fill_polygon,
+ drawable_object,
+ gcontext, array);
ANDROID_DELETE_LOCAL_REF (array);
}
gcontext = android_resolve_handle (gc->gcontext,
ANDROID_HANDLE_GCONTEXT);
- (*android_java_env)->CallVoidMethod (android_java_env,
- emacs_service,
- service_class.draw_rectangle,
- drawable, gcontext,
- (jint) x, (jint) y,
- (jint) width, (jint) height);
+ (*android_java_env)->CallNonvirtualVoidMethod (android_java_env,
+ emacs_service,
+ service_class.class,
+ service_class.draw_rectangle,
+ drawable, gcontext,
+ (jint) x, (jint) y,
+ (jint) width, (jint) height);
}
void
gcontext = android_resolve_handle (gc->gcontext,
ANDROID_HANDLE_GCONTEXT);
- (*android_java_env)->CallVoidMethod (android_java_env,
- emacs_service,
- service_class.draw_point,
- drawable, gcontext,
- (jint) x, (jint) y);
+ (*android_java_env)->CallNonvirtualVoidMethod (android_java_env,
+ emacs_service,
+ service_class.class,
+ service_class.draw_point,
+ drawable, gcontext,
+ (jint) x, (jint) y);
}
void
gcontext = android_resolve_handle (gc->gcontext,
ANDROID_HANDLE_GCONTEXT);
- (*android_java_env)->CallVoidMethod (android_java_env,
- emacs_service,
- service_class.draw_line,
- drawable, gcontext,
- (jint) x, (jint) y,
- (jint) x2, (jint) y2);
+ (*android_java_env)->CallNonvirtualVoidMethod (android_java_env,
+ emacs_service,
+ service_class.class,
+ service_class.draw_line,
+ drawable, gcontext,
+ (jint) x, (jint) y,
+ (jint) x2, (jint) y2);
}
android_pixmap
window = android_resolve_handle (handle, ANDROID_HANDLE_WINDOW);
- (*android_java_env)->CallVoidMethod (android_java_env,
- emacs_service,
- service_class.clear_area,
- window, (jint) x, (jint) y,
- (jint) width, (jint) height);
+ (*android_java_env)->CallNonvirtualVoidMethod (android_java_env,
+ emacs_service,
+ service_class.class,
+ service_class.clear_area,
+ window, (jint) x, (jint) y,
+ (jint) width, (jint) height);
}
android_pixmap
void
android_bell (void)
{
- (*android_java_env)->CallVoidMethod (android_java_env,
- emacs_service,
- service_class.ring_bell);
+ (*android_java_env)->CallNonvirtualVoidMethod (android_java_env,
+ emacs_service,
+ service_class.class,
+ service_class.ring_bell);
android_exception_check ();
}
window = android_resolve_handle (handle, ANDROID_HANDLE_WINDOW);
make_input_focus = window_class.make_input_focus;
- (*android_java_env)->CallVoidMethod (android_java_env, window,
- make_input_focus, (jlong) time);
+ (*android_java_env)->CallNonvirtualVoidMethod (android_java_env,
+ window,
+ service_class.class,
+ make_input_focus,
+ (jlong) time);
android_exception_check ();
}
window = android_resolve_handle (handle, ANDROID_HANDLE_WINDOW);
raise = window_class.raise;
- (*android_java_env)->CallVoidMethod (android_java_env, window,
- raise);
+ (*android_java_env)->CallNonvirtualVoidMethod (android_java_env,
+ window,
+ window_class.class,
+ raise);
android_exception_check ();
}
window = android_resolve_handle (handle, ANDROID_HANDLE_WINDOW);
lower = window_class.lower;
- (*android_java_env)->CallVoidMethod (android_java_env, window,
- lower);
+ (*android_java_env)->CallNonvirtualVoidMethod (android_java_env,
+ window,
+ window_class.class,
+ lower);
android_exception_check ();
}
window = android_resolve_handle (handle, ANDROID_HANDLE_WINDOW);
method = window_class.set_dont_focus_on_map;
- (*android_java_env)->CallVoidMethod (android_java_env, window,
- method,
- (jboolean) no_focus_on_map);
+ (*android_java_env)->CallNonvirtualVoidMethod (android_java_env, window,
+ window_class.class,
+ method,
+ (jboolean) no_focus_on_map);
+ android_exception_check ();
}
void
window = android_resolve_handle (handle, ANDROID_HANDLE_WINDOW);
method = window_class.set_dont_accept_focus;
- (*android_java_env)->CallVoidMethod (android_java_env, window,
- method,
- (jboolean) no_accept_focus);
+ (*android_java_env)->CallNonvirtualVoidMethod (android_java_env, window,
+ window_class.class,
+ method,
+ (jboolean) no_accept_focus);
+ android_exception_check ();
}
void
buffer = (*android_java_env)->GetStringUTFChars (android_java_env,
(jstring) string,
NULL);
- android_exception_check ();
+ android_exception_check_nonnull ((void *) buffer, string);
strncpy (name_return, buffer, size - 1);
(*android_java_env)->ReleaseStringUTFChars (android_java_env,
method = window_class.toggle_on_screen_keyboard;
/* Now display the on screen keyboard. */
- (*android_java_env)->CallVoidMethod (android_java_env, object,
- method, (jboolean) show);
+ (*android_java_env)->CallNonvirtualVoidMethod (android_java_env, object,
+ window_class.class,
+ method, (jboolean) show);
/* Check for out of memory errors. */
android_exception_check ();
{
/* Try to call the Java side function. Normally, this should call
System.exit to terminate this process. */
- (*android_java_env)->CallVoidMethod (android_java_env,
- emacs_service,
- service_class.restart_emacs);
+ (*android_java_env)->CallNonvirtualVoidMethod (android_java_env,
+ emacs_service,
+ service_class.class,
+ service_class.restart_emacs);
/* Exit anyway, in case EmacsService did not do so. */
exit (0);
android_exception_check ();
/* Display the toast. */
- (*android_java_env)->CallVoidMethod (android_java_env,
- emacs_service,
- service_class.display_toast,
- string);
+ (*android_java_env)->CallNonvirtualVoidMethod (android_java_env,
+ emacs_service,
+ service_class.class,
+ service_class.display_toast,
+ string);
android_exception_check_1 (string);
/* Delete the local reference to the string. */
object = android_resolve_handle (window, ANDROID_HANDLE_WINDOW);
- (*android_java_env)->CallVoidMethod (android_java_env,
- emacs_service,
- service_class.update_ic,
- object,
- (jint) selection_start,
- (jint) selection_end,
- (jint) composing_region_start,
- (jint) composing_region_end);
+ (*android_java_env)->CallNonvirtualVoidMethod (android_java_env,
+ emacs_service,
+ service_class.class,
+ service_class.update_ic,
+ object,
+ (jint) selection_start,
+ (jint) selection_end,
+ (jint) composing_region_start,
+ (jint) composing_region_end);
android_exception_check ();
}
object = android_resolve_handle (window, ANDROID_HANDLE_WINDOW);
- (*android_java_env)->CallVoidMethod (android_java_env,
- emacs_service,
- service_class.reset_ic,
- object, (jint) mode);
+ (*android_java_env)->CallNonvirtualVoidMethod (android_java_env,
+ emacs_service,
+ service_class.class,
+ service_class.reset_ic,
+ object, (jint) mode);
android_exception_check ();
}
object = android_resolve_handle (window, ANDROID_HANDLE_WINDOW);
- (*android_java_env)->CallVoidMethod (android_java_env,
- object,
- window_class.set_fullscreen,
- (jboolean) fullscreen);
+ (*android_java_env)->CallNonvirtualVoidMethod (android_java_env,
+ object,
+ window_class.class,
+ window_class.set_fullscreen,
+ (jboolean) fullscreen);
android_exception_check ();
return 0;
}