gi-handy-1.0.4: 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 NULL to fallback to the generated avatar

Deprecated: (Since version 1.2)use [methodavatar.set_loadable_icon] instead.

Callback for loading an [classavatar]'s image.

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.

Since: 1.0

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 NULL to fallback to the generated avatar

Callback for loading an [classavatar]'s image.

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.

Since: 1.0

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 NULL to fallback to the generated avatar

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

genClosure_AvatarImageLoadFunc :: MonadIO m => AvatarImageLoadFunc -> m (GClosure C_AvatarImageLoadFunc) Source #

Wrap the callback into a GClosure.

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 displayable name that represents value

Callback for getting the name of a row from an enum.

Called for combo rows that are bound to an enumeration with [methodcomboRow.set_for_enum] for each value from that enumeration.

See also: [funcenumValueRowName].

Since: 1.0

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 displayable name that represents value

Callback for getting the name of a row from an enum.

Called for combo rows that are bound to an enumeration with [methodcomboRow.set_for_enum] for each value from that enumeration.

See also: [funcenumValueRowName].

Since: 1.0

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 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 displayable name that represents item

Callback for getting the name of a row.

Called for combo rows that are bound to a ListModel with [methodcomboRow.bind_name_model] for each item that gets added to the model.

Since: 1.0

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 displayable name that represents item

Callback for getting the name of a row.

Called for combo rows that are bound to a ListModel with [methodcomboRow.bind_name_model] for each item that gets added to the model.

Since: 1.0

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 displayable name that represents item

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

genClosure_ComboRowGetNameFunc :: MonadIO m => ComboRowGetNameFunc -> m (GClosure C_ComboRowGetNameFunc) Source #

Wrap the callback into a GClosure.

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

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