Top | Description | Object Hierarchy | Properties |
struct WebKitWebViewGroup; enum WebKitInjectedContentFrames; WebKitWebViewGroup * webkit_web_view_group_new (const gchar *name
); const gchar * webkit_web_view_group_get_name (WebKitWebViewGroup *group
); WebKitSettings * webkit_web_view_group_get_settings (WebKitWebViewGroup *group
); void webkit_web_view_group_set_settings (WebKitWebViewGroup *group
,WebKitSettings *settings
); 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
); void webkit_web_view_group_remove_all_user_style_sheets (WebKitWebViewGroup *group
);
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.
typedef enum { WEBKIT_INJECTED_CONTENT_FRAMES_ALL, WEBKIT_INJECTED_CONTENT_FRAMES_TOP_ONLY, } WebKitInjectedContentFrames;
Enum values used for determining into which frames content is injected.
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.
|
the name of the group. [allow-none] |
Returns : |
a new WebKitWebViewGroup. [transfer full] |
const gchar * webkit_web_view_group_get_name (WebKitWebViewGroup *group
);
Gets the name that uniquely identifies the WebKitWebViewGroup.
|
a WebKitWebViewGroup |
Returns : |
the name of group
|
WebKitSettings * webkit_web_view_group_get_settings (WebKitWebViewGroup *group
);
Gets the WebKitSettings of the WebKitWebViewGroup.
|
a WebKitWebViewGroup |
Returns : |
the settings of group . [transfer none]
|
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
.
|
a WebKitWebViewGroup |
|
a WebKitSettings |
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.
|
a WebKitWebViewGroup |
|
the source of the style_sheet to inject |
|
the base URI to use when processing the style_sheet contents or NULL for about:blank. [allow-none]
|
|
a whitelist of URI patterns or NULL . [array zero-terminated=1][allow-none]
|
|
a blacklist of URI patterns or NULL . [array zero-terminated=1][allow-none]
|
|
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()
.
|
a WebKitWebViewGroup |
"settings"
property"settings" WebKitSettings* : Read / Write
The WebKitSettings of the web view group.