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-appwidget-AppWidgetHostView"))]
__jni_bindgen! {
    /// public class [AppWidgetHostView](https://developer.android.com/reference/android/appwidget/AppWidgetHostView.html)
    ///
    /// Required feature: "android-appwidget-AppWidgetHostView"
    public class AppWidgetHostView ("android/appwidget/AppWidgetHostView") extends crate::android::widget::FrameLayout {

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

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

        /// [setAppWidget](https://developer.android.com/reference/android/appwidget/AppWidgetHostView.html#setAppWidget(int,%20android.appwidget.AppWidgetProviderInfo))
        ///
        /// Required features: "android-appwidget-AppWidgetProviderInfo"
        #[cfg(any(feature = "all", all(feature = "android-appwidget-AppWidgetProviderInfo")))]
        pub fn setAppWidget<'env>(&'env self, arg0: i32, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::appwidget::AppWidgetProviderInfo>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/appwidget/AppWidgetHostView", java.flags == PUBLIC, .name == "setAppWidget", .descriptor == "(ILandroid/appwidget/AppWidgetProviderInfo;)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0), __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/appwidget/AppWidgetHostView\0", "setAppWidget\0", "(ILandroid/appwidget/AppWidgetProviderInfo;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

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

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

        /// [getAppWidgetInfo](https://developer.android.com/reference/android/appwidget/AppWidgetHostView.html#getAppWidgetInfo())
        ///
        /// Required features: "android-appwidget-AppWidgetProviderInfo"
        #[cfg(any(feature = "all", all(feature = "android-appwidget-AppWidgetProviderInfo")))]
        pub fn getAppWidgetInfo<'env>(&'env self) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::android::appwidget::AppWidgetProviderInfo>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/appwidget/AppWidgetHostView", java.flags == PUBLIC, .name == "getAppWidgetInfo", .descriptor == "()Landroid/appwidget/AppWidgetProviderInfo;"
            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/appwidget/AppWidgetHostView\0", "getAppWidgetInfo\0", "()Landroid/appwidget/AppWidgetProviderInfo;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

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

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

        /// [generateLayoutParams](https://developer.android.com/reference/android/appwidget/AppWidgetHostView.html#generateLayoutParams(android.util.AttributeSet))
        ///
        /// Required features: "android-util-AttributeSet", "android-widget-FrameLayout_LayoutParams"
        #[cfg(any(feature = "all", all(feature = "android-util-AttributeSet", feature = "android-widget-FrameLayout_LayoutParams")))]
        pub fn generateLayoutParams_AttributeSet<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::util::AttributeSet>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::android::widget::FrameLayout_LayoutParams>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/appwidget/AppWidgetHostView", java.flags == PUBLIC, .name == "generateLayoutParams", .descriptor == "(Landroid/util/AttributeSet;)Landroid/widget/FrameLayout$LayoutParams;"
            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/appwidget/AppWidgetHostView\0", "generateLayoutParams\0", "(Landroid/util/AttributeSet;)Landroid/widget/FrameLayout$LayoutParams;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

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