gi-wnck-3.0.14: Wnck bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Wnck.Callbacks

Description

 
Synopsis

Signals

LoadSurfaceFunction

type C_LoadSurfaceFunction = CString -> Int32 -> Word32 -> Ptr () -> IO (Ptr Surface) Source #

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

type LoadSurfaceFunction Source #

Arguments

 = Text

iconName: an icon name as in the Icon field in a .desktop file for the icon to load.

-> Int32

size: the desired icon size.

-> Word32

flags: not defined to do anything yet.

-> Ptr ()

data: data passed to the function, set when the LoadSurfaceFunction has been set for the Tasklist.

-> IO Surface

Returns: it should return a <classname>cairo_surface_t</classname> of iconName at size size, or Nothing if no icon for iconName at size size could be loaded.

Specifies the type of function passed to wnck_tasklist_set_icon_loader().

dynamic_LoadSurfaceFunction Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_LoadSurfaceFunction 
-> Text

iconName: an icon name as in the Icon field in a .desktop file for the icon to load.

-> Int32

size: the desired icon size.

-> Word32

flags: not defined to do anything yet.

-> Ptr ()

data: data passed to the function, set when the LoadSurfaceFunction has been set for the Tasklist.

-> m Surface

Returns: it should return a <classname>cairo_surface_t</classname> of iconName at size size, or Nothing if no icon for iconName at size size could be loaded.

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

genClosure_LoadSurfaceFunction :: MonadIO m => LoadSurfaceFunction -> m (GClosure C_LoadSurfaceFunction) Source #

Wrap the callback into a GClosure.

mk_LoadSurfaceFunction :: C_LoadSurfaceFunction -> IO (FunPtr C_LoadSurfaceFunction) Source #

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