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-VelocityTracker"))]
__jni_bindgen! {
    /// public final class [VelocityTracker](https://developer.android.com/reference/android/view/VelocityTracker.html)
    ///
    /// Required feature: "android-view-VelocityTracker"
    public final class VelocityTracker ("android/view/VelocityTracker") extends crate::java::lang::Object {

        /// [obtain](https://developer.android.com/reference/android/view/VelocityTracker.html#obtain())
        ///
        /// Required features: "android-view-VelocityTracker"
        #[cfg(any(feature = "all", all(feature = "android-view-VelocityTracker")))]
        pub fn obtain<'env>(__jni_env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::android::view::VelocityTracker>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/view/VelocityTracker", java.flags == PUBLIC | STATIC, .name == "obtain", .descriptor == "()Landroid/view/VelocityTracker;"
            unsafe {
                let __jni_args = [];
                let (__jni_class, __jni_method) = __jni_env.require_class_static_method("android/view/VelocityTracker\0", "obtain\0", "()Landroid/view/VelocityTracker;\0");
                __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [recycle](https://developer.android.com/reference/android/view/VelocityTracker.html#recycle())
        pub fn recycle<'env>(&'env self) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/view/VelocityTracker", java.flags == PUBLIC, .name == "recycle", .descriptor == "()V"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/view/VelocityTracker\0", "recycle\0", "()V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [clear](https://developer.android.com/reference/android/view/VelocityTracker.html#clear())
        pub fn clear<'env>(&'env self) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/view/VelocityTracker", java.flags == PUBLIC, .name == "clear", .descriptor == "()V"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/view/VelocityTracker\0", "clear\0", "()V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [addMovement](https://developer.android.com/reference/android/view/VelocityTracker.html#addMovement(android.view.MotionEvent))
        ///
        /// Required features: "android-view-MotionEvent"
        #[cfg(any(feature = "all", all(feature = "android-view-MotionEvent")))]
        pub fn addMovement<'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<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/view/VelocityTracker", java.flags == PUBLIC, .name == "addMovement", .descriptor == "(Landroid/view/MotionEvent;)V"
            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/VelocityTracker\0", "addMovement\0", "(Landroid/view/MotionEvent;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [computeCurrentVelocity](https://developer.android.com/reference/android/view/VelocityTracker.html#computeCurrentVelocity(int))
        pub fn computeCurrentVelocity_int<'env>(&'env self, arg0: i32) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/view/VelocityTracker", java.flags == PUBLIC, .name == "computeCurrentVelocity", .descriptor == "(I)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0)];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/view/VelocityTracker\0", "computeCurrentVelocity\0", "(I)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [computeCurrentVelocity](https://developer.android.com/reference/android/view/VelocityTracker.html#computeCurrentVelocity(int,%20float))
        pub fn computeCurrentVelocity_int_float<'env>(&'env self, arg0: i32, arg1: f32) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/view/VelocityTracker", java.flags == PUBLIC, .name == "computeCurrentVelocity", .descriptor == "(IF)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0), __jni_bindgen::AsJValue::as_jvalue(&arg1)];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/view/VelocityTracker\0", "computeCurrentVelocity\0", "(IF)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getXVelocity](https://developer.android.com/reference/android/view/VelocityTracker.html#getXVelocity())
        pub fn getXVelocity<'env>(&'env self) -> __jni_bindgen::std::result::Result<f32, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/view/VelocityTracker", java.flags == PUBLIC, .name == "getXVelocity", .descriptor == "()F"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/view/VelocityTracker\0", "getXVelocity\0", "()F\0");
                __jni_env.call_float_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getYVelocity](https://developer.android.com/reference/android/view/VelocityTracker.html#getYVelocity())
        pub fn getYVelocity<'env>(&'env self) -> __jni_bindgen::std::result::Result<f32, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/view/VelocityTracker", java.flags == PUBLIC, .name == "getYVelocity", .descriptor == "()F"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/view/VelocityTracker\0", "getYVelocity\0", "()F\0");
                __jni_env.call_float_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getXVelocity](https://developer.android.com/reference/android/view/VelocityTracker.html#getXVelocity(int))
        pub fn getXVelocity_int<'env>(&'env self, arg0: i32) -> __jni_bindgen::std::result::Result<f32, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/view/VelocityTracker", java.flags == PUBLIC, .name == "getXVelocity", .descriptor == "(I)F"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0)];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/view/VelocityTracker\0", "getXVelocity\0", "(I)F\0");
                __jni_env.call_float_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getYVelocity](https://developer.android.com/reference/android/view/VelocityTracker.html#getYVelocity(int))
        pub fn getYVelocity_int<'env>(&'env self, arg0: i32) -> __jni_bindgen::std::result::Result<f32, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/view/VelocityTracker", java.flags == PUBLIC, .name == "getYVelocity", .descriptor == "(I)F"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0)];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/view/VelocityTracker\0", "getYVelocity\0", "(I)F\0");
                __jni_env.call_float_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }
    }
}