gi-gobject-2.0.31: GObject bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
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

BoxedPtr CClosure Source # 
Instance details

Defined in GI.GObject.Structs.CClosure

CallocPtr CClosure Source # 
Instance details

Defined in GI.GObject.Structs.CClosure

ManagedPtrNewtype CClosure Source # 
Instance details

Defined in GI.GObject.Structs.CClosure

Methods

toManagedPtr :: CClosure -> ManagedPtr 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

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 ClosureMarshal 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: 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 ClosureMarshal function for use with signals with handlers that take a flags type as an argument and return a boolean. If you have such a signal, you will probably also need to use an accumulator, such as signalAccumulatorTrueHandled.

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: 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 ClosureMarshal function for use with signals with handlers that take a Object and a pointer and produce a string. It is highly unlikely that your signal handler fits this description.

marshalVOID_BOOLEAN

cClosureMarshalVOID_BOOLEAN 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 ClosureMarshal function for use with signals with a single boolean argument.

marshalVOID_BOXED

cClosureMarshalVOID_BOXED 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 ClosureMarshal function for use with signals with a single argument which is any boxed pointer type.

marshalVOID_CHAR

cClosureMarshalVOID_CHAR 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 ClosureMarshal function for use with signals with a single character argument.

marshalVOID_DOUBLE

cClosureMarshalVOID_DOUBLE 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 ClosureMarshal function for use with signals with one double-precision floating point argument.

marshalVOID_ENUM

cClosureMarshalVOID_ENUM 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 ClosureMarshal function for use with signals with a single argument with an enumerated type.

marshalVOID_FLAGS

cClosureMarshalVOID_FLAGS 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 ClosureMarshal function for use with signals with a single argument with a flags types.

marshalVOID_FLOAT

cClosureMarshalVOID_FLOAT 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 ClosureMarshal function for use with signals with one single-precision floating point argument.

marshalVOID_INT

cClosureMarshalVOID_INT 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 ClosureMarshal function for use with signals with a single integer argument.

marshalVOID_LONG

cClosureMarshalVOID_LONG 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 ClosureMarshal function for use with signals with with a single long integer argument.

marshalVOID_OBJECT

cClosureMarshalVOID_OBJECT 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 ClosureMarshal function for use with signals with a single Object argument.

marshalVOID_PARAM

cClosureMarshalVOID_PARAM 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 ClosureMarshal function for use with signals with a single argument of type ParamSpec.

marshalVOID_POINTER

cClosureMarshalVOID_POINTER 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 ClosureMarshal function for use with signals with a single raw pointer argument type.

If it is possible, it is better to use one of the more specific functions such as cclosureMarshalVOID_OBJECT or cclosureMarshalVOID_OBJECT.

marshalVOID_STRING

cClosureMarshalVOID_STRING 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 ClosureMarshal function for use with signals with a single string argument.

marshalVOID_UCHAR

cClosureMarshalVOID_UCHAR 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 ClosureMarshal function for use with signals with a single unsigned character argument.

marshalVOID_UINT

cClosureMarshalVOID_UINT 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 ClosureMarshal function for use with signals with with a single unsigned integer argument.

marshalVOID_UINTPOINTER

cClosureMarshalVOID_UINTPOINTER 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 ClosureMarshal function for use with signals with an unsigned int and a pointer as arguments.

marshalVOID_ULONG

cClosureMarshalVOID_ULONG 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 ClosureMarshal function for use with signals with a single unsigned long integer argument.

marshalVOID_VARIANT

cClosureMarshalVOID_VARIANT 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 ClosureMarshal function for use with signals with a single GVariant argument.

marshalVOID_VOID

cClosureMarshalVOID_VOID 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 ClosureMarshal function for use with signals with no arguments.

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 ]