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

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

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

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

        /// public static final [A_8](https://developer.android.com/reference/android/graphics/PixelFormat.html#A_8)
        #[deprecated] pub const A_8 : i32 = 8;

        /// public static final [JPEG](https://developer.android.com/reference/android/graphics/PixelFormat.html#JPEG)
        #[deprecated] pub const JPEG : i32 = 256;

        /// public static final [LA_88](https://developer.android.com/reference/android/graphics/PixelFormat.html#LA_88)
        #[deprecated] pub const LA_88 : i32 = 10;

        /// public static final [L_8](https://developer.android.com/reference/android/graphics/PixelFormat.html#L_8)
        #[deprecated] pub const L_8 : i32 = 9;

        /// public static final [OPAQUE](https://developer.android.com/reference/android/graphics/PixelFormat.html#OPAQUE)
        pub const OPAQUE : i32 = -1;

        /// public static final [RGBA_4444](https://developer.android.com/reference/android/graphics/PixelFormat.html#RGBA_4444)
        #[deprecated] pub const RGBA_4444 : i32 = 7;

        /// public static final [RGBA_5551](https://developer.android.com/reference/android/graphics/PixelFormat.html#RGBA_5551)
        #[deprecated] pub const RGBA_5551 : i32 = 6;

        /// public static final [RGBA_8888](https://developer.android.com/reference/android/graphics/PixelFormat.html#RGBA_8888)
        pub const RGBA_8888 : i32 = 1;

        /// public static final [RGBX_8888](https://developer.android.com/reference/android/graphics/PixelFormat.html#RGBX_8888)
        pub const RGBX_8888 : i32 = 2;

        /// public static final [RGB_332](https://developer.android.com/reference/android/graphics/PixelFormat.html#RGB_332)
        #[deprecated] pub const RGB_332 : i32 = 11;

        /// public static final [RGB_565](https://developer.android.com/reference/android/graphics/PixelFormat.html#RGB_565)
        pub const RGB_565 : i32 = 4;

        /// public static final [RGB_888](https://developer.android.com/reference/android/graphics/PixelFormat.html#RGB_888)
        pub const RGB_888 : i32 = 3;

        /// public static final [TRANSLUCENT](https://developer.android.com/reference/android/graphics/PixelFormat.html#TRANSLUCENT)
        pub const TRANSLUCENT : i32 = -3;

        /// public static final [TRANSPARENT](https://developer.android.com/reference/android/graphics/PixelFormat.html#TRANSPARENT)
        pub const TRANSPARENT : i32 = -2;

        /// public static final [UNKNOWN](https://developer.android.com/reference/android/graphics/PixelFormat.html#UNKNOWN)
        pub const UNKNOWN : i32 = 0;

        /// public static final [YCbCr_420_SP](https://developer.android.com/reference/android/graphics/PixelFormat.html#YCbCr_420_SP)
        #[deprecated] pub const YCbCr_420_SP : i32 = 17;

        /// public static final [YCbCr_422_I](https://developer.android.com/reference/android/graphics/PixelFormat.html#YCbCr_422_I)
        #[deprecated] pub const YCbCr_422_I : i32 = 20;

        /// public static final [YCbCr_422_SP](https://developer.android.com/reference/android/graphics/PixelFormat.html#YCbCr_422_SP)
        #[deprecated] pub const YCbCr_422_SP : i32 = 16;

        /// **get** public [bitsPerPixel](https://developer.android.com/reference/android/graphics/PixelFormat.html#bitsPerPixel)
        pub fn bitsPerPixel<'env>(&'env self) -> i32 {
            unsafe {
                let env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_field) = env.require_class_field("android/graphics/PixelFormat\0", "bitsPerPixel\0", "I\0");
                env.get_int_field(self.0.object, __jni_field)
            }
        }

        /// **set** public [bitsPerPixel](https://developer.android.com/reference/android/graphics/PixelFormat.html#bitsPerPixel)
        pub fn set_bitsPerPixel<'env>(&'env self, value: i32) {
            unsafe {
                let env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_field) = env.require_class_field("android/graphics/PixelFormat\0", "bitsPerPixel\0", "I\0");
                env.set_int_field(self.0.object, __jni_field, value)
            }
        }

        /// **get** public [bytesPerPixel](https://developer.android.com/reference/android/graphics/PixelFormat.html#bytesPerPixel)
        pub fn bytesPerPixel<'env>(&'env self) -> i32 {
            unsafe {
                let env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_field) = env.require_class_field("android/graphics/PixelFormat\0", "bytesPerPixel\0", "I\0");
                env.get_int_field(self.0.object, __jni_field)
            }
        }

        /// **set** public [bytesPerPixel](https://developer.android.com/reference/android/graphics/PixelFormat.html#bytesPerPixel)
        pub fn set_bytesPerPixel<'env>(&'env self, value: i32) {
            unsafe {
                let env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_field) = env.require_class_field("android/graphics/PixelFormat\0", "bytesPerPixel\0", "I\0");
                env.set_int_field(self.0.object, __jni_field, value)
            }
        }
    }
}