summaryrefslogtreecommitdiff
path: root/glib/glib-unix.h
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2013-01-14 14:47:16 -0500
committerRyan Lortie <desrt@desrt.ca>2013-01-15 14:08:02 -0500
commit6d1a6636090b498d43354d5503ac39fb10ac908c (patch)
tree59bce546a128365aa6d24917dc5ae696ebbe062a /glib/glib-unix.h
parentcbf68cb22d9f17721654283e97c2320025f03bc7 (diff)
downloadglib-6d1a6636090b498d43354d5503ac39fb10ac908c.tar.gz
Add a UNIX fd source
https://bugzilla.gnome.org/show_bug.cgi?id=658020
Diffstat (limited to 'glib/glib-unix.h')
-rw-r--r--glib/glib-unix.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/glib/glib-unix.h b/glib/glib-unix.h
index c04f66f3c..66ccf74cd 100644
--- a/glib/glib-unix.h
+++ b/glib/glib-unix.h
@@ -85,6 +85,39 @@ guint g_unix_signal_add (gint signum,
GSourceFunc handler,
gpointer user_data);
+/**
+ * GUnixFDSourceFunc:
+ * @fd: the fd that triggered the event
+ * @condition: the IO conditions reported on @fd
+ * @user_data: user data passed to g_unix_fd_add()
+ *
+ * The type of functions to be called when a UNIX fd watch source
+ * triggers.
+ *
+ * Returns: %FALSE if the source should be removed
+ **/
+typedef gboolean (*GUnixFDSourceFunc) (gint fd,
+ GIOCondition condition,
+ gpointer user_data);
+
+GLIB_AVAILABLE_IN_2_36
+GSource *g_unix_fd_source_new (gint fd,
+ GIOCondition condition);
+
+GLIB_AVAILABLE_IN_2_36
+guint g_unix_fd_add_full (gint priority,
+ gint fd,
+ GIOCondition condition,
+ GUnixFDSourceFunc function,
+ gpointer user_data,
+ GDestroyNotify notify);
+
+GLIB_AVAILABLE_IN_2_36
+guint g_unix_fd_add (gint fd,
+ GIOCondition condition,
+ GUnixFDSourceFunc function,
+ gpointer user_data);
+
G_END_DECLS
#endif /* __G_UNIX_H__ */