-#include <stdlib.h>
-#include <X11/Intrinsic.h>
-#include <wx/gsocket.h>
-#include <wx/app.h>
-#include "../unix/gsockunx.h"
-
-#define wxAPP_CONTEXT ((XtAppContext)wxTheApp->GetAppContext())
-
-static void _GSocket_Motif_Input(XtPointer data, int *fid,
- XtInputId *id)
-{
- GSocket *socket = (GSocket *)data;
-
- _GSocket_Detected_Read(socket);
-}
-
-static void _GSocket_Motif_Output(XtPointer data, int *fid,
- XtInputId *id)
-{
- GSocket *socket = (GSocket *)data;
-
- _GSocket_Detected_Write(socket);
-}
-
-void _GSocket_GUI_Init(GSocket *socket)
-{
- int i;
- int *m_id;
-
- socket->m_gui_dependent = (char *)malloc(sizeof(int)*3);
- m_id = (int *)(socket->m_gui_dependent);
+#include <X11/Intrinsic.h> // XtAppAdd/RemoveInput()
+#include "wx/motif/private.h" // wxGetAppContext()
+#include "wx/gsocket.h"
+#include "wx/apptrait.h"