gi-gio-2.0.32: 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.Interfaces.FileDescriptorBased

Contents

- Exported types
- Methods
  - getFd

Description

`GFileDescriptorBased` is an interface for file descriptor based IO.

It 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 or the `GioUnix-2.0` GIR namespace when using it.

Since: 2.24

Synopsis

- newtype FileDescriptorBased = FileDescriptorBased (ManagedPtr FileDescriptorBased)
- class (GObject o, IsDescendantOf FileDescriptorBased 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

Instances details

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

class (GObject o, IsDescendantOf FileDescriptorBased o) => IsFileDescriptorBased o Source #

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

#### Instances

Instances details

(GObject o, IsDescendantOf FileDescriptorBased o) => IsFileDescriptorBased o Source # |
Instance details Defined in GI.Gio.Interfaces.FileDescriptorBased

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

### Click to display all available methods, including inherited ones

Expand

#### Methods

bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.

#### Getters

getData, getFd, getProperty, getQdata.

#### Setters

setData, setDataFull, setProperty.

## 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