Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
GI.Gio.Objects.SimpleIOStream
Description
GSimpleIOStream
creates a IOStream
from an arbitrary
InputStream
and OutputStream
. This allows any pair of
input and output streams to be used with IOStream
methods.
This is useful when you obtained a InputStream
and a
OutputStream
by other means, for instance creating them with
platform specific methods as
`g_unix_input_stream_new()`
(from gio-unix-2.0.pc
/ GioUnix-2.0
), and you want to
take advantage of the methods provided by IOStream
.
Since: 2.44
Synopsis
- newtype SimpleIOStream = SimpleIOStream (ManagedPtr SimpleIOStream)
- class (GObject o, IsDescendantOf SimpleIOStream o) => IsSimpleIOStream o
- toSimpleIOStream :: (MonadIO m, IsSimpleIOStream o) => o -> m SimpleIOStream
- type family ResolveSimpleIOStreamMethod (t :: Symbol) o where ...
- simpleIOStreamNew :: (HasCallStack, MonadIO m, IsInputStream a, IsOutputStream b) => a -> b -> m SimpleIOStream
- data SimpleIOStreamInputStreamPropertyInfo
- constructSimpleIOStreamInputStream :: (IsSimpleIOStream o, MonadIO m, IsInputStream a) => a -> m (GValueConstruct o)
- getSimpleIOStreamInputStream :: (MonadIO m, IsSimpleIOStream o) => o -> m (Maybe InputStream)
- simpleIOStreamInputStream :: AttrLabelProxy "inputStream"
- data SimpleIOStreamOutputStreamPropertyInfo
- constructSimpleIOStreamOutputStream :: (IsSimpleIOStream o, MonadIO m, IsOutputStream a) => a -> m (GValueConstruct o)
- getSimpleIOStreamOutputStream :: (MonadIO m, IsSimpleIOStream o) => o -> m (Maybe OutputStream)
- simpleIOStreamOutputStream :: AttrLabelProxy "outputStream"
Exported types
newtype SimpleIOStream Source #
Memory-managed wrapper type.
Constructors
SimpleIOStream (ManagedPtr SimpleIOStream) |
Instances
class (GObject o, IsDescendantOf SimpleIOStream o) => IsSimpleIOStream o Source #
Type class for types which can be safely cast to SimpleIOStream
, for instance with toSimpleIOStream
.
Instances
(GObject o, IsDescendantOf SimpleIOStream o) => IsSimpleIOStream o Source # | |
Defined in GI.Gio.Objects.SimpleIOStream |
toSimpleIOStream :: (MonadIO m, IsSimpleIOStream o) => o -> m SimpleIOStream Source #
Cast to SimpleIOStream
, 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, clearPending, close, closeAsync, closeFinish, forceFloating, freezeNotify, getv, hasPending, isClosed, isFloating, notify, notifyByPspec, ref, refSink, runDispose, spliceAsync, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getData, getInputStream, getOutputStream, getProperty, getQdata.
Setters
type family ResolveSimpleIOStreamMethod (t :: Symbol) o where ... Source #
Equations
new
Arguments
:: (HasCallStack, MonadIO m, IsInputStream a, IsOutputStream b) | |
=> a |
|
-> b |
|
-> m SimpleIOStream | Returns: a new |
Creates a new SimpleIOStream
wrapping inputStream
and outputStream
.
See also IOStream
.
Since: 2.44
Properties
inputStream
The InputStream
to read from.
Since: 2.44
data SimpleIOStreamInputStreamPropertyInfo Source #
Instances
constructSimpleIOStreamInputStream :: (IsSimpleIOStream o, MonadIO m, IsInputStream a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “input-stream
” property. This is rarely needed directly, but it is used by new
.
getSimpleIOStreamInputStream :: (MonadIO m, IsSimpleIOStream o) => o -> m (Maybe InputStream) Source #
Get the value of the “input-stream
” property.
When overloading is enabled, this is equivalent to
get
simpleIOStream #inputStream
simpleIOStreamInputStream :: AttrLabelProxy "inputStream" Source #
outputStream
The OutputStream
to write to.
Since: 2.44
data SimpleIOStreamOutputStreamPropertyInfo Source #
Instances
AttrInfo SimpleIOStreamOutputStreamPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SimpleIOStream Associated Types
Methods attrGet :: AttrBaseTypeConstraint SimpleIOStreamOutputStreamPropertyInfo o => o -> IO (AttrGetType SimpleIOStreamOutputStreamPropertyInfo) # attrSet :: (AttrBaseTypeConstraint SimpleIOStreamOutputStreamPropertyInfo o, AttrSetTypeConstraint SimpleIOStreamOutputStreamPropertyInfo b) => o -> b -> IO () # attrClear :: AttrBaseTypeConstraint SimpleIOStreamOutputStreamPropertyInfo o => o -> IO () # attrConstruct :: (AttrBaseTypeConstraint SimpleIOStreamOutputStreamPropertyInfo o, AttrSetTypeConstraint SimpleIOStreamOutputStreamPropertyInfo b) => b -> IO (GValueConstruct o) # attrTransfer :: (AttrBaseTypeConstraint SimpleIOStreamOutputStreamPropertyInfo o, AttrTransferTypeConstraint SimpleIOStreamOutputStreamPropertyInfo b) => Proxy o -> b -> IO (AttrTransferType SimpleIOStreamOutputStreamPropertyInfo) # | |||||||||||||||||||||||||||||||||
type AttrAllowedOps SimpleIOStreamOutputStreamPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SimpleIOStream | |||||||||||||||||||||||||||||||||
type AttrBaseTypeConstraint SimpleIOStreamOutputStreamPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrGetType SimpleIOStreamOutputStreamPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrLabel SimpleIOStreamOutputStreamPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SimpleIOStream | |||||||||||||||||||||||||||||||||
type AttrOrigin SimpleIOStreamOutputStreamPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrSetTypeConstraint SimpleIOStreamOutputStreamPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrTransferType SimpleIOStreamOutputStreamPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrTransferTypeConstraint SimpleIOStreamOutputStreamPropertyInfo Source # | |||||||||||||||||||||||||||||||||
constructSimpleIOStreamOutputStream :: (IsSimpleIOStream o, MonadIO m, IsOutputStream a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “output-stream
” property. This is rarely needed directly, but it is used by new
.
getSimpleIOStreamOutputStream :: (MonadIO m, IsSimpleIOStream o) => o -> m (Maybe OutputStream) Source #
Get the value of the “output-stream
” property.
When overloading is enabled, this is equivalent to
get
simpleIOStream #outputStream
simpleIOStreamOutputStream :: AttrLabelProxy "outputStream" Source #