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

        /// [PopupMenu](https://developer.android.com/reference/android/widget/PopupMenu.html#PopupMenu(android.content.Context,%20android.view.View))
        ///
        /// Required features: "android-content-Context", "android-view-View"
        #[cfg(any(feature = "all", all(feature = "android-content-Context", feature = "android-view-View")))]
        pub fn new_Context_View<'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::view::View>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::Local<'env, crate::android::widget::PopupMenu>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/widget/PopupMenu", java.flags == PUBLIC, .name == "<init>", .descriptor == "(Landroid/content/Context;Landroid/view/View;)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1.into())];
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/widget/PopupMenu\0", "<init>\0", "(Landroid/content/Context;Landroid/view/View;)V\0");
                __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

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

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

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

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

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

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

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

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

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

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