gi-gdk4-4.0.10: Gdk 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.Gdk.Callbacks

Contents

- Signals
  - ContentDeserializeFunc
  - ContentSerializeFunc
  - CursorGetTextureCallback

Description

Synopsis

- type C_ContentDeserializeFunc = Ptr ContentDeserializer -> IO ()
- type ContentDeserializeFunc = ContentDeserializer -> IO ()
- dynamic_ContentDeserializeFunc :: (HasCallStack, MonadIO m, IsContentDeserializer a) => FunPtr C_ContentDeserializeFunc -> a -> m ()
- genClosure_ContentDeserializeFunc :: MonadIO m => ContentDeserializeFunc -> m (GClosure C_ContentDeserializeFunc)
- mk_ContentDeserializeFunc :: C_ContentDeserializeFunc -> IO (FunPtr C_ContentDeserializeFunc)
- noContentDeserializeFunc :: Maybe ContentDeserializeFunc
- wrap_ContentDeserializeFunc :: Maybe (Ptr (FunPtr C_ContentDeserializeFunc)) -> ContentDeserializeFunc -> C_ContentDeserializeFunc
- type C_ContentSerializeFunc = Ptr ContentSerializer -> IO ()
- type ContentSerializeFunc = ContentSerializer -> IO ()
- dynamic_ContentSerializeFunc :: (HasCallStack, MonadIO m, IsContentSerializer a) => FunPtr C_ContentSerializeFunc -> a -> m ()
- genClosure_ContentSerializeFunc :: MonadIO m => ContentSerializeFunc -> m (GClosure C_ContentSerializeFunc)
- mk_ContentSerializeFunc :: C_ContentSerializeFunc -> IO (FunPtr C_ContentSerializeFunc)
- noContentSerializeFunc :: Maybe ContentSerializeFunc
- wrap_ContentSerializeFunc :: Maybe (Ptr (FunPtr C_ContentSerializeFunc)) -> ContentSerializeFunc -> C_ContentSerializeFunc
- type C_CursorGetTextureCallback = Ptr Cursor -> Int32 -> CDouble -> Ptr Int32 -> Ptr Int32 -> Ptr Int32 -> Ptr Int32 -> Ptr () -> IO (Ptr Texture)
- type CursorGetTextureCallback = Cursor -> Int32 -> Double -> Ptr () -> IO (Maybe Texture, Int32, Int32, Int32, Int32)
- dynamic_CursorGetTextureCallback :: (HasCallStack, MonadIO m, IsCursor a) => FunPtr C_CursorGetTextureCallback -> a -> Int32 -> Double -> Ptr () -> m (Maybe Texture, Int32, Int32, Int32, Int32)
- genClosure_CursorGetTextureCallback :: MonadIO m => CursorGetTextureCallback -> m (GClosure C_CursorGetTextureCallback)
- mk_CursorGetTextureCallback :: C_CursorGetTextureCallback -> IO (FunPtr C_CursorGetTextureCallback)
- noCursorGetTextureCallback :: Maybe CursorGetTextureCallback
- wrap_CursorGetTextureCallback :: Maybe (Ptr (FunPtr C_CursorGetTextureCallback)) -> CursorGetTextureCallback -> C_CursorGetTextureCallback

# Signals

## ContentDeserializeFunc

type C_ContentDeserializeFunc = Ptr ContentDeserializer -> IO () Source #

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

type ContentDeserializeFunc Source #

Arguments

= ContentDeserializer | `deserializer`: a `GdkContentDeserializer`
-> IO () |

The type of a function that can be registered with `contentRegisterDeserializer`.

When the function gets called to operate on content, it can call functions on the `deserializer` object to obtain the mime type, input stream, user data, etc. for its operation.

dynamic_ContentDeserializeFunc Source #

Arguments

:: (HasCallStack, MonadIO m, IsContentDeserializer a) |
=> FunPtr C_ContentDeserializeFunc |
-> a | `deserializer`: a `GdkContentDeserializer`
-> m () |

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

genClosure_ContentDeserializeFunc :: MonadIO m => ContentDeserializeFunc -> m (GClosure C_ContentDeserializeFunc) Source #

Wrap the callback into a `GClosure`.

mk_ContentDeserializeFunc :: C_ContentDeserializeFunc -> IO (FunPtr C_ContentDeserializeFunc) Source #

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

noContentDeserializeFunc :: Maybe ContentDeserializeFunc Source #

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

wrap_ContentDeserializeFunc :: Maybe (Ptr (FunPtr C_ContentDeserializeFunc)) -> ContentDeserializeFunc -> C_ContentDeserializeFunc Source #

Wrap a `ContentDeserializeFunc` into a `C_ContentDeserializeFunc`.

## ContentSerializeFunc

type C_ContentSerializeFunc = Ptr ContentSerializer -> IO () Source #

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

type ContentSerializeFunc Source #

Arguments

= ContentSerializer | `serializer`: a `GdkContentSerializer`
-> IO () |

The type of a function that can be registered with `contentRegisterSerializer`.

When the function gets called to operate on content, it can call functions on the `serializer` object to obtain the mime type, output stream, user data, etc. for its operation.

dynamic_ContentSerializeFunc Source #

Arguments

:: (HasCallStack, MonadIO m, IsContentSerializer a) |
=> FunPtr C_ContentSerializeFunc |
-> a | `serializer`: a `GdkContentSerializer`
-> m () |

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

genClosure_ContentSerializeFunc :: MonadIO m => ContentSerializeFunc -> m (GClosure C_ContentSerializeFunc) Source #

Wrap the callback into a `GClosure`.

mk_ContentSerializeFunc :: C_ContentSerializeFunc -> IO (FunPtr C_ContentSerializeFunc) Source #

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

noContentSerializeFunc :: Maybe ContentSerializeFunc Source #

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

wrap_ContentSerializeFunc :: Maybe (Ptr (FunPtr C_ContentSerializeFunc)) -> ContentSerializeFunc -> C_ContentSerializeFunc Source #

Wrap a `ContentSerializeFunc` into a `C_ContentSerializeFunc`.

## CursorGetTextureCallback

type C_CursorGetTextureCallback = Ptr Cursor -> Int32 -> CDouble -> Ptr Int32 -> Ptr Int32 -> Ptr Int32 -> Ptr Int32 -> Ptr () -> IO (Ptr Texture) Source #

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

type CursorGetTextureCallback Source #

Arguments

= Cursor | `cursor`: the `GdkCursor`
-> Int32 | `cursorSize`: the nominal cursor size, in application pixels
-> Double | `scale`: the device scale
-> Ptr () | `data`: User data for the callback
-> IO (Maybe Texture, Int32, Int32, Int32, Int32) | Returns: the cursor image, or `NULL` if none could be produced.

The type of callback used by a dynamic `GdkCursor` to generate a texture for the cursor image at the given `cursorSize` and `scale`.

The actual cursor size in application pixels may be different from `cursorSize` x `cursorSize`, and will be returned in `width`, `height`. The returned texture should have a size that corresponds to the actual cursor size, in device pixels (i.e. application pixels, multiplied by `scale`).

This function may fail and return `NULL`, in which case the fallback cursor will be used.

dynamic_CursorGetTextureCallback Source #

Arguments

:: (HasCallStack, MonadIO m, IsCursor a) |
=> FunPtr C_CursorGetTextureCallback |
-> a | `cursor`: the `GdkCursor`
-> Int32 | `cursorSize`: the nominal cursor size, in application pixels
-> Double | `scale`: the device scale
-> Ptr () | `data`: User data for the callback
-> m (Maybe Texture, Int32, Int32, Int32, Int32) | Returns: the cursor image, or `NULL` if none could be produced.

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

genClosure_CursorGetTextureCallback :: MonadIO m => CursorGetTextureCallback -> m (GClosure C_CursorGetTextureCallback) Source #

Wrap the callback into a `GClosure`.

mk_CursorGetTextureCallback :: C_CursorGetTextureCallback -> IO (FunPtr C_CursorGetTextureCallback) Source #

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

noCursorGetTextureCallback :: Maybe CursorGetTextureCallback Source #

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

wrap_CursorGetTextureCallback :: Maybe (Ptr (FunPtr C_CursorGetTextureCallback)) -> CursorGetTextureCallback -> C_CursorGetTextureCallback Source #

Wrap a `CursorGetTextureCallback` into a `C_CursorGetTextureCallback`.