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
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_protocol!(
/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uicontentconfiguration?language=objc)
pub unsafe trait UIContentConfiguration:
NSObjectProtocol + NSCopying + MainThreadOnly
{
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
/// Initializes and returns a new instance of the content view using this configuration.
#[unsafe(method(makeContentView))]
#[unsafe(method_family = none)]
fn makeContentView(&self) -> Retained<UIView>;
#[cfg(feature = "UIConfigurationState")]
/// Returns a copy of the configuration updated for the specified state, by applying the configuration's default values for that state to any properties that have not been customized.
#[unsafe(method(updatedConfigurationForState:))]
#[unsafe(method_family = none)]
fn updatedConfigurationForState(
&self,
state: &ProtocolObject<dyn UIConfigurationState>,
) -> Retained<Self>;
}
);
extern_protocol!(
/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uicontentview?language=objc)
pub unsafe trait UIContentView: NSObjectProtocol + MainThreadOnly {
/// Returns the current configuration of the view. Setting this property applies the new configuration to the view.
#[unsafe(method(configuration))]
#[unsafe(method_family = none)]
fn configuration(&self) -> Retained<ProtocolObject<dyn UIContentConfiguration>>;
/// Setter for [`configuration`][Self::configuration].
///
/// This is [copied][objc2_foundation::NSCopying::copy] when set.
#[unsafe(method(setConfiguration:))]
#[unsafe(method_family = none)]
fn setConfiguration(&self, configuration: &ProtocolObject<dyn UIContentConfiguration>);
/// Whether this view is compatible with the provided configuration, meaning the view supports
/// it being set to the `configuration` property and is capable of updating itself for the
/// configuration. If not implemented, the view is assumed to be compatible with configuration
/// classes that match the class of the view's existing configuration.
#[optional]
#[unsafe(method(supportsConfiguration:))]
#[unsafe(method_family = none)]
fn supportsConfiguration(
&self,
configuration: &ProtocolObject<dyn UIContentConfiguration>,
) -> bool;
}
);