X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ee0995b09b0f91ceeaff41129ec7228d389d33ff..e733c4ce1e24cf7e4b0b0d8362fc59aaa7a7641c:/src/motif/sockmot.cpp diff --git a/src/motif/sockmot.cpp b/src/motif/sockmot.cpp index 6e347bfe60..3d28d956ca 100644 --- a/src/motif/sockmot.cpp +++ b/src/motif/sockmot.cpp @@ -1,9 +1,8 @@ /////////////////////////////////////////////////////////////////////////////// -// Name: motif/sockmot.cpp +// Name: src/motif/sockmot.cpp // Purpose: implementation of wxMotif-specific socket event handling // Author: Guilhem Lavaux, Vadim Zeitlin // Created: 1999 -// RCS-ID: $Id$ // Copyright: (c) 1999, 2007 wxWidgets dev team // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -15,7 +14,7 @@ #include // 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 +22,7 @@ extern "C" { static void wxSocket_Motif_Input(XtPointer data, int *WXUNUSED(fid), XtInputId *WXUNUSED(id)) { - wxSocketImplUnix * const handler = static_cast(data); + wxFDIOHandler * const handler = static_cast(data); handler->OnReadWaiting(); } @@ -31,39 +30,40 @@ static void wxSocket_Motif_Input(XtPointer data, int *WXUNUSED(fid), static void wxSocket_Motif_Output(XtPointer data, int *WXUNUSED(fid), XtInputId *WXUNUSED(id)) { - wxSocketImplUnix * const handler = static_cast(data); + wxFDIOHandler * const handler = static_cast(data); handler->OnWriteWaiting(); } } -class MotifSocketManager : public wxSocketInputBasedManager +class MotifFDIOManager : public wxFDIOManager { public: - virtual int AddInput(wxSocketImplUnix *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; }