gi-gio-2.0.19: Gio bindings

Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com)
Safe Haskell | None
Language | Haskell2010

GI.Gio.Interfaces.FileDescriptorBased

Contents

- Exported types
- Methods
  - getFd

Description

`FileDescriptorBased` is implemented by streams (implementations of `InputStream` or `OutputStream`) that are based on file descriptors.

Note that `<gio/gfiledescriptorbased.h>` belongs to the UNIX-specific GIO interfaces, thus you have to use the `gio-unix-2.0.pc` pkg-config file when using it.

Since: 2.24

Synopsis

- newtype FileDescriptorBased = FileDescriptorBased (ManagedPtr FileDescriptorBased)
- noFileDescriptorBased :: Maybe FileDescriptorBased
- class GObject o => IsFileDescriptorBased o
- toFileDescriptorBased :: (MonadIO m, IsFileDescriptorBased o) => o -> m FileDescriptorBased
- fileDescriptorBasedGetFd :: (HasCallStack, MonadIO m, IsFileDescriptorBased a) => a -> m Int32

# Exported types

newtype FileDescriptorBased Source #

Memory-managed wrapper type.

Constructors

FileDescriptorBased (ManagedPtr FileDescriptorBased) |

Instances

GObject FileDescriptorBased Source # |
Instance details Defined in GI.Gio.Interfaces.FileDescriptorBased Methods gobjectType :: FileDescriptorBased -> IO GType Source #
IsObject FileDescriptorBased Source # |
Instance details Defined in GI.Gio.Interfaces.FileDescriptorBased
IsFileDescriptorBased FileDescriptorBased Source # |
Instance details Defined in GI.Gio.Interfaces.FileDescriptorBased

noFileDescriptorBased :: Maybe FileDescriptorBased Source #

A convenience alias for `Nothing` :: `Maybe` `FileDescriptorBased`.

class GObject o => IsFileDescriptorBased o Source #

Type class for types which can be safely cast to `FileDescriptorBased`, for instance with `toFileDescriptorBased`.

Instances

(GObject a, (UnknownAncestorError FileDescriptorBased a :: Constraint)) => IsFileDescriptorBased a Source # |
Instance details Defined in GI.Gio.Interfaces.FileDescriptorBased
IsFileDescriptorBased FileDescriptorBased Source # |
Instance details Defined in GI.Gio.Interfaces.FileDescriptorBased
IsFileDescriptorBased UnixInputStream Source # |
Instance details Defined in GI.Gio.Objects.UnixInputStream
IsFileDescriptorBased UnixOutputStream Source # |
Instance details Defined in GI.Gio.Objects.UnixOutputStream

toFileDescriptorBased :: (MonadIO m, IsFileDescriptorBased o) => o -> m FileDescriptorBased Source #

Cast to `FileDescriptorBased`, for types for which this is known to be safe. For general casts, use `castTo`.

# Methods

## getFd

fileDescriptorBasedGetFd Source #

Arguments

:: (HasCallStack, MonadIO m, IsFileDescriptorBased a) |
=> a | `fdBased`: a `FileDescriptorBased`.
-> m Int32 | Returns: The file descriptor

Gets the underlying file descriptor.

Since: 2.24