gi-pango-1.0.30: Pango bindings

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

GI.Pango.Callbacks

Contents

- Signals
  - AttrClassCopyFieldCallback
  - AttrClassDestroyFieldCallback
  - AttrClassEqualFieldCallback
  - AttrDataCopyFunc
  - AttrFilterFunc
  - FontsetForeachFunc

Description

Synopsis

- type AttrClassCopyFieldCallback = Attribute -> IO Attribute
- type C_AttrClassCopyFieldCallback = Ptr Attribute -> IO (Ptr Attribute)
- dynamic_AttrClassCopyFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_AttrClassCopyFieldCallback -> Attribute -> m Attribute
- genClosure_AttrClassCopyFieldCallback :: MonadIO m => AttrClassCopyFieldCallback -> m (GClosure C_AttrClassCopyFieldCallback)
- mk_AttrClassCopyFieldCallback :: C_AttrClassCopyFieldCallback -> IO (FunPtr C_AttrClassCopyFieldCallback)
- noAttrClassCopyFieldCallback :: Maybe AttrClassCopyFieldCallback
- wrap_AttrClassCopyFieldCallback :: Maybe (Ptr (FunPtr C_AttrClassCopyFieldCallback)) -> AttrClassCopyFieldCallback -> C_AttrClassCopyFieldCallback
- type AttrClassDestroyFieldCallback = Attribute -> IO ()
- type C_AttrClassDestroyFieldCallback = Ptr Attribute -> IO ()
- dynamic_AttrClassDestroyFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_AttrClassDestroyFieldCallback -> Attribute -> m ()
- genClosure_AttrClassDestroyFieldCallback :: MonadIO m => AttrClassDestroyFieldCallback -> m (GClosure C_AttrClassDestroyFieldCallback)
- mk_AttrClassDestroyFieldCallback :: C_AttrClassDestroyFieldCallback -> IO (FunPtr C_AttrClassDestroyFieldCallback)
- noAttrClassDestroyFieldCallback :: Maybe AttrClassDestroyFieldCallback
- wrap_AttrClassDestroyFieldCallback :: Maybe (Ptr (FunPtr C_AttrClassDestroyFieldCallback)) -> AttrClassDestroyFieldCallback -> C_AttrClassDestroyFieldCallback
- type AttrClassEqualFieldCallback = Attribute -> Attribute -> IO Bool
- type C_AttrClassEqualFieldCallback = Ptr Attribute -> Ptr Attribute -> IO CInt
- dynamic_AttrClassEqualFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_AttrClassEqualFieldCallback -> Attribute -> Attribute -> m Bool
- genClosure_AttrClassEqualFieldCallback :: MonadIO m => AttrClassEqualFieldCallback -> m (GClosure C_AttrClassEqualFieldCallback)
- mk_AttrClassEqualFieldCallback :: C_AttrClassEqualFieldCallback -> IO (FunPtr C_AttrClassEqualFieldCallback)
- noAttrClassEqualFieldCallback :: Maybe AttrClassEqualFieldCallback
- wrap_AttrClassEqualFieldCallback :: Maybe (Ptr (FunPtr C_AttrClassEqualFieldCallback)) -> AttrClassEqualFieldCallback -> C_AttrClassEqualFieldCallback
- type AttrDataCopyFunc = IO (Ptr ())
- type AttrDataCopyFunc_WithClosures = Ptr () -> IO (Ptr ())
- type C_AttrDataCopyFunc = Ptr () -> IO (Ptr ())
- drop_closures_AttrDataCopyFunc :: AttrDataCopyFunc -> AttrDataCopyFunc_WithClosures
- dynamic_AttrDataCopyFunc :: (HasCallStack, MonadIO m) => FunPtr C_AttrDataCopyFunc -> Ptr () -> m (Ptr ())
- genClosure_AttrDataCopyFunc :: MonadIO m => AttrDataCopyFunc -> m (GClosure C_AttrDataCopyFunc)
- mk_AttrDataCopyFunc :: C_AttrDataCopyFunc -> IO (FunPtr C_AttrDataCopyFunc)
- noAttrDataCopyFunc :: Maybe AttrDataCopyFunc
- noAttrDataCopyFunc_WithClosures :: Maybe AttrDataCopyFunc_WithClosures
- wrap_AttrDataCopyFunc :: Maybe (Ptr (FunPtr C_AttrDataCopyFunc)) -> AttrDataCopyFunc_WithClosures -> C_AttrDataCopyFunc
- type AttrFilterFunc = Attribute -> IO Bool
- type AttrFilterFunc_WithClosures = Attribute -> Ptr () -> IO Bool
- type C_AttrFilterFunc = Ptr Attribute -> Ptr () -> IO CInt
- drop_closures_AttrFilterFunc :: AttrFilterFunc -> AttrFilterFunc_WithClosures
- dynamic_AttrFilterFunc :: (HasCallStack, MonadIO m) => FunPtr C_AttrFilterFunc -> Attribute -> Ptr () -> m Bool
- genClosure_AttrFilterFunc :: MonadIO m => AttrFilterFunc -> m (GClosure C_AttrFilterFunc)
- mk_AttrFilterFunc :: C_AttrFilterFunc -> IO (FunPtr C_AttrFilterFunc)
- noAttrFilterFunc :: Maybe AttrFilterFunc
- noAttrFilterFunc_WithClosures :: Maybe AttrFilterFunc_WithClosures
- wrap_AttrFilterFunc :: Maybe (Ptr (FunPtr C_AttrFilterFunc)) -> AttrFilterFunc_WithClosures -> C_AttrFilterFunc
- type C_FontsetForeachFunc = Ptr Fontset -> Ptr Font -> Ptr () -> IO CInt
- type FontsetForeachFunc = Fontset -> Font -> IO Bool
- type FontsetForeachFunc_WithClosures = Fontset -> Font -> Ptr () -> IO Bool
- drop_closures_FontsetForeachFunc :: FontsetForeachFunc -> FontsetForeachFunc_WithClosures
- dynamic_FontsetForeachFunc :: (HasCallStack, MonadIO m, IsFontset a, IsFont b) => FunPtr C_FontsetForeachFunc -> a -> b -> Ptr () -> m Bool
- genClosure_FontsetForeachFunc :: MonadIO m => FontsetForeachFunc -> m (GClosure C_FontsetForeachFunc)
- mk_FontsetForeachFunc :: C_FontsetForeachFunc -> IO (FunPtr C_FontsetForeachFunc)
- noFontsetForeachFunc :: Maybe FontsetForeachFunc
- noFontsetForeachFunc_WithClosures :: Maybe FontsetForeachFunc_WithClosures
- wrap_FontsetForeachFunc :: Maybe (Ptr (FunPtr C_FontsetForeachFunc)) -> FontsetForeachFunc_WithClosures -> C_FontsetForeachFunc

# Signals

## AttrClassCopyFieldCallback

type AttrClassCopyFieldCallback = Attribute -> IO Attribute Source #

No description available in the introspection data.

type C_AttrClassCopyFieldCallback = Ptr Attribute -> IO (Ptr Attribute) Source #

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

dynamic_AttrClassCopyFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_AttrClassCopyFieldCallback -> Attribute -> m Attribute Source #

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

genClosure_AttrClassCopyFieldCallback :: MonadIO m => AttrClassCopyFieldCallback -> m (GClosure C_AttrClassCopyFieldCallback) Source #

Wrap the callback into a `GClosure`.

mk_AttrClassCopyFieldCallback :: C_AttrClassCopyFieldCallback -> IO (FunPtr C_AttrClassCopyFieldCallback) Source #

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

noAttrClassCopyFieldCallback :: Maybe AttrClassCopyFieldCallback Source #

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

wrap_AttrClassCopyFieldCallback :: Maybe (Ptr (FunPtr C_AttrClassCopyFieldCallback)) -> AttrClassCopyFieldCallback -> C_AttrClassCopyFieldCallback Source #

Wrap a `AttrClassCopyFieldCallback` into a `C_AttrClassCopyFieldCallback`.

## AttrClassDestroyFieldCallback

type AttrClassDestroyFieldCallback = Attribute -> IO () Source #

No description available in the introspection data.

type C_AttrClassDestroyFieldCallback = Ptr Attribute -> IO () Source #

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

dynamic_AttrClassDestroyFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_AttrClassDestroyFieldCallback -> Attribute -> m () Source #

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

genClosure_AttrClassDestroyFieldCallback :: MonadIO m => AttrClassDestroyFieldCallback -> m (GClosure C_AttrClassDestroyFieldCallback) Source #

Wrap the callback into a `GClosure`.

mk_AttrClassDestroyFieldCallback :: C_AttrClassDestroyFieldCallback -> IO (FunPtr C_AttrClassDestroyFieldCallback) Source #

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

noAttrClassDestroyFieldCallback :: Maybe AttrClassDestroyFieldCallback Source #

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

wrap_AttrClassDestroyFieldCallback :: Maybe (Ptr (FunPtr C_AttrClassDestroyFieldCallback)) -> AttrClassDestroyFieldCallback -> C_AttrClassDestroyFieldCallback Source #

Wrap a `AttrClassDestroyFieldCallback` into a `C_AttrClassDestroyFieldCallback`.

## AttrClassEqualFieldCallback

type AttrClassEqualFieldCallback = Attribute -> Attribute -> IO Bool Source #

No description available in the introspection data.

type C_AttrClassEqualFieldCallback = Ptr Attribute -> Ptr Attribute -> IO CInt Source #

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

dynamic_AttrClassEqualFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_AttrClassEqualFieldCallback -> Attribute -> Attribute -> m Bool Source #

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

genClosure_AttrClassEqualFieldCallback :: MonadIO m => AttrClassEqualFieldCallback -> m (GClosure C_AttrClassEqualFieldCallback) Source #

Wrap the callback into a `GClosure`.

mk_AttrClassEqualFieldCallback :: C_AttrClassEqualFieldCallback -> IO (FunPtr C_AttrClassEqualFieldCallback) Source #

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

noAttrClassEqualFieldCallback :: Maybe AttrClassEqualFieldCallback Source #

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

wrap_AttrClassEqualFieldCallback :: Maybe (Ptr (FunPtr C_AttrClassEqualFieldCallback)) -> AttrClassEqualFieldCallback -> C_AttrClassEqualFieldCallback Source #

Wrap a `AttrClassEqualFieldCallback` into a `C_AttrClassEqualFieldCallback`.

## AttrDataCopyFunc

type AttrDataCopyFunc Source #

Arguments

= IO (Ptr ()) | Returns: new copy of `userData`.

Type of a function that can duplicate user data for an attribute.

type AttrDataCopyFunc_WithClosures Source #

Arguments

= Ptr () | `userData`: user data to copy
-> IO (Ptr ()) | Returns: new copy of `userData`.

Type of a function that can duplicate user data for an attribute.

type C_AttrDataCopyFunc = Ptr () -> IO (Ptr ()) Source #

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

drop_closures_AttrDataCopyFunc :: AttrDataCopyFunc -> AttrDataCopyFunc_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_AttrDataCopyFunc Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FunPtr C_AttrDataCopyFunc |
-> Ptr () | `userData`: user data to copy
-> m (Ptr ()) | Returns: new copy of `userData`.

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

genClosure_AttrDataCopyFunc :: MonadIO m => AttrDataCopyFunc -> m (GClosure C_AttrDataCopyFunc) Source #

Wrap the callback into a `GClosure`.

mk_AttrDataCopyFunc :: C_AttrDataCopyFunc -> IO (FunPtr C_AttrDataCopyFunc) Source #

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

noAttrDataCopyFunc :: Maybe AttrDataCopyFunc Source #

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

noAttrDataCopyFunc_WithClosures :: Maybe AttrDataCopyFunc_WithClosures Source #

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

wrap_AttrDataCopyFunc :: Maybe (Ptr (FunPtr C_AttrDataCopyFunc)) -> AttrDataCopyFunc_WithClosures -> C_AttrDataCopyFunc Source #

Wrap a `AttrDataCopyFunc` into a `C_AttrDataCopyFunc`.

## AttrFilterFunc

type AttrFilterFunc Source #

Arguments

= Attribute | `attribute`: a Pango attribute
-> IO Bool | Returns: `True` if the attribute should be selected for filtering, `False` otherwise.

Type of a function filtering a list of attributes.

type AttrFilterFunc_WithClosures Source #

Arguments

= Attribute | `attribute`: a Pango attribute
-> Ptr () | `userData`: user data passed to the function
-> IO Bool | Returns: `True` if the attribute should be selected for filtering, `False` otherwise.

Type of a function filtering a list of attributes.

type C_AttrFilterFunc = Ptr Attribute -> Ptr () -> IO CInt Source #

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

drop_closures_AttrFilterFunc :: AttrFilterFunc -> AttrFilterFunc_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_AttrFilterFunc Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FunPtr C_AttrFilterFunc |
-> Attribute | `attribute`: a Pango attribute
-> Ptr () | `userData`: user data passed to the function
-> m Bool | Returns: `True` if the attribute should be selected for filtering, `False` otherwise.

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

genClosure_AttrFilterFunc :: MonadIO m => AttrFilterFunc -> m (GClosure C_AttrFilterFunc) Source #

Wrap the callback into a `GClosure`.

mk_AttrFilterFunc :: C_AttrFilterFunc -> IO (FunPtr C_AttrFilterFunc) Source #

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

noAttrFilterFunc :: Maybe AttrFilterFunc Source #

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

noAttrFilterFunc_WithClosures :: Maybe AttrFilterFunc_WithClosures Source #

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

wrap_AttrFilterFunc :: Maybe (Ptr (FunPtr C_AttrFilterFunc)) -> AttrFilterFunc_WithClosures -> C_AttrFilterFunc Source #

Wrap a `AttrFilterFunc` into a `C_AttrFilterFunc`.

## FontsetForeachFunc

type C_FontsetForeachFunc = Ptr Fontset -> Ptr Font -> Ptr () -> IO CInt Source #

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

type FontsetForeachFunc Source #

Arguments

= Fontset | `fontset`: a `PangoFontset`
-> Font | `font`: a font from `fontset`
-> IO Bool | Returns: if `True`, stop iteration and return immediately.

Callback used when enumerating fonts in a fontset.

See `fontsetForeach`.

Since: 1.4

type FontsetForeachFunc_WithClosures Source #

Arguments

= Fontset | `fontset`: a `PangoFontset`
-> Font | `font`: a font from `fontset`
-> Ptr () | `userData`: callback data
-> IO Bool | Returns: if `True`, stop iteration and return immediately.

Callback used when enumerating fonts in a fontset.

See `fontsetForeach`.

Since: 1.4

drop_closures_FontsetForeachFunc :: FontsetForeachFunc -> FontsetForeachFunc_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_FontsetForeachFunc Source #

Arguments

:: (HasCallStack, MonadIO m, IsFontset a, IsFont b) |
=> FunPtr C_FontsetForeachFunc |
-> a | `fontset`: a `PangoFontset`
-> b | `font`: a font from `fontset`
-> Ptr () | `userData`: callback data
-> m Bool | Returns: if `True`, stop iteration and return immediately.

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

genClosure_FontsetForeachFunc :: MonadIO m => FontsetForeachFunc -> m (GClosure C_FontsetForeachFunc) Source #

Wrap the callback into a `GClosure`.

mk_FontsetForeachFunc :: C_FontsetForeachFunc -> IO (FunPtr C_FontsetForeachFunc) Source #

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

noFontsetForeachFunc :: Maybe FontsetForeachFunc Source #

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

noFontsetForeachFunc_WithClosures :: Maybe FontsetForeachFunc_WithClosures Source #

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

wrap_FontsetForeachFunc :: Maybe (Ptr (FunPtr C_FontsetForeachFunc)) -> FontsetForeachFunc_WithClosures -> C_FontsetForeachFunc Source #

Wrap a `FontsetForeachFunc` into a `C_FontsetForeachFunc`.