gi-gio-2.0.35: Gio bindings

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

GI.Gio.Objects.ConverterOutputStream

Contents

- Exported types
- Methods
  - getConverter
  - new
- Properties
  - converter

Description

Converter output stream implements `OutputStream` and allows conversion of data of various types during reading.

As of GLib 2.34, `GConverterOutputStream` implements `PollableOutputStream`.

Synopsis

- newtype ConverterOutputStream = ConverterOutputStream (ManagedPtr ConverterOutputStream)
- class (GObject o, IsDescendantOf ConverterOutputStream o) => IsConverterOutputStream o
- toConverterOutputStream :: (MonadIO m, IsConverterOutputStream o) => o -> m ConverterOutputStream
- converterOutputStreamGetConverter :: (HasCallStack, MonadIO m, IsConverterOutputStream a) => a -> m Converter
- converterOutputStreamNew :: (HasCallStack, MonadIO m, IsOutputStream a, IsConverter b) => a -> b -> m ConverterOutputStream
- constructConverterOutputStreamConverter :: (IsConverterOutputStream o, MonadIO m, IsConverter a) => a -> m (GValueConstruct o)
- getConverterOutputStreamConverter :: (MonadIO m, IsConverterOutputStream o) => o -> m Converter

# Exported types

newtype ConverterOutputStream Source #

Memory-managed wrapper type.

Constructors

ConverterOutputStream (ManagedPtr ConverterOutputStream) |

#### Instances

Instances details

Eq ConverterOutputStream Source # |
Instance details Defined in GI.Gio.Objects.ConverterOutputStream Methods (==) :: ConverterOutputStream -> ConverterOutputStream -> Bool Source # (/=) :: ConverterOutputStream -> ConverterOutputStream -> Bool Source #
GObject ConverterOutputStream Source # |
Instance details Defined in GI.Gio.Objects.ConverterOutputStream
ManagedPtrNewtype ConverterOutputStream Source # |
Instance details Defined in GI.Gio.Objects.ConverterOutputStream Methods toManagedPtr :: ConverterOutputStream -> ManagedPtr ConverterOutputStream Source #
TypedObject ConverterOutputStream Source # |
Instance details Defined in GI.Gio.Objects.ConverterOutputStream Methods glibType :: IO GType Source #
HasParentTypes ConverterOutputStream Source # |
Instance details Defined in GI.Gio.Objects.ConverterOutputStream
IsGValue (Maybe ConverterOutputStream) Source # | Convert `ConverterOutputStream` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.Gio.Objects.ConverterOutputStream Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe ConverterOutputStream -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe ConverterOutputStream) Source #
type ParentTypes ConverterOutputStream Source # |
Instance details Defined in GI.Gio.Objects.ConverterOutputStream type ParentTypes ConverterOutputStream = '[FilterOutputStream, OutputStream, Object, PollableOutputStream]

class (GObject o, IsDescendantOf ConverterOutputStream o) => IsConverterOutputStream o Source #

Type class for types which can be safely cast to `ConverterOutputStream`, for instance with `toConverterOutputStream`.

#### Instances

Instances details

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

toConverterOutputStream :: (MonadIO m, IsConverterOutputStream o) => o -> m ConverterOutputStream Source #

Cast to `ConverterOutputStream`, 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

Expand

#### Methods

bindProperty, bindPropertyFull, canPoll, clearPending, close, closeAsync, closeFinish, createSource, flush, flushAsync, flushFinish, forceFloating, freezeNotify, getv, hasPending, isClosed, isClosing, isFloating, isWritable, notify, notifyByPspec, ref, refSink, runDispose, splice, spliceAsync, spliceFinish, stealData, stealQdata, thawNotify, unref, watchClosure, write, writeAll, writeAllAsync, writeAllFinish, writeAsync, writeBytes, writeBytesAsync, writeBytesFinish, writeFinish, writeNonblocking, writev, writevAll, writevAllAsync, writevAllFinish, writevAsync, writevFinish, writevNonblocking.

#### Getters

getBaseStream, getCloseBaseStream, getConverter, getData, getProperty, getQdata.

#### Setters

setCloseBaseStream, setData, setDataFull, setPending, setProperty.

## getConverter

converterOutputStreamGetConverter Source #

Arguments

:: (HasCallStack, MonadIO m, IsConverterOutputStream a) |
=> a | `converterStream`: a `ConverterOutputStream`
-> m Converter | Returns: the converter of the converter output stream

Gets the `Converter` that is used by `converterStream`.

Since: 2.24

## new

converterOutputStreamNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsOutputStream a, IsConverter b) |
=> a | `baseStream`: a `OutputStream`
-> b | `converter`: a `Converter`
-> m ConverterOutputStream | Returns: a new `OutputStream`.

Creates a new converter output stream for the `baseStream`.

# Properties

## converter

The converter object.

constructConverterOutputStreamConverter :: (IsConverterOutputStream o, MonadIO m, IsConverter a) => a -> m (GValueConstruct o) Source #

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

getConverterOutputStreamConverter :: (MonadIO m, IsConverterOutputStream o) => o -> m Converter Source #

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

    get converterOutputStream #converter