gi-gobject-2.0.24: GObject bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.GObject.Structs.CClosure

Description

A CClosure is a specialization of Closure for C function callbacks.

Synopsis

Exported types

newtype CClosure Source #

Memory-managed wrapper type.

Constructors

CClosure (ManagedPtr CClosure) 

Instances

Instances details
Eq CClosure Source # 
Instance details

Defined in GI.GObject.Structs.CClosure

CallocPtr CClosure Source # 
Instance details

Defined in GI.GObject.Structs.CClosure

BoxedPtr CClosure Source # 
Instance details

Defined in GI.GObject.Structs.CClosure

ManagedPtrNewtype CClosure Source # 
Instance details

Defined in GI.GObject.Structs.CClosure

tag ~ 'AttrSet => Constructible CClosure tag Source # 
Instance details

Defined in GI.GObject.Structs.CClosure

Methods

new :: MonadIO m => (ManagedPtr CClosure -> CClosure) -> [AttrOp CClosure tag] -> m CClosure #

newZeroCClosure :: MonadIO m => m CClosure Source #

Construct a CClosure struct initialized to zero.

Methods

Overloaded methods

marshalBOOLEAN_BOXEDBOXED

cClosureMarshalBOOLEAN_BOXEDBOXED Source #

Arguments

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

closure: A Closure.

-> GValue

returnValue: A Value to store the return value. May be Nothing if the callback of closure doesn't return a value.

-> Word32

nParamValues: The length of the paramValues array.

-> GValue

paramValues: An array of GValues holding the arguments on which to invoke the callback of closure.

-> Ptr ()

invocationHint: The invocation hint given as the last argument to closureInvoke.

-> Ptr ()

marshalData: Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

-> m () 

A GClosureMarshal function for use with signals with handlers that take two boxed pointers as arguments and return a boolean. If you have such a signal, you will probably also need to use an accumulator, such as signalAccumulatorTrueHandled.

marshalBOOLEAN_FLAGS

cClosureMarshalBOOLEAN_FLAGS Source #

Arguments

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

closure: the Closure to which the marshaller belongs

-> GValue

returnValue: a Value which can store the returned Bool

-> Word32

nParamValues: 2

-> GValue

paramValues: a Value array holding instance and arg1

-> Ptr ()

invocationHint: the invocation hint given as the last argument to closureInvoke

-> Ptr ()

marshalData: additional data specified when registering the marshaller

-> m () 

A marshaller for a CClosure with a callback of type gboolean (*callback) (gpointer instance, gint arg1, gpointer user_data) where the gint parameter denotes a flags type.

marshalGeneric

cClosureMarshalGeneric Source #

Arguments

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

closure: A Closure.

-> GValue

returnGvalue: A Value to store the return value. May be Nothing if the callback of closure doesn't return a value.

-> Word32

nParamValues: The length of the paramValues array.

-> GValue

paramValues: An array of GValues holding the arguments on which to invoke the callback of closure.

-> Ptr ()

invocationHint: The invocation hint given as the last argument to closureInvoke.

-> Ptr ()

marshalData: Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

-> m () 

A generic marshaller function implemented via libffi.

Normally this function is not passed explicitly to g_signal_new(), but used automatically by GLib when specifying a Nothing marshaller.

Since: 2.30

marshalSTRING_OBJECTPOINTER

cClosureMarshalSTRING_OBJECTPOINTER Source #

Arguments

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

closure: the Closure to which the marshaller belongs

-> GValue

returnValue: a Value, which can store the returned string

-> Word32

nParamValues: 3

-> GValue

paramValues: a Value array holding instance, arg1 and arg2

-> Ptr ()

invocationHint: the invocation hint given as the last argument to closureInvoke

-> Ptr ()

marshalData: additional data specified when registering the marshaller

-> m () 

A marshaller for a CClosure with a callback of type gchar* (*callback) (gpointer instance, GObject *arg1, gpointer arg2, gpointer user_data).

marshalVOID_BOOLEAN

cClosureMarshalVOID_BOOLEAN Source #

Arguments

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

closure: the Closure to which the marshaller belongs

-> GValue

returnValue: ignored

-> Word32

nParamValues: 2

-> GValue

paramValues: a Value array holding the instance and the Bool parameter

-> Ptr ()

invocationHint: the invocation hint given as the last argument to closureInvoke

-> Ptr ()

marshalData: additional data specified when registering the marshaller

-> m () 

A marshaller for a CClosure with a callback of type void (*callback) (gpointer instance, gboolean arg1, gpointer user_data).

marshalVOID_BOXED

cClosureMarshalVOID_BOXED Source #

Arguments

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

closure: the Closure to which the marshaller belongs

-> GValue

returnValue: ignored

-> Word32

nParamValues: 2

-> GValue

paramValues: a Value array holding the instance and the GBoxed* parameter

-> Ptr ()

invocationHint: the invocation hint given as the last argument to closureInvoke

-> Ptr ()

marshalData: additional data specified when registering the marshaller

-> m () 

A marshaller for a CClosure with a callback of type void (*callback) (gpointer instance, GBoxed *arg1, gpointer user_data).

marshalVOID_CHAR

cClosureMarshalVOID_CHAR Source #

Arguments

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

closure: the Closure to which the marshaller belongs

-> GValue

returnValue: ignored

-> Word32

nParamValues: 2

-> GValue

paramValues: a Value array holding the instance and the gchar parameter

-> Ptr ()

invocationHint: the invocation hint given as the last argument to closureInvoke

-> Ptr ()

marshalData: additional data specified when registering the marshaller

-> m () 

A marshaller for a CClosure with a callback of type void (*callback) (gpointer instance, gchar arg1, gpointer user_data).

marshalVOID_DOUBLE

cClosureMarshalVOID_DOUBLE Source #

Arguments

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

closure: the Closure to which the marshaller belongs

-> GValue

returnValue: ignored

-> Word32

nParamValues: 2

-> GValue

paramValues: a Value array holding the instance and the gdouble parameter

-> Ptr ()

invocationHint: the invocation hint given as the last argument to closureInvoke

-> Ptr ()

marshalData: additional data specified when registering the marshaller

-> m () 

A marshaller for a CClosure with a callback of type void (*callback) (gpointer instance, gdouble arg1, gpointer user_data).

marshalVOID_ENUM

cClosureMarshalVOID_ENUM Source #

Arguments

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

closure: the Closure to which the marshaller belongs

-> GValue

returnValue: ignored

-> Word32

nParamValues: 2

-> GValue

paramValues: a Value array holding the instance and the enumeration parameter

-> Ptr ()

invocationHint: the invocation hint given as the last argument to closureInvoke

-> Ptr ()

marshalData: additional data specified when registering the marshaller

-> m () 

A marshaller for a CClosure with a callback of type void (*callback) (gpointer instance, gint arg1, gpointer user_data) where the gint parameter denotes an enumeration type..

marshalVOID_FLAGS

cClosureMarshalVOID_FLAGS Source #

Arguments

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

closure: the Closure to which the marshaller belongs

-> GValue

returnValue: ignored

-> Word32

nParamValues: 2

-> GValue

paramValues: a Value array holding the instance and the flags parameter

-> Ptr ()

invocationHint: the invocation hint given as the last argument to closureInvoke

-> Ptr ()

marshalData: additional data specified when registering the marshaller

-> m () 

A marshaller for a CClosure with a callback of type void (*callback) (gpointer instance, gint arg1, gpointer user_data) where the gint parameter denotes a flags type.

marshalVOID_FLOAT

cClosureMarshalVOID_FLOAT Source #

Arguments

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

closure: the Closure to which the marshaller belongs

-> GValue

returnValue: ignored

-> Word32

nParamValues: 2

-> GValue

paramValues: a Value array holding the instance and the gfloat parameter

-> Ptr ()

invocationHint: the invocation hint given as the last argument to closureInvoke

-> Ptr ()

marshalData: additional data specified when registering the marshaller

-> m () 

A marshaller for a CClosure with a callback of type void (*callback) (gpointer instance, gfloat arg1, gpointer user_data).

marshalVOID_INT

cClosureMarshalVOID_INT Source #

Arguments

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

closure: the Closure to which the marshaller belongs

-> GValue

returnValue: ignored

-> Word32

nParamValues: 2

-> GValue

paramValues: a Value array holding the instance and the gint parameter

-> Ptr ()

invocationHint: the invocation hint given as the last argument to closureInvoke

-> Ptr ()

marshalData: additional data specified when registering the marshaller

-> m () 

A marshaller for a CClosure with a callback of type void (*callback) (gpointer instance, gint arg1, gpointer user_data).

marshalVOID_LONG

cClosureMarshalVOID_LONG Source #

Arguments

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

closure: the Closure to which the marshaller belongs

-> GValue

returnValue: ignored

-> Word32

nParamValues: 2

-> GValue

paramValues: a Value array holding the instance and the glong parameter

-> Ptr ()

invocationHint: the invocation hint given as the last argument to closureInvoke

-> Ptr ()

marshalData: additional data specified when registering the marshaller

-> m () 

A marshaller for a CClosure with a callback of type void (*callback) (gpointer instance, glong arg1, gpointer user_data).

marshalVOID_OBJECT

cClosureMarshalVOID_OBJECT Source #

Arguments

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

closure: the Closure to which the marshaller belongs

-> GValue

returnValue: ignored

-> Word32

nParamValues: 2

-> GValue

paramValues: a Value array holding the instance and the Object* parameter

-> Ptr ()

invocationHint: the invocation hint given as the last argument to closureInvoke

-> Ptr ()

marshalData: additional data specified when registering the marshaller

-> m () 

A marshaller for a CClosure with a callback of type void (*callback) (gpointer instance, GObject *arg1, gpointer user_data).

marshalVOID_PARAM

cClosureMarshalVOID_PARAM Source #

Arguments

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

closure: the Closure to which the marshaller belongs

-> GValue

returnValue: ignored

-> Word32

nParamValues: 2

-> GValue

paramValues: a Value array holding the instance and the ParamSpec* parameter

-> Ptr ()

invocationHint: the invocation hint given as the last argument to closureInvoke

-> Ptr ()

marshalData: additional data specified when registering the marshaller

-> m () 

A marshaller for a CClosure with a callback of type void (*callback) (gpointer instance, GParamSpec *arg1, gpointer user_data).

marshalVOID_POINTER

cClosureMarshalVOID_POINTER Source #

Arguments

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

closure: the Closure to which the marshaller belongs

-> GValue

returnValue: ignored

-> Word32

nParamValues: 2

-> GValue

paramValues: a Value array holding the instance and the gpointer parameter

-> Ptr ()

invocationHint: the invocation hint given as the last argument to closureInvoke

-> Ptr ()

marshalData: additional data specified when registering the marshaller

-> m () 

A marshaller for a CClosure with a callback of type void (*callback) (gpointer instance, gpointer arg1, gpointer user_data).

marshalVOID_STRING

cClosureMarshalVOID_STRING Source #

Arguments

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

closure: the Closure to which the marshaller belongs

-> GValue

returnValue: ignored

-> Word32

nParamValues: 2

-> GValue

paramValues: a Value array holding the instance and the gchar* parameter

-> Ptr ()

invocationHint: the invocation hint given as the last argument to closureInvoke

-> Ptr ()

marshalData: additional data specified when registering the marshaller

-> m () 

A marshaller for a CClosure with a callback of type void (*callback) (gpointer instance, const gchar *arg1, gpointer user_data).

marshalVOID_UCHAR

cClosureMarshalVOID_UCHAR Source #

Arguments

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

closure: the Closure to which the marshaller belongs

-> GValue

returnValue: ignored

-> Word32

nParamValues: 2

-> GValue

paramValues: a Value array holding the instance and the guchar parameter

-> Ptr ()

invocationHint: the invocation hint given as the last argument to closureInvoke

-> Ptr ()

marshalData: additional data specified when registering the marshaller

-> m () 

A marshaller for a CClosure with a callback of type void (*callback) (gpointer instance, guchar arg1, gpointer user_data).

marshalVOID_UINT

cClosureMarshalVOID_UINT Source #

Arguments

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

closure: the Closure to which the marshaller belongs

-> GValue

returnValue: ignored

-> Word32

nParamValues: 2

-> GValue

paramValues: a Value array holding the instance and the guint parameter

-> Ptr ()

invocationHint: the invocation hint given as the last argument to closureInvoke

-> Ptr ()

marshalData: additional data specified when registering the marshaller

-> m () 

A marshaller for a CClosure with a callback of type void (*callback) (gpointer instance, guint arg1, gpointer user_data).

marshalVOID_UINTPOINTER

cClosureMarshalVOID_UINTPOINTER Source #

Arguments

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

closure: the Closure to which the marshaller belongs

-> GValue

returnValue: ignored

-> Word32

nParamValues: 3

-> GValue

paramValues: a Value array holding instance, arg1 and arg2

-> Ptr ()

invocationHint: the invocation hint given as the last argument to closureInvoke

-> Ptr ()

marshalData: additional data specified when registering the marshaller

-> m () 

A marshaller for a CClosure with a callback of type void (*callback) (gpointer instance, guint arg1, gpointer arg2, gpointer user_data).

marshalVOID_ULONG

cClosureMarshalVOID_ULONG Source #

Arguments

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

closure: the Closure to which the marshaller belongs

-> GValue

returnValue: ignored

-> Word32

nParamValues: 2

-> GValue

paramValues: a Value array holding the instance and the gulong parameter

-> Ptr ()

invocationHint: the invocation hint given as the last argument to closureInvoke

-> Ptr ()

marshalData: additional data specified when registering the marshaller

-> m () 

A marshaller for a CClosure with a callback of type void (*callback) (gpointer instance, gulong arg1, gpointer user_data).

marshalVOID_VARIANT

cClosureMarshalVOID_VARIANT Source #

Arguments

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

closure: the Closure to which the marshaller belongs

-> GValue

returnValue: ignored

-> Word32

nParamValues: 2

-> GValue

paramValues: a Value array holding the instance and the GVariant* parameter

-> Ptr ()

invocationHint: the invocation hint given as the last argument to closureInvoke

-> Ptr ()

marshalData: additional data specified when registering the marshaller

-> m () 

A marshaller for a CClosure with a callback of type void (*callback) (gpointer instance, GVariant *arg1, gpointer user_data).

Since: 2.26

marshalVOID_VOID

cClosureMarshalVOID_VOID Source #

Arguments

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

closure: the Closure to which the marshaller belongs

-> GValue

returnValue: ignored

-> Word32

nParamValues: 1

-> GValue

paramValues: a Value array holding only the instance

-> Ptr ()

invocationHint: the invocation hint given as the last argument to closureInvoke

-> Ptr ()

marshalData: additional data specified when registering the marshaller

-> m () 

A marshaller for a CClosure with a callback of type void (*callback) (gpointer instance, gpointer user_data).

Properties

callback

the callback function

clearCClosureCallback :: MonadIO m => CClosure -> m () Source #

Set the value of the “callback” field to Nothing. When overloading is enabled, this is equivalent to

clear #callback

getCClosureCallback :: MonadIO m => CClosure -> m (Ptr ()) Source #

Get the value of the “callback” field. When overloading is enabled, this is equivalent to

get cClosure #callback

setCClosureCallback :: MonadIO m => CClosure -> Ptr () -> m () Source #

Set the value of the “callback” field. When overloading is enabled, this is equivalent to

set cClosure [ #callback := value ]

closure

clearCClosureClosure :: MonadIO m => CClosure -> m () Source #

Set the value of the “closure” field to Nothing. When overloading is enabled, this is equivalent to

clear #closure

getCClosureClosure :: MonadIO m => CClosure -> m (Maybe (GClosure ())) Source #

Get the value of the “closure” field. When overloading is enabled, this is equivalent to

get cClosure #closure

setCClosureClosure :: MonadIO m => CClosure -> Ptr (GClosure ()) -> m () Source #

Set the value of the “closure” field. When overloading is enabled, this is equivalent to

set cClosure [ #closure := value ]