gi-webkit-6.0.2: WebKit bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.WebKit.Structs.UserStyleSheet

Description

A CSS style sheet which can be injected in loaded pages.

Since: 2.6

Synopsis

Exported types

newtype UserStyleSheet Source #

Memory-managed wrapper type.

Constructors

UserStyleSheet (ManagedPtr UserStyleSheet) 

Instances

Instances details
Eq UserStyleSheet Source # 
Instance details

Defined in GI.WebKit.Structs.UserStyleSheet

GBoxed UserStyleSheet Source # 
Instance details

Defined in GI.WebKit.Structs.UserStyleSheet

ManagedPtrNewtype UserStyleSheet Source # 
Instance details

Defined in GI.WebKit.Structs.UserStyleSheet

TypedObject UserStyleSheet Source # 
Instance details

Defined in GI.WebKit.Structs.UserStyleSheet

Methods

glibType :: IO GType

HasParentTypes UserStyleSheet Source # 
Instance details

Defined in GI.WebKit.Structs.UserStyleSheet

IsGValue (Maybe UserStyleSheet) Source #

Convert UserStyleSheet to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.WebKit.Structs.UserStyleSheet

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe UserStyleSheet -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe UserStyleSheet)

type ParentTypes UserStyleSheet Source # 
Instance details

Defined in GI.WebKit.Structs.UserStyleSheet

type ParentTypes UserStyleSheet = '[] :: [Type]

Methods

Click to display all available methods, including inherited ones

Expand

Methods

ref, unref.

Getters

None.

Setters

None.

new

userStyleSheetNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

source: Source code of the user style sheet.

-> UserContentInjectedFrames

injectedFrames: A UserContentInjectedFrames value

-> UserStyleLevel

level: A UserStyleLevel

-> Maybe [Text]

allowList: An allow_list of URI patterns or Nothing

-> Maybe [Text]

blockList: A block_list of URI patterns or Nothing

-> m UserStyleSheet

Returns: A new UserStyleSheet

Creates a new user style sheet.

Style sheets can be applied to some URIs only by passing non-null values for allowList or blockList. Passing a Nothing 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.

Since: 2.6

newForWorld

userStyleSheetNewForWorld Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

source: Source code of the user style sheet.

-> UserContentInjectedFrames

injectedFrames: A UserContentInjectedFrames value

-> UserStyleLevel

level: A UserStyleLevel

-> Text

worldName: the name of a WebKitScriptWorld

-> Maybe [Text]

allowList: An allow_list of URI patterns or Nothing

-> Maybe [Text]

blockList: A block_list of URI patterns or Nothing

-> m UserStyleSheet

Returns: A new UserStyleSheet

Creates a new user style sheet for script world.

Creates a new user style sheet for script world with name worldName. See userStyleSheetNew for a full description.

Since: 2.22

ref

userStyleSheetRef Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> UserStyleSheet

userStyleSheet: a UserStyleSheet

-> m UserStyleSheet

Returns: The passed UserStyleSheet

Atomically increments the reference count of userStyleSheet by one.

This function is MT-safe and may be called from any thread.

Since: 2.6

unref

userStyleSheetUnref Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> UserStyleSheet

userStyleSheet: a UserStyleSheet

-> m () 

Atomically decrements the reference count of userStyleSheet by one.

If the reference count drops to 0, all memory allocated by UserStyleSheet is released. This function is MT-safe and may be called from any thread.

Since: 2.6