gi-clutter-1.0.5: clutter GObject bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Clutter.Callbacks

Description

 
Synopsis

Signals

ActorCreateChildFunc

type ActorCreateChildFunc Source #

Arguments

 = Object

item: the item in the model

-> IO Actor

Returns: The newly created child Actor

Creates a Actor using the item in the model.

The usual way to implement this function is to create a Actor instance and then bind the Object properties to the actor properties of interest, using objectBindProperty. This way, when the item in the ListModel changes, the Actor changes as well.

Since: 1.24

type ActorCreateChildFunc_WithClosures Source #

Arguments

 = Object

item: the item in the model

-> Ptr ()

userData: Data passed to actorBindModel

-> IO Actor

Returns: The newly created child Actor

Creates a Actor using the item in the model.

The usual way to implement this function is to create a Actor instance and then bind the Object properties to the actor properties of interest, using objectBindProperty. This way, when the item in the ListModel changes, the Actor changes as well.

Since: 1.24

type C_ActorCreateChildFunc = Ptr Object -> Ptr () -> IO (Ptr Actor) Source #

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

dynamic_ActorCreateChildFunc Source #

Arguments

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

item: the item in the model

-> Ptr ()

userData: Data passed to actorBindModel

-> m Actor

Returns: The newly created child Actor

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

genClosure_ActorCreateChildFunc :: MonadIO m => ActorCreateChildFunc -> m (GClosure C_ActorCreateChildFunc) Source #

Wrap the callback into a GClosure.

mk_ActorCreateChildFunc :: C_ActorCreateChildFunc -> IO (FunPtr C_ActorCreateChildFunc) Source #

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

AlphaFunc

type AlphaFunc Source #

Arguments

 = Alpha

alpha: a Alpha

-> IO Double

Returns: a floating point value

Deprecated: (Since version 1.12)Use TimelineProgressFunc instead.

A function returning a value depending on the position of the Timeline bound to alpha.

Since: 0.2

type AlphaFunc_WithClosures Source #

Arguments

 = Alpha

alpha: a Alpha

-> Ptr ()

userData: user data passed to the function

-> IO Double

Returns: a floating point value

A function returning a value depending on the position of the Timeline bound to alpha.

Since: 0.2

type C_AlphaFunc = Ptr Alpha -> Ptr () -> IO CDouble Source #

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

drop_closures_AlphaFunc :: AlphaFunc -> AlphaFunc_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_AlphaFunc Source #

Arguments

:: (HasCallStack, MonadIO m, IsAlpha a) 
=> FunPtr C_AlphaFunc 
-> a

alpha: a Alpha

-> Ptr ()

userData: user data passed to the function

-> m Double

Returns: a floating point value

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

genClosure_AlphaFunc :: MonadIO m => AlphaFunc -> m (GClosure C_AlphaFunc) Source #

Wrap the callback into a GClosure.

mk_AlphaFunc :: C_AlphaFunc -> IO (FunPtr C_AlphaFunc) Source #

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

noAlphaFunc :: Maybe AlphaFunc Source #

A convenience synonym for Nothing :: Maybe AlphaFunc.

BehaviourForeachFunc

type BehaviourForeachFunc Source #

Arguments

 = Behaviour

behaviour: the Behaviour

-> Actor

actor: an actor driven by behaviour

-> IO () 

Deprecated: (Since version 1.6)

This function is passed to behaviourActorsForeach and will be called for each actor driven by behaviour.

Since: 0.2

type BehaviourForeachFunc_WithClosures Source #

Arguments

 = Behaviour

behaviour: the Behaviour

-> Actor

actor: an actor driven by behaviour

-> Ptr ()

data: optional data passed to the function

-> IO () 

This function is passed to behaviourActorsForeach and will be called for each actor driven by behaviour.

Since: 0.2

type C_BehaviourForeachFunc = Ptr Behaviour -> Ptr Actor -> Ptr () -> IO () Source #

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

dynamic_BehaviourForeachFunc Source #

Arguments

:: (HasCallStack, MonadIO m, IsBehaviour a, IsActor b) 
=> FunPtr C_BehaviourForeachFunc 
-> a

behaviour: the Behaviour

-> b

actor: an actor driven by behaviour

-> Ptr ()

data: optional data passed to the function

-> m () 

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

genClosure_BehaviourForeachFunc :: MonadIO m => BehaviourForeachFunc -> m (GClosure C_BehaviourForeachFunc) Source #

Wrap the callback into a GClosure.

mk_BehaviourForeachFunc :: C_BehaviourForeachFunc -> IO (FunPtr C_BehaviourForeachFunc) Source #

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

BindingActionFunc

type BindingActionFunc Source #

Arguments

 = Object

gobject: a Object

-> Text

actionName: the name of the action

-> Word32

keyVal: the key symbol

-> [ModifierType]

modifiers: bitmask of the modifier flags

-> IO Bool

Returns: the function should return True if the key binding has been handled, and return False otherwise

The prototype for the callback function registered with bindingPoolInstallAction and invoked by bindingPoolActivate.

Since: 1.0

type BindingActionFunc_WithClosures Source #

Arguments

 = Object

gobject: a Object

-> Text

actionName: the name of the action

-> Word32

keyVal: the key symbol

-> [ModifierType]

modifiers: bitmask of the modifier flags

-> Ptr ()

userData: data passed to the function

-> IO Bool

Returns: the function should return True if the key binding has been handled, and return False otherwise

The prototype for the callback function registered with bindingPoolInstallAction and invoked by bindingPoolActivate.

Since: 1.0

type C_BindingActionFunc = Ptr Object -> CString -> Word32 -> CUInt -> Ptr () -> IO CInt Source #

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

drop_closures_BindingActionFunc :: BindingActionFunc -> BindingActionFunc_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_BindingActionFunc Source #

Arguments

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

gobject: a Object

-> Text

actionName: the name of the action

-> Word32

keyVal: the key symbol

-> [ModifierType]

modifiers: bitmask of the modifier flags

-> Ptr ()

userData: data passed to the function

-> m Bool

Returns: the function should return True if the key binding has been handled, and return False otherwise

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

genClosure_BindingActionFunc :: MonadIO m => BindingActionFunc -> m (GClosure C_BindingActionFunc) Source #

Wrap the callback into a GClosure.

mk_BindingActionFunc :: C_BindingActionFunc -> IO (FunPtr C_BindingActionFunc) Source #

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

Callback

type C_Callback = Ptr Actor -> Ptr () -> IO () Source #

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

type Callback Source #

Arguments

 = Actor

actor: a Actor

-> IO () 

Generic callback

type Callback_WithClosures Source #

Arguments

 = Actor

actor: a Actor

-> Ptr ()

data: user data

-> IO () 

Generic callback

drop_closures_Callback :: Callback -> Callback_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_Callback Source #

Arguments

:: (HasCallStack, MonadIO m, IsActor a) 
=> FunPtr C_Callback 
-> a

actor: a Actor

-> Ptr ()

data: user data

-> m () 

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.

EventFilterFunc

type C_EventFilterFunc = Ptr Event -> Ptr () -> IO CInt Source #

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

type EventFilterFunc Source #

Arguments

 = Event

event: the event that is going to be emitted

-> IO Bool

Returns: EVENT_STOP to indicate that the event has been handled or EVENT_PROPAGATE otherwise. Returning EVENT_STOP skips any further filter functions and prevents the signal emission for the event.

A function pointer type used by event filters that are added with eventAddFilter.

Since: 1.18

type EventFilterFunc_WithClosures Source #

Arguments

 = Event

event: the event that is going to be emitted

-> Ptr ()

userData: the data pointer passed to eventAddFilter

-> IO Bool

Returns: EVENT_STOP to indicate that the event has been handled or EVENT_PROPAGATE otherwise. Returning EVENT_STOP skips any further filter functions and prevents the signal emission for the event.

A function pointer type used by event filters that are added with eventAddFilter.

Since: 1.18

drop_closures_EventFilterFunc :: EventFilterFunc -> EventFilterFunc_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_EventFilterFunc Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_EventFilterFunc 
-> Event

event: the event that is going to be emitted

-> Ptr ()

userData: the data pointer passed to eventAddFilter

-> m Bool

Returns: EVENT_STOP to indicate that the event has been handled or EVENT_PROPAGATE otherwise. Returning EVENT_STOP skips any further filter functions and prevents the signal emission for the event.

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

genClosure_EventFilterFunc :: MonadIO m => EventFilterFunc -> m (GClosure C_EventFilterFunc) Source #

Wrap the callback into a GClosure.

mk_EventFilterFunc :: C_EventFilterFunc -> IO (FunPtr C_EventFilterFunc) Source #

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

ModelFilterFunc

type C_ModelFilterFunc = Ptr Model -> Ptr ModelIter -> Ptr () -> IO CInt Source #

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

type ModelFilterFunc Source #

Arguments

 = Model

model: a Model

-> ModelIter

iter: the iterator for the row

-> IO Bool

Returns: If the row should be displayed, return True

Deprecated: (Since version 1.24)Implement filters using a custom ListModel instead

Filters the content of a row in the model.

Since: 0.6

type ModelFilterFunc_WithClosures Source #

Arguments

 = Model

model: a Model

-> ModelIter

iter: the iterator for the row

-> Ptr ()

userData: data passed to modelSetFilter

-> IO Bool

Returns: If the row should be displayed, return True

Filters the content of a row in the model.

Since: 0.6

drop_closures_ModelFilterFunc :: ModelFilterFunc -> ModelFilterFunc_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_ModelFilterFunc Source #

Arguments

:: (HasCallStack, MonadIO m, IsModel a, IsModelIter b) 
=> FunPtr C_ModelFilterFunc 
-> a

model: a Model

-> b

iter: the iterator for the row

-> Ptr ()

userData: data passed to modelSetFilter

-> m Bool

Returns: If the row should be displayed, return True

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

genClosure_ModelFilterFunc :: MonadIO m => ModelFilterFunc -> m (GClosure C_ModelFilterFunc) Source #

Wrap the callback into a GClosure.

mk_ModelFilterFunc :: C_ModelFilterFunc -> IO (FunPtr C_ModelFilterFunc) Source #

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

ModelForeachFunc

type C_ModelForeachFunc = Ptr Model -> Ptr ModelIter -> Ptr () -> IO CInt Source #

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

type ModelForeachFunc Source #

Arguments

 = Model

model: a Model

-> ModelIter

iter: the iterator for the row

-> IO Bool

Returns: True if the iteration should continue, False otherwise

Deprecated: (Since version 1.24)Use ListModel

Iterates on the content of a row in the model

Since: 0.6

type ModelForeachFunc_WithClosures Source #

Arguments

 = Model

model: a Model

-> ModelIter

iter: the iterator for the row

-> Ptr ()

userData: data passed to modelForeach

-> IO Bool

Returns: True if the iteration should continue, False otherwise

Iterates on the content of a row in the model

Since: 0.6

drop_closures_ModelForeachFunc :: ModelForeachFunc -> ModelForeachFunc_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_ModelForeachFunc Source #

Arguments

:: (HasCallStack, MonadIO m, IsModel a, IsModelIter b) 
=> FunPtr C_ModelForeachFunc 
-> a

model: a Model

-> b

iter: the iterator for the row

-> Ptr ()

userData: data passed to modelForeach

-> m Bool

Returns: True if the iteration should continue, False otherwise

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

genClosure_ModelForeachFunc :: MonadIO m => ModelForeachFunc -> m (GClosure C_ModelForeachFunc) Source #

Wrap the callback into a GClosure.

mk_ModelForeachFunc :: C_ModelForeachFunc -> IO (FunPtr C_ModelForeachFunc) Source #

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

ModelSortFunc

type C_ModelSortFunc = Ptr Model -> Ptr GValue -> Ptr GValue -> Ptr () -> IO Int32 Source #

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

type ModelSortFunc Source #

Arguments

 = Model

model: a Model

-> GValue

a: a Value representing the contents of the row

-> GValue

b: a Value representing the contents of the second row

-> IO Int32

Returns: a positive integer if a is after b, a negative integer if a is before b, or 0 if the rows are the same

Deprecated: (Since version 1.24)Implement sorting using a custom ListModel instead

Compares the content of two rows in the model.

Since: 0.6

type ModelSortFunc_WithClosures Source #

Arguments

 = Model

model: a Model

-> GValue

a: a Value representing the contents of the row

-> GValue

b: a Value representing the contents of the second row

-> Ptr ()

userData: data passed to modelSetSort

-> IO Int32

Returns: a positive integer if a is after b, a negative integer if a is before b, or 0 if the rows are the same

Compares the content of two rows in the model.

Since: 0.6

drop_closures_ModelSortFunc :: ModelSortFunc -> ModelSortFunc_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_ModelSortFunc Source #

Arguments

:: (HasCallStack, MonadIO m, IsModel a) 
=> FunPtr C_ModelSortFunc 
-> a

model: a Model

-> GValue

a: a Value representing the contents of the row

-> GValue

b: a Value representing the contents of the second row

-> Ptr ()

userData: data passed to modelSetSort

-> m Int32

Returns: a positive integer if a is after b, a negative integer if a is before b, or 0 if the rows are the same

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

genClosure_ModelSortFunc :: MonadIO m => ModelSortFunc -> m (GClosure C_ModelSortFunc) Source #

Wrap the callback into a GClosure.

mk_ModelSortFunc :: C_ModelSortFunc -> IO (FunPtr C_ModelSortFunc) Source #

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

PathCallback

type C_PathCallback = Ptr PathNode -> Ptr () -> IO () Source #

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

type PathCallback Source #

Arguments

 = PathNode

node: the node

-> IO () 

This function is passed to pathForeach and will be called for each node contained in the path.

Since: 1.0

type PathCallback_WithClosures Source #

Arguments

 = PathNode

node: the node

-> Ptr ()

data: optional data passed to the function

-> IO () 

This function is passed to pathForeach and will be called for each node contained in the path.

Since: 1.0

drop_closures_PathCallback :: PathCallback -> PathCallback_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_PathCallback Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_PathCallback 
-> PathNode

node: the node

-> Ptr ()

data: optional data passed to the function

-> m () 

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

genClosure_PathCallback :: MonadIO m => PathCallback -> m (GClosure C_PathCallback) Source #

Wrap the callback into a GClosure.

mk_PathCallback :: C_PathCallback -> IO (FunPtr C_PathCallback) Source #

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

ProgressFunc

type C_ProgressFunc = Ptr GValue -> Ptr GValue -> CDouble -> Ptr GValue -> IO CInt Source #

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

type ProgressFunc Source #

Arguments

 = GValue

a: the initial value of an interval

-> GValue

b: the final value of an interval

-> Double

progress: the progress factor, between 0 and 1

-> GValue

retval: the value used to store the progress

-> IO Bool

Returns: True if the function successfully computed the value and stored it inside retval

Prototype of the progress function used to compute the value between the two ends a and b of an interval depending on the value of progress.

The Value in retval is already initialized with the same type as a and b.

This function will be called by Interval if the type of the values of the interval was registered using clutter_interval_register_progress_func().

Since: 1.0

dynamic_ProgressFunc Source #

Arguments

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

a: the initial value of an interval

-> GValue

b: the final value of an interval

-> Double

progress: the progress factor, between 0 and 1

-> GValue

retval: the value used to store the progress

-> m Bool

Returns: True if the function successfully computed the value and stored it inside retval

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

genClosure_ProgressFunc :: MonadIO m => ProgressFunc -> m (GClosure C_ProgressFunc) Source #

Wrap the callback into a GClosure.

mk_ProgressFunc :: C_ProgressFunc -> IO (FunPtr C_ProgressFunc) Source #

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

ScriptConnectFunc

type C_ScriptConnectFunc = Ptr Script -> Ptr Object -> CString -> CString -> Ptr Object -> CUInt -> Ptr () -> IO () Source #

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

type ScriptConnectFunc Source #

Arguments

 = Script

script: a Script

-> Object

object: the object to connect

-> Text

signalName: the name of the signal

-> Text

handlerName: the name of the signal handler

-> Object

connectObject: the object to connect the signal to, or Nothing

-> [ConnectFlags]

flags: signal connection flags

-> IO () 

This is the signature of a function used to connect signals. It is used by the scriptConnectSignalsFull function. It is mainly intended for interpreted language bindings, but could be useful where the programmer wants more control over the signal connection process.

Since: 0.6

type ScriptConnectFunc_WithClosures Source #

Arguments

 = Script

script: a Script

-> Object

object: the object to connect

-> Text

signalName: the name of the signal

-> Text

handlerName: the name of the signal handler

-> Object

connectObject: the object to connect the signal to, or Nothing

-> [ConnectFlags]

flags: signal connection flags

-> Ptr ()

userData: user data to pass to the signal handler

-> IO () 

This is the signature of a function used to connect signals. It is used by the scriptConnectSignalsFull function. It is mainly intended for interpreted language bindings, but could be useful where the programmer wants more control over the signal connection process.

Since: 0.6

drop_closures_ScriptConnectFunc :: ScriptConnectFunc -> ScriptConnectFunc_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_ScriptConnectFunc Source #

Arguments

:: (HasCallStack, MonadIO m, IsScript a, IsObject b, IsObject c) 
=> FunPtr C_ScriptConnectFunc 
-> a

script: a Script

-> b

object: the object to connect

-> Text

signalName: the name of the signal

-> Text

handlerName: the name of the signal handler

-> c

connectObject: the object to connect the signal to, or Nothing

-> [ConnectFlags]

flags: signal connection flags

-> Ptr ()

userData: user data to pass to the signal handler

-> m () 

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

genClosure_ScriptConnectFunc :: MonadIO m => ScriptConnectFunc -> m (GClosure C_ScriptConnectFunc) Source #

Wrap the callback into a GClosure.

mk_ScriptConnectFunc :: C_ScriptConnectFunc -> IO (FunPtr C_ScriptConnectFunc) Source #

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

TimelineProgressFunc

type C_TimelineProgressFunc = Ptr Timeline -> CDouble -> CDouble -> Ptr () -> IO CDouble Source #

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

type TimelineProgressFunc Source #

Arguments

 = Timeline

timeline: a Timeline

-> Double

elapsed: the elapsed time, in milliseconds

-> Double

total: the total duration of the timeline, in milliseconds,

-> IO Double

Returns: the progress, as a floating point value between -1.0 and 2.0.

A function for defining a custom progress.

Since: 1.10

type TimelineProgressFunc_WithClosures Source #

Arguments

 = Timeline

timeline: a Timeline

-> Double

elapsed: the elapsed time, in milliseconds

-> Double

total: the total duration of the timeline, in milliseconds,

-> Ptr ()

userData: data passed to the function

-> IO Double

Returns: the progress, as a floating point value between -1.0 and 2.0.

A function for defining a custom progress.

Since: 1.10

dynamic_TimelineProgressFunc Source #

Arguments

:: (HasCallStack, MonadIO m, IsTimeline a) 
=> FunPtr C_TimelineProgressFunc 
-> a

timeline: a Timeline

-> Double

elapsed: the elapsed time, in milliseconds

-> Double

total: the total duration of the timeline, in milliseconds,

-> Ptr ()

userData: data passed to the function

-> m Double

Returns: the progress, as a floating point value between -1.0 and 2.0.

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

genClosure_TimelineProgressFunc :: MonadIO m => TimelineProgressFunc -> m (GClosure C_TimelineProgressFunc) Source #

Wrap the callback into a GClosure.

mk_TimelineProgressFunc :: C_TimelineProgressFunc -> IO (FunPtr C_TimelineProgressFunc) Source #

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