gi-handy-0.0.4: libhandy bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (inaki@blueleaf.cc)
Safe HaskellNone
LanguageHaskell2010

GI.Handy.Functions

Contents

Description

 
Synopsis

Methods

enumValueRowName

enumValueRowName Source #

Arguments

:: (HasCallStack, MonadIO m, IsEnumValueObject a) 
=> a

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

-> Ptr ()

userData: unused user data

-> m Text

Returns: a newly allocated displayable name that represents value

This is a default implementation of ComboRowGetEnumValueNameFunc to be used with comboRowSetForEnum. If the enumeration has a nickname, it will return it, otherwise it will return its name.

Since: 0.0.6

init

init Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Maybe [Text]

argv: Address of the <parameter>argv</parameter> parameter of main(), or Nothing. Any options understood by Handy are stripped before return.

-> m (Bool, Maybe [Text])

Returns: True if initialization was successful, False otherwise.

Call this function before using any other Handy functions in your GUI applications. If libhandy has already been initialized, the function will simply return without processing the new arguments.

listBoxSeparatorHeader

listBoxSeparatorHeader Source #

Arguments

:: (HasCallStack, MonadIO m, IsListBoxRow a, IsListBoxRow b) 
=> a

row: the row to update

-> Maybe b

before: the row before row, or Nothing if it is first

-> Ptr ()

unusedUserData: unused user data

-> m () 

Separates rows by using Separator as headers. The first row doesn't have a separator as there is no row above it.

Since: 0.0.6

stringUtf8Len

stringUtf8Len Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> String

string: a String

-> m CLong

Returns: the length of string in characters

Computes the length of the string in utf-8 characters. See g_utf8_strlen.

stringUtf8Truncate

stringUtf8Truncate Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> String

string: a String

-> Word64

len: the new size of the string

-> m String

Returns: string

Cut of the end of the string string so that len utf8 characters remain