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.GLib.Structs.IOFuncs
Description
A table of functions used to handle different types of IOChannel
in a generic way.
Synopsis
- newtype IOFuncs = IOFuncs (ManagedPtr IOFuncs)
- newZeroIOFuncs :: MonadIO m => m IOFuncs
- clearIOFuncsIoClose :: MonadIO m => IOFuncs -> m ()
- getIOFuncsIoClose :: MonadIO m => IOFuncs -> m (Maybe IOFuncsIoCloseFieldCallback)
- setIOFuncsIoClose :: MonadIO m => IOFuncs -> FunPtr C_IOFuncsIoCloseFieldCallback -> m ()
- clearIOFuncsIoCreateWatch :: MonadIO m => IOFuncs -> m ()
- getIOFuncsIoCreateWatch :: MonadIO m => IOFuncs -> m (Maybe IOFuncsIoCreateWatchFieldCallback)
- setIOFuncsIoCreateWatch :: MonadIO m => IOFuncs -> FunPtr C_IOFuncsIoCreateWatchFieldCallback -> m ()
- clearIOFuncsIoFree :: MonadIO m => IOFuncs -> m ()
- getIOFuncsIoFree :: MonadIO m => IOFuncs -> m (Maybe IOFuncsIoFreeFieldCallback)
- setIOFuncsIoFree :: MonadIO m => IOFuncs -> FunPtr C_IOFuncsIoFreeFieldCallback -> m ()
- clearIOFuncsIoGetFlags :: MonadIO m => IOFuncs -> m ()
- getIOFuncsIoGetFlags :: MonadIO m => IOFuncs -> m (Maybe IOFuncsIoGetFlagsFieldCallback)
- setIOFuncsIoGetFlags :: MonadIO m => IOFuncs -> FunPtr C_IOFuncsIoGetFlagsFieldCallback -> m ()
- clearIOFuncsIoRead :: MonadIO m => IOFuncs -> m ()
- getIOFuncsIoRead :: MonadIO m => IOFuncs -> m (Maybe IOFuncsIoReadFieldCallback)
- setIOFuncsIoRead :: MonadIO m => IOFuncs -> FunPtr C_IOFuncsIoReadFieldCallback -> m ()
- clearIOFuncsIoSeek :: MonadIO m => IOFuncs -> m ()
- getIOFuncsIoSeek :: MonadIO m => IOFuncs -> m (Maybe IOFuncsIoSeekFieldCallback)
- setIOFuncsIoSeek :: MonadIO m => IOFuncs -> FunPtr C_IOFuncsIoSeekFieldCallback -> m ()
- clearIOFuncsIoSetFlags :: MonadIO m => IOFuncs -> m ()
- getIOFuncsIoSetFlags :: MonadIO m => IOFuncs -> m (Maybe IOFuncsIoSetFlagsFieldCallback)
- setIOFuncsIoSetFlags :: MonadIO m => IOFuncs -> FunPtr C_IOFuncsIoSetFlagsFieldCallback -> m ()
- clearIOFuncsIoWrite :: MonadIO m => IOFuncs -> m ()
- getIOFuncsIoWrite :: MonadIO m => IOFuncs -> m (Maybe IOFuncsIoWriteFieldCallback)
- setIOFuncsIoWrite :: MonadIO m => IOFuncs -> FunPtr C_IOFuncsIoWriteFieldCallback -> m ()
Exported types
Memory-managed wrapper type.
Instances
Eq IOFuncs Source # | |
BoxedPtr IOFuncs Source # | |
Defined in GI.GLib.Structs.IOFuncs | |
CallocPtr IOFuncs Source # | |
Defined in GI.GLib.Structs.IOFuncs Methods boxedPtrCalloc :: IO (Ptr IOFuncs) | |
ManagedPtrNewtype IOFuncs Source # | |
Defined in GI.GLib.Structs.IOFuncs Methods toManagedPtr :: IOFuncs -> ManagedPtr IOFuncs | |
tag ~ 'AttrSet => Constructible IOFuncs tag Source # | |
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 ]