| Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria (inaki@blueleaf.cc) |
| 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
unixInputStreamNew or g_win32_input_stream_new(), 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
- noSimpleIOStream :: Maybe SimpleIOStream
- simpleIOStreamNew :: (HasCallStack, MonadIO m, IsInputStream a, IsOutputStream b) => a -> b -> m SimpleIOStream
- constructSimpleIOStreamInputStream :: (IsSimpleIOStream o, IsInputStream a) => a -> IO (GValueConstruct o)
- getSimpleIOStreamInputStream :: (MonadIO m, IsSimpleIOStream o) => o -> m (Maybe InputStream)
- constructSimpleIOStreamOutputStream :: (IsSimpleIOStream o, IsOutputStream a) => a -> IO (GValueConstruct o)
- getSimpleIOStreamOutputStream :: (MonadIO m, IsSimpleIOStream o) => o -> m (Maybe OutputStream)
Exported types
newtype SimpleIOStream Source #
Memory-managed wrapper type.
Constructors
| SimpleIOStream (ManagedPtr SimpleIOStream) |
Instances
| GObject SimpleIOStream Source # | |
Defined in GI.Gio.Objects.SimpleIOStream Methods gobjectType :: IO GType # | |
| HasParentTypes SimpleIOStream Source # | |
Defined in GI.Gio.Objects.SimpleIOStream | |
| type ParentTypes SimpleIOStream Source # | |
Defined in GI.Gio.Objects.SimpleIOStream | |
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.
noSimpleIOStream :: Maybe SimpleIOStream Source #
A convenience alias for Nothing :: Maybe SimpleIOStream.
Methods
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
No description available in the introspection data.
Since: 2.44
constructSimpleIOStreamInputStream :: (IsSimpleIOStream o, IsInputStream a) => a -> IO (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
outputStream
No description available in the introspection data.
Since: 2.44
constructSimpleIOStreamOutputStream :: (IsSimpleIOStream o, IsOutputStream a) => a -> IO (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