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
#[cfg(feature = "v2_16")]
use super::{NetworkProxyMode, NetworkProxySettings};
#[cfg(feature = "v2_16")]
use glib::translate::{IntoGlib, ToGlibPtr, ToGlibPtrMut};
use glib::IsA;
use super::WebContext;
pub trait WebContextExtManual {
#[cfg(any(feature = "v2_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_16")))]
#[doc(alias = "webkit_web_context_set_network_proxy_settings")]
fn set_network_proxy_settings(
&self,
proxy_mode: NetworkProxyMode,
proxy_settings: Option<&mut NetworkProxySettings>,
);
}
impl<O> WebContextExtManual for O
where
O: IsA<WebContext>,
{
#[cfg(any(feature = "v2_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_16")))]
fn set_network_proxy_settings(
&self,
proxy_mode: NetworkProxyMode,
mut proxy_settings: Option<&mut NetworkProxySettings>,
) {
unsafe {
ffi::webkit_web_context_set_network_proxy_settings(
self.as_ref().to_glib_none().0,
proxy_mode.into_glib(),
proxy_settings.to_glib_none_mut().0,
);
}
}
}