diff options
author | Ryan Lortie <desrt@desrt.ca> | 2013-01-14 15:11:10 -0500 |
---|---|---|
committer | Ryan Lortie <desrt@desrt.ca> | 2013-01-15 14:08:02 -0500 |
commit | b68856a7c63289ae00394dafd354aa716477b8bc (patch) | |
tree | d1ea938a7cccd6550eb323c52fa643a54991bb67 /glib/gmain.h | |
parent | 83e5d169d6f0fd3d0427bc3599df8e777b275d9f (diff) | |
download | glib-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.h | 16 |
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 |