Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
GCharsetConverter
is an implementation of Converter
based on
[structgLib
.IConv].
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.
Instances
Eq CharsetConverter Source # | |
Defined in GI.Gio.Objects.CharsetConverter (==) :: CharsetConverter -> CharsetConverter -> Bool # (/=) :: CharsetConverter -> CharsetConverter -> Bool # | |
GObject CharsetConverter Source # | |
Defined in GI.Gio.Objects.CharsetConverter | |
ManagedPtrNewtype CharsetConverter Source # | |
Defined in GI.Gio.Objects.CharsetConverter | |
TypedObject CharsetConverter Source # | |
Defined in GI.Gio.Objects.CharsetConverter | |
HasParentTypes CharsetConverter Source # | |
Defined in GI.Gio.Objects.CharsetConverter | |
IsGValue (Maybe CharsetConverter) Source # | Convert |
Defined in GI.Gio.Objects.CharsetConverter gvalueGType_ :: IO GType # gvalueSet_ :: Ptr GValue -> Maybe CharsetConverter -> IO () # gvalueGet_ :: Ptr GValue -> IO (Maybe CharsetConverter) # | |
type ParentTypes CharsetConverter Source # | |
Defined in GI.Gio.Objects.CharsetConverter |
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
(GObject o, IsDescendantOf CharsetConverter o) => IsCharsetConverter o Source # | |
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
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, convert, forceFloating, freezeNotify, getv, init, isFloating, notify, notifyByPspec, ref, refSink, reset, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getData, getNumFallbacks, getProperty, getQdata, getUseFallback.
Setters
getNumFallbacks
charsetConverterGetNumFallbacks Source #
:: (HasCallStack, MonadIO m, IsCharsetConverter a) | |
=> a |
|
-> m Word32 | Returns: the number of fallbacks that |
Gets the number of fallbacks that converter
has applied so far.
Since: 2.24
getUseFallback
charsetConverterGetUseFallback Source #
:: (HasCallStack, MonadIO m, IsCharsetConverter a) | |
=> a |
|
-> m Bool | Returns: |
Gets the CharsetConverter:useFallback property.
Since: 2.24
new
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> Text |
|
-> m CharsetConverter | Returns: a new |
Creates a new CharsetConverter
.
Since: 2.24
setUseFallback
charsetConverterSetUseFallback Source #
:: (HasCallStack, MonadIO m, IsCharsetConverter a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets the CharsetConverter:useFallback property.
Since: 2.24
Properties
fromCharset
The character encoding to convert from.
Since: 2.24
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
The character encoding to convert to.
Since: 2.24
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
Use fallback (of form \<hexval>
) for invalid bytes.
Since: 2.24
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 ]