objc2_av_foundation/generated/
AVMediaSelection.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSObject))]
13 #[derive(Debug, PartialEq, Eq, Hash)]
14 pub struct AVMediaSelection;
15);
16
17extern_conformance!(
18 unsafe impl NSCopying for AVMediaSelection {}
19);
20
21unsafe impl CopyingHelper for AVMediaSelection {
22 type Result = Self;
23}
24
25extern_conformance!(
26 unsafe impl NSMutableCopying for AVMediaSelection {}
27);
28
29unsafe impl MutableCopyingHelper for AVMediaSelection {
30 type Result = AVMutableMediaSelection;
31}
32
33extern_conformance!(
34 unsafe impl NSObjectProtocol for AVMediaSelection {}
35);
36
37impl AVMediaSelection {
38 extern_methods!(
39 #[cfg(feature = "AVAsset")]
40 #[unsafe(method(asset))]
41 #[unsafe(method_family = none)]
42 pub unsafe fn asset(&self) -> Option<Retained<AVAsset>>;
43
44 #[cfg(feature = "AVMediaSelectionGroup")]
45 #[unsafe(method(selectedMediaOptionInMediaSelectionGroup:))]
53 #[unsafe(method_family = none)]
54 pub unsafe fn selectedMediaOptionInMediaSelectionGroup(
55 &self,
56 media_selection_group: &AVMediaSelectionGroup,
57 ) -> Option<Retained<AVMediaSelectionOption>>;
58
59 #[cfg(feature = "AVMediaSelectionGroup")]
60 #[unsafe(method(mediaSelectionCriteriaCanBeAppliedAutomaticallyToMediaSelectionGroup:))]
68 #[unsafe(method_family = none)]
69 pub unsafe fn mediaSelectionCriteriaCanBeAppliedAutomaticallyToMediaSelectionGroup(
70 &self,
71 media_selection_group: &AVMediaSelectionGroup,
72 ) -> bool;
73 );
74}
75
76impl AVMediaSelection {
78 extern_methods!(
79 #[unsafe(method(init))]
80 #[unsafe(method_family = init)]
81 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
82
83 #[unsafe(method(new))]
84 #[unsafe(method_family = new)]
85 pub unsafe fn new() -> Retained<Self>;
86 );
87}
88
89extern_class!(
90 #[unsafe(super(AVMediaSelection, NSObject))]
92 #[derive(Debug, PartialEq, Eq, Hash)]
93 pub struct AVMutableMediaSelection;
94);
95
96extern_conformance!(
97 unsafe impl NSCopying for AVMutableMediaSelection {}
98);
99
100unsafe impl CopyingHelper for AVMutableMediaSelection {
101 type Result = AVMediaSelection;
102}
103
104extern_conformance!(
105 unsafe impl NSMutableCopying for AVMutableMediaSelection {}
106);
107
108unsafe impl MutableCopyingHelper for AVMutableMediaSelection {
109 type Result = Self;
110}
111
112extern_conformance!(
113 unsafe impl NSObjectProtocol for AVMutableMediaSelection {}
114);
115
116impl AVMutableMediaSelection {
117 extern_methods!(
118 #[cfg(feature = "AVMediaSelectionGroup")]
119 #[unsafe(method(selectMediaOption:inMediaSelectionGroup:))]
128 #[unsafe(method_family = none)]
129 pub unsafe fn selectMediaOption_inMediaSelectionGroup(
130 &self,
131 media_selection_option: Option<&AVMediaSelectionOption>,
132 media_selection_group: &AVMediaSelectionGroup,
133 );
134 );
135}
136
137impl AVMutableMediaSelection {
139 extern_methods!(
140 #[unsafe(method(init))]
141 #[unsafe(method_family = init)]
142 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
143
144 #[unsafe(method(new))]
145 #[unsafe(method_family = new)]
146 pub unsafe fn new() -> Retained<Self>;
147 );
148}