]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/msw/apptrait.h
Don't define __STRICT_ANSI__, we should build both with and without it.
[wxWidgets.git] / include / wx / msw / apptrait.h
... / ...
CommitLineData
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// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org>
8// Licence: wxWindows licence
9///////////////////////////////////////////////////////////////////////////////
10
11#ifndef _WX_MSW_APPTRAIT_H_
12#define _WX_MSW_APPTRAIT_H_
13
14// ----------------------------------------------------------------------------
15// wxGUI/ConsoleAppTraits: must derive from wxAppTraits, not wxAppTraitsBase
16// ----------------------------------------------------------------------------
17
18class WXDLLIMPEXP_BASE wxConsoleAppTraits : public wxConsoleAppTraitsBase
19{
20public:
21 virtual wxEventLoopBase *CreateEventLoop();
22 virtual void *BeforeChildWaitLoop();
23 virtual void AfterChildWaitLoop(void *data);
24#if wxUSE_TIMER
25 virtual wxTimerImpl *CreateTimerImpl(wxTimer *timer);
26#endif // wxUSE_TIMER
27#if wxUSE_THREADS
28 virtual bool DoMessageFromThreadWait();
29 virtual WXDWORD WaitForThread(WXHANDLE hThread, int flags);
30#endif // wxUSE_THREADS
31#ifndef __WXWINCE__
32 virtual bool CanUseStderr() { return true; }
33 virtual bool WriteToStderr(const wxString& text);
34#endif // !__WXWINCE__
35};
36
37#if wxUSE_GUI
38
39#if defined(__WXMSW__)
40
41class WXDLLIMPEXP_CORE wxGUIAppTraits : public wxGUIAppTraitsBase
42{
43public:
44 virtual wxEventLoopBase *CreateEventLoop();
45 virtual void *BeforeChildWaitLoop();
46 virtual void AfterChildWaitLoop(void *data);
47#if wxUSE_TIMER
48 virtual wxTimerImpl *CreateTimerImpl(wxTimer *timer);
49#endif // wxUSE_TIMER
50#if wxUSE_THREADS
51 virtual bool DoMessageFromThreadWait();
52 virtual WXDWORD WaitForThread(WXHANDLE hThread, int flags);
53#endif // wxUSE_THREADS
54 virtual wxPortId GetToolkitVersion(int *majVer = NULL, int *minVer = NULL) const;
55
56#ifndef __WXWINCE__
57 virtual bool CanUseStderr();
58 virtual bool WriteToStderr(const wxString& text);
59#endif // !__WXWINCE__
60};
61
62#elif defined(__WXGTK__)
63
64class WXDLLIMPEXP_CORE wxGUIAppTraits : public wxGUIAppTraitsBase
65{
66public:
67 virtual wxEventLoopBase *CreateEventLoop();
68 virtual void *BeforeChildWaitLoop() { return NULL; }
69 virtual void AfterChildWaitLoop(void *WXUNUSED(data)) { }
70#if wxUSE_TIMER
71 virtual wxTimerImpl *CreateTimerImpl(wxTimer *timer);
72#endif
73
74#if wxUSE_THREADS && defined(__WXGTK20__)
75 virtual void MutexGuiEnter();
76 virtual void MutexGuiLeave();
77#endif
78
79#if wxUSE_THREADS
80 virtual bool DoMessageFromThreadWait() { return true; }
81 virtual WXDWORD WaitForThread(WXHANDLE hThread, int WXUNUSED(flags))
82 { return DoSimpleWaitForThread(hThread); }
83#endif // wxUSE_THREADS
84 virtual wxPortId GetToolkitVersion(int *majVer = NULL, int *minVer = NULL) const;
85
86#ifndef __WXWINCE__
87 virtual bool CanUseStderr() { return false; }
88 virtual bool WriteToStderr(const wxString& WXUNUSED(text)) { return false; }
89#endif // !__WXWINCE__
90};
91
92#endif
93
94#endif // wxUSE_GUI
95
96#endif // _WX_MSW_APPTRAIT_H_