gi-javascriptcore-4.0.24: JavaScriptCore bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.JavaScriptCore.Objects.WeakValue

Description

No description available in the introspection data.

Synopsis

Exported types

class (GObject o, IsDescendantOf WeakValue o) => IsWeakValue o Source #

Type class for types which can be safely cast to WeakValue, for instance with toWeakValue.

Instances

Instances details
(GObject o, IsDescendantOf WeakValue o) => IsWeakValue o Source # 
Instance details

Defined in GI.JavaScriptCore.Objects.WeakValue

toWeakValue :: (MonadIO m, IsWeakValue o) => o -> m WeakValue Source #

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

Methods

getValue

weakValueGetValue Source #

Arguments

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

weakValue: a WeakValue

-> m Value

Returns: a new Value or Nothing if weakValue was cleared.

Get a Value referencing the JavaScript value of weakValue.

new

weakValueNew Source #

Arguments

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

value: a Value

-> m WeakValue

Returns: a new WeakValue

Create a new WeakValue for the JavaScript value referenced by value.

Properties

value

The Value referencing the JavaScript value.

constructWeakValueValue :: (IsWeakValue o, MonadIO m, IsValue a) => a -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “value” property. This is rarely needed directly, but it is used by new.

Signals

cleared

type WeakValueClearedCallback = IO () Source #

This signal is emitted when the JavaScript value is destroyed.

afterWeakValueCleared :: (IsWeakValue a, MonadIO m) => a -> ((?self :: a) => WeakValueClearedCallback) -> m SignalHandlerId Source #

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

after weakValue #cleared callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onWeakValueCleared :: (IsWeakValue a, MonadIO m) => a -> ((?self :: a) => WeakValueClearedCallback) -> m SignalHandlerId Source #

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

on weakValue #cleared callback