apptrait.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. ///////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/os2/apptrait.h
  3. // Purpose: class implementing wxAppTraits for OS/2
  4. // Author: Stefan Neis
  5. // Modified by:
  6. // Created: 22.09.2003
  7. // Copyright: (c) 2003 Stefan Neis <Stefan.Neis@t-online.de>
  8. // Licence: wxWindows licence
  9. ///////////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_OS2_APPTRAIT_H_
  11. #define _WX_OS2_APPTRAIT_H_
  12. // ----------------------------------------------------------------------------
  13. // wxGUI/ConsoleAppTraits: must derive from wxAppTraits, not wxAppTraitsBase
  14. // ----------------------------------------------------------------------------
  15. class WXDLLIMPEXP_BASE wxConsoleAppTraits : public wxConsoleAppTraitsBase
  16. {
  17. public:
  18. #if wxUSE_CONSOLE_EVENTLOOP
  19. virtual wxEventLoopBase *CreateEventLoop();
  20. #endif // wxUSE_CONSOLE_EVENTLOOP
  21. #if wxUSE_TIMER
  22. virtual wxTimerImpl *CreateTimerImpl(wxTimer *timer);
  23. #endif
  24. };
  25. #if wxUSE_GUI
  26. class WXDLLIMPEXP_CORE wxGUIAppTraits : public wxGUIAppTraitsBase
  27. {
  28. public:
  29. virtual wxEventLoopBase *CreateEventLoop();
  30. #if wxUSE_TIMER
  31. virtual wxTimerImpl *CreateTimerImpl(wxTimer *timer);
  32. #endif
  33. virtual wxPortId GetToolkitVersion(int *majVer = NULL, int *minVer = NULL) const;
  34. // wxThread helpers
  35. // ----------------
  36. // Initialize PM facilities to enable GUI access
  37. virtual void InitializeGui(unsigned long &ulHab);
  38. // Clean up message queue.
  39. virtual void TerminateGui(unsigned long ulHab);
  40. #ifdef __WXGTK__
  41. virtual wxString GetDesktopEnvironment() const;
  42. #endif
  43. #if wxUSE_SOCKETS
  44. virtual wxFDIOManager *GetFDIOManager();
  45. #endif
  46. };
  47. #ifndef __WXPM__
  48. inline void wxGUIAppTraits::InitializeGui(unsigned long &WXUNUSED(ulHab))
  49. {
  50. }
  51. inline void wxGUIAppTraits::TerminateGui(unsigned long WXUNUSED(ulHab))
  52. {
  53. }
  54. #endif
  55. #endif // wxUSE_GUI
  56. #endif // _WX_OS2_APPTRAIT_H_