jni-android-sys 0.0.10

Autogenerated glue code for access Android JVM APIs from Rust
// WARNING:  This file was autogenerated by jni-bindgen.  Any changes to this file may be lost!!!


#[cfg(any(feature = "all", feature = "android-view-TouchDelegate"))]
__jni_bindgen! {
    /// public class [TouchDelegate](https://developer.android.com/reference/android/view/TouchDelegate.html)
    ///
    /// Required feature: "android-view-TouchDelegate"
    public class TouchDelegate ("android/view/TouchDelegate") extends crate::java::lang::Object {

        /// [TouchDelegate](https://developer.android.com/reference/android/view/TouchDelegate.html#TouchDelegate(android.graphics.Rect,%20android.view.View))
        ///
        /// Required features: "android-graphics-Rect", "android-view-View"
        #[cfg(any(feature = "all", all(feature = "android-graphics-Rect", feature = "android-view-View")))]
        pub fn new<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::graphics::Rect>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::view::View>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::Local<'env, crate::android::view::TouchDelegate>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/view/TouchDelegate", java.flags == PUBLIC, .name == "<init>", .descriptor == "(Landroid/graphics/Rect;Landroid/view/View;)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1.into())];
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/view/TouchDelegate\0", "<init>\0", "(Landroid/graphics/Rect;Landroid/view/View;)V\0");
                __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [onTouchEvent](https://developer.android.com/reference/android/view/TouchDelegate.html#onTouchEvent(android.view.MotionEvent))
        ///
        /// Required features: "android-view-MotionEvent"
        #[cfg(any(feature = "all", all(feature = "android-view-MotionEvent")))]
        pub fn onTouchEvent<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::view::MotionEvent>>) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/view/TouchDelegate", java.flags == PUBLIC, .name == "onTouchEvent", .descriptor == "(Landroid/view/MotionEvent;)Z"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/view/TouchDelegate\0", "onTouchEvent\0", "(Landroid/view/MotionEvent;)Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// public static final [ABOVE](https://developer.android.com/reference/android/view/TouchDelegate.html#ABOVE)
        pub const ABOVE : i32 = 1;

        /// public static final [BELOW](https://developer.android.com/reference/android/view/TouchDelegate.html#BELOW)
        pub const BELOW : i32 = 2;

        /// public static final [TO_LEFT](https://developer.android.com/reference/android/view/TouchDelegate.html#TO_LEFT)
        pub const TO_LEFT : i32 = 4;

        /// public static final [TO_RIGHT](https://developer.android.com/reference/android/view/TouchDelegate.html#TO_RIGHT)
        pub const TO_RIGHT : i32 = 8;
    }
}