]> git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/apptrait.h
2cdb32a4a8b5235584c4260cb84510c02f5f3694
[wxWidgets.git] / include / wx / os2 / apptrait.h
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 // RCS-ID: $Id$
8 // Copyright: (c) 2003 Stefan Neis <Stefan.Neis@t-online.de>
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_OS2_APPTRAIT_H_
13 #define _WX_OS2_APPTRAIT_H_
14
15 // ----------------------------------------------------------------------------
16 // wxGUI/ConsoleAppTraits: must derive from wxAppTraits, not wxAppTraitsBase
17 // ----------------------------------------------------------------------------
18
19 class WXDLLIMPEXP_BASE wxConsoleAppTraits : public wxConsoleAppTraitsBase
20 {
21 public:
22 #if wxUSE_CONSOLE_EVENTLOOP
23 virtual wxEventLoopBase *CreateEventLoop();
24 #endif // wxUSE_CONSOLE_EVENTLOOP
25 #if wxUSE_TIMER
26 virtual wxTimerImpl *CreateTimerImpl(wxTimer *timer);
27 #endif
28 };
29
30 #if wxUSE_GUI
31
32 class WXDLLIMPEXP_CORE wxGUIAppTraits : public wxGUIAppTraitsBase
33 {
34 public:
35 virtual wxEventLoopBase *CreateEventLoop();
36 #if wxUSE_TIMER
37 virtual wxTimerImpl *CreateTimerImpl(wxTimer *timer);
38 #endif
39 virtual wxPortId GetToolkitVersion(int *majVer = NULL, int *minVer = NULL) const;
40
41 // wxThread helpers
42 // ----------------
43
44 // Initialize PM facilities to enable GUI access
45 virtual void InitializeGui(unsigned long &ulHab);
46
47 // Clean up message queue.
48 virtual void TerminateGui(unsigned long ulHab);
49 #ifdef __WXGTK__
50 virtual wxString GetDesktopEnvironment() const;
51 #endif
52 #if wxUSE_SOCKETS
53 virtual wxFDIOManager *GetFDIOManager();
54 #endif
55 };
56
57 #ifndef __WXPM__
58 inline void wxGUIAppTraits::InitializeGui(unsigned long &WXUNUSED(ulHab))
59 {
60 }
61
62 inline void wxGUIAppTraits::TerminateGui(unsigned long WXUNUSED(ulHab))
63 {
64 }
65 #endif
66
67 #endif // wxUSE_GUI
68
69 #endif // _WX_OS2_APPTRAIT_H_