gi-gio-2.0.18: Gio bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gio.Objects.CharsetConverter

Contents

Description

CharsetConverter is an implementation of Converter based on GIConv.

Synopsis

Exported types

class GObject o => IsCharsetConverter o Source #

Type class for types which can be safely cast to CharsetConverter, for instance with toCharsetConverter.

toCharsetConverter :: (MonadIO m, IsCharsetConverter o) => o -> m CharsetConverter Source #

Cast to CharsetConverter, for types for which this is known to be safe. For general casts, use castTo.

Methods

getNumFallbacks

charsetConverterGetNumFallbacks Source #

Arguments

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

converter: a CharsetConverter

-> m Word32

Returns: the number of fallbacks that converter has applied

Gets the number of fallbacks that converter has applied so far.

Since: 2.24

getUseFallback

charsetConverterGetUseFallback Source #

Arguments

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

converter: a CharsetConverter

-> m Bool

Returns: True if fallbacks are used by converter

Gets the CharsetConverter:use-fallback property.

Since: 2.24

new

charsetConverterNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

toCharset: destination charset

-> Text

fromCharset: source charset

-> m CharsetConverter

Returns: a new CharsetConverter or Nothing on error. (Can throw GError)

Creates a new CharsetConverter.

Since: 2.24

setUseFallback

charsetConverterSetUseFallback Source #

Arguments

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

converter: a CharsetConverter

-> Bool

useFallback: True to use fallbacks

-> m () 

Sets the CharsetConverter:use-fallback property.

Since: 2.24

Properties

fromCharset

No description available in the introspection data.

constructCharsetConverterFromCharset :: IsCharsetConverter o => Text -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “from-charset” property. This is rarely needed directly, but it is used by new.

getCharsetConverterFromCharset :: (MonadIO m, IsCharsetConverter o) => o -> m (Maybe Text) Source #

Get the value of the “from-charset” property. When overloading is enabled, this is equivalent to

get charsetConverter #fromCharset

toCharset

No description available in the introspection data.

constructCharsetConverterToCharset :: IsCharsetConverter o => Text -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “to-charset” property. This is rarely needed directly, but it is used by new.

getCharsetConverterToCharset :: (MonadIO m, IsCharsetConverter o) => o -> m (Maybe Text) Source #

Get the value of the “to-charset” property. When overloading is enabled, this is equivalent to

get charsetConverter #toCharset

useFallback

No description available in the introspection data.

constructCharsetConverterUseFallback :: IsCharsetConverter o => Bool -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “use-fallback” property. This is rarely needed directly, but it is used by new.

getCharsetConverterUseFallback :: (MonadIO m, IsCharsetConverter o) => o -> m Bool Source #

Get the value of the “use-fallback” property. When overloading is enabled, this is equivalent to

get charsetConverter #useFallback

setCharsetConverterUseFallback :: (MonadIO m, IsCharsetConverter o) => o -> Bool -> m () Source #

Set the value of the “use-fallback” property. When overloading is enabled, this is equivalent to

set charsetConverter [ #useFallback := value ]