]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/apptrait.h
No real changes, just refactor wxControlContainer code a little.
[wxWidgets.git] / include / wx / msw / apptrait.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/apptrait.h
3 // Purpose: class implementing wxAppTraits for MSW
4 // Author: Vadim Zeitlin
5 // Modified by:
6 // Created: 21.06.2003
7 // RCS-ID: $Id$
8 // Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org>
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_MSW_APPTRAIT_H_
13 #define _WX_MSW_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 virtual wxEventLoopBase *CreateEventLoop();
23 virtual void *BeforeChildWaitLoop();
24 virtual void AfterChildWaitLoop(void *data);
25 #if wxUSE_TIMER
26 virtual wxTimerImpl *CreateTimerImpl(wxTimer *timer);
27 #endif // wxUSE_TIMER
28 #if wxUSE_THREADS
29 virtual bool DoMessageFromThreadWait();
30 virtual WXDWORD WaitForThread(WXHANDLE hThread, int flags);
31 #endif // wxUSE_THREADS
32 #ifndef __WXWINCE__
33 virtual bool CanUseStderr() { return true; }
34 virtual bool WriteToStderr(const wxString& text);
35 #endif // !__WXWINCE__
36 };
37
38 #if wxUSE_GUI
39
40 #if defined(__WXMSW__)
41
42 class WXDLLIMPEXP_CORE wxGUIAppTraits : public wxGUIAppTraitsBase
43 {
44 public:
45 virtual wxEventLoopBase *CreateEventLoop();
46 virtual void *BeforeChildWaitLoop();
47 virtual void AfterChildWaitLoop(void *data);
48 #if wxUSE_TIMER
49 virtual wxTimerImpl *CreateTimerImpl(wxTimer *timer);
50 #endif // wxUSE_TIMER
51 #if wxUSE_THREADS
52 virtual bool DoMessageFromThreadWait();
53 virtual WXDWORD WaitForThread(WXHANDLE hThread, int flags);
54 #endif // wxUSE_THREADS
55 virtual wxPortId GetToolkitVersion(int *majVer = NULL, int *minVer = NULL) const;
56
57 #ifndef __WXWINCE__
58 virtual bool CanUseStderr();
59 virtual bool WriteToStderr(const wxString& text);
60 #endif // !__WXWINCE__
61 };
62
63 #elif defined(__WXGTK__)
64
65 class WXDLLIMPEXP_CORE wxGUIAppTraits : public wxGUIAppTraitsBase
66 {
67 public:
68 virtual wxEventLoopBase *CreateEventLoop();
69 virtual void *BeforeChildWaitLoop() { return NULL; }
70 virtual void AfterChildWaitLoop(void *WXUNUSED(data)) { }
71 #if wxUSE_TIMER
72 virtual wxTimerImpl *CreateTimerImpl(wxTimer *timer);
73 #endif
74
75 #if wxUSE_THREADS && defined(__WXGTK20__)
76 virtual void MutexGuiEnter();
77 virtual void MutexGuiLeave();
78 #endif
79
80 #if wxUSE_THREADS
81 virtual bool DoMessageFromThreadWait() { return true; }
82 virtual WXDWORD WaitForThread(WXHANDLE hThread, int WXUNUSED(flags))
83 { return DoSimpleWaitForThread(hThread); }
84 #endif // wxUSE_THREADS
85 virtual wxPortId GetToolkitVersion(int *majVer = NULL, int *minVer = NULL) const;
86
87 #ifndef __WXWINCE__
88 virtual bool CanUseStderr() { return false; }
89 virtual bool WriteToStderr(const wxString& WXUNUSED(text)) { return false; }
90 #endif // !__WXWINCE__
91 };
92
93 #endif
94
95 #endif // wxUSE_GUI
96
97 #endif // _WX_MSW_APPTRAIT_H_