gi-gio-2.0.27: Gio bindings

Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Gio.Objects.CharsetConverter

Contents

- Exported types
- Methods
  - Overloaded methods
  - getNumFallbacks
  - getUseFallback
  - new
  - setUseFallback
- Properties
  - fromCharset
  - toCharset
  - useFallback

Description

`CharsetConverter` is an implementation of `Converter` based on GIConv.

Synopsis

- newtype CharsetConverter = CharsetConverter (ManagedPtr CharsetConverter)
- class (GObject o, IsDescendantOf CharsetConverter o) => IsCharsetConverter o
- toCharsetConverter :: (MonadIO m, IsCharsetConverter o) => o -> m CharsetConverter
- charsetConverterGetNumFallbacks :: (HasCallStack, MonadIO m, IsCharsetConverter a) => a -> m Word32
- charsetConverterGetUseFallback :: (HasCallStack, MonadIO m, IsCharsetConverter a) => a -> m Bool
- charsetConverterNew :: (HasCallStack, MonadIO m) => Text -> Text -> m CharsetConverter
- charsetConverterSetUseFallback :: (HasCallStack, MonadIO m, IsCharsetConverter a) => a -> Bool -> m ()
- constructCharsetConverterFromCharset :: (IsCharsetConverter o, MonadIO m) => Text -> m (GValueConstruct o)
- getCharsetConverterFromCharset :: (MonadIO m, IsCharsetConverter o) => o -> m (Maybe Text)
- constructCharsetConverterToCharset :: (IsCharsetConverter o, MonadIO m) => Text -> m (GValueConstruct o)
- getCharsetConverterToCharset :: (MonadIO m, IsCharsetConverter o) => o -> m (Maybe Text)
- constructCharsetConverterUseFallback :: (IsCharsetConverter o, MonadIO m) => Bool -> m (GValueConstruct o)
- getCharsetConverterUseFallback :: (MonadIO m, IsCharsetConverter o) => o -> m Bool
- setCharsetConverterUseFallback :: (MonadIO m, IsCharsetConverter o) => o -> Bool -> m ()

# Exported types

newtype CharsetConverter Source #

Memory-managed wrapper type.

Constructors

CharsetConverter (ManagedPtr CharsetConverter) |

#### Instances

Instances details

Eq CharsetConverter Source # |
Instance details Defined in GI.Gio.Objects.CharsetConverter Methods (==) :: CharsetConverter -> CharsetConverter -> Bool # (/=) :: CharsetConverter -> CharsetConverter -> Bool #
GObject CharsetConverter Source # |
Instance details Defined in GI.Gio.Objects.CharsetConverter
TypedObject CharsetConverter Source # |
Instance details Defined in GI.Gio.Objects.CharsetConverter Methods glibType :: IO GType Source #
ManagedPtrNewtype CharsetConverter Source # |
Instance details Defined in GI.Gio.Objects.CharsetConverter Methods toManagedPtr :: CharsetConverter -> ManagedPtr CharsetConverter Source #
IsGValue CharsetConverter Source # | Convert `CharsetConverter` to and from `GValue` with `toGValue` and `fromGValue`.
Instance details Defined in GI.Gio.Objects.CharsetConverter Methods toGValue :: CharsetConverter -> IO GValue Source # fromGValue :: GValue -> IO CharsetConverter Source #
HasParentTypes CharsetConverter Source # |
Instance details Defined in GI.Gio.Objects.CharsetConverter
type ParentTypes CharsetConverter Source # |
Instance details Defined in GI.Gio.Objects.CharsetConverter type ParentTypes CharsetConverter = '[Object, Converter, Initable]

class (GObject o, IsDescendantOf CharsetConverter o) => IsCharsetConverter o Source #

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

#### Instances

Instances details

(GObject o, IsDescendantOf CharsetConverter o) => IsCharsetConverter o Source # |
Instance details Defined in GI.Gio.Objects.CharsetConverter

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

## Overloaded 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, MonadIO m) => Text -> m (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, MonadIO m) => Text -> m (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, MonadIO m) => Bool -> m (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 ]