gi-glib-2.0.13: 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.Structs.Hook

Contents

Description

The Hook struct represents a single hook function in a HookList.

Synopsis

Exported types

newtype Hook Source #

Constructors

Hook (ManagedPtr Hook) 

newZeroHook :: MonadIO m => m Hook Source #

Construct a Hook struct initialized to zero.

Methods

compareIds

hookCompareIds Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Hook

newHook: a Hook

-> Hook

sibling: a Hook to compare with newHook

-> m Int32

Returns: a value <= 0 if the id of sibling is >= the id of newHook

Compares the ids of two Hook elements, returning a negative value if the second id is greater than the first.

destroy

hookDestroy Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> HookList

hookList: a HookList

-> CULong

hookId: a hook ID

-> m Bool

Returns: True if the Hook was found in the HookList and destroyed

Destroys a Hook, given its ID.

destroyLink

hookDestroyLink Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> HookList

hookList: a HookList

-> Hook

hook: the Hook to remove

-> m () 

Removes one Hook from a HookList, marking it inactive and calling hookUnref on it.

free

hookFree Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> HookList

hookList: a HookList

-> Hook

hook: the Hook to free

-> m () 

Calls the HookList finalizeHook function if it exists, and frees the memory allocated for the Hook.

insertBefore

hookInsertBefore Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> HookList

hookList: a HookList

-> Maybe Hook

sibling: the Hook to insert the new Hook before

-> Hook

hook: the Hook to insert

-> m () 

Inserts a Hook into a HookList, before a given Hook.

prepend

hookPrepend Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> HookList

hookList: a HookList

-> Hook

hook: the Hook to add to the start of hookList

-> m () 

Prepends a Hook on the start of a HookList.

unref

hookUnref Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> HookList

hookList: a HookList

-> Hook

hook: the Hook to unref

-> m () 

Decrements the reference count of a Hook. If the reference count falls to 0, the Hook is removed from the HookList and hookFree is called to free it.

Properties

data

getHookData :: MonadIO m => Hook -> m (Ptr ()) Source #

setHookData :: MonadIO m => Hook -> Ptr () -> m () Source #

destroy

flags

setHookFlags :: MonadIO m => Hook -> Word32 -> m () Source #

func

getHookFunc :: MonadIO m => Hook -> m (Ptr ()) Source #

setHookFunc :: MonadIO m => Hook -> Ptr () -> m () Source #

hookId

next

setHookNext :: MonadIO m => Hook -> Ptr Hook -> m () Source #

prev

setHookPrev :: MonadIO m => Hook -> Ptr Hook -> m () Source #

refCount