+/* -------------------------------------------------------------------------
+ * Project: GSocket (Generic Socket) for WX
+ * Name: gsockgtk.c
+ * Purpose: GSocket: GTK part
+ * CVSID: $Id$
+ * -------------------------------------------------------------------------
+ */
+#include "wx/setup.h"
+
+#if wxUSE_SOCKETS
+
#include <stdlib.h>
-#include <gdk/gdk.h>
-#include <glib.h>
-#include <wx/gsocket.h>
-#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)
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;
_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;
void GSocket_DoEvent(unsigned long evt_id)
{
}
+
+#endif /* wxUSE_SOCKETS */