pub struct WebContext { /* private fields */ }Expand description
Manages aspects common to all WebViews
The WebContext manages all aspects common to all
WebViews.
You can define the CacheModel with
set_cache_model(), depending on the needs of
your application. You can access the SecurityManager to specify
the behaviour of your application regarding security using
security_manager().
It is also possible to change your preferred language or enable
spell checking, using set_preferred_languages(),
set_spell_checking_languages() and
set_spell_checking_enabled().
You can use register_uri_scheme() to register
custom URI schemes, and manage several other settings.
TLS certificate validation failure is now treated as a transport
error by default. To handle TLS failures differently, you can
connect to load-failed-with-tls-errors.
Alternatively, you can use webkit_web_context_set_tls_errors_policy()
to set the policy TLSErrorsPolicy::Ignore; however, this is
not appropriate for Internet applications.
§Properties
§memory-pressure-settings
The MemoryPressureSettings applied to the web processes created by this context.
Writeable | Construct Only
§time-zone-override
The timezone override for this web context. Setting this property provides a better alternative to configure the timezone information for all webviews managed by the WebContext. The other, less optimal, approach is to globally set the TZ environment variable in the process before creating the context. However this approach might not be very convenient and can have side-effects in your application.
The expected values for this property are defined in the IANA timezone database. See this wikipedia page for instance, https://en.wikipedia.org/wiki/List_of_tz_database_time_zones.
Readable | Writeable | Construct Only
§Signals
§automation-started
This signal is emitted when a new automation request is made.
Note that it will never be emitted if automation is not enabled in context,
see WebContext::set_automation_allowed() for more details.
§initialize-notification-permissions
This signal is emitted when a WebContext needs to set
initial notification permissions for a web process. It is emitted
when a new web process is about to be launched, and signals the
most appropriate moment to use
WebContext::initialize_notification_permissions(). If no
notification permissions have changed since the last time this
signal was emitted, then there is no need to call
WebContext::initialize_notification_permissions() again.
§initialize-web-process-extensions
This signal is emitted when a new web process is about to be
launched. It signals the most appropriate moment to use
WebContext::set_web_process_extensions_initialization_user_data()
and WebContext::set_web_process_extensions_directory().
§user-message-received
This signal is emitted when a UserMessage is received from a
web process extension. You can reply to the message using
UserMessage::send_reply().
You can handle the user message asynchronously by calling g_object_ref() on
message and returning true.
GLib type: GObject with reference counted clone semantics.
Implementations§
Source§impl WebContext
impl WebContext
Sourcepub fn new() -> WebContext
pub fn new() -> WebContext
Sourcepub fn builder() -> WebContextBuilder
pub fn builder() -> WebContextBuilder
Creates a new builder-pattern struct instance to construct WebContext objects.
This method returns an instance of WebContextBuilder which can be used to create WebContext objects.
Sourcepub fn add_path_to_sandbox(&self, path: impl AsRef<Path>, read_only: bool)
pub fn add_path_to_sandbox(&self, path: impl AsRef<Path>, read_only: bool)
Adds a path to be mounted in the sandbox.
path must exist before any web process has been created. It is a fatal error
to add paths after a web process has been spawned.
Paths under /sys, /proc, and /dev are invalid. Attempting to
add all of / is not valid. Since 2.40, adding the user’s entire
home directory or /home is also not valid.
See also webkit_web_context_set_sandbox_enabled()
§path
an absolute path to mount in the sandbox
§read_only
if true the path will be read-only
Sourcepub fn cache_model(&self) -> CacheModel
pub fn cache_model(&self) -> CacheModel
Returns the current cache model.
For more information about this
value check the documentation of the function
set_cache_model().
§Returns
the current CacheModel
Sourcepub fn geolocation_manager(&self) -> Option<GeolocationManager>
pub fn geolocation_manager(&self) -> Option<GeolocationManager>
Sourcepub fn network_session_for_automation(&self) -> Option<NetworkSession>
pub fn network_session_for_automation(&self) -> Option<NetworkSession>
Get the NetworkSession used for automation sessions started in self.
§Returns
a NetworkSession, or None if automation is not enabled
Sourcepub fn security_manager(&self) -> Option<SecurityManager>
pub fn security_manager(&self) -> Option<SecurityManager>
Sourcepub fn is_spell_checking_enabled(&self) -> bool
pub fn is_spell_checking_enabled(&self) -> bool
Sourcepub fn spell_checking_languages(&self) -> Vec<GString>
pub fn spell_checking_languages(&self) -> Vec<GString>
Get the the list of spell checking languages.
Get the the list of spell checking languages associated with
self, or None if no languages have been previously set.
See set_spell_checking_languages() for more
details on the format of the languages in the list.
§Returns
A None-terminated
array of languages if available, or None otherwise.
Sourcepub fn time_zone_override(&self) -> Option<GString>
pub fn time_zone_override(&self) -> Option<GString>
Get the time-zone-override property.
Sourcepub fn initialize_notification_permissions(
&self,
allowed_origins: &[&SecurityOrigin],
disallowed_origins: &[&SecurityOrigin],
)
pub fn initialize_notification_permissions( &self, allowed_origins: &[&SecurityOrigin], disallowed_origins: &[&SecurityOrigin], )
Sets initial desktop notification permissions for the self.
allowed_origins and disallowed_origins must each be GList of
SecurityOrigin objects representing origins that will,
respectively, either always or never have permission to show desktop
notifications. No NotificationPermissionRequest will ever be
generated for any of the security origins represented in
allowed_origins or disallowed_origins. This function is necessary
because some webpages proactively check whether they have permission
to display notifications without ever creating a permission request.
This function only affects web processes that have not already been
created. The best time to call it is when handling
initialize-notification-permissions so as to
ensure that new web processes receive the most recent set of
permissions.
§allowed_origins
a GList of security origins
§disallowed_origins
a GList of security origins
Sourcepub fn is_automation_allowed(&self) -> bool
pub fn is_automation_allowed(&self) -> bool
Sourcepub fn register_uri_scheme<P: Fn(&URISchemeRequest) + 'static>(
&self,
scheme: &str,
callback: P,
)
pub fn register_uri_scheme<P: Fn(&URISchemeRequest) + 'static>( &self, scheme: &str, callback: P, )
Register scheme in self.
Register scheme in self, so that when an URI request with scheme is made in the
WebContext, the WebKitURISchemeRequestCallback registered will be called with a
URISchemeRequest.
It is possible to handle URI scheme requests asynchronously, by calling g_object_ref() on the
URISchemeRequest and calling URISchemeRequest::finish() later
when the data of the request is available or
URISchemeRequest::finish_error() in case of error.
⚠️ The following code is in c ⚠️
static void
about_uri_scheme_request_cb (WebKitURISchemeRequest *request,
gpointer user_data)
{
GInputStream *stream;
gsize stream_length;
const gchar *path = webkit_uri_scheme_request_get_path (request);
if (!g_strcmp0 (path, "memory")) {
// Create a GInputStream with the contents of memory about page, and set its length to stream_length
} else if (!g_strcmp0 (path, "applications")) {
// Create a GInputStream with the contents of applications about page, and set its length to stream_length
} else if (!g_strcmp0 (path, "example")) {
gchar *contents = g_strdup_printf ("<html><body><p>Example about page</p></body></html>");
stream_length = strlen (contents);
stream = g_memory_input_stream_new_from_data (contents, stream_length, g_free);
} else {
GError *error = g_error_new (ABOUT_HANDLER_ERROR, ABOUT_HANDLER_ERROR_INVALID, "Invalid about:%s page.", path);
webkit_uri_scheme_request_finish_error (request, error);
g_error_free (error);
return;
}
webkit_uri_scheme_request_finish (request, stream, stream_length, "text/html");
g_object_unref (stream);
}§scheme
the network scheme to register
§callback
a WebKitURISchemeRequestCallback
§user_data_destroy_func
destroy notify for user_data
Sourcepub fn send_message_to_all_extensions(&self, message: &UserMessage)
pub fn send_message_to_all_extensions(&self, message: &UserMessage)
Send message to all web process extensions associated to self.
If message is floating, it’s consumed.
§message
Sourcepub fn set_automation_allowed(&self, allowed: bool)
pub fn set_automation_allowed(&self, allowed: bool)
Set whether automation is allowed in self.
When automation is enabled the browser could
be controlled by another process by requesting an automation session. When a new automation
session is requested the signal automation-started is emitted.
Automation is disabled by default, so you need to explicitly call this method passing true
to enable it.
Note that only one WebContext can have automation enabled, so this will do nothing
if there’s another WebContext with automation already enabled.
§allowed
value to set
Sourcepub fn set_cache_model(&self, cache_model: CacheModel)
pub fn set_cache_model(&self, cache_model: CacheModel)
Specifies a usage model for WebViews.
Specifies a usage model for WebViews, which WebKit will use to determine its caching behavior. All web views follow the cache model. This cache model determines the RAM and disk space to use for caching previously viewed content .
Research indicates that users tend to browse within clusters of documents that hold resources in common, and to revisit previously visited documents. WebKit and the frameworks below it include built-in caches that take advantage of these patterns, substantially improving document load speed in browsing situations. The WebKit cache model controls the behaviors of all of these caches, including various WebCore caches.
Browsers can improve document load speed substantially by
specifying CacheModel::WebBrowser. Applications without a
browsing interface can reduce memory usage substantially by
specifying CacheModel::DocumentViewer. The default value is
CacheModel::WebBrowser.
§cache_model
Sourcepub fn set_preferred_languages(&self, languages: &[&str])
pub fn set_preferred_languages(&self, languages: &[&str])
Set the list of preferred languages.
Set the list of preferred languages, sorted from most desirable to least desirable. The list will be used in the following ways:
- Determining how to build the
Accept-LanguageHTTP header that will be included in the network requests started by theWebContext. - Setting the values of
navigator.languageandnavigator.languages. - The first item in the list sets the default locale for JavaScript
Intlfunctions.
§languages
a None-terminated list of language identifiers
Sourcepub fn set_spell_checking_enabled(&self, enabled: bool)
pub fn set_spell_checking_enabled(&self, enabled: bool)
Sourcepub fn set_spell_checking_languages(&self, languages: &[&str])
pub fn set_spell_checking_languages(&self, languages: &[&str])
Set the list of spell checking languages to be used for spell checking.
The locale string typically is in the form lang_COUNTRY, where lang is an ISO-639 language code, and COUNTRY is an ISO-3166 country code. For instance, sv_FI for Swedish as written in Finland or pt_BR for Portuguese as written in Brazil.
You need to call this function with a valid list of languages at least once in order to properly enable the spell checking feature in WebKit.
§languages
a None-terminated list of spell checking languages
Sourcepub fn set_web_process_extensions_directory(&self, directory: &str)
pub fn set_web_process_extensions_directory(&self, directory: &str)
Set the directory where WebKit will look for web process extensions.
This method must be called before loading anything in this context,
otherwise it will not have any effect. You can connect to
initialize-web-process-extensions to call this method
before anything is loaded.
If your web process extension is installed to an unusual location,
then you may also need to call add_path_to_sandbox().
§directory
the directory to add
Sourcepub fn set_web_process_extensions_initialization_user_data(
&self,
user_data: &Variant,
)
pub fn set_web_process_extensions_initialization_user_data( &self, user_data: &Variant, )
Set user data to be passed to Web Extensions on initialization.
The data will be passed to the
WebKitWebProcessExtensionInitializeWithUserDataFunction.
This method must be called before loading anything in this context,
otherwise it will not have any effect. You can connect to
initialize-web-process-extensions to call this method
before anything is loaded.
Sourcepub fn default() -> Option<WebContext>
pub fn default() -> Option<WebContext>
Sourcepub fn connect_automation_started<F: Fn(&Self, &AutomationSession) + 'static>(
&self,
f: F,
) -> SignalHandlerId
pub fn connect_automation_started<F: Fn(&Self, &AutomationSession) + 'static>( &self, f: F, ) -> SignalHandlerId
This signal is emitted when a new automation request is made.
Note that it will never be emitted if automation is not enabled in context,
see set_automation_allowed() for more details.
§session
the AutomationSession associated with this event
Sourcepub fn connect_initialize_notification_permissions<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId
pub fn connect_initialize_notification_permissions<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
This signal is emitted when a WebContext needs to set
initial notification permissions for a web process. It is emitted
when a new web process is about to be launched, and signals the
most appropriate moment to use
initialize_notification_permissions(). If no
notification permissions have changed since the last time this
signal was emitted, then there is no need to call
initialize_notification_permissions() again.
Sourcepub fn connect_initialize_web_process_extensions<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId
pub fn connect_initialize_web_process_extensions<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
This signal is emitted when a new web process is about to be
launched. It signals the most appropriate moment to use
set_web_process_extensions_initialization_user_data()
and set_web_process_extensions_directory().
Sourcepub fn connect_user_message_received<F: Fn(&Self, &UserMessage) -> bool + 'static>(
&self,
f: F,
) -> SignalHandlerId
pub fn connect_user_message_received<F: Fn(&Self, &UserMessage) -> bool + 'static>( &self, f: F, ) -> SignalHandlerId
This signal is emitted when a UserMessage is received from a
web process extension. You can reply to the message using
UserMessage::send_reply().
You can handle the user message asynchronously by calling g_object_ref() on
message and returning true.
§message
the UserMessage received
§Returns
Trait Implementations§
Source§impl Clone for WebContext
impl Clone for WebContext
Source§impl Debug for WebContext
impl Debug for WebContext
Source§impl Default for WebContext
impl Default for WebContext
Source§impl HasParamSpec for WebContext
impl HasParamSpec for WebContext
type ParamSpec = ParamSpecObject
Source§type SetValue = WebContext
type SetValue = WebContext
type BuilderFn = fn(&str) -> ParamSpecObjectBuilder<'_, WebContext>
fn param_spec_builder() -> Self::BuilderFn
Source§impl Hash for WebContext
impl Hash for WebContext
Source§impl Ord for WebContext
impl Ord for WebContext
Source§fn cmp(&self, other: &Self) -> Ordering
fn cmp(&self, other: &Self) -> Ordering
Comparison for two GObjects.
Compares the memory addresses of the provided objects.
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl ParentClassIs for WebContext
impl ParentClassIs for WebContext
Source§impl<OT: ObjectType> PartialEq<OT> for WebContext
impl<OT: ObjectType> PartialEq<OT> for WebContext
Source§impl<OT: ObjectType> PartialOrd<OT> for WebContext
impl<OT: ObjectType> PartialOrd<OT> for WebContext
Source§impl StaticType for WebContext
impl StaticType for WebContext
Source§fn static_type() -> Type
fn static_type() -> Type
Self.impl Eq for WebContext
Auto Trait Implementations§
impl Freeze for WebContext
impl RefUnwindSafe for WebContext
impl !Send for WebContext
impl !Sync for WebContext
impl Unpin for WebContext
impl UnsafeUnpin for WebContext
impl UnwindSafe for WebContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Cast for Twhere
T: ObjectType,
impl<T> Cast for Twhere
T: ObjectType,
Source§fn upcast<T>(self) -> Twhere
T: ObjectType,
Self: IsA<T>,
fn upcast<T>(self) -> Twhere
T: ObjectType,
Self: IsA<T>,
T. Read moreSource§fn upcast_ref<T>(&self) -> &Twhere
T: ObjectType,
Self: IsA<T>,
fn upcast_ref<T>(&self) -> &Twhere
T: ObjectType,
Self: IsA<T>,
T. Read moreSource§fn downcast<T>(self) -> Result<T, Self>where
T: ObjectType,
Self: MayDowncastTo<T>,
fn downcast<T>(self) -> Result<T, Self>where
T: ObjectType,
Self: MayDowncastTo<T>,
T. Read moreSource§fn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
Self: MayDowncastTo<T>,
fn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
Self: MayDowncastTo<T>,
T. Read moreSource§fn dynamic_cast<T>(self) -> Result<T, Self>where
T: ObjectType,
fn dynamic_cast<T>(self) -> Result<T, Self>where
T: ObjectType,
T. This handles upcasting, downcasting
and casting between interface and interface implementors. All checks are performed at
runtime, while upcast will do many checks at compile-time already. downcast will
perform the same checks at runtime as dynamic_cast, but will also ensure some amount of
compile-time safety. Read moreSource§fn dynamic_cast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
fn dynamic_cast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
T. This handles upcasting, downcasting
and casting between interface and interface implementors. All checks are performed at
runtime, while downcast and upcast will do many checks at compile-time already. Read moreSource§unsafe fn unsafe_cast<T>(self) -> Twhere
T: ObjectType,
unsafe fn unsafe_cast<T>(self) -> Twhere
T: ObjectType,
T unconditionally. Read moreSource§unsafe fn unsafe_cast_ref<T>(&self) -> &Twhere
T: ObjectType,
unsafe fn unsafe_cast_ref<T>(&self) -> &Twhere
T: ObjectType,
&T unconditionally. Read moreSource§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *const GList) -> Vec<T>
unsafe fn from_glib_container_as_vec(_: *const GList) -> Vec<T>
unsafe fn from_glib_full_as_vec(_: *const GList) -> Vec<T>
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *const GPtrArray) -> Vec<T>
unsafe fn from_glib_container_as_vec(_: *const GPtrArray) -> Vec<T>
unsafe fn from_glib_full_as_vec(_: *const GPtrArray) -> Vec<T>
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *const GSList) -> Vec<T>
unsafe fn from_glib_container_as_vec(_: *const GSList) -> Vec<T>
unsafe fn from_glib_full_as_vec(_: *const GSList) -> Vec<T>
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *mut GList) -> Vec<T>
unsafe fn from_glib_container_as_vec(ptr: *mut GList) -> Vec<T>
unsafe fn from_glib_full_as_vec(ptr: *mut GList) -> Vec<T>
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *mut GPtrArray) -> Vec<T>
unsafe fn from_glib_container_as_vec(ptr: *mut GPtrArray) -> Vec<T>
unsafe fn from_glib_full_as_vec(ptr: *mut GPtrArray) -> Vec<T>
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *mut GSList) -> Vec<T>
unsafe fn from_glib_container_as_vec(ptr: *mut GSList) -> Vec<T>
unsafe fn from_glib_full_as_vec(ptr: *mut GSList) -> Vec<T>
Source§impl<O> GObjectPropertyExpressionExt for O
impl<O> GObjectPropertyExpressionExt for O
Source§fn property_expression(&self, property_name: &str) -> PropertyExpression
fn property_expression(&self, property_name: &str) -> PropertyExpression
Source§fn property_expression_weak(&self, property_name: &str) -> PropertyExpression
fn property_expression_weak(&self, property_name: &str) -> PropertyExpression
Source§fn this_expression(property_name: &str) -> PropertyExpression
fn this_expression(property_name: &str) -> PropertyExpression
this object.Source§impl<T> IntoClosureReturnValue for T
impl<T> IntoClosureReturnValue for T
fn into_closure_return_value(self) -> Option<Value>
Source§impl<U> IsSubclassableExt for Uwhere
U: IsClass + ParentClassIs,
impl<U> IsSubclassableExt for Uwhere
U: IsClass + ParentClassIs,
fn parent_class_init<T>(class: &mut Class<U>)
fn parent_instance_init<T>(instance: &mut InitializingObject<T>)
Source§impl<T> ObjectExt for Twhere
T: ObjectType,
impl<T> ObjectExt for Twhere
T: ObjectType,
Source§fn is<U>(&self) -> boolwhere
U: StaticType,
fn is<U>(&self) -> boolwhere
U: StaticType,
true if the object is an instance of (can be cast to) T.Source§fn object_class(&self) -> &Class<Object>
fn object_class(&self) -> &Class<Object>
ObjectClass of the object. Read moreSource§fn class_of<U>(&self) -> Option<&Class<U>>where
U: IsClass,
fn class_of<U>(&self) -> Option<&Class<U>>where
U: IsClass,
T. Read moreSource§fn interface<U>(&self) -> Option<InterfaceRef<'_, U>>where
U: IsInterface,
fn interface<U>(&self) -> Option<InterfaceRef<'_, U>>where
U: IsInterface,
T of the object. Read moreSource§fn set_property_from_value(&self, property_name: &str, value: &Value)
fn set_property_from_value(&self, property_name: &str, value: &Value)
Source§fn set_properties(&self, property_values: &[(&str, &dyn ToValue)])
fn set_properties(&self, property_values: &[(&str, &dyn ToValue)])
Source§fn set_properties_from_value(&self, property_values: &[(&str, Value)])
fn set_properties_from_value(&self, property_values: &[(&str, Value)])
Source§fn property<V>(&self, property_name: &str) -> Vwhere
V: for<'b> FromValue<'b> + 'static,
fn property<V>(&self, property_name: &str) -> Vwhere
V: for<'b> FromValue<'b> + 'static,
property_name of the object and cast it to the type V. Read moreSource§fn property_value(&self, property_name: &str) -> Value
fn property_value(&self, property_name: &str) -> Value
property_name of the object. Read moreSource§fn has_property(&self, property_name: &str) -> bool
fn has_property(&self, property_name: &str) -> bool
property_name.Source§fn has_property_with_type(&self, property_name: &str, type_: Type) -> bool
fn has_property_with_type(&self, property_name: &str, type_: Type) -> bool
property_name of the given type_.Source§fn property_type(&self, property_name: &str) -> Option<Type>
fn property_type(&self, property_name: &str) -> Option<Type>
property_name of this object. Read moreSource§fn find_property(&self, property_name: &str) -> Option<ParamSpec>
fn find_property(&self, property_name: &str) -> Option<ParamSpec>
ParamSpec of the property property_name of this object.Source§fn list_properties(&self) -> PtrSlice<ParamSpec>
fn list_properties(&self) -> PtrSlice<ParamSpec>
ParamSpec of the properties of this object.Source§fn freeze_notify(&self) -> PropertyNotificationFreezeGuard
fn freeze_notify(&self) -> PropertyNotificationFreezeGuard
Source§unsafe fn set_qdata<QD>(&self, key: Quark, value: QD)where
QD: 'static,
unsafe fn set_qdata<QD>(&self, key: Quark, value: QD)where
QD: 'static,
key. Read moreSource§unsafe fn qdata<QD>(&self, key: Quark) -> Option<NonNull<QD>>where
QD: 'static,
unsafe fn qdata<QD>(&self, key: Quark) -> Option<NonNull<QD>>where
QD: 'static,
key. Read moreSource§unsafe fn steal_qdata<QD>(&self, key: Quark) -> Option<QD>where
QD: 'static,
unsafe fn steal_qdata<QD>(&self, key: Quark) -> Option<QD>where
QD: 'static,
key. Read moreSource§unsafe fn set_data<QD>(&self, key: &str, value: QD)where
QD: 'static,
unsafe fn set_data<QD>(&self, key: &str, value: QD)where
QD: 'static,
key. Read moreSource§unsafe fn data<QD>(&self, key: &str) -> Option<NonNull<QD>>where
QD: 'static,
unsafe fn data<QD>(&self, key: &str) -> Option<NonNull<QD>>where
QD: 'static,
key. Read moreSource§unsafe fn steal_data<QD>(&self, key: &str) -> Option<QD>where
QD: 'static,
unsafe fn steal_data<QD>(&self, key: &str) -> Option<QD>where
QD: 'static,
key. Read moreSource§fn block_signal(&self, handler_id: &SignalHandlerId)
fn block_signal(&self, handler_id: &SignalHandlerId)
Source§fn unblock_signal(&self, handler_id: &SignalHandlerId)
fn unblock_signal(&self, handler_id: &SignalHandlerId)
Source§fn stop_signal_emission(&self, signal_id: SignalId, detail: Option<Quark>)
fn stop_signal_emission(&self, signal_id: SignalId, detail: Option<Quark>)
Source§fn stop_signal_emission_by_name(&self, signal_name: &str)
fn stop_signal_emission_by_name(&self, signal_name: &str)
Source§fn connect<F>(
&self,
signal_name: &str,
after: bool,
callback: F,
) -> SignalHandlerId
fn connect<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
signal_name on this object. Read moreSource§fn connect_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F,
) -> SignalHandlerId
fn connect_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
signal_id on this object. Read moreSource§fn connect_local<F>(
&self,
signal_name: &str,
after: bool,
callback: F,
) -> SignalHandlerId
fn connect_local<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
signal_name on this object. Read moreSource§fn connect_local_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F,
) -> SignalHandlerId
fn connect_local_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
signal_id on this object. Read moreSource§unsafe fn connect_unsafe<F>(
&self,
signal_name: &str,
after: bool,
callback: F,
) -> SignalHandlerId
unsafe fn connect_unsafe<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
signal_name on this object. Read moreSource§unsafe fn connect_unsafe_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F,
) -> SignalHandlerId
unsafe fn connect_unsafe_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
signal_id on this object. Read moreSource§fn connect_closure(
&self,
signal_name: &str,
after: bool,
closure: RustClosure,
) -> SignalHandlerId
fn connect_closure( &self, signal_name: &str, after: bool, closure: RustClosure, ) -> SignalHandlerId
signal_name on this object. Read moreSource§fn connect_closure_id(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
closure: RustClosure,
) -> SignalHandlerId
fn connect_closure_id( &self, signal_id: SignalId, details: Option<Quark>, after: bool, closure: RustClosure, ) -> SignalHandlerId
signal_id on this object. Read moreSource§fn watch_closure(&self, closure: &impl AsRef<Closure>)
fn watch_closure(&self, closure: &impl AsRef<Closure>)
closure to the lifetime of the object. When
the object’s reference count drops to zero, the closure will be
invalidated. An invalidated closure will ignore any calls to
invoke_with_values, or
invoke when using Rust closures.Source§fn emit<R>(&self, signal_id: SignalId, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
fn emit<R>(&self, signal_id: SignalId, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
Source§fn emit_with_values(&self, signal_id: SignalId, args: &[Value]) -> Option<Value>
fn emit_with_values(&self, signal_id: SignalId, args: &[Value]) -> Option<Value>
Self::emit but takes Value for the arguments.Source§fn emit_by_name<R>(&self, signal_name: &str, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
fn emit_by_name<R>(&self, signal_name: &str, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
Source§fn emit_by_name_with_values(
&self,
signal_name: &str,
args: &[Value],
) -> Option<Value>
fn emit_by_name_with_values( &self, signal_name: &str, args: &[Value], ) -> Option<Value>
Source§fn emit_by_name_with_details<R>(
&self,
signal_name: &str,
details: Quark,
args: &[&dyn ToValue],
) -> Rwhere
R: TryFromClosureReturnValue,
fn emit_by_name_with_details<R>(
&self,
signal_name: &str,
details: Quark,
args: &[&dyn ToValue],
) -> Rwhere
R: TryFromClosureReturnValue,
Source§fn emit_by_name_with_details_and_values(
&self,
signal_name: &str,
details: Quark,
args: &[Value],
) -> Option<Value>
fn emit_by_name_with_details_and_values( &self, signal_name: &str, details: Quark, args: &[Value], ) -> Option<Value>
Source§fn emit_with_details<R>(
&self,
signal_id: SignalId,
details: Quark,
args: &[&dyn ToValue],
) -> Rwhere
R: TryFromClosureReturnValue,
fn emit_with_details<R>(
&self,
signal_id: SignalId,
details: Quark,
args: &[&dyn ToValue],
) -> Rwhere
R: TryFromClosureReturnValue,
Source§fn emit_with_details_and_values(
&self,
signal_id: SignalId,
details: Quark,
args: &[Value],
) -> Option<Value>
fn emit_with_details_and_values( &self, signal_id: SignalId, details: Quark, args: &[Value], ) -> Option<Value>
Source§fn disconnect(&self, handler_id: SignalHandlerId)
fn disconnect(&self, handler_id: SignalHandlerId)
Source§fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
notify signal of the object. Read moreSource§fn connect_notify_local<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
fn connect_notify_local<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
notify signal of the object. Read moreSource§unsafe fn connect_notify_unsafe<F>(
&self,
name: Option<&str>,
f: F,
) -> SignalHandlerId
unsafe fn connect_notify_unsafe<F>( &self, name: Option<&str>, f: F, ) -> SignalHandlerId
notify signal of the object. Read more