:right-sidebar: True IOFuncs =================================================================== .. currentmodule:: gi.repository.GLib .. class:: IOFuncs(*args, **kwargs) :no-contents-entry: A table of functions used to handle different types of :obj:`~gi.repository.GLib.IOChannel` in a generic way. Fields ------ .. rst-class:: interim-class .. class:: IOFuncs :no-index: .. attribute:: io_close Closes the channel. This is called from :func:`~gi.repository.GLib.IOChannel.close` after flushing the buffers. .. attribute:: io_create_watch Creates a watch on the channel. This call corresponds directly to :func:`~gi.repository.GLib.io_create_watch`. .. attribute:: io_free Called from :func:`~gi.repository.GLib.IOChannel.unref` when the channel needs to be freed. This function must free the memory associated with the channel, including freeing the :obj:`~gi.repository.GLib.IOChannel` structure itself. The channel buffers have been flushed and possibly ``io_close`` has been called by the time this function is called. .. attribute:: io_get_flags Gets the :obj:`~gi.repository.GLib.IOFlags` for the channel. This function need only return the :const:`~gi.repository.GLib.IOFlags.APPEND` and :const:`~gi.repository.GLib.IOFlags.NONBLOCK` flags; :func:`~gi.repository.GLib.IOChannel.get_flags` automatically adds the others as appropriate. .. attribute:: io_read Reads raw bytes from the channel. This is called from various functions such as :func:`~gi.repository.GLib.IOChannel.read_chars` to read raw bytes from the channel. Encoding and buffering issues are dealt with at a higher level. .. attribute:: io_seek Seeks the channel. This is called from :func:`~gi.repository.GLib.IOChannel.seek` on channels that support it. .. attribute:: io_set_flags Sets the :obj:`~gi.repository.GLib.IOFlags` on the channel. This is called from :func:`~gi.repository.GLib.IOChannel.set_flags` with all flags except for :const:`~gi.repository.GLib.IOFlags.APPEND` and :const:`~gi.repository.GLib.IOFlags.NONBLOCK` masked out. .. attribute:: io_write Writes raw bytes to the channel. This is called from various functions such as :func:`~gi.repository.GLib.IOChannel.write_chars` to write raw bytes to the channel. Encoding and buffering issues are dealt with at a higher level.