1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/apptbase.h
3 // Purpose: declaration of wxAppTraits for MSW
4 // Author: Vadim Zeitlin
8 // Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org>
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_MSW_APPTBASE_H_
13 #define _WX_MSW_APPTBASE_H_
15 // ----------------------------------------------------------------------------
16 // wxAppTraits: the MSW version adds extra hooks needed by MSW-only code
17 // ----------------------------------------------------------------------------
19 class WXDLLIMPEXP_BASE wxAppTraits
: public wxAppTraitsBase
22 // wxExecute() support methods
23 // ---------------------------
25 // called before starting to wait for the child termination, may return
26 // some opaque data which will be passed later to AfterChildWaitLoop()
27 virtual void *BeforeChildWaitLoop() = 0;
29 // process pending Windows messages, even in console app
30 virtual void AlwaysYield() = 0;
32 // called after starting to wait for the child termination, the parameter
33 // is the return value of BeforeChildWaitLoop()
34 virtual void AfterChildWaitLoop(void *data
) = 0;
40 // process a message while waiting for a(nother) thread, should return
41 // false if and only if we have to exit the application
42 virtual bool DoMessageFromThreadWait() = 0;
44 // wait for the handle to be signaled, return WAIT_OBJECT_0 if it is or, in
45 // the GUI code, WAIT_OBJECT_0 + 1 if a Windows message arrived
46 virtual WXDWORD
WaitForThread(WXHANDLE hThread
) = 0;
49 // implementation of WaitForThread() for the console applications which is
50 // also used by the GUI code if it doesn't [yet|already} dispatch events
51 WXDWORD
DoSimpleWaitForThread(WXHANDLE hThread
);
54 #endif // _WX_MSW_APPTBASE_H_