X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a324a7bccf4bda8f4f2bf09daee8104cae953cee..866592d872daa1f4e3d44948d7d3a6c90b0af9d0:/src/gtk/gsockgtk.c?ds=sidebyside diff --git a/src/gtk/gsockgtk.c b/src/gtk/gsockgtk.c index 85816cbddb..8677ef3626 100644 --- a/src/gtk/gsockgtk.c +++ b/src/gtk/gsockgtk.c @@ -1,23 +1,28 @@ +/* ------------------------------------------------------------------------- + * Project: GSocket (Generic Socket) for WX + * Name: gsockgtk.c + * Purpose: GSocket: GTK part + * CVSID: $Id$ + * ------------------------------------------------------------------------- + */ +#include "wx/setup.h" + +#if wxUSE_SOCKETS + #include -#include -#include -#include -#include "../unix/gsockunx.h" +#include "gdk/gdk.h" +#include "glib.h" +#include "wx/gsocket.h" +#include "wx/unix/gsockunx.h" void _GSocket_GDK_Input(gpointer data, gint source, GdkInputCondition condition) { GSocket *socket = (GSocket *)data; - switch (condition) { - case GDK_INPUT_READ: + if (condition & GDK_INPUT_READ) _GSocket_Detected_Read(socket); - break; - case GDK_INPUT_WRITE: + if (condition & GDK_INPUT_WRITE) _GSocket_Detected_Write(socket); - break; - default: - break; - } } void _GSocket_GUI_Init(GSocket *socket) @@ -46,7 +51,7 @@ void _GSocket_GUI_Destroy(GSocket *socket) free(socket->m_gui_dependent); } -void _GSocket_Install_Fallback(GSocket *socket, GSocketEvent event) +void _GSocket_Install_Callback(GSocket *socket, GSocketEvent event) { GdkInputCondition flag; int c; @@ -69,7 +74,7 @@ void _GSocket_Install_Fallback(GSocket *socket, GSocketEvent event) _GSocket_GDK_Input, (gpointer)socket); } -void _GSocket_Uninstall_Fallback(GSocket *socket, GSocketEvent event) +void _GSocket_Uninstall_Callback(GSocket *socket, GSocketEvent event) { int c; gint *m_id; @@ -98,3 +103,5 @@ unsigned long GSocket_GetEventID(GSocket *socket) void GSocket_DoEvent(unsigned long evt_id) { } + +#endif /* wxUSE_SOCKETS */