summaryrefslogtreecommitdiff
path: root/glib/gmain.h
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2013-01-14 15:11:10 -0500
committerRyan Lortie <desrt@desrt.ca>2013-01-15 14:08:02 -0500
commitb68856a7c63289ae00394dafd354aa716477b8bc (patch)
treed1ea938a7cccd6550eb323c52fa643a54991bb67 /glib/gmain.h
parent83e5d169d6f0fd3d0427bc3599df8e777b275d9f (diff)
downloadglib-wip/win32-source-api.tar.gz
win32: add HANDLE equivalents of new fd APIswip/win32-source-api
Add support for adding HANDLEs to a GSource and add API for creating a new GSource from a single HANDLE.
Diffstat (limited to 'glib/gmain.h')
-rw-r--r--glib/gmain.h16
1 files changed, 15 insertions, 1 deletions
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 <glib/gslist.h>
#include <glib/gthread.h>
+#ifndef G_OS_UNIX
+#include <windows.h>
+#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