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
73
74
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use objc2_ui_kit::*;
use crate::*;
extern_class!(
/// A specialized `UIContextMenuConfiguration` object to defer a context menu presentation when the
/// when the context menu gestures are first recognized and a possible menu presentation is not immediately known.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/browserenginekit/becontextmenuconfiguration?language=objc)
#[unsafe(super(UIContextMenuConfiguration, NSObject))]
#[thread_kind = MainThreadOnly]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct BEContextMenuConfiguration;
);
extern_conformance!(
unsafe impl NSObjectProtocol for BEContextMenuConfiguration {}
);
impl BEContextMenuConfiguration {
extern_methods!(
/// Fulfills the configuration with a concrete configuration. Once fulfilled, the context menu presentation will begin.
/// You should call this method as soon as you have determined that a menu presentation is possible for the configuration, as to
/// minimize the delay between the context menu gesture's recognition and the menu's presentation. If no menu presentation is possible,
/// fulfill with a `nil` configuration.
///
/// There is a system-defined timeout before the configuration is cancelled, where no menu presents. This method returns `YES` if the
/// configuration did successfully prepare, and `NO` otherwise.
///
/// : The fulfilled configuration is used by `UIContextMenuInteractionDelegate` when referencing any `UIContextMenuConfiguration`,
/// rather than this object.
#[unsafe(method(fulfillUsingConfiguration:))]
#[unsafe(method_family = none)]
pub unsafe fn fulfillUsingConfiguration(
&self,
configuration: Option<&UIContextMenuConfiguration>,
) -> bool;
/// Creates a new configuration for the context menu interaction.
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
/// For a concrete configuration, use the parent `UIContextMenuConfiguration` class instead.
///
/// # Safety
///
/// - `identifier` should be of the correct type.
/// - `preview_provider` must be a valid pointer or null.
/// - `action_provider` must be a valid pointer or null.
#[unsafe(method(configurationWithIdentifier:previewProvider:actionProvider:))]
#[unsafe(method_family = none)]
pub unsafe fn configurationWithIdentifier_previewProvider_actionProvider(
identifier: Option<&ProtocolObject<dyn NSCopying>>,
preview_provider: UIContextMenuContentPreviewProvider,
action_provider: UIContextMenuActionProvider,
mtm: MainThreadMarker,
) -> Retained<Self>;
);
}
/// Methods declared on superclass `NSObject`.
impl BEContextMenuConfiguration {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}