gi-glib-2.0.12: GLib bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.GLib.Callbacks

Contents

Description

 

Synopsis

Signals

ChildWatchFunc

type C_ChildWatchFunc = Int32 -> Int32 -> Ptr () -> IO () Source #

dynamic_ChildWatchFunc Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_ChildWatchFunc 
-> Int32

pid: the process id of the child process

-> Int32

status: Status information about the child process, encoded in a platform-specific manner

-> Ptr ()

userData: user data passed to g_child_watch_add()

-> m () 

CompareDataFunc

type C_CompareDataFunc = Ptr () -> Ptr () -> Ptr () -> IO Int32 Source #

type CompareDataFunc = Ptr () -> Ptr () -> IO Int32 Source #

dynamic_CompareDataFunc Source #

Arguments

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

a: a value

-> Ptr ()

b: a value to compare with

-> Ptr ()

userData: user data

-> m Int32

Returns: negative value if a < b; zero if a = b; positive value if a > b

CompareFunc

type C_CompareFunc = Ptr () -> Ptr () -> IO Int32 Source #

type CompareFunc = Ptr () -> Ptr () -> IO Int32 Source #

dynamic_CompareFunc Source #

Arguments

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

a: a value

-> Ptr ()

b: a value to compare with

-> m Int32

Returns: negative value if a < b; zero if a = b; positive value if a > b

CopyFunc

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

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

dynamic_CopyFunc Source #

Arguments

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

src: A pointer to the data which should be copied

-> Ptr ()

data: Additional data

-> m (Ptr ())

Returns: A pointer to the copy

DataForeachFunc

type C_DataForeachFunc = Word32 -> Ptr () -> Ptr () -> IO () Source #

type DataForeachFunc = Word32 -> Ptr () -> IO () Source #

dynamic_DataForeachFunc Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_DataForeachFunc 
-> Word32

keyId: the GQuark id to identifying the data element.

-> Ptr ()

data: the data element.

-> Ptr ()

userData: user data passed to g_dataset_foreach().

-> m () 

DestroyNotify

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

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

dynamic_DestroyNotify Source #

Arguments

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

data: the data element.

-> m () 

DuplicateFunc

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

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

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

dynamic_DuplicateFunc Source #

Arguments

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

data: the data to duplicate

-> Ptr ()

userData: user data that was specified in g_datalist_id_dup_data()

-> m (Ptr ())

Returns: a duplicate of data

EqualFunc

type C_EqualFunc = Ptr () -> Ptr () -> IO CInt Source #

type EqualFunc = Ptr () -> Ptr () -> IO Bool Source #

dynamic_EqualFunc Source #

Arguments

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

a: a value

-> Ptr ()

b: a value to compare with

-> m Bool

Returns: True if a = b; False otherwise

FreeFunc

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

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

dynamic_FreeFunc Source #

Arguments

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

data: a data pointer

-> m () 

Func

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

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

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

dynamic_Func Source #

Arguments

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

data: the element's data

-> Ptr ()

userData: user data passed to g_list_foreach() or g_slist_foreach()

-> m () 

HFunc

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

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

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

dynamic_HFunc Source #

Arguments

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

key: a key

-> Ptr ()

value: the value corresponding to the key

-> Ptr ()

userData: user data passed to g_hash_table_foreach()

-> m () 

wrap_HFunc :: Maybe (Ptr (FunPtr C_HFunc)) -> HFunc_WithClosures -> Ptr () -> Ptr () -> Ptr () -> IO () Source #

HRFunc

type C_HRFunc = Ptr () -> Ptr () -> Ptr () -> IO CInt Source #

type HRFunc = Ptr () -> Ptr () -> IO Bool Source #

type HRFunc_WithClosures = Ptr () -> Ptr () -> Ptr () -> IO Bool Source #

dynamic_HRFunc Source #

Arguments

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

key: a key

-> Ptr ()

value: the value associated with the key

-> Ptr ()

userData: user data passed to hashTableRemove

-> m Bool

Returns: True if the key/value pair should be removed from the HashTable

HashFunc

type HashFunc = Ptr () -> IO Word32 Source #

dynamic_HashFunc Source #

Arguments

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

key: a key

-> m Word32

Returns: the hash value corresponding to the key

HookCheckFunc

dynamic_HookCheckFunc Source #

Arguments

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

data: the data field of the Hook is passed to the hook function here

-> m Bool

Returns: False if the Hook should be destroyed

HookCheckMarshaller

dynamic_HookCheckMarshaller Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_HookCheckMarshaller 
-> Hook

hook: a Hook

-> Ptr ()

marshalData: user data

-> m Bool

Returns: False if hook should be destroyed

HookCompareFunc

dynamic_HookCompareFunc Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_HookCompareFunc 
-> Hook

newHook: the Hook being inserted

-> Hook

sibling: the Hook to compare with newHook

-> m Int32

Returns: a value <= 0 if newHook should be before sibling

HookFinalizeFunc

dynamic_HookFinalizeFunc Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_HookFinalizeFunc 
-> HookList

hookList: a HookList

-> Hook

hook: the hook in hookList that gets finalized

-> m () 

HookFindFunc

type HookFindFunc = Hook -> Ptr () -> IO Bool Source #

dynamic_HookFindFunc Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_HookFindFunc 
-> Hook

hook: a Hook

-> Ptr ()

data: user data passed to g_hook_find_func()

-> m Bool

Returns: True if the required Hook has been found

HookFunc

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

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

dynamic_HookFunc Source #

Arguments

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

data: the data field of the Hook is passed to the hook function here

-> m () 

HookMarshaller

type C_HookMarshaller = Ptr Hook -> Ptr () -> IO () Source #

type HookMarshaller = Hook -> Ptr () -> IO () Source #

dynamic_HookMarshaller Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_HookMarshaller 
-> Hook

hook: a Hook

-> Ptr ()

marshalData: user data

-> m () 

IOFunc

type IOFunc = IOChannel -> [IOCondition] -> Ptr () -> IO Bool Source #

dynamic_IOFunc Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_IOFunc 
-> IOChannel

source: the IOChannel event source

-> [IOCondition]

condition: the condition which has been satisfied

-> Ptr ()

data: user data set in g_io_add_watch() or ioAddWatch

-> m Bool

Returns: the function should return False if the event source should be removed

IOFuncsIoCloseFieldCallback

IOFuncsIoCreateWatchFieldCallback

IOFuncsIoFreeFieldCallback

IOFuncsIoGetFlagsFieldCallback

IOFuncsIoReadFieldCallback

IOFuncsIoSeekFieldCallback

IOFuncsIoSetFlagsFieldCallback

IOFuncsIoWriteFieldCallback

LogFunc

type C_LogFunc = CString -> CUInt -> CString -> Ptr () -> IO () Source #

type LogFunc = Text -> [LogLevelFlags] -> Text -> IO () Source #

dynamic_LogFunc Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_LogFunc 
-> Text

logDomain: the log domain of the message

-> [LogLevelFlags]

logLevel: the log level of the message (including the fatal and recursion flags)

-> Text

message: the message to process

-> Ptr ()

userData: user data, set in g_log_set_handler()

-> m () 

LogWriterFunc

dynamic_LogWriterFunc Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_LogWriterFunc 
-> [LogLevelFlags]

logLevel: log level of the message

-> [LogField]

fields: fields forming the message

-> Ptr ()

userData: user data passed to logSetWriterFunc

-> m LogWriterOutput

Returns: LogWriterOutputHandled if the log entry was handled successfully; LogWriterOutputUnhandled otherwise

MarkupParserEndElementFieldCallback

MarkupParserErrorFieldCallback

MarkupParserPassthroughFieldCallback

MarkupParserStartElementFieldCallback

MarkupParserTextFieldCallback

MemVTableCallocFieldCallback

MemVTableFreeFieldCallback

MemVTableMallocFieldCallback

MemVTableReallocFieldCallback

MemVTableTryMallocFieldCallback

MemVTableTryReallocFieldCallback

NodeForeachFunc

type C_NodeForeachFunc = Ptr Node -> Ptr () -> IO () Source #

type NodeForeachFunc = Node -> Ptr () -> IO () Source #

dynamic_NodeForeachFunc Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_NodeForeachFunc 
-> Node

node: a Node.

-> Ptr ()

data: user data passed to g_node_children_foreach().

-> m () 

NodeTraverseFunc

dynamic_NodeTraverseFunc Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_NodeTraverseFunc 
-> Node

node: a Node.

-> Ptr ()

data: user data passed to g_node_traverse().

-> m Bool

Returns: True to stop the traversal.

OptionArgFunc

type OptionArgFunc = Text -> Text -> Ptr () -> IO () Source #

dynamic_OptionArgFunc Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_OptionArgFunc 
-> Text

optionName: The name of the option being parsed. This will be either a single dash followed by a single letter (for a short name) or two dashes followed by a long option name.

-> Text

value: The value to be parsed.

-> Ptr ()

data: User data added to the OptionGroup containing the option when it was created with optionGroupNew

-> m ()

(Can throw GError)

OptionErrorFunc

dynamic_OptionErrorFunc Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_OptionErrorFunc 
-> OptionContext

context: The active OptionContext

-> OptionGroup

group: The group to which the function belongs

-> Ptr ()

data: User data added to the OptionGroup containing the option when it was created with optionGroupNew

-> m ()

(Can throw GError)

OptionParseFunc

dynamic_OptionParseFunc Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_OptionParseFunc 
-> OptionContext

context: The active OptionContext

-> OptionGroup

group: The group to which the function belongs

-> Ptr ()

data: User data added to the OptionGroup containing the option when it was created with optionGroupNew

-> m ()

(Can throw GError)

PollFunc

dynamic_PollFunc Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_PollFunc 
-> PollFD

ufds: an array of PollFD elements

-> Word32

nfsd: the number of elements in ufds

-> Int32

timeout_: the maximum time to wait for an event of the file descriptors. A negative value indicates an infinite timeout.

-> m Int32

Returns: the number of PollFD elements which have events or errors reported, or -1 if an error occurred.

PrintFunc

type PrintFunc = Text -> IO () Source #

dynamic_PrintFunc Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_PrintFunc 
-> Text

string: the message to output

-> m () 

RegexEvalCallback

dynamic_RegexEvalCallback Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_RegexEvalCallback 
-> MatchInfo

matchInfo: the MatchInfo generated by the match. Use matchInfoGetRegex and matchInfoGetString if you need the Regex or the matched string.

-> String

result: a String containing the new string

-> Ptr ()

userData: user data passed to g_regex_replace_eval()

-> m Bool

Returns: False to continue the replacement process, True to stop it

ScannerMsgFunc

dynamic_ScannerMsgFunc Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_ScannerMsgFunc 
-> Scanner

scanner: a Scanner

-> Text

message: the message

-> Bool

error: True if the message signals an error, False if it signals a warning.

-> m () 

SequenceIterCompareFunc

dynamic_SequenceIterCompareFunc Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_SequenceIterCompareFunc 
-> SequenceIter

a: a SequenceIter

-> SequenceIter

b: a SequenceIter

-> Ptr ()

data: user data

-> m Int32

Returns: zero if the iterators are equal, a negative value if a comes before b, and a positive value if b comes before a.

SourceCallbackFuncsRefFieldCallback

SourceCallbackFuncsUnrefFieldCallback

SourceDummyMarshal

SourceFunc

dynamic_SourceFunc Source #

Arguments

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

userData: data passed to the function, set when the source was created with one of the above functions

-> m Bool

Returns: False if the source should be removed. SOURCE_CONTINUE and SOURCE_REMOVE are more memorable names for the return value.

SourceFuncsCheckFieldCallback

SourceFuncsFinalizeFieldCallback

SourceFuncsPrepareFieldCallback

SpawnChildSetupFunc

dynamic_SpawnChildSetupFunc Source #

Arguments

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

userData: user data to pass to the function.

-> m () 

TestDataFunc

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

dynamic_TestDataFunc Source #

Arguments

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

userData: the data provided when registering the test

-> m () 

TestFixtureFunc

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

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

dynamic_TestFixtureFunc Source #

Arguments

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

fixture: the test fixture

-> Ptr ()

userData: the data provided when registering the test

-> m () 

TestFunc

type C_TestFunc = IO () Source #

type TestFunc = IO () Source #

TestLogFatalFunc

dynamic_TestLogFatalFunc Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_TestLogFatalFunc 
-> Text

logDomain: the log domain of the message

-> [LogLevelFlags]

logLevel: the log level of the message (including the fatal and recursion flags)

-> Text

message: the message to process

-> Ptr ()

userData: user data, set in g_test_log_set_fatal_handler()

-> m Bool

Returns: True if the program should abort, False otherwise

ThreadFunc

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

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

dynamic_ThreadFunc Source #

Arguments

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

data: data passed to the thread

-> m (Ptr ())

Returns: the return value of the thread

TranslateFunc

type TranslateFunc = Text -> Ptr () -> IO Text Source #

dynamic_TranslateFunc Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_TranslateFunc 
-> Text

str: the untranslated string

-> Ptr ()

data: user data specified when installing the function, e.g. in optionGroupSetTranslateFunc

-> m Text

Returns: a translation of the string for the current locale. The returned string is owned by GLib and must not be freed.

TraverseFunc

type C_TraverseFunc = Ptr () -> Ptr () -> Ptr () -> IO CInt Source #

type TraverseFunc = Ptr () -> Ptr () -> Ptr () -> IO Bool Source #

dynamic_TraverseFunc Source #

Arguments

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

key: a key of a Tree node

-> Ptr ()

value: the value corresponding to the key

-> Ptr ()

data: user data passed to g_tree_traverse()

-> m Bool

Returns: True to stop the traversal

UnixFDSourceFunc

dynamic_UnixFDSourceFunc Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_UnixFDSourceFunc 
-> Int32

fd: the fd that triggered the event

-> [IOCondition]

condition: the IO conditions reported on fd

-> Ptr ()

userData: user data passed to g_unix_fd_add()

-> m Bool

Returns: False if the source should be removed

VoidFunc

type C_VoidFunc = IO () Source #

type VoidFunc = IO () Source #