glib-unix: Improve documentation for g_unix_fd_source_new()

In particular, document the type of the callback function.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
Philip Withnall 2023-04-25 15:17:51 +01:00
parent 28b1b9d9c3
commit df9d3818ac

View File

@ -293,12 +293,15 @@ GSourceFuncs g_unix_fd_source_funcs = {
/** /**
* g_unix_fd_source_new: * g_unix_fd_source_new:
* @fd: a file descriptor * @fd: a file descriptor
* @condition: IO conditions to watch for on @fd * @condition: I/O conditions to watch for on @fd
* *
* Creates a #GSource to watch for a particular IO condition on a file * Creates a #GSource to watch for a particular I/O condition on a file
* descriptor. * descriptor.
* *
* The source will never close the fd -- you must do it yourself. * The source will never close the @fd you must do it yourself.
*
* Any callback attached to the returned #GSource must have type
* #GUnixFDSourceFunc.
* *
* Returns: the newly created #GSource * Returns: the newly created #GSource
* *