gi-glib-2.0.30: GLib bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.GLib.Structs.IOFuncs

Description

A table of functions used to handle different types of IOChannel in a generic way.

Synopsis

Exported types

newtype IOFuncs Source #

Memory-managed wrapper type.

Constructors

IOFuncs (ManagedPtr IOFuncs) 

Instances

Instances details
Eq IOFuncs Source # 
Instance details

Defined in GI.GLib.Structs.IOFuncs

Methods

(==) :: IOFuncs -> IOFuncs -> Bool #

(/=) :: IOFuncs -> IOFuncs -> Bool #

BoxedPtr IOFuncs Source # 
Instance details

Defined in GI.GLib.Structs.IOFuncs

CallocPtr IOFuncs Source # 
Instance details

Defined in GI.GLib.Structs.IOFuncs

ManagedPtrNewtype IOFuncs Source # 
Instance details

Defined in GI.GLib.Structs.IOFuncs

Methods

toManagedPtr :: IOFuncs -> ManagedPtr IOFuncs

tag ~ 'AttrSet => Constructible IOFuncs tag Source # 
Instance details

Defined in GI.GLib.Structs.IOFuncs

Methods

new :: MonadIO m => (ManagedPtr IOFuncs -> IOFuncs) -> [AttrOp IOFuncs tag] -> m IOFuncs

newZeroIOFuncs :: MonadIO m => m IOFuncs Source #

Construct a IOFuncs struct initialized to zero.

Methods

Properties

ioClose

closes the channel. This is called from iOChannelClose after flushing the buffers.

clearIOFuncsIoClose :: MonadIO m => IOFuncs -> m () Source #

Set the value of the “io_close” field to Nothing. When overloading is enabled, this is equivalent to

clear #ioClose

getIOFuncsIoClose :: MonadIO m => IOFuncs -> m (Maybe IOFuncsIoCloseFieldCallback) Source #

Get the value of the “io_close” field. When overloading is enabled, this is equivalent to

get iOFuncs #ioClose

setIOFuncsIoClose :: MonadIO m => IOFuncs -> FunPtr C_IOFuncsIoCloseFieldCallback -> m () Source #

Set the value of the “io_close” field. When overloading is enabled, this is equivalent to

set iOFuncs [ #ioClose := value ]

ioCreateWatch

creates a watch on the channel. This call corresponds directly to ioCreateWatch.

clearIOFuncsIoCreateWatch :: MonadIO m => IOFuncs -> m () Source #

Set the value of the “io_create_watch” field to Nothing. When overloading is enabled, this is equivalent to

clear #ioCreateWatch

getIOFuncsIoCreateWatch :: MonadIO m => IOFuncs -> m (Maybe IOFuncsIoCreateWatchFieldCallback) Source #

Get the value of the “io_create_watch” field. When overloading is enabled, this is equivalent to

get iOFuncs #ioCreateWatch

setIOFuncsIoCreateWatch :: MonadIO m => IOFuncs -> FunPtr C_IOFuncsIoCreateWatchFieldCallback -> m () Source #

Set the value of the “io_create_watch” field. When overloading is enabled, this is equivalent to

set iOFuncs [ #ioCreateWatch := value ]

ioFree

called from iOChannelUnref when the channel needs to be freed. This function must free the memory associated with the channel, including freeing the IOChannel structure itself. The channel buffers have been flushed and possibly ioClose has been called by the time this function is called.

clearIOFuncsIoFree :: MonadIO m => IOFuncs -> m () Source #

Set the value of the “io_free” field to Nothing. When overloading is enabled, this is equivalent to

clear #ioFree

getIOFuncsIoFree :: MonadIO m => IOFuncs -> m (Maybe IOFuncsIoFreeFieldCallback) Source #

Get the value of the “io_free” field. When overloading is enabled, this is equivalent to

get iOFuncs #ioFree

setIOFuncsIoFree :: MonadIO m => IOFuncs -> FunPtr C_IOFuncsIoFreeFieldCallback -> m () Source #

Set the value of the “io_free” field. When overloading is enabled, this is equivalent to

set iOFuncs [ #ioFree := value ]

ioGetFlags

gets the IOFlags for the channel. This function need only return the IOFlagsAppend and IOFlagsNonblock flags; iOChannelGetFlags automatically adds the others as appropriate.

clearIOFuncsIoGetFlags :: MonadIO m => IOFuncs -> m () Source #

Set the value of the “io_get_flags” field to Nothing. When overloading is enabled, this is equivalent to

clear #ioGetFlags

getIOFuncsIoGetFlags :: MonadIO m => IOFuncs -> m (Maybe IOFuncsIoGetFlagsFieldCallback) Source #

Get the value of the “io_get_flags” field. When overloading is enabled, this is equivalent to

get iOFuncs #ioGetFlags

setIOFuncsIoGetFlags :: MonadIO m => IOFuncs -> FunPtr C_IOFuncsIoGetFlagsFieldCallback -> m () Source #

Set the value of the “io_get_flags” field. When overloading is enabled, this is equivalent to

set iOFuncs [ #ioGetFlags := value ]

ioRead

reads raw bytes from the channel. This is called from various functions such as iOChannelReadChars to read raw bytes from the channel. Encoding and buffering issues are dealt with at a higher level.

clearIOFuncsIoRead :: MonadIO m => IOFuncs -> m () Source #

Set the value of the “io_read” field to Nothing. When overloading is enabled, this is equivalent to

clear #ioRead

getIOFuncsIoRead :: MonadIO m => IOFuncs -> m (Maybe IOFuncsIoReadFieldCallback) Source #

Get the value of the “io_read” field. When overloading is enabled, this is equivalent to

get iOFuncs #ioRead

setIOFuncsIoRead :: MonadIO m => IOFuncs -> FunPtr C_IOFuncsIoReadFieldCallback -> m () Source #

Set the value of the “io_read” field. When overloading is enabled, this is equivalent to

set iOFuncs [ #ioRead := value ]

ioSeek

seeks the channel. This is called from iOChannelSeek on channels that support it.

clearIOFuncsIoSeek :: MonadIO m => IOFuncs -> m () Source #

Set the value of the “io_seek” field to Nothing. When overloading is enabled, this is equivalent to

clear #ioSeek

getIOFuncsIoSeek :: MonadIO m => IOFuncs -> m (Maybe IOFuncsIoSeekFieldCallback) Source #

Get the value of the “io_seek” field. When overloading is enabled, this is equivalent to

get iOFuncs #ioSeek

setIOFuncsIoSeek :: MonadIO m => IOFuncs -> FunPtr C_IOFuncsIoSeekFieldCallback -> m () Source #

Set the value of the “io_seek” field. When overloading is enabled, this is equivalent to

set iOFuncs [ #ioSeek := value ]

ioSetFlags

sets the IOFlags on the channel. This is called from iOChannelSetFlags with all flags except for IOFlagsAppend and IOFlagsNonblock masked out.

clearIOFuncsIoSetFlags :: MonadIO m => IOFuncs -> m () Source #

Set the value of the “io_set_flags” field to Nothing. When overloading is enabled, this is equivalent to

clear #ioSetFlags

getIOFuncsIoSetFlags :: MonadIO m => IOFuncs -> m (Maybe IOFuncsIoSetFlagsFieldCallback) Source #

Get the value of the “io_set_flags” field. When overloading is enabled, this is equivalent to

get iOFuncs #ioSetFlags

setIOFuncsIoSetFlags :: MonadIO m => IOFuncs -> FunPtr C_IOFuncsIoSetFlagsFieldCallback -> m () Source #

Set the value of the “io_set_flags” field. When overloading is enabled, this is equivalent to

set iOFuncs [ #ioSetFlags := value ]

ioWrite

writes raw bytes to the channel. This is called from various functions such as iOChannelWriteChars to write raw bytes to the channel. Encoding and buffering issues are dealt with at a higher level.

clearIOFuncsIoWrite :: MonadIO m => IOFuncs -> m () Source #

Set the value of the “io_write” field to Nothing. When overloading is enabled, this is equivalent to

clear #ioWrite

getIOFuncsIoWrite :: MonadIO m => IOFuncs -> m (Maybe IOFuncsIoWriteFieldCallback) Source #

Get the value of the “io_write” field. When overloading is enabled, this is equivalent to

get iOFuncs #ioWrite

setIOFuncsIoWrite :: MonadIO m => IOFuncs -> FunPtr C_IOFuncsIoWriteFieldCallback -> m () Source #

Set the value of the “io_write” field. When overloading is enabled, this is equivalent to

set iOFuncs [ #ioWrite := value ]