## WebKitWebViewGroup

WebKitWebViewGroup — Group of web views

## Functions

WebKitWebViewGroup * | webkit_web_view_group_new ()
const gchar * | webkit_web_view_group_get_name ()
WebKitSettings * | webkit_web_view_group_get_settings ()
void | webkit_web_view_group_set_settings ()
void | webkit_web_view_group_add_user_style_sheet ()
void | webkit_web_view_group_remove_all_user_style_sheets ()

## Properties

WebKitSettings * | settings | Read / Write

## Types and Values

struct | WebKitWebViewGroup
enum | WebKitInjectedContentFrames

## Object Hierarchy

        GObject
        ╰── WebKitWebViewGroup

## Description

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.

## Functions

### webkit_web_view_group_new ()

    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.

#### Parameters

name | the name of the group. | [allow-none]

#### Returns

a new WebKitWebViewGroup.

[transfer full]

### webkit_web_view_group_get_name ()

    const gchar *
    webkit_web_view_group_get_name (WebKitWebViewGroup *group);

Gets the name that uniquely identifies the WebKitWebViewGroup.

#### Parameters

group | a WebKitWebViewGroup |

#### Returns

the name of `group`

### webkit_web_view_group_get_settings ()

    WebKitSettings *
    webkit_web_view_group_get_settings (WebKitWebViewGroup *group);

Gets the WebKitSettings of the WebKitWebViewGroup.

#### Parameters

group | a WebKitWebViewGroup |

#### Returns

the settings of `group` .

[transfer none]

### webkit_web_view_group_set_settings ()

    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` .

#### Parameters

group | a WebKitWebViewGroup |
settings | a WebKitSettings |

### webkit_web_view_group_add_user_style_sheet ()

    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.

#### Parameters

group | a WebKitWebViewGroup |
source | the source of the style_sheet to inject |
base_uri | the base URI to use when processing the style_sheet contents or `NULL` for about:blank. | [allow-none]
whitelist | a whitelist of URI patterns or `NULL`. | [array zero-terminated=1][allow-none]
blacklist | a blacklist of URI patterns or `NULL`. | [array zero-terminated=1][allow-none]
injected_frames | a WebKitInjectedContentFrames describing to which frames the style_sheet should apply |

### webkit_web_view_group_remove_all_user_style_sheets ()

    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()`.

#### Parameters

group | a WebKitWebViewGroup |

## Types and Values

### struct WebKitWebViewGroup

    struct WebKitWebViewGroup;

### enum WebKitInjectedContentFrames

Enum values used for determining into which frames content is injected.

#### Members

WEBKIT_INJECTED_CONTENT_FRAMES_ALL | Content will be injected into all frames. |
WEBKIT_INJECTED_CONTENT_FRAMES_TOP_ONLY | Content will only be injected into the main frame. |

## Property Details

### The `“settings”` property

      “settings”                 WebKitSettings *

The WebKitSettings of the web view group.

Flags: Read / Write

## See Also

WebKitWebView, WebKitSettings