1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_protocol!(
    pub unsafe trait UIMenuLeaf: NSObjectProtocol + IsMainThreadOnly {
        #[method_id(@__retain_semantics Other title)]
        unsafe fn title(&self) -> Retained<NSString>;

        #[method(setTitle:)]
        unsafe fn setTitle(&self, title: &NSString);

        #[cfg(feature = "UIImage")]
        #[method_id(@__retain_semantics Other image)]
        unsafe fn image(&self) -> Option<Retained<UIImage>>;

        #[cfg(feature = "UIImage")]
        #[method(setImage:)]
        unsafe fn setImage(&self, image: Option<&UIImage>);

        #[cfg(feature = "UIImage")]
        #[method_id(@__retain_semantics Other selectedImage)]
        unsafe fn selectedImage(&self) -> Option<Retained<UIImage>>;

        #[cfg(feature = "UIImage")]
        #[method(setSelectedImage:)]
        unsafe fn setSelectedImage(&self, selected_image: Option<&UIImage>);

        #[method_id(@__retain_semantics Other discoverabilityTitle)]
        unsafe fn discoverabilityTitle(&self) -> Option<Retained<NSString>>;

        #[method(setDiscoverabilityTitle:)]
        unsafe fn setDiscoverabilityTitle(&self, discoverability_title: Option<&NSString>);

        #[cfg(feature = "UIMenuElement")]
        #[method(attributes)]
        unsafe fn attributes(&self) -> UIMenuElementAttributes;

        #[cfg(feature = "UIMenuElement")]
        #[method(setAttributes:)]
        unsafe fn setAttributes(&self, attributes: UIMenuElementAttributes);

        #[cfg(feature = "UIMenuElement")]
        #[method(state)]
        unsafe fn state(&self) -> UIMenuElementState;

        #[cfg(feature = "UIMenuElement")]
        #[method(setState:)]
        unsafe fn setState(&self, state: UIMenuElementState);

        #[method_id(@__retain_semantics Other sender)]
        unsafe fn sender(&self) -> Option<Retained<AnyObject>>;

        #[cfg(feature = "UIPopoverPresentationControllerSourceItem")]
        #[method_id(@__retain_semantics Other presentationSourceItem)]
        unsafe fn presentationSourceItem(
            &self,
        ) -> Option<Retained<ProtocolObject<dyn UIPopoverPresentationControllerSourceItem>>>;

        #[method(performWithSender:target:)]
        unsafe fn performWithSender_target(
            &self,
            sender: Option<&AnyObject>,
            target: Option<&AnyObject>,
        );
    }

    unsafe impl ProtocolType for dyn UIMenuLeaf {}
);