Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
A CSS style sheet which can be injected in loaded pages.
Since: 2.6
Synopsis
- newtype UserStyleSheet = UserStyleSheet (ManagedPtr UserStyleSheet)
- userStyleSheetNew :: (HasCallStack, MonadIO m) => Text -> UserContentInjectedFrames -> UserStyleLevel -> Maybe [Text] -> Maybe [Text] -> m UserStyleSheet
- userStyleSheetNewForWorld :: (HasCallStack, MonadIO m) => Text -> UserContentInjectedFrames -> UserStyleLevel -> Text -> Maybe [Text] -> Maybe [Text] -> m UserStyleSheet
- userStyleSheetRef :: (HasCallStack, MonadIO m) => UserStyleSheet -> m UserStyleSheet
- userStyleSheetUnref :: (HasCallStack, MonadIO m) => UserStyleSheet -> m ()
Exported types
newtype UserStyleSheet Source #
Memory-managed wrapper type.
UserStyleSheet (ManagedPtr UserStyleSheet) |
Instances
Eq UserStyleSheet Source # | |
Defined in GI.WebKit2.Structs.UserStyleSheet (==) :: UserStyleSheet -> UserStyleSheet -> Bool # (/=) :: UserStyleSheet -> UserStyleSheet -> Bool # | |
GBoxed UserStyleSheet Source # | |
Defined in GI.WebKit2.Structs.UserStyleSheet | |
ManagedPtrNewtype UserStyleSheet Source # | |
Defined in GI.WebKit2.Structs.UserStyleSheet toManagedPtr :: UserStyleSheet -> ManagedPtr UserStyleSheet | |
TypedObject UserStyleSheet Source # | |
Defined in GI.WebKit2.Structs.UserStyleSheet | |
HasParentTypes UserStyleSheet Source # | |
Defined in GI.WebKit2.Structs.UserStyleSheet | |
IsGValue (Maybe UserStyleSheet) Source # | Convert |
Defined in GI.WebKit2.Structs.UserStyleSheet gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe UserStyleSheet -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe UserStyleSheet) | |
type ParentTypes UserStyleSheet Source # | |
Defined in GI.WebKit2.Structs.UserStyleSheet |
Methods
Click to display all available methods, including inherited ones
new
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> UserContentInjectedFrames |
|
-> UserStyleLevel |
|
-> Maybe [Text] |
|
-> Maybe [Text] |
|
-> m UserStyleSheet | Returns: A new |
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 #
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> UserContentInjectedFrames |
|
-> UserStyleLevel |
|
-> Text |
|
-> Maybe [Text] |
|
-> Maybe [Text] |
|
-> m UserStyleSheet | Returns: A new |
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
:: (HasCallStack, MonadIO m) | |
=> UserStyleSheet |
|
-> m UserStyleSheet | Returns: The passed |
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
:: (HasCallStack, MonadIO m) | |
=> 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