Top |
A WebKitWebViewGroup represents a group of WebKitWebViews that
share things like settings. There's a default WebKitWebViewGroup where
all WebKitWebViews of the same WebKitWebContext are added by default.
To create a WebKitWebView in a different WebKitWebViewGroup you can use
webkit_web_view_new_with_group()
.
WebKitWebViewGroups are identified by a unique name given when the group is
created with webkit_web_view_group_new()
.
WebKitWebViewGroups have a WebKitSettings to control the settings of all
WebKitWebViews of the group. You can get the settings with
webkit_web_view_group_get_settings()
to handle the settings, or you can set
your own WebKitSettings with webkit_web_view_group_set_settings()
. When
the WebKitSettings of a WebKitWebViewGroup changes, the signal notify::settings
is emitted on the group.
WebKitWebViewGroup *
webkit_web_view_group_new (const gchar *name
);
Creates a new WebKitWebViewGroup with the given name
.
If name
is NULL
a unique identifier name will be created
automatically.
The newly created WebKitWebViewGroup doesn't contain any
WebKitWebView, web views are added to the new group when created
with webkit_web_view_new_with_group()
passing the group.
const gchar *
webkit_web_view_group_get_name (WebKitWebViewGroup *group
);
Gets the name that uniquely identifies the WebKitWebViewGroup.
WebKitSettings *
webkit_web_view_group_get_settings (WebKitWebViewGroup *group
);
Gets the WebKitSettings of the WebKitWebViewGroup.
void webkit_web_view_group_set_settings (WebKitWebViewGroup *group
,WebKitSettings *settings
);
Sets a new WebKitSettings for the WebKitWebViewGroup. The settings will
affect to all the WebKitWebViews of the group.
WebKitWebViewGroups always have a WebKitSettings so if you just want to
modify a setting you can use webkit_web_view_group_get_settings()
and modify the
returned WebKitSettings instead.
Setting the same WebKitSettings multiple times doesn't have any effect.
You can monitor the settings of a WebKitWebViewGroup by connecting to the
notify::settings signal of group
.
void webkit_web_view_group_add_user_style_sheet (WebKitWebViewGroup *group
,const gchar *source
,const gchar *base_uri
,const gchar * const *whitelist
,const gchar * const *blacklist
,WebKitInjectedContentFrames injected_frames
);
Inject an external style sheet into pages. It is possible to only apply the style sheet
to some URIs by passing non-null values for whitelist
or blacklist
. Passing a NULL
whitelist implies that all URIs are on the whitelist. The style sheet is applied if a URI matches
the whitelist and not the blacklist. URI patterns must be of the form [protocol]://[host]/[path]
where the host and path components can contain the wildcard character ('*') to represent zero
or more other characters.
group |
||
source |
the source of the style_sheet to inject |
|
base_uri |
the base URI to use when processing the style_sheet contents or |
[allow-none] |
whitelist |
a whitelist of URI patterns or |
[array zero-terminated=1][allow-none] |
blacklist |
a blacklist of URI patterns or |
[array zero-terminated=1][allow-none] |
injected_frames |
a WebKitInjectedContentFrames describing to which frames the style_sheet should apply |
void
webkit_web_view_group_remove_all_user_style_sheets
(WebKitWebViewGroup *group
);
Remove all style sheets previously injected into this WebKitWebViewGroup
via webkit_web_view_group_add_user_style_sheet()
.
“settings”
property“settings” WebKitSettings *
The WebKitSettings of the web view group.
Flags: Read / Write