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

GI.GObject.Callbacks

Contents

Description

 
Synopsis

Signals

BaseFinalizeFunc

type BaseFinalizeFunc Source #

Arguments

 = TypeClass

gClass: The TypeClass structure to finalize

-> IO () 

A callback function used by the type system to finalize those portions of a derived types class structure that were setup from the corresponding GBaseInitFunc() function. Class finalization basically works the inverse way in which class initialization is performed. See GClassInitFunc() for a discussion of the class initialization process.

type C_BaseFinalizeFunc = Ptr TypeClass -> IO () Source #

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

dynamic_BaseFinalizeFunc Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_BaseFinalizeFunc 
-> TypeClass

gClass: The TypeClass structure to finalize

-> m () 

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

genClosure_BaseFinalizeFunc :: MonadIO m => BaseFinalizeFunc -> m (GClosure C_BaseFinalizeFunc) Source #

Wrap the callback into a GClosure.

mk_BaseFinalizeFunc :: C_BaseFinalizeFunc -> IO (FunPtr C_BaseFinalizeFunc) Source #

Generate a function pointer callable from C code, from a C_BaseFinalizeFunc.

BaseInitFunc

type BaseInitFunc Source #

Arguments

 = TypeClass

gClass: The TypeClass structure to initialize

-> IO () 

A callback function used by the type system to do base initialization of the class structures of derived types. It is called as part of the initialization process of all derived classes and should reallocate or reset all dynamic class members copied over from the parent class. For example, class members (such as strings) that are not sufficiently handled by a plain memory copy of the parent class into the derived class have to be altered. See GClassInitFunc() for a discussion of the class initialization process.

type C_BaseInitFunc = Ptr TypeClass -> IO () Source #

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

dynamic_BaseInitFunc Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_BaseInitFunc 
-> TypeClass

gClass: The TypeClass structure to initialize

-> m () 

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

genClosure_BaseInitFunc :: MonadIO m => BaseInitFunc -> m (GClosure C_BaseInitFunc) Source #

Wrap the callback into a GClosure.

mk_BaseInitFunc :: C_BaseInitFunc -> IO (FunPtr C_BaseInitFunc) Source #

Generate a function pointer callable from C code, from a C_BaseInitFunc.

BindingTransformFunc

type BindingTransformFunc Source #

Arguments

 = Binding

binding: a Binding

-> GValue

fromValue: the Value containing the value to transform

-> GValue

toValue: the Value in which to store the transformed value

-> IO Bool

Returns: True if the transformation was successful, and False otherwise

A function to be called to transform fromValue to toValue. If this is the transformTo function of a binding, then fromValue is the sourceProperty on the source object, and toValue is the targetProperty on the target object. If this is the transformFrom function of a BindingFlagsBidirectional binding, then those roles are reversed.

Since: 2.26

type BindingTransformFunc_WithClosures Source #

Arguments

 = Binding

binding: a Binding

-> GValue

fromValue: the Value containing the value to transform

-> GValue

toValue: the Value in which to store the transformed value

-> Ptr ()

userData: data passed to the transform function

-> IO Bool

Returns: True if the transformation was successful, and False otherwise

A function to be called to transform fromValue to toValue. If this is the transformTo function of a binding, then fromValue is the sourceProperty on the source object, and toValue is the targetProperty on the target object. If this is the transformFrom function of a BindingFlagsBidirectional binding, then those roles are reversed.

Since: 2.26

type C_BindingTransformFunc = Ptr Binding -> Ptr GValue -> Ptr GValue -> Ptr () -> IO CInt Source #

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

dynamic_BindingTransformFunc Source #

Arguments

:: (HasCallStack, MonadIO m, IsBinding a) 
=> FunPtr C_BindingTransformFunc 
-> a

binding: a Binding

-> GValue

fromValue: the Value containing the value to transform

-> GValue

toValue: the Value in which to store the transformed value

-> Ptr ()

userData: data passed to the transform function

-> m Bool

Returns: True if the transformation was successful, and False otherwise

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

genClosure_BindingTransformFunc :: MonadIO m => BindingTransformFunc -> m (GClosure C_BindingTransformFunc) Source #

Wrap the callback into a GClosure.

mk_BindingTransformFunc :: C_BindingTransformFunc -> IO (FunPtr C_BindingTransformFunc) Source #

Generate a function pointer callable from C code, from a C_BindingTransformFunc.

BoxedCopyFunc

type BoxedCopyFunc Source #

Arguments

 = Ptr ()

boxed: The boxed structure to be copied.

-> IO (Ptr ())

Returns: The newly created copy of the boxed structure.

This function is provided by the user and should produce a copy of the passed in boxed structure.

type C_BoxedCopyFunc = Ptr () -> IO (Ptr ()) Source #

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

dynamic_BoxedCopyFunc Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_BoxedCopyFunc 
-> Ptr ()

boxed: The boxed structure to be copied.

-> m (Ptr ())

Returns: The newly created copy of the boxed structure.

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

genClosure_BoxedCopyFunc :: MonadIO m => BoxedCopyFunc -> m (GClosure C_BoxedCopyFunc) Source #

Wrap the callback into a GClosure.

mk_BoxedCopyFunc :: C_BoxedCopyFunc -> IO (FunPtr C_BoxedCopyFunc) Source #

Generate a function pointer callable from C code, from a C_BoxedCopyFunc.

BoxedFreeFunc

type BoxedFreeFunc Source #

Arguments

 = Ptr ()

boxed: The boxed structure to be freed.

-> IO () 

This function is provided by the user and should free the boxed structure passed.

type C_BoxedFreeFunc = Ptr () -> IO () Source #

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

dynamic_BoxedFreeFunc Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_BoxedFreeFunc 
-> Ptr ()

boxed: The boxed structure to be freed.

-> m () 

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

genClosure_BoxedFreeFunc :: MonadIO m => BoxedFreeFunc -> m (GClosure C_BoxedFreeFunc) Source #

Wrap the callback into a GClosure.

mk_BoxedFreeFunc :: C_BoxedFreeFunc -> IO (FunPtr C_BoxedFreeFunc) Source #

Generate a function pointer callable from C code, from a C_BoxedFreeFunc.

Callback

type C_Callback = IO () Source #

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

type Callback = IO () Source #

The type used for callback functions in structure definitions and function signatures. This doesn't mean that all callback functions must take no parameters and return void. The required signature of a callback function is determined by the context in which is used (e.g. the signal to which it is connected). Use G_CALLBACK() to cast the callback function to a Callback.

dynamic_Callback :: (HasCallStack, MonadIO m) => FunPtr C_Callback -> m () Source #

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

genClosure_Callback :: MonadIO m => Callback -> m (GClosure C_Callback) Source #

Wrap the callback into a GClosure.

mk_Callback :: C_Callback -> IO (FunPtr C_Callback) Source #

Generate a function pointer callable from C code, from a C_Callback.

noCallback :: Maybe Callback Source #

A convenience synonym for Nothing :: Maybe Callback.

ClassFinalizeFunc

type C_ClassFinalizeFunc = Ptr TypeClass -> Ptr () -> IO () Source #

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

type ClassFinalizeFunc Source #

Arguments

 = TypeClass

gClass: The TypeClass structure to finalize

-> Ptr ()

classData: The classData member supplied via the TypeInfo structure

-> IO () 

A callback function used by the type system to finalize a class. This function is rarely needed, as dynamically allocated class resources should be handled by GBaseInitFunc() and GBaseFinalizeFunc(). Also, specification of a GClassFinalizeFunc() in the TypeInfo structure of a static type is invalid, because classes of static types will never be finalized (they are artificially kept alive when their reference count drops to zero).

dynamic_ClassFinalizeFunc Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_ClassFinalizeFunc 
-> TypeClass

gClass: The TypeClass structure to finalize

-> Ptr ()

classData: The classData member supplied via the TypeInfo structure

-> m () 

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

genClosure_ClassFinalizeFunc :: MonadIO m => ClassFinalizeFunc -> m (GClosure C_ClassFinalizeFunc) Source #

Wrap the callback into a GClosure.

mk_ClassFinalizeFunc :: C_ClassFinalizeFunc -> IO (FunPtr C_ClassFinalizeFunc) Source #

Generate a function pointer callable from C code, from a C_ClassFinalizeFunc.

ClassInitFunc

type C_ClassInitFunc = Ptr TypeClass -> Ptr () -> IO () Source #

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

type ClassInitFunc Source #

Arguments

 = TypeClass

gClass: The TypeClass structure to initialize.

-> Ptr ()

classData: The classData member supplied via the TypeInfo structure.

-> IO () 

A callback function used by the type system to initialize the class of a specific type. This function should initialize all static class members.

The initialization process of a class involves:

  • Copying common members from the parent class over to the derived class structure.
  • Zero initialization of the remaining members not copied over from the parent class.
  • Invocation of the GBaseInitFunc() initializers of all parent types and the class' type.
  • Invocation of the class' GClassInitFunc() initializer.

Since derived classes are partially initialized through a memory copy of the parent class, the general rule is that GBaseInitFunc() and GBaseFinalizeFunc() should take care of necessary reinitialization and release of those class members that were introduced by the type that specified these GBaseInitFunc()/GBaseFinalizeFunc(). GClassInitFunc() should only care about initializing static class members, while dynamic class members (such as allocated strings or reference counted resources) are better handled by a GBaseInitFunc() for this type, so proper initialization of the dynamic class members is performed for class initialization of derived types as well.

An example may help to correspond the intend of the different class initializers:

C code

typedef struct {
  GObjectClass parent_class;
  gint         static_integer;
  gchar       *dynamic_string;
} TypeAClass;
static void
type_a_base_class_init (TypeAClass *class)
{
  class->dynamic_string = g_strdup ("some string");
}
static void
type_a_base_class_finalize (TypeAClass *class)
{
  g_free (class->dynamic_string);
}
static void
type_a_class_init (TypeAClass *class)
{
  class->static_integer = 42;
}

typedef struct {
  TypeAClass   parent_class;
  gfloat       static_float;
  GString     *dynamic_gstring;
} TypeBClass;
static void
type_b_base_class_init (TypeBClass *class)
{
  class->dynamic_gstring = g_string_new ("some other string");
}
static void
type_b_base_class_finalize (TypeBClass *class)
{
  g_string_free (class->dynamic_gstring);
}
static void
type_b_class_init (TypeBClass *class)
{
  class->static_float = 3.14159265358979323846;
}

Initialization of TypeBClass will first cause initialization of TypeAClass (derived classes reference their parent classes, see typeClassRef on this).

Initialization of TypeAClass roughly involves zero-initializing its fields, then calling its GBaseInitFunc() type_a_base_class_init() to allocate its dynamic members (dynamic_string), and finally calling its GClassInitFunc() type_a_class_init() to initialize its static members (static_integer). The first step in the initialization process of TypeBClass is then a plain memory copy of the contents of TypeAClass into TypeBClass and zero-initialization of the remaining fields in TypeBClass. The dynamic members of TypeAClass within TypeBClass now need reinitialization which is performed by calling type_a_base_class_init() with an argument of TypeBClass.

After that, the GBaseInitFunc() of TypeBClass, type_b_base_class_init() is called to allocate the dynamic members of TypeBClass (dynamic_gstring), and finally the GClassInitFunc() of TypeBClass, type_b_class_init(), is called to complete the initialization process with the static members (static_float).

Corresponding finalization counter parts to the GBaseInitFunc() functions have to be provided to release allocated resources at class finalization time.

dynamic_ClassInitFunc Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_ClassInitFunc 
-> TypeClass

gClass: The TypeClass structure to initialize.

-> Ptr ()

classData: The classData member supplied via the TypeInfo structure.

-> m () 

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

genClosure_ClassInitFunc :: MonadIO m => ClassInitFunc -> m (GClosure C_ClassInitFunc) Source #

Wrap the callback into a GClosure.

mk_ClassInitFunc :: C_ClassInitFunc -> IO (FunPtr C_ClassInitFunc) Source #

Generate a function pointer callable from C code, from a C_ClassInitFunc.

ClosureMarshal

type C_ClosureMarshal = Ptr (GClosure ()) -> Ptr GValue -> Word32 -> Ptr GValue -> Ptr () -> Ptr () -> IO () Source #

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

type ClosureMarshal Source #

Arguments

 = GClosure ()

closure: the Closure to which the marshaller belongs

-> Maybe GValue

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

-> [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()

-> IO () 

The type used for marshaller functions.

dynamic_ClosureMarshal Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_ClosureMarshal 
-> GClosure a

closure: the Closure to which the marshaller belongs

-> Maybe GValue

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

-> [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 () 

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

genClosure_ClosureMarshal :: MonadIO m => ClosureMarshal -> m (GClosure C_ClosureMarshal) Source #

Wrap the callback into a GClosure.

mk_ClosureMarshal :: C_ClosureMarshal -> IO (FunPtr C_ClosureMarshal) Source #

Generate a function pointer callable from C code, from a C_ClosureMarshal.

ClosureMarshalFieldCallback

type C_ClosureMarshalFieldCallback = Ptr (GClosure ()) -> Ptr GValue -> Word32 -> Ptr GValue -> Ptr () -> Ptr () -> IO () Source #

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

type ClosureMarshalFieldCallback = GClosure () -> GValue -> Word32 -> GValue -> Ptr () -> Ptr () -> IO () Source #

No description available in the introspection data.

dynamic_ClosureMarshalFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_ClosureMarshalFieldCallback -> GClosure a -> GValue -> Word32 -> GValue -> Ptr () -> Ptr () -> m () Source #

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

ClosureNotify

type C_ClosureNotify = Ptr () -> Ptr (GClosure ()) -> IO () Source #

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

type ClosureNotify Source #

Arguments

 = Ptr ()

data: data specified when registering the notification callback

-> GClosure ()

closure: the Closure on which the notification is emitted

-> IO () 

The type used for the various notification callbacks which can be registered on closures.

dynamic_ClosureNotify Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_ClosureNotify 
-> Ptr ()

data: data specified when registering the notification callback

-> GClosure a

closure: the Closure on which the notification is emitted

-> m () 

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

genClosure_ClosureNotify :: MonadIO m => ClosureNotify -> m (GClosure C_ClosureNotify) Source #

Wrap the callback into a GClosure.

mk_ClosureNotify :: C_ClosureNotify -> IO (FunPtr C_ClosureNotify) Source #

Generate a function pointer callable from C code, from a C_ClosureNotify.

InitiallyUnownedClassConstructedFieldCallback

type C_InitiallyUnownedClassConstructedFieldCallback = Ptr Object -> IO () Source #

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

type InitiallyUnownedClassConstructedFieldCallback = Object -> IO () Source #

No description available in the introspection data.

dynamic_InitiallyUnownedClassConstructedFieldCallback :: (HasCallStack, MonadIO m, IsObject a) => FunPtr C_InitiallyUnownedClassConstructedFieldCallback -> a -> m () Source #

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

InitiallyUnownedClassDispatchPropertiesChangedFieldCallback

type C_InitiallyUnownedClassDispatchPropertiesChangedFieldCallback = Ptr Object -> Word32 -> Ptr GParamSpec -> IO () Source #

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

type InitiallyUnownedClassDispatchPropertiesChangedFieldCallback = Object -> Word32 -> GParamSpec -> IO () Source #

No description available in the introspection data.

dynamic_InitiallyUnownedClassDispatchPropertiesChangedFieldCallback :: (HasCallStack, MonadIO m, IsObject a) => FunPtr C_InitiallyUnownedClassDispatchPropertiesChangedFieldCallback -> a -> Word32 -> GParamSpec -> m () Source #

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

InitiallyUnownedClassDisposeFieldCallback

type C_InitiallyUnownedClassDisposeFieldCallback = Ptr Object -> IO () Source #

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

type InitiallyUnownedClassDisposeFieldCallback = Object -> IO () Source #

No description available in the introspection data.

dynamic_InitiallyUnownedClassDisposeFieldCallback :: (HasCallStack, MonadIO m, IsObject a) => FunPtr C_InitiallyUnownedClassDisposeFieldCallback -> a -> m () Source #

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

InitiallyUnownedClassFinalizeFieldCallback

type C_InitiallyUnownedClassFinalizeFieldCallback = Ptr Object -> IO () Source #

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

type InitiallyUnownedClassFinalizeFieldCallback = Object -> IO () Source #

No description available in the introspection data.

dynamic_InitiallyUnownedClassFinalizeFieldCallback :: (HasCallStack, MonadIO m, IsObject a) => FunPtr C_InitiallyUnownedClassFinalizeFieldCallback -> a -> m () Source #

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

InitiallyUnownedClassGetPropertyFieldCallback

type C_InitiallyUnownedClassGetPropertyFieldCallback = Ptr Object -> Word32 -> Ptr GValue -> Ptr GParamSpec -> IO () Source #

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

type InitiallyUnownedClassGetPropertyFieldCallback = Object -> Word32 -> GValue -> GParamSpec -> IO () Source #

No description available in the introspection data.

dynamic_InitiallyUnownedClassGetPropertyFieldCallback :: (HasCallStack, MonadIO m, IsObject a) => FunPtr C_InitiallyUnownedClassGetPropertyFieldCallback -> a -> Word32 -> GValue -> GParamSpec -> m () Source #

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

InitiallyUnownedClassNotifyFieldCallback

type C_InitiallyUnownedClassNotifyFieldCallback = Ptr Object -> Ptr GParamSpec -> IO () Source #

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

type InitiallyUnownedClassNotifyFieldCallback Source #

Arguments

 = Object

object: a Object

-> GParamSpec 
-> IO () 

No description available in the introspection data.

dynamic_InitiallyUnownedClassNotifyFieldCallback Source #

Arguments

:: (HasCallStack, MonadIO m, IsObject a) 
=> FunPtr C_InitiallyUnownedClassNotifyFieldCallback 
-> a

object: a Object

-> GParamSpec 
-> m () 

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

InitiallyUnownedClassSetPropertyFieldCallback

type C_InitiallyUnownedClassSetPropertyFieldCallback = Ptr Object -> Word32 -> Ptr GValue -> Ptr GParamSpec -> IO () Source #

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

type InitiallyUnownedClassSetPropertyFieldCallback = Object -> Word32 -> GValue -> GParamSpec -> IO () Source #

No description available in the introspection data.

dynamic_InitiallyUnownedClassSetPropertyFieldCallback :: (HasCallStack, MonadIO m, IsObject a) => FunPtr C_InitiallyUnownedClassSetPropertyFieldCallback -> a -> Word32 -> GValue -> GParamSpec -> m () Source #

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

InstanceInitFunc

type C_InstanceInitFunc = Ptr TypeInstance -> Ptr TypeClass -> IO () Source #

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

type InstanceInitFunc Source #

Arguments

 = TypeInstance

instance: The instance to initialize

-> TypeClass

gClass: The class of the type the instance is created for

-> IO () 

A callback function used by the type system to initialize a new instance of a type. This function initializes all instance members and allocates any resources required by it.

Initialization of a derived instance involves calling all its parent types instance initializers, so the class member of the instance is altered during its initialization to always point to the class that belongs to the type the current initializer was introduced for.

The extended members of instance are guaranteed to have been filled with zeros before this function is called.

dynamic_InstanceInitFunc Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_InstanceInitFunc 
-> TypeInstance

instance: The instance to initialize

-> TypeClass

gClass: The class of the type the instance is created for

-> m () 

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

genClosure_InstanceInitFunc :: MonadIO m => InstanceInitFunc -> m (GClosure C_InstanceInitFunc) Source #

Wrap the callback into a GClosure.

mk_InstanceInitFunc :: C_InstanceInitFunc -> IO (FunPtr C_InstanceInitFunc) Source #

Generate a function pointer callable from C code, from a C_InstanceInitFunc.

InterfaceFinalizeFunc

type C_InterfaceFinalizeFunc = Ptr TypeInterface -> Ptr () -> IO () Source #

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

type InterfaceFinalizeFunc Source #

Arguments

 = TypeInterface

gIface: The interface structure to finalize

-> Ptr ()

ifaceData: The interfaceData supplied via the InterfaceInfo structure

-> IO () 

A callback function used by the type system to finalize an interface. This function should destroy any internal data and release any resources allocated by the corresponding GInterfaceInitFunc() function.

dynamic_InterfaceFinalizeFunc Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_InterfaceFinalizeFunc 
-> TypeInterface

gIface: The interface structure to finalize

-> Ptr ()

ifaceData: The interfaceData supplied via the InterfaceInfo structure

-> m () 

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

genClosure_InterfaceFinalizeFunc :: MonadIO m => InterfaceFinalizeFunc -> m (GClosure C_InterfaceFinalizeFunc) Source #

Wrap the callback into a GClosure.

mk_InterfaceFinalizeFunc :: C_InterfaceFinalizeFunc -> IO (FunPtr C_InterfaceFinalizeFunc) Source #

Generate a function pointer callable from C code, from a C_InterfaceFinalizeFunc.

InterfaceInitFunc

type C_InterfaceInitFunc = Ptr TypeInterface -> Ptr () -> IO () Source #

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

type InterfaceInitFunc Source #

Arguments

 = TypeInterface

gIface: The interface structure to initialize

-> Ptr ()

ifaceData: The interfaceData supplied via the InterfaceInfo structure

-> IO () 

A callback function used by the type system to initialize a new interface. This function should initialize all internal data and allocate any resources required by the interface.

The members of ifaceData are guaranteed to have been filled with zeros before this function is called.

dynamic_InterfaceInitFunc Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_InterfaceInitFunc 
-> TypeInterface

gIface: The interface structure to initialize

-> Ptr ()

ifaceData: The interfaceData supplied via the InterfaceInfo structure

-> m () 

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

genClosure_InterfaceInitFunc :: MonadIO m => InterfaceInitFunc -> m (GClosure C_InterfaceInitFunc) Source #

Wrap the callback into a GClosure.

mk_InterfaceInitFunc :: C_InterfaceInitFunc -> IO (FunPtr C_InterfaceInitFunc) Source #

Generate a function pointer callable from C code, from a C_InterfaceInitFunc.

ObjectClassConstructedFieldCallback

type C_ObjectClassConstructedFieldCallback = Ptr Object -> IO () Source #

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

type ObjectClassConstructedFieldCallback = Object -> IO () Source #

No description available in the introspection data.

dynamic_ObjectClassConstructedFieldCallback :: (HasCallStack, MonadIO m, IsObject a) => FunPtr C_ObjectClassConstructedFieldCallback -> a -> m () Source #

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

ObjectClassDispatchPropertiesChangedFieldCallback

type C_ObjectClassDispatchPropertiesChangedFieldCallback = Ptr Object -> Word32 -> Ptr GParamSpec -> IO () Source #

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

type ObjectClassDispatchPropertiesChangedFieldCallback = Object -> Word32 -> GParamSpec -> IO () Source #

No description available in the introspection data.

dynamic_ObjectClassDispatchPropertiesChangedFieldCallback :: (HasCallStack, MonadIO m, IsObject a) => FunPtr C_ObjectClassDispatchPropertiesChangedFieldCallback -> a -> Word32 -> GParamSpec -> m () Source #

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

ObjectClassDisposeFieldCallback

type C_ObjectClassDisposeFieldCallback = Ptr Object -> IO () Source #

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

type ObjectClassDisposeFieldCallback = Object -> IO () Source #

No description available in the introspection data.

dynamic_ObjectClassDisposeFieldCallback :: (HasCallStack, MonadIO m, IsObject a) => FunPtr C_ObjectClassDisposeFieldCallback -> a -> m () Source #

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

ObjectClassFinalizeFieldCallback

type C_ObjectClassFinalizeFieldCallback = Ptr Object -> IO () Source #

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

type ObjectClassFinalizeFieldCallback = Object -> IO () Source #

No description available in the introspection data.

dynamic_ObjectClassFinalizeFieldCallback :: (HasCallStack, MonadIO m, IsObject a) => FunPtr C_ObjectClassFinalizeFieldCallback -> a -> m () Source #

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

ObjectClassGetPropertyFieldCallback

type C_ObjectClassGetPropertyFieldCallback = Ptr Object -> Word32 -> Ptr GValue -> Ptr GParamSpec -> IO () Source #

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

type ObjectClassGetPropertyFieldCallback = Object -> Word32 -> GValue -> GParamSpec -> IO () Source #

No description available in the introspection data.

dynamic_ObjectClassGetPropertyFieldCallback :: (HasCallStack, MonadIO m, IsObject a) => FunPtr C_ObjectClassGetPropertyFieldCallback -> a -> Word32 -> GValue -> GParamSpec -> m () Source #

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

ObjectClassNotifyFieldCallback

type C_ObjectClassNotifyFieldCallback = Ptr Object -> Ptr GParamSpec -> IO () Source #

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

type ObjectClassNotifyFieldCallback Source #

Arguments

 = Object

object: a Object

-> GParamSpec 
-> IO () 

No description available in the introspection data.

dynamic_ObjectClassNotifyFieldCallback Source #

Arguments

:: (HasCallStack, MonadIO m, IsObject a) 
=> FunPtr C_ObjectClassNotifyFieldCallback 
-> a

object: a Object

-> GParamSpec 
-> m () 

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

ObjectClassSetPropertyFieldCallback

type C_ObjectClassSetPropertyFieldCallback = Ptr Object -> Word32 -> Ptr GValue -> Ptr GParamSpec -> IO () Source #

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

type ObjectClassSetPropertyFieldCallback = Object -> Word32 -> GValue -> GParamSpec -> IO () Source #

No description available in the introspection data.

dynamic_ObjectClassSetPropertyFieldCallback :: (HasCallStack, MonadIO m, IsObject a) => FunPtr C_ObjectClassSetPropertyFieldCallback -> a -> Word32 -> GValue -> GParamSpec -> m () Source #

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

ObjectFinalizeFunc

type C_ObjectFinalizeFunc = Ptr Object -> IO () Source #

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

type ObjectFinalizeFunc Source #

Arguments

 = Object

object: the Object being finalized

-> IO () 

The type of the finalize function of ObjectClass.

dynamic_ObjectFinalizeFunc Source #

Arguments

:: (HasCallStack, MonadIO m, IsObject a) 
=> FunPtr C_ObjectFinalizeFunc 
-> a

object: the Object being finalized

-> m () 

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

genClosure_ObjectFinalizeFunc :: MonadIO m => ObjectFinalizeFunc -> m (GClosure C_ObjectFinalizeFunc) Source #

Wrap the callback into a GClosure.

mk_ObjectFinalizeFunc :: C_ObjectFinalizeFunc -> IO (FunPtr C_ObjectFinalizeFunc) Source #

Generate a function pointer callable from C code, from a C_ObjectFinalizeFunc.

ObjectGetPropertyFunc

type C_ObjectGetPropertyFunc = Ptr Object -> Word32 -> Ptr GValue -> Ptr GParamSpec -> IO () Source #

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

type ObjectGetPropertyFunc Source #

Arguments

 = Object

object: a Object

-> Word32

propertyId: the numeric id under which the property was registered with objectClassInstallProperty.

-> GValue

value: a Value to return the property value in

-> GParamSpec

pspec: the ParamSpec describing the property

-> IO () 

The type of the getProperty function of ObjectClass.

dynamic_ObjectGetPropertyFunc Source #

Arguments

:: (HasCallStack, MonadIO m, IsObject a) 
=> FunPtr C_ObjectGetPropertyFunc 
-> a

object: a Object

-> Word32

propertyId: the numeric id under which the property was registered with objectClassInstallProperty.

-> GValue

value: a Value to return the property value in

-> GParamSpec

pspec: the ParamSpec describing the property

-> m () 

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

genClosure_ObjectGetPropertyFunc :: MonadIO m => ObjectGetPropertyFunc -> m (GClosure C_ObjectGetPropertyFunc) Source #

Wrap the callback into a GClosure.

mk_ObjectGetPropertyFunc :: C_ObjectGetPropertyFunc -> IO (FunPtr C_ObjectGetPropertyFunc) Source #

Generate a function pointer callable from C code, from a C_ObjectGetPropertyFunc.

ObjectSetPropertyFunc

type C_ObjectSetPropertyFunc = Ptr Object -> Word32 -> Ptr GValue -> Ptr GParamSpec -> IO () Source #

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

type ObjectSetPropertyFunc Source #

Arguments

 = Object

object: a Object

-> Word32

propertyId: the numeric id under which the property was registered with objectClassInstallProperty.

-> GValue

value: the new value for the property

-> GParamSpec

pspec: the ParamSpec describing the property

-> IO () 

The type of the setProperty function of ObjectClass.

dynamic_ObjectSetPropertyFunc Source #

Arguments

:: (HasCallStack, MonadIO m, IsObject a) 
=> FunPtr C_ObjectSetPropertyFunc 
-> a

object: a Object

-> Word32

propertyId: the numeric id under which the property was registered with objectClassInstallProperty.

-> GValue

value: the new value for the property

-> GParamSpec

pspec: the ParamSpec describing the property

-> m () 

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

genClosure_ObjectSetPropertyFunc :: MonadIO m => ObjectSetPropertyFunc -> m (GClosure C_ObjectSetPropertyFunc) Source #

Wrap the callback into a GClosure.

mk_ObjectSetPropertyFunc :: C_ObjectSetPropertyFunc -> IO (FunPtr C_ObjectSetPropertyFunc) Source #

Generate a function pointer callable from C code, from a C_ObjectSetPropertyFunc.

ParamSpecTypeInfoFinalizeFieldCallback

type C_ParamSpecTypeInfoFinalizeFieldCallback = Ptr GParamSpec -> IO () Source #

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

type ParamSpecTypeInfoFinalizeFieldCallback = GParamSpec -> IO () Source #

No description available in the introspection data.

dynamic_ParamSpecTypeInfoFinalizeFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_ParamSpecTypeInfoFinalizeFieldCallback -> GParamSpec -> m () Source #

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

ParamSpecTypeInfoInstanceInitFieldCallback

type C_ParamSpecTypeInfoInstanceInitFieldCallback = Ptr GParamSpec -> IO () Source #

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

type ParamSpecTypeInfoInstanceInitFieldCallback = GParamSpec -> IO () Source #

No description available in the introspection data.

dynamic_ParamSpecTypeInfoInstanceInitFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_ParamSpecTypeInfoInstanceInitFieldCallback -> GParamSpec -> m () Source #

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

ParamSpecTypeInfoValueSetDefaultFieldCallback

type C_ParamSpecTypeInfoValueSetDefaultFieldCallback = Ptr GParamSpec -> Ptr GValue -> IO () Source #

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

type ParamSpecTypeInfoValueSetDefaultFieldCallback = GParamSpec -> GValue -> IO () Source #

No description available in the introspection data.

dynamic_ParamSpecTypeInfoValueSetDefaultFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_ParamSpecTypeInfoValueSetDefaultFieldCallback -> GParamSpec -> GValue -> m () Source #

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

ParamSpecTypeInfoValueValidateFieldCallback

type C_ParamSpecTypeInfoValueValidateFieldCallback = Ptr GParamSpec -> Ptr GValue -> IO CInt Source #

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

type ParamSpecTypeInfoValueValidateFieldCallback = GParamSpec -> GValue -> IO Bool Source #

No description available in the introspection data.

dynamic_ParamSpecTypeInfoValueValidateFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_ParamSpecTypeInfoValueValidateFieldCallback -> GParamSpec -> GValue -> m Bool Source #

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

ParamSpecTypeInfoValuesCmpFieldCallback

type C_ParamSpecTypeInfoValuesCmpFieldCallback = Ptr GParamSpec -> Ptr GValue -> Ptr GValue -> IO Int32 Source #

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

type ParamSpecTypeInfoValuesCmpFieldCallback = GParamSpec -> GValue -> GValue -> IO Int32 Source #

No description available in the introspection data.

dynamic_ParamSpecTypeInfoValuesCmpFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_ParamSpecTypeInfoValuesCmpFieldCallback -> GParamSpec -> GValue -> GValue -> m Int32 Source #

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

SignalAccumulator

type C_SignalAccumulator = Ptr SignalInvocationHint -> Ptr GValue -> Ptr GValue -> Ptr () -> IO CInt Source #

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

type SignalAccumulator Source #

Arguments

 = SignalInvocationHint

ihint: Signal invocation hint, see SignalInvocationHint.

-> GValue

returnAccu: Accumulator to collect callback return values in, this is the return value of the current signal emission.

-> GValue

handlerReturn: A Value holding the return value of the signal handler.

-> Ptr ()

data: Callback data that was specified when creating the signal.

-> IO Bool

Returns: The accumulator function returns whether the signal emission should be aborted. Returning False means to abort the current emission and True is returned for continuation.

The signal accumulator is a special callback function that can be used to collect return values of the various callbacks that are called during a signal emission. The signal accumulator is specified at signal creation time, if it is left Nothing, no accumulation of callback return values is performed. The return value of signal emissions is then the value returned by the last callback.

dynamic_SignalAccumulator Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_SignalAccumulator 
-> SignalInvocationHint

ihint: Signal invocation hint, see SignalInvocationHint.

-> GValue

returnAccu: Accumulator to collect callback return values in, this is the return value of the current signal emission.

-> GValue

handlerReturn: A Value holding the return value of the signal handler.

-> Ptr ()

data: Callback data that was specified when creating the signal.

-> m Bool

Returns: The accumulator function returns whether the signal emission should be aborted. Returning False means to abort the current emission and True is returned for continuation.

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

genClosure_SignalAccumulator :: MonadIO m => SignalAccumulator -> m (GClosure C_SignalAccumulator) Source #

Wrap the callback into a GClosure.

mk_SignalAccumulator :: C_SignalAccumulator -> IO (FunPtr C_SignalAccumulator) Source #

Generate a function pointer callable from C code, from a C_SignalAccumulator.

SignalEmissionHook

type C_SignalEmissionHook = Ptr SignalInvocationHint -> Word32 -> Ptr GValue -> Ptr () -> IO CInt Source #

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

type SignalEmissionHook Source #

Arguments

 = SignalInvocationHint

ihint: Signal invocation hint, see SignalInvocationHint.

-> [GValue]

paramValues: the instance on which the signal was emitted, followed by the parameters of the emission.

-> Ptr ()

data: user data associated with the hook.

-> IO Bool

Returns: whether it wants to stay connected. If it returns False, the signal hook is disconnected (and destroyed).

A simple function pointer to get invoked when the signal is emitted. This allows you to tie a hook to the signal type, so that it will trap all emissions of that signal, from any object.

You may not attach these to signals created with the G_SIGNAL_NO_HOOKS flag.

dynamic_SignalEmissionHook Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_SignalEmissionHook 
-> SignalInvocationHint

ihint: Signal invocation hint, see SignalInvocationHint.

-> [GValue]

paramValues: the instance on which the signal was emitted, followed by the parameters of the emission.

-> Ptr ()

data: user data associated with the hook.

-> m Bool

Returns: whether it wants to stay connected. If it returns False, the signal hook is disconnected (and destroyed).

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

genClosure_SignalEmissionHook :: MonadIO m => SignalEmissionHook -> m (GClosure C_SignalEmissionHook) Source #

Wrap the callback into a GClosure.

mk_SignalEmissionHook :: C_SignalEmissionHook -> IO (FunPtr C_SignalEmissionHook) Source #

Generate a function pointer callable from C code, from a C_SignalEmissionHook.

ToggleNotify

type C_ToggleNotify = Ptr () -> Ptr Object -> CInt -> IO () Source #

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

type ToggleNotify Source #

Arguments

 = Ptr ()

data: Callback data passed to g_object_add_toggle_ref()

-> Object

object: The object on which g_object_add_toggle_ref() was called.

-> Bool

isLastRef: True if the toggle reference is now the last reference to the object. False if the toggle reference was the last reference and there are now other references.

-> IO () 

A callback function used for notification when the state of a toggle reference changes. See g_object_add_toggle_ref().

dynamic_ToggleNotify Source #

Arguments

:: (HasCallStack, MonadIO m, IsObject a) 
=> FunPtr C_ToggleNotify 
-> Ptr ()

data: Callback data passed to g_object_add_toggle_ref()

-> a

object: The object on which g_object_add_toggle_ref() was called.

-> Bool

isLastRef: True if the toggle reference is now the last reference to the object. False if the toggle reference was the last reference and there are now other references.

-> m () 

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

genClosure_ToggleNotify :: MonadIO m => ToggleNotify -> m (GClosure C_ToggleNotify) Source #

Wrap the callback into a GClosure.

mk_ToggleNotify :: C_ToggleNotify -> IO (FunPtr C_ToggleNotify) Source #

Generate a function pointer callable from C code, from a C_ToggleNotify.

TypeClassCacheFunc

type C_TypeClassCacheFunc = Ptr () -> Ptr TypeClass -> IO CInt Source #

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

type TypeClassCacheFunc Source #

Arguments

 = Ptr ()

cacheData: data that was given to the g_type_add_class_cache_func() call

-> TypeClass

gClass: The TypeClass structure which is unreferenced

-> IO Bool

Returns: True to stop further GTypeClassCacheFuncs from being called, False to continue

A callback function which is called when the reference count of a class drops to zero. It may use typeClassRef to prevent the class from being freed. You should not call typeClassUnref from a TypeClassCacheFunc function to prevent infinite recursion, use g_type_class_unref_uncached() instead.

The functions have to check the class id passed in to figure whether they actually want to cache the class of this type, since all classes are routed through the same TypeClassCacheFunc chain.

dynamic_TypeClassCacheFunc Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_TypeClassCacheFunc 
-> Ptr ()

cacheData: data that was given to the g_type_add_class_cache_func() call

-> TypeClass

gClass: The TypeClass structure which is unreferenced

-> m Bool

Returns: True to stop further GTypeClassCacheFuncs from being called, False to continue

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

genClosure_TypeClassCacheFunc :: MonadIO m => TypeClassCacheFunc -> m (GClosure C_TypeClassCacheFunc) Source #

Wrap the callback into a GClosure.

mk_TypeClassCacheFunc :: C_TypeClassCacheFunc -> IO (FunPtr C_TypeClassCacheFunc) Source #

Generate a function pointer callable from C code, from a C_TypeClassCacheFunc.

TypeInterfaceCheckFunc

type C_TypeInterfaceCheckFunc = Ptr () -> Ptr TypeInterface -> IO () Source #

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

type TypeInterfaceCheckFunc Source #

Arguments

 = Ptr ()

checkData: data passed to g_type_add_interface_check()

-> TypeInterface

gIface: the interface that has been initialized

-> IO () 

A callback called after an interface vtable is initialized. See g_type_add_interface_check().

Since: 2.4

dynamic_TypeInterfaceCheckFunc Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_TypeInterfaceCheckFunc 
-> Ptr ()

checkData: data passed to g_type_add_interface_check()

-> TypeInterface

gIface: the interface that has been initialized

-> m () 

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

genClosure_TypeInterfaceCheckFunc :: MonadIO m => TypeInterfaceCheckFunc -> m (GClosure C_TypeInterfaceCheckFunc) Source #

Wrap the callback into a GClosure.

TypePluginCompleteInterfaceInfo

type C_TypePluginCompleteInterfaceInfo = Ptr TypePlugin -> CGType -> CGType -> Ptr InterfaceInfo -> IO () Source #

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

type TypePluginCompleteInterfaceInfo Source #

Arguments

 = TypePlugin

plugin: the TypePlugin

-> GType

instanceType: the GType of an instantiable type to which the interface is added

-> GType

interfaceType: the GType of the interface whose info is completed

-> InterfaceInfo

info: the InterfaceInfo to fill in

-> IO () 

The type of the completeInterfaceInfo function of GTypePluginClass.

dynamic_TypePluginCompleteInterfaceInfo Source #

Arguments

:: (HasCallStack, MonadIO m, IsTypePlugin a) 
=> FunPtr C_TypePluginCompleteInterfaceInfo 
-> a

plugin: the TypePlugin

-> GType

instanceType: the GType of an instantiable type to which the interface is added

-> GType

interfaceType: the GType of the interface whose info is completed

-> InterfaceInfo

info: the InterfaceInfo to fill in

-> m () 

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

TypePluginCompleteTypeInfo

type C_TypePluginCompleteTypeInfo = Ptr TypePlugin -> CGType -> Ptr TypeInfo -> Ptr TypeValueTable -> IO () Source #

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

type TypePluginCompleteTypeInfo Source #

Arguments

 = TypePlugin

plugin: the TypePlugin

-> GType

gType: the GType whose info is completed

-> TypeInfo

info: the TypeInfo struct to fill in

-> TypeValueTable

valueTable: the TypeValueTable to fill in

-> IO () 

The type of the completeTypeInfo function of GTypePluginClass.

dynamic_TypePluginCompleteTypeInfo Source #

Arguments

:: (HasCallStack, MonadIO m, IsTypePlugin a) 
=> FunPtr C_TypePluginCompleteTypeInfo 
-> a

plugin: the TypePlugin

-> GType

gType: the GType whose info is completed

-> TypeInfo

info: the TypeInfo struct to fill in

-> TypeValueTable

valueTable: the TypeValueTable to fill in

-> m () 

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

TypePluginUnuse

type C_TypePluginUnuse = Ptr TypePlugin -> IO () Source #

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

type TypePluginUnuse Source #

Arguments

 = TypePlugin

plugin: the TypePlugin whose use count should be decreased

-> IO () 

The type of the unusePlugin function of GTypePluginClass.

dynamic_TypePluginUnuse Source #

Arguments

:: (HasCallStack, MonadIO m, IsTypePlugin a) 
=> FunPtr C_TypePluginUnuse 
-> a

plugin: the TypePlugin whose use count should be decreased

-> m () 

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

genClosure_TypePluginUnuse :: MonadIO m => TypePluginUnuse -> m (GClosure C_TypePluginUnuse) Source #

Wrap the callback into a GClosure.

mk_TypePluginUnuse :: C_TypePluginUnuse -> IO (FunPtr C_TypePluginUnuse) Source #

Generate a function pointer callable from C code, from a C_TypePluginUnuse.

TypePluginUse

type C_TypePluginUse = Ptr TypePlugin -> IO () Source #

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

type TypePluginUse Source #

Arguments

 = TypePlugin

plugin: the TypePlugin whose use count should be increased

-> IO () 

The type of the usePlugin function of GTypePluginClass, which gets called to increase the use count of plugin.

dynamic_TypePluginUse Source #

Arguments

:: (HasCallStack, MonadIO m, IsTypePlugin a) 
=> FunPtr C_TypePluginUse 
-> a

plugin: the TypePlugin whose use count should be increased

-> m () 

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

genClosure_TypePluginUse :: MonadIO m => TypePluginUse -> m (GClosure C_TypePluginUse) Source #

Wrap the callback into a GClosure.

mk_TypePluginUse :: C_TypePluginUse -> IO (FunPtr C_TypePluginUse) Source #

Generate a function pointer callable from C code, from a C_TypePluginUse.

TypeValueTableCollectValueFieldCallback

type C_TypeValueTableCollectValueFieldCallback = Ptr GValue -> Word32 -> Ptr TypeCValue -> Word32 -> IO CString Source #

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

type TypeValueTableCollectValueFieldCallback = GValue -> Word32 -> TypeCValue -> Word32 -> IO Text Source #

No description available in the introspection data.

dynamic_TypeValueTableCollectValueFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_TypeValueTableCollectValueFieldCallback -> GValue -> Word32 -> TypeCValue -> Word32 -> m Text Source #

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

TypeValueTableLcopyValueFieldCallback

type C_TypeValueTableLcopyValueFieldCallback = Ptr GValue -> Word32 -> Ptr TypeCValue -> Word32 -> IO CString Source #

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

type TypeValueTableLcopyValueFieldCallback = GValue -> Word32 -> TypeCValue -> Word32 -> IO Text Source #

No description available in the introspection data.

dynamic_TypeValueTableLcopyValueFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_TypeValueTableLcopyValueFieldCallback -> GValue -> Word32 -> TypeCValue -> Word32 -> m Text Source #

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

TypeValueTableValueCopyFieldCallback

type C_TypeValueTableValueCopyFieldCallback = Ptr GValue -> Ptr GValue -> IO () Source #

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

type TypeValueTableValueCopyFieldCallback = GValue -> GValue -> IO () Source #

No description available in the introspection data.

dynamic_TypeValueTableValueCopyFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_TypeValueTableValueCopyFieldCallback -> GValue -> GValue -> m () Source #

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

TypeValueTableValueFreeFieldCallback

type C_TypeValueTableValueFreeFieldCallback = Ptr GValue -> IO () Source #

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

type TypeValueTableValueFreeFieldCallback = GValue -> IO () Source #

No description available in the introspection data.

dynamic_TypeValueTableValueFreeFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_TypeValueTableValueFreeFieldCallback -> GValue -> m () Source #

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

TypeValueTableValueInitFieldCallback

type C_TypeValueTableValueInitFieldCallback = Ptr GValue -> IO () Source #

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

type TypeValueTableValueInitFieldCallback = GValue -> IO () Source #

No description available in the introspection data.

dynamic_TypeValueTableValueInitFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_TypeValueTableValueInitFieldCallback -> GValue -> m () Source #

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

TypeValueTableValuePeekPointerFieldCallback

type C_TypeValueTableValuePeekPointerFieldCallback = Ptr GValue -> IO (Ptr ()) Source #

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

type TypeValueTableValuePeekPointerFieldCallback = GValue -> IO (Ptr ()) Source #

No description available in the introspection data.

dynamic_TypeValueTableValuePeekPointerFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_TypeValueTableValuePeekPointerFieldCallback -> GValue -> m (Ptr ()) Source #

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

ValueTransform

type C_ValueTransform = Ptr GValue -> Ptr GValue -> IO () Source #

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

type ValueTransform Source #

Arguments

 = GValue

srcValue: Source value.

-> GValue

destValue: Target value.

-> IO () 

The type of value transformation functions which can be registered with g_value_register_transform_func().

destValue will be initialized to the correct destination type.

dynamic_ValueTransform Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_ValueTransform 
-> GValue

srcValue: Source value.

-> GValue

destValue: Target value.

-> m () 

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

genClosure_ValueTransform :: MonadIO m => ValueTransform -> m (GClosure C_ValueTransform) Source #

Wrap the callback into a GClosure.

mk_ValueTransform :: C_ValueTransform -> IO (FunPtr C_ValueTransform) Source #

Generate a function pointer callable from C code, from a C_ValueTransform.

WeakNotify

type C_WeakNotify = Ptr () -> Ptr Object -> IO () Source #

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

type WeakNotify Source #

Arguments

 = Ptr ()

data: data that was provided when the weak reference was established

-> Object

whereTheObjectWas: the object being finalized

-> IO () 

A WeakNotify function can be added to an object as a callback that gets triggered when the object is finalized. Since the object is already being finalized when the WeakNotify is called, there's not much you could do with the object, apart from e.g. using its address as hash-index or the like.

dynamic_WeakNotify Source #

Arguments

:: (HasCallStack, MonadIO m, IsObject a) 
=> FunPtr C_WeakNotify 
-> Ptr ()

data: data that was provided when the weak reference was established

-> a

whereTheObjectWas: the object being finalized

-> m () 

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

genClosure_WeakNotify :: MonadIO m => WeakNotify -> m (GClosure C_WeakNotify) Source #

Wrap the callback into a GClosure.

mk_WeakNotify :: C_WeakNotify -> IO (FunPtr C_WeakNotify) Source #

Generate a function pointer callable from C code, from a C_WeakNotify.

noWeakNotify :: Maybe WeakNotify Source #

A convenience synonym for Nothing :: Maybe WeakNotify.