Sets our main struct and passes it to the parent class.
Open a file @filename as a #GIOChannel using mode @mode. This channel will be closed when the last reference to it is dropped, so there is no need to call g_io_channel_close() (though doing so will not cause problems, as long as no attempt is made to access the channel after it is closed).
Creates a new #GIOChannel given a file descriptor. On UNIX systems this works for plain files, pipes, and sockets.
Close an IO channel. Any pending data to be written will be flushed, ignoring errors. The channel will not be freed until the last reference is dropped using g_io_channel_unref().
Increments the reference count of a #GIOChannel.
Flushes the write buffer for the GIOChannel.
This function returns a #GIOCondition depending on whether there is data to be read/space to write data in the internal buffers in the #GIOChannel. Only the flags %G_IO_IN and %G_IO_OUT may be set.
Gets the buffer size.
Returns whether @channel is buffered.
Returns whether the file/socket/whatever associated with @channel will be closed when @channel receives its final unref and is destroyed. The default value of this is %TRUE for channels created by g_io_channel_new_file (), and %FALSE for all other channels.
Gets the encoding for the input/output of the channel. The internal encoding is always UTF-8. The encoding %NULL makes the channel safe for binary data.
Gets the current flags for a #GIOChannel, including read-only flags such as %G_IO_FLAG_IS_READABLE.
Get the main Gtk struct
This returns the string that #GIOChannel uses to determine where in the file a line break occurs. A value of %NULL indicates autodetection.
the main Gtk struct as a void*
Initializes a #GIOChannel struct.
Reads data from a #GIOChannel.
Replacement for g_io_channel_read() with the new API.
Reads a line, including the terminating character(s), from a #GIOChannel into a newly-allocated string. @str_return will contain allocated memory if the return is %G_IO_STATUS_NORMAL.
Reads a line from a #GIOChannel, using a #GString as a buffer.
Reads all the remaining data from the file.
Reads a Unicode character from @channel. This function cannot be called on a channel with %NULL encoding.
Sets the current position in the #GIOChannel, similar to the standard library function fseek().
Replacement for g_io_channel_seek() with the new API.
Sets the buffer size.
The buffering state can only be set if the channel's encoding is %NULL. For any other encoding, the channel must be buffered.
Whether to close the channel on the final unref of the #GIOChannel data structure. The default value of this is %TRUE for channels created by g_io_channel_new_file (), and %FALSE for all other channels.
Sets the encoding for the input/output of the channel. The internal encoding is always UTF-8. The default encoding for the external file is UTF-8.
Sets the (writeable) flags in @channel to (@flags & %G_IO_FLAG_SET_MASK).
This sets the string that #GIOChannel uses to determine where in the file a line break occurs.
Close an IO channel. Any pending data to be written will be flushed if @flush is %TRUE. The channel will not be freed until the last reference is dropped using g_io_channel_unref().
Returns the file descriptor of the #GIOChannel.
Decrements the reference count of a #GIOChannel.
Writes data to a #GIOChannel.
Replacement for g_io_channel_write() with the new API.
Writes a Unicode character to @channel. This function cannot be called on a channel with %NULL encoding.
Converts an errno error number to a #GIOChannelError.
Adds the #GIOChannel into the default main loop context with the default priority.
Adds the #GIOChannel into the default main loop context with the given priority.
Creates a #GSource that's dispatched when @condition is met for the given @channel. For example, if condition is #G_IO_IN, the source will be dispatched when there's data available for reading.
the main Gtk struct
A data structure representing an IO Channel. The fields should be considered private and should only be accessed with the following functions.