mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-11-01 00:42:16 +01:00 
			
		
		
		
	docs: Move the GIOChannel SECTION
Move it to the struct docs. Signed-off-by: Philip Withnall <pwithnall@gnome.org> Helps: #3037
This commit is contained in:
		| @@ -43,56 +43,45 @@ | ||||
| #include "glibintl.h" | ||||
|  | ||||
|  | ||||
| /** | ||||
|  * SECTION:iochannels | ||||
|  * @title: IO Channels | ||||
|  * @short_description: portable support for using files, pipes and sockets | ||||
|  * @see_also: g_io_add_watch(), g_io_add_watch_full(), g_source_remove(), | ||||
|  *     #GMainLoop | ||||
|  * | ||||
|  * The #GIOChannel data type aims to provide a portable method for | ||||
|  * using file descriptors, pipes, and sockets, and integrating them | ||||
|  * into the [main event loop][glib-The-Main-Event-Loop]. Currently, | ||||
|  * full support is available on UNIX platforms, support for Windows | ||||
|  * is only partially complete. | ||||
|  * | ||||
|  * To create a new #GIOChannel on UNIX systems use | ||||
|  * g_io_channel_unix_new(). This works for plain file descriptors, | ||||
|  * pipes and sockets. Alternatively, a channel can be created for a | ||||
|  * file in a system independent manner using g_io_channel_new_file(). | ||||
|  * | ||||
|  * Once a #GIOChannel has been created, it can be used in a generic | ||||
|  * manner with the functions g_io_channel_read_chars(), | ||||
|  * g_io_channel_write_chars(), g_io_channel_seek_position(), and | ||||
|  * g_io_channel_shutdown(). | ||||
|  * | ||||
|  * To add a #GIOChannel to the [main event loop][glib-The-Main-Event-Loop], | ||||
|  * use g_io_add_watch() or g_io_add_watch_full(). Here you specify which | ||||
|  * events you are interested in on the #GIOChannel, and provide a | ||||
|  * function to be called whenever these events occur. | ||||
|  * | ||||
|  * #GIOChannel instances are created with an initial reference count of 1. | ||||
|  * g_io_channel_ref() and g_io_channel_unref() can be used to | ||||
|  * increment or decrement the reference count respectively. When the | ||||
|  * reference count falls to 0, the #GIOChannel is freed. (Though it | ||||
|  * isn't closed automatically, unless it was created using | ||||
|  * g_io_channel_new_file().) Using g_io_add_watch() or | ||||
|  * g_io_add_watch_full() increments a channel's reference count. | ||||
|  * | ||||
|  * The new functions g_io_channel_read_chars(), | ||||
|  * g_io_channel_read_line(), g_io_channel_read_line_string(), | ||||
|  * g_io_channel_read_to_end(), g_io_channel_write_chars(), | ||||
|  * g_io_channel_seek_position(), and g_io_channel_flush() should not be | ||||
|  * mixed with the deprecated functions g_io_channel_read(), | ||||
|  * g_io_channel_write(), and g_io_channel_seek() on the same channel. | ||||
|  **/ | ||||
|  | ||||
| /** | ||||
|  * GIOChannel: | ||||
|  * | ||||
|  * A data structure representing an IO Channel. The fields should be | ||||
|  * considered private and should only be accessed with the following | ||||
|  * functions. | ||||
|  * The `GIOChannel` data type aims to provide a portable method for | ||||
|  * using file descriptors, pipes, and sockets, and integrating them | ||||
|  * into the main event loop (see [struct@GLib.MainContext]). Currently, | ||||
|  * full support is available on UNIX platforms; support for Windows | ||||
|  * is only partially complete. | ||||
|  * | ||||
|  * To create a new `GIOChannel` on UNIX systems use | ||||
|  * [ctor@GLib.IOChannel.unix_new]. This works for plain file descriptors, | ||||
|  * pipes and sockets. Alternatively, a channel can be created for a | ||||
|  * file in a system independent manner using [ctor@GLib.IOChannel.new_file]. | ||||
|  * | ||||
|  * Once a `GIOChannel` has been created, it can be used in a generic | ||||
|  * manner with the functions [method@GLib.IOChannel.read_chars], | ||||
|  * [method@GLib.IOChannel.write_chars], [method@GLib.IOChannel.seek_position], | ||||
|  * and [method@GLib.IOChannel.shutdown]. | ||||
|  * | ||||
|  * To add a `GIOChannel` to the main event loop, use [func@GLib.io_add_watch] or | ||||
|  * [func@GLib.io_add_watch_full]. Here you specify which events you are | ||||
|  * interested in on the `GIOChannel`, and provide a function to be called | ||||
|  * whenever these events occur. | ||||
|  * | ||||
|  * `GIOChannel` instances are created with an initial reference count of 1. | ||||
|  * [method@GLib.IOChannel.ref] and [method@GLib.IOChannel.unref] can be used to | ||||
|  * increment or decrement the reference count respectively. When the | ||||
|  * reference count falls to 0, the `GIOChannel` is freed. (Though it | ||||
|  * isn’t closed automatically, unless it was created using | ||||
|  * [ctor@GLib.IOChannel.new_file].) Using [func@GLib.io_add_watch] or | ||||
|  * [func@GLib.io_add_watch_full] increments a channel’s reference count. | ||||
|  * | ||||
|  * The new functions [method@GLib.IOChannel.read_chars], | ||||
|  * [method@GLib.IOChannel.read_line], [method@GLib.IOChannel.read_line_string], | ||||
|  * [method@GLib.IOChannel.read_to_end], [method@GLib.IOChannel.write_chars], | ||||
|  * [method@GLib.IOChannel.seek_position], and [method@GLib.IOChannel.flush] | ||||
|  * should not be mixed with the deprecated functions | ||||
|  * [method@GLib.IOChannel.read], [method@GLib.IOChannel.write], and | ||||
|  * [method@GLib.IOChannel.seek] on the same channel. | ||||
|  **/ | ||||
|  | ||||
| /** | ||||
|   | ||||
		Reference in New Issue
	
	Block a user