Function
WebKitUserStyleSheetnew
since: 2.6
Declaration [src]
WebKitUserStyleSheet*
webkit_user_style_sheet_new (
const gchar* source,
WebKitUserContentInjectedFrames injected_frames,
WebKitUserStyleLevel level,
const gchar* const* allow_list,
const gchar* const* block_list
)
Description [src]
Creates a new user style sheet.
Style sheets can be applied to some URIs
only by passing non-null values for allow_list or block_list. Passing a
NULL allow_list implies that all URIs are on the allow_list. The style
sheet is applied if an URI matches the allow_list and not the block_list.
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.
Available since: 2.6
Parameters
source-
Type:
const gchar*Source code of the user style sheet.
The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. injected_frames-
Type:
WebKitUserContentInjectedFramesA
WebKitUserContentInjectedFramesvalue. level-
Type:
WebKitUserStyleLevelA
WebKitUserStyleLevel. allow_list-
Type: An array of
gchar*An allow_list of URI patterns or
NULL.The argument can be NULL.The array must be NULL-terminated.The data is owned by the caller of the function. Each element is a NUL terminated UTF-8 string. block_list-
Type: An array of
gchar*A block_list of URI patterns or
NULL.The argument can be NULL.The array must be NULL-terminated.The data is owned by the caller of the function. Each element is a NUL terminated UTF-8 string.
Return value
Type: WebKitUserStyleSheet
A new WebKitUserStyleSheet.
| The caller of the function takes ownership of the data, and is responsible for freeing it. |