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
17unsafe impl NSCopying for AVMediaSelection {}
18
19unsafe impl CopyingHelper for AVMediaSelection {
20 type Result = Self;
21}
22
23unsafe impl NSMutableCopying for AVMediaSelection {}
24
25unsafe impl MutableCopyingHelper for AVMediaSelection {
26 type Result = AVMutableMediaSelection;
27}
28
29unsafe impl NSObjectProtocol for AVMediaSelection {}
30
31impl AVMediaSelection {
32 extern_methods!(
33 #[cfg(feature = "AVAsset")]
34 #[unsafe(method(asset))]
35 #[unsafe(method_family = none)]
36 pub unsafe fn asset(&self) -> Option<Retained<AVAsset>>;
37
38 #[cfg(feature = "AVMediaSelectionGroup")]
39 #[unsafe(method(selectedMediaOptionInMediaSelectionGroup:))]
47 #[unsafe(method_family = none)]
48 pub unsafe fn selectedMediaOptionInMediaSelectionGroup(
49 &self,
50 media_selection_group: &AVMediaSelectionGroup,
51 ) -> Option<Retained<AVMediaSelectionOption>>;
52
53 #[cfg(feature = "AVMediaSelectionGroup")]
54 #[unsafe(method(mediaSelectionCriteriaCanBeAppliedAutomaticallyToMediaSelectionGroup:))]
62 #[unsafe(method_family = none)]
63 pub unsafe fn mediaSelectionCriteriaCanBeAppliedAutomaticallyToMediaSelectionGroup(
64 &self,
65 media_selection_group: &AVMediaSelectionGroup,
66 ) -> bool;
67 );
68}
69
70impl AVMediaSelection {
72 extern_methods!(
73 #[unsafe(method(init))]
74 #[unsafe(method_family = init)]
75 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
76
77 #[unsafe(method(new))]
78 #[unsafe(method_family = new)]
79 pub unsafe fn new() -> Retained<Self>;
80 );
81}
82
83extern_class!(
84 #[unsafe(super(AVMediaSelection, NSObject))]
86 #[derive(Debug, PartialEq, Eq, Hash)]
87 pub struct AVMutableMediaSelection;
88);
89
90unsafe impl NSCopying for AVMutableMediaSelection {}
91
92unsafe impl CopyingHelper for AVMutableMediaSelection {
93 type Result = AVMediaSelection;
94}
95
96unsafe impl NSMutableCopying for AVMutableMediaSelection {}
97
98unsafe impl MutableCopyingHelper for AVMutableMediaSelection {
99 type Result = Self;
100}
101
102unsafe impl NSObjectProtocol for AVMutableMediaSelection {}
103
104impl AVMutableMediaSelection {
105 extern_methods!(
106 #[cfg(feature = "AVMediaSelectionGroup")]
107 #[unsafe(method(selectMediaOption:inMediaSelectionGroup:))]
116 #[unsafe(method_family = none)]
117 pub unsafe fn selectMediaOption_inMediaSelectionGroup(
118 &self,
119 media_selection_option: Option<&AVMediaSelectionOption>,
120 media_selection_group: &AVMediaSelectionGroup,
121 );
122 );
123}
124
125impl AVMutableMediaSelection {
127 extern_methods!(
128 #[unsafe(method(init))]
129 #[unsafe(method_family = init)]
130 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
131
132 #[unsafe(method(new))]
133 #[unsafe(method_family = new)]
134 pub unsafe fn new() -> Retained<Self>;
135 );
136}