Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (inaki@blueleaf.cc) |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- enumValueRowName :: (HasCallStack, MonadIO m, IsEnumValueObject a) => a -> Ptr () -> m Text
- init :: (HasCallStack, MonadIO m) => Maybe [Text] -> m (Bool, Maybe [Text])
- listBoxSeparatorHeader :: (HasCallStack, MonadIO m, IsListBoxRow a, IsListBoxRow b) => a -> Maybe b -> Ptr () -> m ()
- stringUtf8Len :: (HasCallStack, MonadIO m) => String -> m CLong
- stringUtf8Truncate :: (HasCallStack, MonadIO m) => String -> Word64 -> m String
Methods
enumValueRowName
:: (HasCallStack, MonadIO m, IsEnumValueObject a) | |
=> a |
|
-> Ptr () |
|
-> m Text | Returns: a newly allocated displayable name that represents |
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
:: (HasCallStack, MonadIO m) | |
=> Maybe [Text] |
|
-> m (Bool, Maybe [Text]) | Returns: |
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 #
:: (HasCallStack, MonadIO m, IsListBoxRow a, IsListBoxRow b) | |
=> a |
|
-> Maybe b |
|
-> Ptr () |
|
-> 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
:: (HasCallStack, MonadIO m) | |
=> String |
|
-> m CLong | Returns: the length of |
Computes the length of the string in utf-8 characters. See g_utf8_strlen
.
stringUtf8Truncate
:: (HasCallStack, MonadIO m) | |
=> String |
|
-> Word64 |
|
-> m String | Returns: |
Cut of the end of the string string
so that len
utf8 characters remain