gi-handy-1.0.1: libhandy bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Handy.Callbacks

Description

 
Synopsis

Signals

AvatarImageLoadFunc

type AvatarImageLoadFunc Source #

Arguments

 = Int32

size: the required size of the avatar

-> IO (Maybe Pixbuf)

Returns: the Pixbuf to use as a custom avatar or Nothing to fallback to the generated avatar.

Deprecated: (Since version 1.2)use avatarSetLoadableIcon instead.

The returned Pixbuf is expected to be square with width and height set to size. The image is cropped to a circle without any scaling or transformation.

type AvatarImageLoadFunc_WithClosures Source #

Arguments

 = Int32

size: the required size of the avatar

-> Ptr ()

userData: user data

-> IO (Maybe Pixbuf)

Returns: the Pixbuf to use as a custom avatar or Nothing to fallback to the generated avatar.

The returned Pixbuf is expected to be square with width and height set to size. The image is cropped to a circle without any scaling or transformation.

type C_AvatarImageLoadFunc = Int32 -> Ptr () -> IO (Ptr Pixbuf) Source #

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

drop_closures_AvatarImageLoadFunc :: AvatarImageLoadFunc -> AvatarImageLoadFunc_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_AvatarImageLoadFunc Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_AvatarImageLoadFunc 
-> Int32

size: the required size of the avatar

-> Ptr ()

userData: user data

-> m (Maybe Pixbuf)

Returns: the Pixbuf to use as a custom avatar or Nothing to fallback to the generated avatar.

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

mk_AvatarImageLoadFunc :: C_AvatarImageLoadFunc -> IO (FunPtr C_AvatarImageLoadFunc) Source #

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

ComboRowGetEnumValueNameFunc

type C_ComboRowGetEnumValueNameFunc = Ptr EnumValueObject -> Ptr () -> IO CString Source #

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

type ComboRowGetEnumValueNameFunc Source #

Arguments

 = EnumValueObject

value: the value from the enum from which to get a name

-> IO Text

Returns: a newly allocated displayable name that represents value

Called for combo rows that are bound to an enumeration with comboRowSetForEnum for each value from that enumeration.

type ComboRowGetEnumValueNameFunc_WithClosures Source #

Arguments

 = EnumValueObject

value: the value from the enum from which to get a name

-> Ptr ()

userData: user data

-> IO Text

Returns: a newly allocated displayable name that represents value

Called for combo rows that are bound to an enumeration with comboRowSetForEnum for each value from that enumeration.

dynamic_ComboRowGetEnumValueNameFunc Source #

Arguments

:: (HasCallStack, MonadIO m, IsEnumValueObject a) 
=> FunPtr C_ComboRowGetEnumValueNameFunc 
-> a

value: the value from the enum from which to get a name

-> Ptr ()

userData: user data

-> m Text

Returns: a newly allocated displayable name that represents value

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

ComboRowGetNameFunc

type C_ComboRowGetNameFunc = Ptr Object -> Ptr () -> IO CString Source #

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

type ComboRowGetNameFunc Source #

Arguments

 = Object

item: the item from the model from which to get a name

-> IO Text

Returns: a newly allocated displayable name that represents item

Called for combo rows that are bound to a ListModel with comboRowBindNameModel for each item that gets added to the model.

type ComboRowGetNameFunc_WithClosures Source #

Arguments

 = Object

item: the item from the model from which to get a name

-> Ptr ()

userData: user data

-> IO Text

Returns: a newly allocated displayable name that represents item

Called for combo rows that are bound to a ListModel with comboRowBindNameModel for each item that gets added to the model.

drop_closures_ComboRowGetNameFunc :: ComboRowGetNameFunc -> ComboRowGetNameFunc_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_ComboRowGetNameFunc Source #

Arguments

:: (HasCallStack, MonadIO m, IsObject a) 
=> FunPtr C_ComboRowGetNameFunc 
-> a

item: the item from the model from which to get a name

-> Ptr ()

userData: user data

-> m Text

Returns: a newly allocated displayable name that represents item

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

mk_ComboRowGetNameFunc :: C_ComboRowGetNameFunc -> IO (FunPtr C_ComboRowGetNameFunc) Source #

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