]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/sockmot.cpp
Provide a task-dialog based wxMSW wxMessageDialog implementation.
[wxWidgets.git] / src / motif / sockmot.cpp
index f38ace8e97ee18a30a564cace392114b30ce3a87..7b5802743b995f2281761955e245f69a1cb0a238 100644 (file)
@@ -15,7 +15,7 @@
 
 #include <X11/Intrinsic.h>      // XtAppAdd/RemoveInput()
 #include "wx/motif/private.h"   // wxGetAppContext()
-#include "wx/private/socket.h"
+#include "wx/private/fdiomanager.h"
 #include "wx/apptrait.h"
 
 extern "C" {
@@ -23,7 +23,7 @@ extern "C" {
 static void wxSocket_Motif_Input(XtPointer data, int *WXUNUSED(fid),
                                  XtInputId *WXUNUSED(id))
 {
-    wxSocketImpl * const handler = static_cast<wxSocketImpl *>(data);
+    wxFDIOHandler * const handler = static_cast<wxFDIOHandler *>(data);
 
     handler->OnReadWaiting();
 }
@@ -31,39 +31,40 @@ static void wxSocket_Motif_Input(XtPointer data, int *WXUNUSED(fid),
 static void wxSocket_Motif_Output(XtPointer data, int *WXUNUSED(fid),
                                   XtInputId *WXUNUSED(id))
 {
-    wxSocketImpl * const handler = static_cast<wxSocketImpl *>(data);
+    wxFDIOHandler * const handler = static_cast<wxFDIOHandler *>(data);
 
     handler->OnWriteWaiting();
 }
 
 }
 
-class MotifSocketManager : public wxSocketInputBasedManager
+class MotifFDIOManager : public wxFDIOManager
 {
 public:
-    virtual int AddInput(wxSocketImpl *handler, int fd, SocketDir d)
+    virtual int AddInput(wxFDIOHandler *handler, int fd, Direction d)
     {
         return XtAppAddInput
                (
                     wxGetAppContext(),
                     fd,
-                    (XtPointer)(d == FD_OUTPUT ? XtInputWriteMask
-                                               : XtInputReadMask),
-                    d == FD_OUTPUT ? wxSocket_Motif_Output
-                                   : wxSocket_Motif_Input,
+                    (XtPointer)(d == OUTPUT ? XtInputWriteMask
+                                            : XtInputReadMask),
+                    d == OUTPUT ? wxSocket_Motif_Output
+                                : wxSocket_Motif_Input,
                     handler
                );
     }
 
-    virtual void RemoveInput(int fd)
+    virtual void
+    RemoveInput(wxFDIOHandler* WXUNUSED(handler), int fd, Direction WXUNUSED(d))
     {
         XtRemoveInput(fd);
     }
 };
 
-wxSocketManager *wxGUIAppTraits::GetSocketManager()
+wxFDIOManager *wxGUIAppTraits::GetFDIOManager()
 {
-    static MotifSocketManager s_manager;
+    static MotifFDIOManager s_manager;
     return &s_manager;
 }