gi-gmodule-2.0.1: GModule bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.GModule.Callbacks

Description

 
Synopsis

Signals

ModuleCheckInit

type C_ModuleCheckInit = Ptr Module -> IO CString Source #

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

type ModuleCheckInit Source #

Arguments

 = Module

module: the Module corresponding to the module which has just been loaded

-> IO Text

Returns: Nothing on success, or a string describing the initialization error

Specifies the type of the module initialization function. If a module contains a function named g_module_check_init() it is called automatically when the module is loaded. It is passed the Module structure and should return Nothing on success or a string describing the initialization error.

dynamic_ModuleCheckInit Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_ModuleCheckInit 
-> Module

module: the Module corresponding to the module which has just been loaded

-> m Text

Returns: Nothing on success, or a string describing the initialization error

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

genClosure_ModuleCheckInit :: MonadIO m => ModuleCheckInit -> m (GClosure C_ModuleCheckInit) Source #

Wrap the callback into a GClosure.

mk_ModuleCheckInit :: C_ModuleCheckInit -> IO (FunPtr C_ModuleCheckInit) Source #

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

ModuleUnload

type C_ModuleUnload = Ptr Module -> IO () Source #

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

type ModuleUnload Source #

Arguments

 = Module

module: the Module about to be unloaded

-> IO () 

Specifies the type of the module function called when it is unloaded. If a module contains a function named g_module_unload() it is called automatically when the module is unloaded. It is passed the Module structure.

dynamic_ModuleUnload Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_ModuleUnload 
-> Module

module: the Module about to be unloaded

-> m () 

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

genClosure_ModuleUnload :: MonadIO m => ModuleUnload -> m (GClosure C_ModuleUnload) Source #

Wrap the callback into a GClosure.

mk_ModuleUnload :: C_ModuleUnload -> IO (FunPtr C_ModuleUnload) Source #

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