gi-atk-2.0.20: Atk bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (inaki@blueleaf.cc)
Safe HaskellNone
LanguageHaskell2010

GI.Atk.Callbacks

Contents

Description

 
Synopsis

Signals

EventListener

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

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

type EventListener Source #

Arguments

 = Object

obj: An Object instance for whom the callback will be called when the specified event (e.g. 'focus:') takes place.

-> IO () 

A function which is called when an object emits a matching event, as used in atk_add_focus_tracker. Currently the only events for which object-specific handlers are supported are events of type "focus:". Most clients of ATK will prefer to attach signal handlers for the various ATK signals instead.

see atk_add_focus_tracker.

dynamic_EventListener Source #

Arguments

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

obj: An Object instance for whom the callback will be called when the specified event (e.g. 'focus:') takes place.

-> m () 

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

mk_EventListener :: C_EventListener -> IO (FunPtr C_EventListener) Source #

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

EventListenerInit

type C_EventListenerInit = IO () Source #

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

type EventListenerInit = IO () Source #

An EventListenerInit function is a special function that is called in order to initialize the per-object event registration system used by EventListener, if any preparation is required.

see atk_focus_tracker_init.

dynamic_EventListenerInit :: (HasCallStack, MonadIO m) => FunPtr C_EventListenerInit -> m () Source #

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

mk_EventListenerInit :: C_EventListenerInit -> IO (FunPtr C_EventListenerInit) Source #

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

FocusHandler

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

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

type FocusHandler Source #

Arguments

 = Object

object: the Object that receives/lose the focus

-> Bool

focusIn: TRUE if the object receives the focus

-> IO () 

Deprecated: (Since version 2.9.4)Deprecated with atk_component_add_focus_handler()and componentRemoveFocusHandler. See thosemethods for more information.

The type of callback function used for atk_component_add_focus_handler() and componentRemoveFocusHandler

dynamic_FocusHandler Source #

Arguments

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

object: the Object that receives/lose the focus

-> Bool

focusIn: TRUE if the object receives the focus

-> m () 

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

mk_FocusHandler :: C_FocusHandler -> IO (FunPtr C_FocusHandler) Source #

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

Function

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

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

type Function Source #

Arguments

 = IO Bool

Returns: not used

An AtkFunction is a function definition used for padding which has been added to class and interface structures to allow for expansion in the future.

type Function_WithClosures Source #

Arguments

 = Ptr ()

userData: custom data defined by the user

-> IO Bool

Returns: not used

An AtkFunction is a function definition used for padding which has been added to class and interface structures to allow for expansion in the future.

drop_closures_Function :: Function -> Function_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_Function Source #

Arguments

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

userData: custom data defined by the user

-> m Bool

Returns: not used

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

genClosure_Function :: MonadIO m => Function -> m (GClosure C_Function) Source #

Wrap the callback into a GClosure.

mk_Function :: C_Function -> IO (FunPtr C_Function) Source #

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

noFunction :: Maybe Function Source #

A convenience synonym for Nothing :: Maybe Function.

KeySnoopFunc

type C_KeySnoopFunc = Ptr KeyEventStruct -> Ptr () -> IO Int32 Source #

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

type KeySnoopFunc Source #

Arguments

 = KeyEventStruct

event: an AtkKeyEventStruct containing information about the key event for which notification is being given.

-> IO Int32

Returns: TRUE (nonzero) if the event emission should be stopped and the event discarded without being passed to the normal GUI recipient; FALSE (zero) if the event dispatch to the client application should proceed as normal.

see atk_add_key_event_listener.

An KeySnoopFunc is a type of callback which is called whenever a key event occurs, if registered via atk_add_key_event_listener. It allows for pre-emptive interception of key events via the return code as described below.

type KeySnoopFunc_WithClosures Source #

Arguments

 = KeyEventStruct

event: an AtkKeyEventStruct containing information about the key event for which notification is being given.

-> Ptr ()

userData: a block of data which will be passed to the event listener, on notification.

-> IO Int32

Returns: TRUE (nonzero) if the event emission should be stopped and the event discarded without being passed to the normal GUI recipient; FALSE (zero) if the event dispatch to the client application should proceed as normal.

see atk_add_key_event_listener.

An KeySnoopFunc is a type of callback which is called whenever a key event occurs, if registered via atk_add_key_event_listener. It allows for pre-emptive interception of key events via the return code as described below.

drop_closures_KeySnoopFunc :: KeySnoopFunc -> KeySnoopFunc_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_KeySnoopFunc Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_KeySnoopFunc 
-> KeyEventStruct

event: an AtkKeyEventStruct containing information about the key event for which notification is being given.

-> Ptr ()

userData: a block of data which will be passed to the event listener, on notification.

-> m Int32

Returns: TRUE (nonzero) if the event emission should be stopped and the event discarded without being passed to the normal GUI recipient; FALSE (zero) if the event dispatch to the client application should proceed as normal.

see atk_add_key_event_listener.

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

mk_KeySnoopFunc :: C_KeySnoopFunc -> IO (FunPtr C_KeySnoopFunc) Source #

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

PropertyChangeHandler

type C_PropertyChangeHandler = Ptr Object -> Ptr PropertyValues -> IO () Source #

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

type PropertyChangeHandler Source #

Arguments

 = Object

obj: atkobject which property changes

-> PropertyValues

vals: values changed

-> IO () 

Deprecated: Since 2.12.

An AtkPropertyChangeHandler is a function which is executed when an AtkObject's property changes value. It is specified in a call to atk_object_connect_property_change_handler().

dynamic_PropertyChangeHandler Source #

Arguments

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

obj: atkobject which property changes

-> PropertyValues

vals: values changed

-> m () 

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

mk_PropertyChangeHandler :: C_PropertyChangeHandler -> IO (FunPtr C_PropertyChangeHandler) Source #

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