gi-webkit2webextension-4.0.25: WebKit2-WebExtension bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.WebKit2WebExtension.Objects.WebExtension

Description

No description available in the introspection data.

Synopsis

Exported types

newtype WebExtension Source #

Memory-managed wrapper type.

Constructors

WebExtension (ManagedPtr WebExtension) 

Instances

Instances details
Eq WebExtension Source # 
Instance details

Defined in GI.WebKit2WebExtension.Objects.WebExtension

Methods

(==) :: WebExtension -> WebExtension -> Bool

(/=) :: WebExtension -> WebExtension -> Bool

GObject WebExtension Source # 
Instance details

Defined in GI.WebKit2WebExtension.Objects.WebExtension

ManagedPtrNewtype WebExtension Source # 
Instance details

Defined in GI.WebKit2WebExtension.Objects.WebExtension

Methods

toManagedPtr :: WebExtension -> ManagedPtr WebExtension

TypedObject WebExtension Source # 
Instance details

Defined in GI.WebKit2WebExtension.Objects.WebExtension

Methods

glibType :: IO GType

IsGValue WebExtension Source #

Convert WebExtension to and from GValue with toGValue and fromGValue.

Instance details

Defined in GI.WebKit2WebExtension.Objects.WebExtension

Methods

toGValue :: WebExtension -> IO GValue

fromGValue :: GValue -> IO WebExtension

HasParentTypes WebExtension Source # 
Instance details

Defined in GI.WebKit2WebExtension.Objects.WebExtension

type ParentTypes WebExtension Source # 
Instance details

Defined in GI.WebKit2WebExtension.Objects.WebExtension

type ParentTypes WebExtension = '[Object]

class (GObject o, IsDescendantOf WebExtension o) => IsWebExtension o Source #

Type class for types which can be safely cast to WebExtension, for instance with toWebExtension.

Instances

Instances details
(GObject o, IsDescendantOf WebExtension o) => IsWebExtension o Source # 
Instance details

Defined in GI.WebKit2WebExtension.Objects.WebExtension

toWebExtension :: (MonadIO m, IsWebExtension o) => o -> m WebExtension Source #

Cast to WebExtension, for types for which this is known to be safe. For general casts, use castTo.

Methods

Overloaded methods

getPage

webExtensionGetPage Source #

Arguments

:: (HasCallStack, MonadIO m, IsWebExtension a) 
=> a

extension: a WebExtension

-> Word64

pageId: the identifier of the WebPage to get

-> m (Maybe WebPage)

Returns: the WebPage for the given pageId, or Nothing if the identifier doesn't correspond to an existing web page.

Get the web page of the given pageId.

sendMessageToContext

webExtensionSendMessageToContext Source #

Arguments

:: (HasCallStack, MonadIO m, IsWebExtension a, IsUserMessage b, IsCancellable c) 
=> a

extension: a WebExtension

-> b

message: a UserMessage

-> Maybe c

cancellable: a Cancellable or Nothing to ignore

-> Maybe AsyncReadyCallback

callback: (nullable): A AsyncReadyCallback to call when the request is satisfied or Nothing

-> m () 

Send message to the WebKitWebContext corresponding to extension. If message is floating, it's consumed.

If you don't expect any reply, or you simply want to ignore it, you can pass Nothing as calback. When the operation is finished, callback will be called. You can then call webExtensionSendMessageToContextFinish to get the message reply.

Since: 2.28

sendMessageToContextFinish

webExtensionSendMessageToContextFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsWebExtension a, IsAsyncResult b) 
=> a

extension: a WebExtension

-> b

result: a AsyncResult

-> m UserMessage

Returns: a UserMessage with the reply or Nothing in case of error. (Can throw GError)

Finish an asynchronous operation started with webExtensionSendMessageToContext.

Since: 2.28

Signals

pageCreated

type C_WebExtensionPageCreatedCallback = Ptr () -> Ptr WebPage -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type WebExtensionPageCreatedCallback Source #

Arguments

 = WebPage

webPage: the WebPage created

-> IO () 

This signal is emitted when a new WebPage is created in the Web Process.

afterWebExtensionPageCreated :: (IsWebExtension a, MonadIO m) => a -> WebExtensionPageCreatedCallback -> m SignalHandlerId Source #

Connect a signal handler for the pageCreated signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after webExtension #pageCreated callback

onWebExtensionPageCreated :: (IsWebExtension a, MonadIO m) => a -> WebExtensionPageCreatedCallback -> m SignalHandlerId Source #

Connect a signal handler for the pageCreated signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on webExtension #pageCreated callback

userMessageReceived

type C_WebExtensionUserMessageReceivedCallback = Ptr () -> Ptr UserMessage -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type WebExtensionUserMessageReceivedCallback Source #

Arguments

 = UserMessage

message: the UserMessage received

-> IO () 

This signal is emitted when a UserMessage is received from the WebKitWebContext corresponding to extension. Messages sent by WebKitWebContext are always broadcasted to all WebExtensions and they can't be replied to. Calling userMessageSendReply will do nothing.

Since: 2.28

afterWebExtensionUserMessageReceived :: (IsWebExtension a, MonadIO m) => a -> WebExtensionUserMessageReceivedCallback -> m SignalHandlerId Source #

Connect a signal handler for the userMessageReceived signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after webExtension #userMessageReceived callback

onWebExtensionUserMessageReceived :: (IsWebExtension a, MonadIO m) => a -> WebExtensionUserMessageReceivedCallback -> m SignalHandlerId Source #

Connect a signal handler for the userMessageReceived signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on webExtension #userMessageReceived callback