mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-12 15:36:17 +01:00
glib/giochannel.h Remove bogus (Win32-only) declaration of
2003-06-05 Tor Lillqvist <tml@iki.fi> * glib/giochannel.h * glib/gmain.h: Remove bogus (Win32-only) declaration of g_main_poll_win32_msg_add(). No such function exists. * glib/gmain.c (g_poll) [Win32]: Use g_win32_error_message() for better warning messages.
This commit is contained in:
parent
99c0940b78
commit
1cf610e216
@ -1,3 +1,12 @@
|
|||||||
|
2003-06-05 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* glib/giochannel.h
|
||||||
|
* glib/gmain.h: Remove bogus (Win32-only) declaration of
|
||||||
|
g_main_poll_win32_msg_add(). No such function exists.
|
||||||
|
|
||||||
|
* glib/gmain.c (g_poll) [Win32]: Use g_win32_error_message() for
|
||||||
|
better warning messages.
|
||||||
|
|
||||||
2003-06-04 Noah Levitt <nlevitt@columbia.edu>
|
2003-06-04 Noah Levitt <nlevitt@columbia.edu>
|
||||||
|
|
||||||
* glib/gunidecomp.h (combine): Fix typo (#114375). Also, make the
|
* glib/gunidecomp.h (combine): Fix typo (#114375). Also, make the
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
2003-06-05 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* glib/giochannel.h
|
||||||
|
* glib/gmain.h: Remove bogus (Win32-only) declaration of
|
||||||
|
g_main_poll_win32_msg_add(). No such function exists.
|
||||||
|
|
||||||
|
* glib/gmain.c (g_poll) [Win32]: Use g_win32_error_message() for
|
||||||
|
better warning messages.
|
||||||
|
|
||||||
2003-06-04 Noah Levitt <nlevitt@columbia.edu>
|
2003-06-04 Noah Levitt <nlevitt@columbia.edu>
|
||||||
|
|
||||||
* glib/gunidecomp.h (combine): Fix typo (#114375). Also, make the
|
* glib/gunidecomp.h (combine): Fix typo (#114375). Also, make the
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
2003-06-05 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* glib/giochannel.h
|
||||||
|
* glib/gmain.h: Remove bogus (Win32-only) declaration of
|
||||||
|
g_main_poll_win32_msg_add(). No such function exists.
|
||||||
|
|
||||||
|
* glib/gmain.c (g_poll) [Win32]: Use g_win32_error_message() for
|
||||||
|
better warning messages.
|
||||||
|
|
||||||
2003-06-04 Noah Levitt <nlevitt@columbia.edu>
|
2003-06-04 Noah Levitt <nlevitt@columbia.edu>
|
||||||
|
|
||||||
* glib/gunidecomp.h (combine): Fix typo (#114375). Also, make the
|
* glib/gunidecomp.h (combine): Fix typo (#114375). Also, make the
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
2003-06-05 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* glib/giochannel.h
|
||||||
|
* glib/gmain.h: Remove bogus (Win32-only) declaration of
|
||||||
|
g_main_poll_win32_msg_add(). No such function exists.
|
||||||
|
|
||||||
|
* glib/gmain.c (g_poll) [Win32]: Use g_win32_error_message() for
|
||||||
|
better warning messages.
|
||||||
|
|
||||||
2003-06-04 Noah Levitt <nlevitt@columbia.edu>
|
2003-06-04 Noah Levitt <nlevitt@columbia.edu>
|
||||||
|
|
||||||
* glib/gunidecomp.h (combine): Fix typo (#114375). Also, make the
|
* glib/gunidecomp.h (combine): Fix typo (#114375). Also, make the
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
2003-06-05 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* glib/giochannel.h
|
||||||
|
* glib/gmain.h: Remove bogus (Win32-only) declaration of
|
||||||
|
g_main_poll_win32_msg_add(). No such function exists.
|
||||||
|
|
||||||
|
* glib/gmain.c (g_poll) [Win32]: Use g_win32_error_message() for
|
||||||
|
better warning messages.
|
||||||
|
|
||||||
2003-06-04 Noah Levitt <nlevitt@columbia.edu>
|
2003-06-04 Noah Levitt <nlevitt@columbia.edu>
|
||||||
|
|
||||||
* glib/gunidecomp.h (combine): Fix typo (#114375). Also, make the
|
* glib/gunidecomp.h (combine): Fix typo (#114375). Also, make the
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
2003-06-05 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* glib/giochannel.h
|
||||||
|
* glib/gmain.h: Remove bogus (Win32-only) declaration of
|
||||||
|
g_main_poll_win32_msg_add(). No such function exists.
|
||||||
|
|
||||||
|
* glib/gmain.c (g_poll) [Win32]: Use g_win32_error_message() for
|
||||||
|
better warning messages.
|
||||||
|
|
||||||
2003-06-04 Noah Levitt <nlevitt@columbia.edu>
|
2003-06-04 Noah Levitt <nlevitt@columbia.edu>
|
||||||
|
|
||||||
* glib/gunidecomp.h (combine): Fix typo (#114375). Also, make the
|
* glib/gunidecomp.h (combine): Fix typo (#114375). Also, make the
|
||||||
|
@ -296,6 +296,10 @@ GLIB_VAR GSourceFuncs g_io_watch_funcs;
|
|||||||
|
|
||||||
#ifdef G_OS_WIN32
|
#ifdef G_OS_WIN32
|
||||||
|
|
||||||
|
/* You can use this "pseudo file descriptor" in a GPollFD to add
|
||||||
|
* polling for Windows messages. GTK applications should not do that.
|
||||||
|
*/
|
||||||
|
|
||||||
#define G_WIN32_MSG_HANDLE 19981206
|
#define G_WIN32_MSG_HANDLE 19981206
|
||||||
|
|
||||||
/* Use this to get a GPollFD from a GIOChannel, so that you can call
|
/* Use this to get a GPollFD from a GIOChannel, so that you can call
|
||||||
@ -315,13 +319,6 @@ gint g_io_channel_win32_poll (GPollFD *fds,
|
|||||||
gint n_fds,
|
gint n_fds,
|
||||||
gint timeout_);
|
gint timeout_);
|
||||||
|
|
||||||
/* This is used to add polling for Windows messages. GDK (GTk+) programs
|
|
||||||
* should *not* use this.
|
|
||||||
*/
|
|
||||||
void g_main_poll_win32_msg_add (gint priority,
|
|
||||||
GPollFD *fd,
|
|
||||||
guint hwnd);
|
|
||||||
|
|
||||||
/* Create an IO channel for Windows messages for window handle hwnd. */
|
/* Create an IO channel for Windows messages for window handle hwnd. */
|
||||||
GIOChannel *g_io_channel_win32_new_messages (guint hwnd);
|
GIOChannel *g_io_channel_win32_new_messages (guint hwnd);
|
||||||
|
|
||||||
|
32
glib/gmain.c
32
glib/gmain.c
@ -307,7 +307,11 @@ g_poll (GPollFD *fds,
|
|||||||
g_print ("WaitMessage\n");
|
g_print ("WaitMessage\n");
|
||||||
#endif
|
#endif
|
||||||
if (!WaitMessage ())
|
if (!WaitMessage ())
|
||||||
g_warning (G_STRLOC ": WaitMessage() failed");
|
{
|
||||||
|
gchar *emsg = g_win32_error_message (GetLastError ());
|
||||||
|
g_warning (G_STRLOC ": WaitMessage() failed: %s", emsg);
|
||||||
|
g_free (emsg);
|
||||||
|
}
|
||||||
ready = WAIT_OBJECT_0 + nhandles;
|
ready = WAIT_OBJECT_0 + nhandles;
|
||||||
}
|
}
|
||||||
else if (timeout == 0)
|
else if (timeout == 0)
|
||||||
@ -326,7 +330,9 @@ g_poll (GPollFD *fds,
|
|||||||
timer = SetTimer (NULL, 0, timeout, NULL);
|
timer = SetTimer (NULL, 0, timeout, NULL);
|
||||||
if (timer == 0)
|
if (timer == 0)
|
||||||
{
|
{
|
||||||
g_warning (G_STRLOC ": SetTimer() failed");
|
gchar *emsg = g_win32_error_message (GetLastError ());
|
||||||
|
g_warning (G_STRLOC ": SetTimer() failed: %s", emsg);
|
||||||
|
g_free (emsg);
|
||||||
ready = WAIT_TIMEOUT;
|
ready = WAIT_TIMEOUT;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -359,7 +365,11 @@ g_poll (GPollFD *fds,
|
|||||||
timeout, QS_ALLINPUT);
|
timeout, QS_ALLINPUT);
|
||||||
|
|
||||||
if (ready == WAIT_FAILED)
|
if (ready == WAIT_FAILED)
|
||||||
g_warning (G_STRLOC ": MsgWaitForMultipleObjects() failed");
|
{
|
||||||
|
gchar *emsg = g_win32_error_message (GetLastError ());
|
||||||
|
g_warning (G_STRLOC ": MsgWaitForMultipleObjects() failed: %s", emsg);
|
||||||
|
g_free (emsg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -378,7 +388,11 @@ g_poll (GPollFD *fds,
|
|||||||
#endif
|
#endif
|
||||||
ready = WaitForMultipleObjects (nhandles, handles, FALSE, timeout);
|
ready = WaitForMultipleObjects (nhandles, handles, FALSE, timeout);
|
||||||
if (ready == WAIT_FAILED)
|
if (ready == WAIT_FAILED)
|
||||||
g_warning (G_STRLOC ": WaitForMultipleObjects() failed");
|
{
|
||||||
|
gchar *emsg = g_win32_error_message (GetLastError ());
|
||||||
|
g_warning (G_STRLOC ": WaitForMultipleObjects() failed: %s", emsg);
|
||||||
|
g_free (emsg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef G_MAIN_POLL_DEBUG
|
#ifdef G_MAIN_POLL_DEBUG
|
||||||
@ -2595,8 +2609,14 @@ g_main_context_poll (GMainContext *context,
|
|||||||
|
|
||||||
UNLOCK_CONTEXT (context);
|
UNLOCK_CONTEXT (context);
|
||||||
if ((*poll_func) (fds, n_fds, timeout) < 0 && errno != EINTR)
|
if ((*poll_func) (fds, n_fds, timeout) < 0 && errno != EINTR)
|
||||||
g_warning ("poll(2) failed due to: %s.",
|
{
|
||||||
g_strerror (errno));
|
#ifndef G_OS_WIN32
|
||||||
|
g_warning ("poll(2) failed due to: %s.",
|
||||||
|
g_strerror (errno));
|
||||||
|
#else
|
||||||
|
/* If g_poll () returns -1, it has already called g_warning() */
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef G_MAIN_POLL_DEBUG
|
#ifdef G_MAIN_POLL_DEBUG
|
||||||
LOCK_CONTEXT (context);
|
LOCK_CONTEXT (context);
|
||||||
|
13
glib/gmain.h
13
glib/gmain.h
@ -100,8 +100,7 @@ struct _GSourceFuncs
|
|||||||
* WSAEventSelect to signal events when a SOCKET is readable).
|
* WSAEventSelect to signal events when a SOCKET is readable).
|
||||||
*
|
*
|
||||||
* On Win32, fd can also be the special value G_WIN32_MSG_HANDLE to
|
* On Win32, fd can also be the special value G_WIN32_MSG_HANDLE to
|
||||||
* indicate polling for messages. These message queue GPollFDs should
|
* indicate polling for messages.
|
||||||
* be added with the g_main_poll_win32_msg_add function.
|
|
||||||
*
|
*
|
||||||
* But note that G_WIN32_MSG_HANDLE GPollFDs should not be used by GDK
|
* But note that G_WIN32_MSG_HANDLE GPollFDs should not be used by GDK
|
||||||
* (GTK) programs, as GDK itself wants to read messages and convert them
|
* (GTK) programs, as GDK itself wants to read messages and convert them
|
||||||
@ -300,16 +299,6 @@ gboolean g_idle_remove_by_data (gpointer data);
|
|||||||
GLIB_VAR GSourceFuncs g_timeout_funcs;
|
GLIB_VAR GSourceFuncs g_timeout_funcs;
|
||||||
GLIB_VAR GSourceFuncs g_idle_funcs;
|
GLIB_VAR GSourceFuncs g_idle_funcs;
|
||||||
|
|
||||||
#ifdef G_OS_WIN32
|
|
||||||
|
|
||||||
/* This is used to add polling for Windows messages. GDK (GTK+) programs
|
|
||||||
* should *not* use this.
|
|
||||||
*/
|
|
||||||
void g_main_poll_win32_msg_add (gint priority,
|
|
||||||
GPollFD *fd,
|
|
||||||
guint hwnd);
|
|
||||||
#endif /* G_OS_WIN32 */
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __G_MAIN_H__ */
|
#endif /* __G_MAIN_H__ */
|
||||||
|
Loading…
Reference in New Issue
Block a user