gi-vte-2.91.33: Vte bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | Safe-Inferred
Language | Haskell2010

GI.Vte.Callbacks

Contents

- Signals
  - SelectionFunc
  - TerminalSpawnAsyncCallback

Description

Synopsis

- type C_SelectionFunc = Ptr Terminal -> CLong -> CLong -> Ptr () -> IO CInt
- type SelectionFunc = Terminal -> CLong -> CLong -> IO Bool
- type SelectionFunc_WithClosures = Terminal -> CLong -> CLong -> Ptr () -> IO Bool
- drop_closures_SelectionFunc :: SelectionFunc -> SelectionFunc_WithClosures
- dynamic_SelectionFunc :: (HasCallStack, MonadIO m, IsTerminal a) => FunPtr C_SelectionFunc -> a -> CLong -> CLong -> Ptr () -> m Bool
- genClosure_SelectionFunc :: MonadIO m => SelectionFunc -> m (GClosure C_SelectionFunc)
- mk_SelectionFunc :: C_SelectionFunc -> IO (FunPtr C_SelectionFunc)
- noSelectionFunc :: Maybe SelectionFunc
- noSelectionFunc_WithClosures :: Maybe SelectionFunc_WithClosures
- wrap_SelectionFunc :: Maybe (Ptr (FunPtr C_SelectionFunc)) -> SelectionFunc_WithClosures -> C_SelectionFunc
- type C_TerminalSpawnAsyncCallback = Ptr Terminal -> Int32 -> Ptr GError -> Ptr () -> IO ()
- type TerminalSpawnAsyncCallback = Terminal -> Int32 -> Maybe GError -> IO ()
- type TerminalSpawnAsyncCallback_WithClosures = Terminal -> Int32 -> Maybe GError -> Ptr () -> IO ()
- drop_closures_TerminalSpawnAsyncCallback :: TerminalSpawnAsyncCallback -> TerminalSpawnAsyncCallback_WithClosures
- dynamic_TerminalSpawnAsyncCallback :: (HasCallStack, MonadIO m, IsTerminal a) => FunPtr C_TerminalSpawnAsyncCallback -> a -> Int32 -> Maybe GError -> Ptr () -> m ()
- genClosure_TerminalSpawnAsyncCallback :: MonadIO m => TerminalSpawnAsyncCallback -> m (GClosure C_TerminalSpawnAsyncCallback)
- mk_TerminalSpawnAsyncCallback :: C_TerminalSpawnAsyncCallback -> IO (FunPtr C_TerminalSpawnAsyncCallback)
- noTerminalSpawnAsyncCallback :: Maybe TerminalSpawnAsyncCallback
- noTerminalSpawnAsyncCallback_WithClosures :: Maybe TerminalSpawnAsyncCallback_WithClosures
- wrap_TerminalSpawnAsyncCallback :: Maybe (Ptr (FunPtr C_TerminalSpawnAsyncCallback)) -> TerminalSpawnAsyncCallback_WithClosures -> C_TerminalSpawnAsyncCallback

# Signals

## SelectionFunc

type C_SelectionFunc = Ptr Terminal -> CLong -> CLong -> Ptr () -> IO CInt Source #

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

type SelectionFunc Source #

Arguments

= Terminal | `terminal`: terminal in which the cell is.
-> CLong | `column`: column in which the cell is.
-> CLong | `row`: row in which the cell is.
-> IO Bool | Returns: `True` if cell has to be selected; `False` if otherwise.

Deprecated: (Since version 0.76)

Specifies the type of a selection function used to check whether a cell has to be selected or not.

type SelectionFunc_WithClosures Source #

Arguments

= Terminal | `terminal`: terminal in which the cell is.
-> CLong | `column`: column in which the cell is.
-> CLong | `row`: row in which the cell is.
-> Ptr () | `data`: user data.
-> IO Bool | Returns: `True` if cell has to be selected; `False` if otherwise.

Specifies the type of a selection function used to check whether a cell has to be selected or not.

drop_closures_SelectionFunc :: SelectionFunc -> SelectionFunc_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_SelectionFunc Source #

Arguments

:: (HasCallStack, MonadIO m, IsTerminal a) |
=> FunPtr C_SelectionFunc |
-> a | `terminal`: terminal in which the cell is.
-> CLong | `column`: column in which the cell is.
-> CLong | `row`: row in which the cell is.
-> Ptr () | `data`: user data.
-> m Bool | Returns: `True` if cell has to be selected; `False` if otherwise.

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

genClosure_SelectionFunc :: MonadIO m => SelectionFunc -> m (GClosure C_SelectionFunc) Source #

Wrap the callback into a `GClosure`.

mk_SelectionFunc :: C_SelectionFunc -> IO (FunPtr C_SelectionFunc) Source #

Generate a function pointer callable from C code, from a `C_SelectionFunc`.

noSelectionFunc :: Maybe SelectionFunc Source #

A convenience synonym for ``Nothing` :: `Maybe` `SelectionFunc``.

noSelectionFunc_WithClosures :: Maybe SelectionFunc_WithClosures Source #

A convenience synonym for ``Nothing` :: `Maybe` `SelectionFunc_WithClosures``.

wrap_SelectionFunc :: Maybe (Ptr (FunPtr C_SelectionFunc)) -> SelectionFunc_WithClosures -> C_SelectionFunc Source #

Wrap a `SelectionFunc` into a `C_SelectionFunc`.

## TerminalSpawnAsyncCallback

type C_TerminalSpawnAsyncCallback = Ptr Terminal -> Int32 -> Ptr GError -> Ptr () -> IO () Source #

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

type TerminalSpawnAsyncCallback Source #

Arguments

= Terminal | `terminal`: the `Terminal`
-> Int32 | `pid`: a `GPid`
-> Maybe GError | `error`: a `GError`, or `Nothing`
-> IO () |

Callback for `terminalSpawnAsync`.

On success, `pid` contains the PID of the spawned process, and `error` is `Nothing`. On failure, `pid` is -1 and `error` contains the error information.

Since: 0.48

type TerminalSpawnAsyncCallback_WithClosures Source #

Arguments

= Terminal | `terminal`: the `Terminal`
-> Int32 | `pid`: a `GPid`
-> Maybe GError | `error`: a `GError`, or `Nothing`
-> Ptr () | `userData`: user data that was passed to vte_terminal_spawn_async
-> IO () |

Callback for `terminalSpawnAsync`.

On success, `pid` contains the PID of the spawned process, and `error` is `Nothing`. On failure, `pid` is -1 and `error` contains the error information.

Since: 0.48

drop_closures_TerminalSpawnAsyncCallback :: TerminalSpawnAsyncCallback -> TerminalSpawnAsyncCallback_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_TerminalSpawnAsyncCallback Source #

Arguments

:: (HasCallStack, MonadIO m, IsTerminal a) |
=> FunPtr C_TerminalSpawnAsyncCallback |
-> a | `terminal`: the `Terminal`
-> Int32 | `pid`: a `GPid`
-> Maybe GError | `error`: a `GError`, or `Nothing`
-> Ptr () | `userData`: user data that was passed to vte_terminal_spawn_async
-> m () |

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

genClosure_TerminalSpawnAsyncCallback :: MonadIO m => TerminalSpawnAsyncCallback -> m (GClosure C_TerminalSpawnAsyncCallback) Source #

Wrap the callback into a `GClosure`.

mk_TerminalSpawnAsyncCallback :: C_TerminalSpawnAsyncCallback -> IO (FunPtr C_TerminalSpawnAsyncCallback) Source #

Generate a function pointer callable from C code, from a `C_TerminalSpawnAsyncCallback`.

noTerminalSpawnAsyncCallback :: Maybe TerminalSpawnAsyncCallback Source #

A convenience synonym for ``Nothing` :: `Maybe` `TerminalSpawnAsyncCallback``.

noTerminalSpawnAsyncCallback_WithClosures :: Maybe TerminalSpawnAsyncCallback_WithClosures Source #

A convenience synonym for ``Nothing` :: `Maybe` `TerminalSpawnAsyncCallback_WithClosures``.

wrap_TerminalSpawnAsyncCallback :: Maybe (Ptr (FunPtr C_TerminalSpawnAsyncCallback)) -> TerminalSpawnAsyncCallback_WithClosures -> C_TerminalSpawnAsyncCallback Source #

Wrap a `TerminalSpawnAsyncCallback` into a `C_TerminalSpawnAsyncCallback`.