Update Android port
* src/android.c (android_get_screen_width): (android_get_screen_height): (android_get_mm_width): (android_get_mm_height): (android_detect_mouse): Correctly handle Java exceptions.
This commit is contained in:
parent
90c22cb949
commit
08a3749794
1 changed files with 54 additions and 19 deletions
|
@ -4880,45 +4880,80 @@ android_damage_window (android_drawable handle,
|
|||
int
|
||||
android_get_screen_width (void)
|
||||
{
|
||||
return (*android_java_env)->CallIntMethod (android_java_env,
|
||||
emacs_service,
|
||||
service_class.get_screen_width,
|
||||
(jboolean) false);
|
||||
int rc;
|
||||
jmethodID method;
|
||||
|
||||
method = service_class.get_screen_width;
|
||||
rc = (*android_java_env)->CallNonvirtualIntMethod (android_java_env,
|
||||
emacs_service,
|
||||
service_class.class,
|
||||
method,
|
||||
(jboolean) false);
|
||||
android_exception_check ();
|
||||
return rc;
|
||||
}
|
||||
|
||||
int
|
||||
android_get_screen_height (void)
|
||||
{
|
||||
return (*android_java_env)->CallIntMethod (android_java_env,
|
||||
emacs_service,
|
||||
service_class.get_screen_height,
|
||||
(jboolean) false);
|
||||
int rc;
|
||||
jmethodID method;
|
||||
|
||||
method = service_class.get_screen_height;
|
||||
rc = (*android_java_env)->CallNonvirtualIntMethod (android_java_env,
|
||||
emacs_service,
|
||||
service_class.class,
|
||||
method,
|
||||
(jboolean) false);
|
||||
android_exception_check ();
|
||||
return rc;
|
||||
}
|
||||
|
||||
int
|
||||
android_get_mm_width (void)
|
||||
{
|
||||
return (*android_java_env)->CallIntMethod (android_java_env,
|
||||
emacs_service,
|
||||
service_class.get_screen_width,
|
||||
(jboolean) true);
|
||||
int rc;
|
||||
jmethodID method;
|
||||
|
||||
method = service_class.get_screen_width;
|
||||
rc = (*android_java_env)->CallNonvirtualIntMethod (android_java_env,
|
||||
emacs_service,
|
||||
service_class.class,
|
||||
method,
|
||||
(jboolean) true);
|
||||
android_exception_check ();
|
||||
return rc;
|
||||
}
|
||||
|
||||
int
|
||||
android_get_mm_height (void)
|
||||
{
|
||||
return (*android_java_env)->CallIntMethod (android_java_env,
|
||||
emacs_service,
|
||||
service_class.get_screen_height,
|
||||
(jboolean) true);
|
||||
int rc;
|
||||
jmethodID method;
|
||||
|
||||
method = service_class.get_screen_height;
|
||||
rc = (*android_java_env)->CallNonvirtualIntMethod (android_java_env,
|
||||
emacs_service,
|
||||
service_class.class,
|
||||
method,
|
||||
(jboolean) true);
|
||||
android_exception_check ();
|
||||
return rc;
|
||||
}
|
||||
|
||||
bool
|
||||
android_detect_mouse (void)
|
||||
{
|
||||
return (*android_java_env)->CallBooleanMethod (android_java_env,
|
||||
emacs_service,
|
||||
service_class.detect_mouse);
|
||||
bool rc;
|
||||
jmethodID method;
|
||||
|
||||
method = service_class.detect_mouse;
|
||||
rc = (*android_java_env)->CallNonvirtualBooleanMethod (android_java_env,
|
||||
emacs_service,
|
||||
service_class.class,
|
||||
method);
|
||||
android_exception_check ();
|
||||
return rc;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Add table
Reference in a new issue