fdiomanager.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. ///////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/private/fdiomanager.h
  3. // Purpose: declaration of wxFDIOManager
  4. // Author: Vadim Zeitlin
  5. // Created: 2009-08-17
  6. // Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
  7. // Licence: wxWindows licence
  8. ///////////////////////////////////////////////////////////////////////////////
  9. #ifndef _WX_PRIVATE_FDIOMANAGER_H_
  10. #define _WX_PRIVATE_FDIOMANAGER_H_
  11. #include "wx/private/fdiohandler.h"
  12. // ----------------------------------------------------------------------------
  13. // wxFDIOManager: register or unregister wxFDIOHandlers
  14. // ----------------------------------------------------------------------------
  15. // currently only used in wxGTK and wxMotif, see wx/unix/apptrait.h
  16. class wxFDIOManager
  17. {
  18. public:
  19. // identifies either input or output direction
  20. //
  21. // NB: the values of this enum shouldn't change
  22. enum Direction
  23. {
  24. INPUT,
  25. OUTPUT
  26. };
  27. // start or stop monitoring the events on the given file descriptor
  28. virtual int AddInput(wxFDIOHandler *handler, int fd, Direction d) = 0;
  29. virtual void RemoveInput(wxFDIOHandler *handler, int fd, Direction d) = 0;
  30. // empty but virtual dtor for the base class
  31. virtual ~wxFDIOManager() { }
  32. };
  33. #endif // _WX_PRIVATE_FDIOMANAGER_H_