From b68856a7c63289ae00394dafd354aa716477b8bc Mon Sep 17 00:00:00 2001 From: Ryan Lortie Date: Mon, 14 Jan 2013 15:11:10 -0500 Subject: win32: add HANDLE equivalents of new fd APIs Add support for adding HANDLEs to a GSource and add API for creating a new GSource from a single HANDLE. --- glib/gmain.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'glib/gmain.h') diff --git a/glib/gmain.h b/glib/gmain.h index 47b4ecf1f..fe03ecaab 100644 --- a/glib/gmain.h +++ b/glib/gmain.h @@ -28,6 +28,10 @@ #include #include +#ifndef G_OS_UNIX +#include +#endif + G_BEGIN_DECLS typedef enum /*< flags >*/ @@ -485,7 +489,17 @@ void g_source_remove_unix_fd (GSource *source, GLIB_AVAILABLE_IN_2_36 GIOCondition g_source_query_unix_fd (GSource *source, gpointer tag); -#endif +#else /* G_OS_UNIX */ +GLIB_AVAILABLE_IN_2_36 +gpointer g_source_add_win32_handle (GSource *source, + HANDLE handle); +GLIB_AVAILABLE_IN_2_36 +void g_source_remove_win32_handle (GSource *source, + gpointer tag); +GLIB_AVAILABLE_IN_2_36 +gboolean g_source_query_win32_handle (GSource *source, + gpointer tag); +#endif /* !G_OS_UNIX */ /* Used to implement g_source_connect_closure and internally*/ GLIB_AVAILABLE_IN_ALL -- cgit v1.2.1