gi-gtksource-5.0.0: GtkSource bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.GtkSource.Callbacks

Description

 
Synopsis

Signals

SchedulerCallback

type C_SchedulerCallback = Int64 -> Ptr () -> IO CInt Source #

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

type SchedulerCallback Source #

Arguments

 = Int64

deadline: the time the callback should complete by

-> IO Bool

Returns: True if there is more work to process, otherwise False and the handler is unregistered.

This function is called incrementally to process additional background work. A deadline is provided which can be checked using getMonotonicTime so that additional work can be processed each frame.

This is useful for situations where you are incrementally performing background work such as spell checking or semantic syntax highlighting.

Since: 5.2

type SchedulerCallback_WithClosures Source #

Arguments

 = Int64

deadline: the time the callback should complete by

-> Ptr ()

userData: closure data provided when registering callback

-> IO Bool

Returns: True if there is more work to process, otherwise False and the handler is unregistered.

This function is called incrementally to process additional background work. A deadline is provided which can be checked using getMonotonicTime so that additional work can be processed each frame.

This is useful for situations where you are incrementally performing background work such as spell checking or semantic syntax highlighting.

Since: 5.2

drop_closures_SchedulerCallback :: SchedulerCallback -> SchedulerCallback_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_SchedulerCallback Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_SchedulerCallback 
-> Int64

deadline: the time the callback should complete by

-> Ptr ()

userData: closure data provided when registering callback

-> m Bool

Returns: True if there is more work to process, otherwise False and the handler is unregistered.

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

genClosure_SchedulerCallback :: MonadIO m => SchedulerCallback -> m (GClosure C_SchedulerCallback) Source #

Wrap the callback into a GClosure.

mk_SchedulerCallback :: C_SchedulerCallback -> IO (FunPtr C_SchedulerCallback) Source #

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