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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-image")]
use objc2_core_image::*;
use objc2_foundation::*;
use crate::*;
extern "C" {
/// IKUISizeFlavor
///
/// Key to request the desired size of controls in a filter UIView - defined values are IKUISizeMini, IKUISizeSmall and IKUISizeRegular.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/quartz/ikuisizeflavor?language=objc)
pub static IKUISizeFlavor: Option<&'static NSString>;
}
extern "C" {
/// IKUISizeMini
///
/// Constant for requesting controls in mini size.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/quartz/ikuisizemini?language=objc)
pub static IKUISizeMini: Option<&'static NSString>;
}
extern "C" {
/// IKUISizeSmall
///
/// Constant for requesting controls in small size.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/quartz/ikuisizesmall?language=objc)
pub static IKUISizeSmall: Option<&'static NSString>;
}
extern "C" {
/// IKUISizeRegular
///
/// Constant for requesting controls in regular or normal size.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/quartz/ikuisizeregular?language=objc)
pub static IKUISizeRegular: Option<&'static NSString>;
}
extern "C" {
/// IKUImaxSize
///
/// Maximum allowed dimensions of the view for the filter UI. If width or height is zero it means that that dimension of the view is not restricted.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/quartz/ikuimaxsize?language=objc)
pub static IKUImaxSize: Option<&'static NSString>;
}
extern "C" {
/// IKUIFlavorAllowFallback
///
/// Allow the filter to provide a view with controls of a different size and set than requested, if it cannot provide a view for the requested flavor.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/quartz/ikuiflavorallowfallback?language=objc)
pub static IKUIFlavorAllowFallback: Option<&'static NSString>;
}
mod private_CIFilterIKFilterUIAddition {
pub trait Sealed {}
}
/// Category "IKFilterUIAddition" on [`CIFilter`].
///
/// The IKFilterUIAddition category to IKFilter provides the API for the Image Unit UI generation.
///
/// (comprehensive description)
#[doc(alias = "IKFilterUIAddition")]
pub unsafe trait CIFilterIKFilterUIAddition:
ClassType + Sized + private_CIFilterIKFilterUIAddition::Sealed
{
extern_methods!(
#[cfg(feature = "IKFilterUIView")]
/// The viewForUIConfiguration returns a IKFilterView for the filter. The UI is either created by the filter or automatically generated by the CoreImageKit framework.
///
/// The viewForUIConfiguration first requests that the filter provides a UI by calling provideViewForUIConfiguration. If this method is not implemented or the filter cannot provide a UI for the given configuration, the CoreImageKit framework will generate a UI.
/// The UIConfiguration dictionary is an NSDictionary with the following defined keys:
///
/// Parameter `UIConfiguration`: Dictionary with the IKUISizeFlavor and the kCIUIParameterSet information - see below.
///
/// Parameter `excludedKeys`: An array of keys that should not be included in the view (for example inputImage will often be excluded). This can be nil, if no keys should be excluded
///
/// IKUISizeFlavor:
///
/// mini: IKUISizeMini
///
/// small: IKUISizeSmall
///
/// regular: IKUISizeRegular
///
/// These sizes follow the size conventions available in Tiger IB
///
/// kCIUIParameterSet:
///
/// basic: kCIUISetBasic
///
/// intermediate: kCIUISetIntermediate
///
/// advanced: kCIUISetAdvanced
///
/// development: kCIUISetDevelopment
///
/// When a client app requests a UI for a parameter set, all keys for that set and below will be included - example: advanced consists of all parameters in the basic, intermediate and advanced set.
/// The development set is targeted towards the development of filters and client apps. Parameters in this set are either experimental or for debugging purposes and should not be shown in a shipping product.
/// IKUImaxSize:(NSSize)maxSize; Maximum allowed dimension of the returned view. If the size requested is too small, the filter is expected to return a view as small as possible. It is up to the client to verify that the returned view fits into his context.
/// IKUIFlavorAllowFallback:Boolean If a requested flavor set-size combination is not supported, the filter can return a view for a different set-size combination. If this is set to no (which is the default), NULL should be returned by the filter
///
/// # Safety
///
/// - `in_ui_configuration` generic should be of the correct type.
/// - `in_ui_configuration` might not allow `None`.
/// - `in_keys` generic should be of the correct type.
/// - `in_keys` might not allow `None`.
#[unsafe(method(viewForUIConfiguration:excludedKeys:))]
#[unsafe(method_family = none)]
unsafe fn viewForUIConfiguration_excludedKeys(
&self,
in_ui_configuration: Option<&NSDictionary>,
in_keys: Option<&NSArray>,
mtm: MainThreadMarker,
) -> Option<Retained<IKFilterUIView>>;
);
}
#[cfg(feature = "objc2-core-image")]
impl private_CIFilterIKFilterUIAddition::Sealed for CIFilter {}
#[cfg(feature = "objc2-core-image")]
unsafe impl CIFilterIKFilterUIAddition for CIFilter {}
extern_protocol!(
/// The IKFilterCustomUIProvider needs to be implemented by a filter to implement its own UI.
///
/// When a filter wants to provide its own UI for all or only some configurations, it has to implement the provideViewForUIConfiguration method.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/quartz/ikfiltercustomuiprovider?language=objc)
pub unsafe trait IKFilterCustomUIProvider {
#[cfg(feature = "IKFilterUIView")]
/// The provideViewForUIConfiguration gets called, when a client requests a filter UI by calling viewForUIConfiguration:excludedKeys.
///
/// See description in viewForUIConfiguration:excludedKeys for details on the parameters. If a filter cannot provide a IKFilterUIView for a given UIConfiguration, it can return nil and the CoreImageKit framework will try to provide a UI for it instead.
///
/// # Safety
///
/// - `in_ui_configuration` generic should be of the correct type.
/// - `in_ui_configuration` might not allow `None`.
/// - `in_keys` generic should be of the correct type.
/// - `in_keys` might not allow `None`.
#[unsafe(method(provideViewForUIConfiguration:excludedKeys:))]
#[unsafe(method_family = none)]
unsafe fn provideViewForUIConfiguration_excludedKeys(
&self,
in_ui_configuration: Option<&NSDictionary>,
in_keys: Option<&NSArray>,
mtm: MainThreadMarker,
) -> Option<Retained<IKFilterUIView>>;
}
);