11use super :: internal:: SCStreamConfiguration ;
2- #[ cfg( any( feature = "macos_13_0" , feature = "macos_14_0" , feature = "macos_14_2" ) ) ]
3- use super :: types:: ConfigError ;
42
53#[ repr( i32 ) ]
64#[ derive( Debug , Clone , Copy , PartialEq , Eq , Hash , Default ) ]
@@ -18,19 +16,15 @@ impl SCStreamConfiguration {
1816 /// Available on macOS 14.2+
1917 ///
2018 /// Requires the `macos_14_2` feature flag to be enabled.
21- ///
22- /// # Errors
23- ///
24- /// This function will return an error if the value cannot be set.
2519 #[ cfg( feature = "macos_14_2" ) ]
26- pub fn set_ignore_fraction_of_screen ( self , ignore_fraction : f64 ) -> Result < Self , ConfigError > {
20+ pub fn set_ignore_fraction_of_screen ( self , ignore_fraction : f64 ) -> Self {
2721 unsafe {
2822 crate :: ffi:: sc_stream_configuration_set_ignore_fraction_of_screen (
2923 self . as_ptr ( ) ,
3024 ignore_fraction,
3125 ) ;
3226 }
33- Ok ( self )
27+ self
3428 }
3529
3630 #[ cfg( feature = "macos_14_2" ) ]
@@ -47,22 +41,15 @@ impl SCStreamConfiguration {
4741 /// Available on macOS 14.2+
4842 ///
4943 /// Requires the `macos_14_2` feature flag to be enabled.
50- ///
51- /// # Errors
52- ///
53- /// This function will return an error if the value cannot be set.
5444 #[ cfg( feature = "macos_14_2" ) ]
55- pub fn set_ignores_shadows_single_window (
56- self ,
57- ignores_shadows : bool ,
58- ) -> Result < Self , ConfigError > {
45+ pub fn set_ignores_shadows_single_window ( self , ignores_shadows : bool ) -> Self {
5946 unsafe {
6047 crate :: ffi:: sc_stream_configuration_set_ignores_shadows_single_window (
6148 self . as_ptr ( ) ,
6249 ignores_shadows,
6350 ) ;
6451 }
65- Ok ( self )
52+ self
6653 }
6754
6855 #[ cfg( feature = "macos_14_2" ) ]
@@ -79,19 +66,15 @@ impl SCStreamConfiguration {
7966 /// Available on macOS 13.0+
8067 ///
8168 /// Requires the `macos_13_0` feature flag to be enabled.
82- ///
83- /// # Errors
84- ///
85- /// This function will return an error if the value cannot be set.
8669 #[ cfg( feature = "macos_13_0" ) ]
87- pub fn set_should_be_opaque ( self , should_be_opaque : bool ) -> Result < Self , ConfigError > {
70+ pub fn set_should_be_opaque ( self , should_be_opaque : bool ) -> Self {
8871 unsafe {
8972 crate :: ffi:: sc_stream_configuration_set_should_be_opaque (
9073 self . as_ptr ( ) ,
9174 should_be_opaque,
9275 ) ;
9376 }
94- Ok ( self )
77+ self
9578 }
9679
9780 #[ cfg( feature = "macos_13_0" ) ]
@@ -105,22 +88,15 @@ impl SCStreamConfiguration {
10588 /// Available on macOS 14.2+
10689 ///
10790 /// Requires the `macos_14_2` feature flag to be enabled.
108- ///
109- /// # Errors
110- ///
111- /// This function will return an error if the value cannot be set.
11291 #[ cfg( feature = "macos_14_2" ) ]
113- pub fn set_includes_child_windows (
114- self ,
115- includes_child_windows : bool ,
116- ) -> Result < Self , ConfigError > {
92+ pub fn set_includes_child_windows ( self , includes_child_windows : bool ) -> Self {
11793 unsafe {
11894 crate :: ffi:: sc_stream_configuration_set_includes_child_windows (
11995 self . as_ptr ( ) ,
12096 includes_child_windows,
12197 ) ;
12298 }
123- Ok ( self )
99+ self
124100 }
125101
126102 #[ cfg( feature = "macos_14_2" ) ]
@@ -134,22 +110,18 @@ impl SCStreamConfiguration {
134110 /// Available on macOS 14.2+
135111 ///
136112 /// Requires the `macos_14_2` feature flag to be enabled.
137- ///
138- /// # Errors
139- ///
140- /// This function will return an error if the value cannot be set.
141113 #[ cfg( feature = "macos_14_2" ) ]
142114 pub fn set_presenter_overlay_privacy_alert_setting (
143115 self ,
144116 setting : SCPresenterOverlayAlertSetting ,
145- ) -> Result < Self , ConfigError > {
117+ ) -> Self {
146118 unsafe {
147119 crate :: ffi:: sc_stream_configuration_set_presenter_overlay_privacy_alert_setting (
148120 self . as_ptr ( ) ,
149121 setting as i32 ,
150122 ) ;
151123 }
152- Ok ( self )
124+ self
153125 }
154126
155127 #[ cfg( feature = "macos_14_2" ) ]
@@ -171,22 +143,15 @@ impl SCStreamConfiguration {
171143 /// Available on macOS 14.0+
172144 ///
173145 /// Requires the `macos_14_0` feature flag to be enabled.
174- ///
175- /// # Errors
176- ///
177- /// This function will return an error if the value cannot be set.
178146 #[ cfg( feature = "macos_14_0" ) ]
179- pub fn set_ignore_global_clipboard (
180- self ,
181- ignore_global_clipboard : bool ,
182- ) -> Result < Self , ConfigError > {
147+ pub fn set_ignore_global_clipboard ( self , ignore_global_clipboard : bool ) -> Self {
183148 unsafe {
184149 crate :: ffi:: sc_stream_configuration_set_ignore_global_clipboard (
185150 self . as_ptr ( ) ,
186151 ignore_global_clipboard,
187152 ) ;
188153 }
189- Ok ( self )
154+ self
190155 }
191156
192157 #[ cfg( feature = "macos_14_0" ) ]
@@ -201,22 +166,15 @@ impl SCStreamConfiguration {
201166 /// Available on macOS 14.0+
202167 ///
203168 /// Requires the `macos_14_0` feature flag to be enabled.
204- ///
205- /// # Errors
206- ///
207- /// This function will return an error if the value cannot be set.
208169 #[ cfg( feature = "macos_14_0" ) ]
209- pub fn set_ignores_shadow_display_configuration (
210- self ,
211- ignores_shadow : bool ,
212- ) -> Result < Self , ConfigError > {
170+ pub fn set_ignores_shadow_display_configuration ( self , ignores_shadow : bool ) -> Self {
213171 unsafe {
214172 crate :: ffi:: sc_stream_configuration_set_ignores_shadow_display_configuration (
215173 self . as_ptr ( ) ,
216174 ignores_shadow,
217175 ) ;
218176 }
219- Ok ( self )
177+ self
220178 }
221179
222180 #[ cfg( feature = "macos_14_0" ) ]
0 commit comments