Function

GLibunix_fd_add_full

Declaration

guint
g_unix_fd_add_full (
  gint priority,
  gint fd,
  GIOCondition condition,
  GUnixFDSourceFunc function,
  gpointer user_data,
  GDestroyNotify notify
)

Description

Sets a function to be called when the IO condition, as specified by condition becomes true for fd.

This is the same as g_unix_fd_add(), except that it allows you to specify a non-default priority and a provide a GDestroyNotify for user_data.

Available since:2.36

Parameters

priority gint
 

The priority of the source.

fd gint
 

A file descriptor.

condition GIOCondition
 

IO conditions to watch for on fd.

function GUnixFDSourceFunc
 

A GUnixFDSourceFunc.

user_data gpointer
 

Data to pass to function.

 The argument can be NULL.
 The data is owned by the caller of the function.
notify GDestroyNotify
 

Function to call when the idle is removed, or NULL.

Return value

Returns: guint
 

The ID (greater than 0) of the event source.