]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/apptbase.h
wxMessageBox off the main thread lost result code.
[wxWidgets.git] / include / wx / msw / apptbase.h
CommitLineData
e2478fde
VZ
1///////////////////////////////////////////////////////////////////////////////
2// Name: wx/msw/apptbase.h
3// Purpose: declaration of wxAppTraits for MSW
4// Author: Vadim Zeitlin
5// Modified by:
6// Created: 22.06.2003
77ffb593 7// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org>
65571936 8// Licence: wxWindows licence
e2478fde
VZ
9///////////////////////////////////////////////////////////////////////////////
10
11#ifndef _WX_MSW_APPTBASE_H_
12#define _WX_MSW_APPTBASE_H_
13
14// ----------------------------------------------------------------------------
15// wxAppTraits: the MSW version adds extra hooks needed by MSW-only code
16// ----------------------------------------------------------------------------
17
bb24c68f 18class WXDLLIMPEXP_BASE wxAppTraits : public wxAppTraitsBase
e2478fde
VZ
19{
20public:
21 // wxExecute() support methods
22 // ---------------------------
23
24 // called before starting to wait for the child termination, may return
25 // some opaque data which will be passed later to AfterChildWaitLoop()
26 virtual void *BeforeChildWaitLoop() = 0;
27
e2478fde
VZ
28 // called after starting to wait for the child termination, the parameter
29 // is the return value of BeforeChildWaitLoop()
30 virtual void AfterChildWaitLoop(void *data) = 0;
31
32
dd1af40c 33#if wxUSE_THREADS
e2478fde
VZ
34 // wxThread helpers
35 // ----------------
36
37 // process a message while waiting for a(nother) thread, should return
38 // false if and only if we have to exit the application
39 virtual bool DoMessageFromThreadWait() = 0;
e570a44b 40
535920ff
VZ
41 // wait for the handle to be signaled, return WAIT_OBJECT_0 if it is or, in
42 // the GUI code, WAIT_OBJECT_0 + 1 if a Windows message arrived
b95a7c31 43 virtual WXDWORD WaitForThread(WXHANDLE hThread, int flags) = 0;
dd1af40c 44#endif // wxUSE_THREADS
535920ff 45
2804f77d 46
784ee7d5
VZ
47#ifndef __WXWINCE__
48 // console helpers
49 // ---------------
50
51 // this method can be overridden by a derived class to always return true
52 // or false to force [not] using the console for output to stderr
53 //
54 // by default console applications always return true from here while the
55 // GUI ones only return true if they're being run from console and there is
56 // no other activity happening in this console
57 virtual bool CanUseStderr() = 0;
58
59 // write text to the console, return true if ok or false on error
60 virtual bool WriteToStderr(const wxString& text) = 0;
61#endif // !__WXWINCE__
62
535920ff 63protected:
dd1af40c 64#if wxUSE_THREADS
535920ff 65 // implementation of WaitForThread() for the console applications which is
dd1af40c 66 // also used by the GUI code if it doesn't [yet|already] dispatch events
535920ff 67 WXDWORD DoSimpleWaitForThread(WXHANDLE hThread);
dd1af40c 68#endif // wxUSE_THREADS
e2478fde
VZ
69};
70
71#endif // _WX_MSW_APPTBASE_H_
72