gi-gdk4-4.0.10: Gdk bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Gdk.Callbacks

Description

 
Synopsis

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.

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.

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.

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.

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.

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.