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

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

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

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

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

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

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