1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/unix/apptbase.h
3 // Purpose: declaration of wxAppTraits for Unix systems
4 // Author: Vadim Zeitlin
7 // Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org>
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_UNIX_APPTBASE_H_
12 #define _WX_UNIX_APPTBASE_H_
14 #include "wx/evtloop.h"
15 #include "wx/evtloopsrc.h"
19 class wxEventLoopSourcesManagerBase
;
21 // ----------------------------------------------------------------------------
22 // wxAppTraits: the Unix version adds extra hooks needed by Unix code
23 // ----------------------------------------------------------------------------
25 class WXDLLIMPEXP_BASE wxAppTraits
: public wxAppTraitsBase
28 // wxExecute() support methods
29 // ---------------------------
31 // Wait for the process termination and return its exit code or -1 on error.
33 // Notice that this is only used when execData.flags contains wxEXEC_SYNC
34 // and does not contain wxEXEC_NOEVENTS, i.e. when we need to really wait
35 // until the child process exit and dispatch the events while doing it.
36 virtual int WaitForChild(wxExecuteData
& execData
);
39 // return a pointer to the object which should be used to integrate
40 // monitoring of the file descriptors to the event loop (currently this is
41 // used for the sockets only but should be used for arbitrary event loop
42 // sources in the future)
44 // this object may be different for the console and GUI applications
46 // the pointer is not deleted by the caller as normally it points to a
48 virtual wxFDIOManager
*GetFDIOManager();
49 #endif // wxUSE_SOCKETS
51 #if wxUSE_CONSOLE_EVENTLOOP
52 // Return a non-NULL pointer to the object responsible for managing the
53 // event loop sources in this kind of application.
54 virtual wxEventLoopSourcesManagerBase
* GetEventLoopSourcesManager();
55 #endif // wxUSE_CONSOLE_EVENTLOOP
58 // Wait for the process termination by running the given event loop until
61 // This is used by the public WaitForChild() after creating the event loop
62 // of the appropriate kind.
63 int RunLoopUntilChildExit(wxExecuteData
& execData
, wxEventLoopBase
& loop
);
66 #endif // _WX_UNIX_APPTBASE_H_