gi-javascriptcore-4.0.18: JavaScriptCore bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (inaki@blueleaf.cc)
Safe HaskellNone
LanguageHaskell2010

GI.JavaScriptCore.Objects.WeakValue

Contents

Description

No description available in the introspection data.

Synopsis

Exported types

newtype WeakValue Source #

Memory-managed wrapper type.

Instances
GObject WeakValue Source # 
Instance details

Defined in GI.JavaScriptCore.Objects.WeakValue

Methods

gobjectType :: IO GType #

HasParentTypes WeakValue Source # 
Instance details

Defined in GI.JavaScriptCore.Objects.WeakValue

type ParentTypes WeakValue Source # 
Instance details

Defined in GI.JavaScriptCore.Objects.WeakValue

type ParentTypes WeakValue = Object ': ([] :: [Type])

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
(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.

noWeakValue :: Maybe WeakValue Source #

A convenience alias for Nothing :: Maybe WeakValue.

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, IsValue a) => a -> IO (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 C_WeakValueClearedCallback = Ptr () -> Ptr () -> IO () Source #

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

type WeakValueClearedCallback = IO () Source #

This signal is emitted when the JavaScript value is destroyed.

afterWeakValueCleared :: (IsWeakValue a, MonadIO m) => 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

onWeakValueCleared :: (IsWeakValue a, MonadIO m) => 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