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

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

        /// [SurfaceTexture](https://developer.android.com/reference/android/graphics/SurfaceTexture.html#SurfaceTexture(int,%20boolean))
        pub fn new_int_boolean<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: i32, arg1: bool) -> __jni_bindgen::std::result::Result<__jni_bindgen::Local<'env, crate::android::graphics::SurfaceTexture>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/graphics/SurfaceTexture", java.flags == PUBLIC, .name == "<init>", .descriptor == "(IZ)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0), __jni_bindgen::AsJValue::as_jvalue(&arg1)];
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/graphics/SurfaceTexture\0", "<init>\0", "(IZ)V\0");
                __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [setOnFrameAvailableListener](https://developer.android.com/reference/android/graphics/SurfaceTexture.html#setOnFrameAvailableListener(android.graphics.SurfaceTexture.OnFrameAvailableListener))
        ///
        /// Required features: "android-graphics-SurfaceTexture_OnFrameAvailableListener"
        #[cfg(any(feature = "all", all(feature = "android-graphics-SurfaceTexture_OnFrameAvailableListener")))]
        pub fn setOnFrameAvailableListener_OnFrameAvailableListener<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::graphics::SurfaceTexture_OnFrameAvailableListener>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/graphics/SurfaceTexture", java.flags == PUBLIC, .name == "setOnFrameAvailableListener", .descriptor == "(Landroid/graphics/SurfaceTexture$OnFrameAvailableListener;)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/graphics/SurfaceTexture\0", "setOnFrameAvailableListener\0", "(Landroid/graphics/SurfaceTexture$OnFrameAvailableListener;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [setOnFrameAvailableListener](https://developer.android.com/reference/android/graphics/SurfaceTexture.html#setOnFrameAvailableListener(android.graphics.SurfaceTexture.OnFrameAvailableListener,%20android.os.Handler))
        ///
        /// Required features: "android-graphics-SurfaceTexture_OnFrameAvailableListener", "android-os-Handler"
        #[cfg(any(feature = "all", all(feature = "android-graphics-SurfaceTexture_OnFrameAvailableListener", feature = "android-os-Handler")))]
        pub fn setOnFrameAvailableListener_OnFrameAvailableListener_Handler<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::graphics::SurfaceTexture_OnFrameAvailableListener>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::os::Handler>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/graphics/SurfaceTexture", java.flags == PUBLIC, .name == "setOnFrameAvailableListener", .descriptor == "(Landroid/graphics/SurfaceTexture$OnFrameAvailableListener;Landroid/os/Handler;)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1.into())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/graphics/SurfaceTexture\0", "setOnFrameAvailableListener\0", "(Landroid/graphics/SurfaceTexture$OnFrameAvailableListener;Landroid/os/Handler;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [setDefaultBufferSize](https://developer.android.com/reference/android/graphics/SurfaceTexture.html#setDefaultBufferSize(int,%20int))
        pub fn setDefaultBufferSize<'env>(&'env self, arg0: i32, arg1: i32) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/graphics/SurfaceTexture", java.flags == PUBLIC, .name == "setDefaultBufferSize", .descriptor == "(II)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/graphics/SurfaceTexture\0", "setDefaultBufferSize\0", "(II)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [updateTexImage](https://developer.android.com/reference/android/graphics/SurfaceTexture.html#updateTexImage())
        pub fn updateTexImage<'env>(&'env self) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/graphics/SurfaceTexture", java.flags == PUBLIC, .name == "updateTexImage", .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/graphics/SurfaceTexture\0", "updateTexImage\0", "()V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [releaseTexImage](https://developer.android.com/reference/android/graphics/SurfaceTexture.html#releaseTexImage())
        pub fn releaseTexImage<'env>(&'env self) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/graphics/SurfaceTexture", java.flags == PUBLIC, .name == "releaseTexImage", .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/graphics/SurfaceTexture\0", "releaseTexImage\0", "()V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [detachFromGLContext](https://developer.android.com/reference/android/graphics/SurfaceTexture.html#detachFromGLContext())
        pub fn detachFromGLContext<'env>(&'env self) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/graphics/SurfaceTexture", java.flags == PUBLIC, .name == "detachFromGLContext", .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/graphics/SurfaceTexture\0", "detachFromGLContext\0", "()V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [attachToGLContext](https://developer.android.com/reference/android/graphics/SurfaceTexture.html#attachToGLContext(int))
        pub fn attachToGLContext<'env>(&'env self, arg0: i32) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/graphics/SurfaceTexture", java.flags == PUBLIC, .name == "attachToGLContext", .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/graphics/SurfaceTexture\0", "attachToGLContext\0", "(I)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getTransformMatrix](https://developer.android.com/reference/android/graphics/SurfaceTexture.html#getTransformMatrix(float%5B%5D))
        pub fn getTransformMatrix<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env __jni_bindgen::FloatArray>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/graphics/SurfaceTexture", java.flags == PUBLIC, .name == "getTransformMatrix", .descriptor == "([F)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/graphics/SurfaceTexture\0", "getTransformMatrix\0", "([F)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getTimestamp](https://developer.android.com/reference/android/graphics/SurfaceTexture.html#getTimestamp())
        pub fn getTimestamp<'env>(&'env self) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/graphics/SurfaceTexture", java.flags == PUBLIC, .name == "getTimestamp", .descriptor == "()J"
            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/graphics/SurfaceTexture\0", "getTimestamp\0", "()J\0");
                __jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [release](https://developer.android.com/reference/android/graphics/SurfaceTexture.html#release())
        pub fn release<'env>(&'env self) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/graphics/SurfaceTexture", java.flags == PUBLIC, .name == "release", .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/graphics/SurfaceTexture\0", "release\0", "()V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }
    }
}