1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/unix/apptbase.h
3 // Purpose: declaration of wxAppTraits for Unix systems
4 // Author: Vadim Zeitlin
8 // Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org>
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_UNIX_APPTBASE_H_
13 #define _WX_UNIX_APPTBASE_H_
15 #include "wx/evtloop.h"
16 #include "wx/evtloopsrc.h"
20 class wxEventLoopSourcesManagerBase
;
22 // ----------------------------------------------------------------------------
23 // wxAppTraits: the Unix version adds extra hooks needed by Unix code
24 // ----------------------------------------------------------------------------
26 class WXDLLIMPEXP_BASE wxAppTraits
: public wxAppTraitsBase
29 // wxExecute() support methods
30 // ---------------------------
32 // Wait for the process termination and return its exit code or -1 on error.
34 // Notice that this is only used when execData.flags contains wxEXEC_SYNC
35 // and does not contain wxEXEC_NOEVENTS, i.e. when we need to really wait
36 // until the child process exit and dispatch the events while doing it.
37 virtual int WaitForChild(wxExecuteData
& execData
);
40 // return a pointer to the object which should be used to integrate
41 // monitoring of the file descriptors to the event loop (currently this is
42 // used for the sockets only but should be used for arbitrary event loop
43 // sources in the future)
45 // this object may be different for the console and GUI applications
47 // the pointer is not deleted by the caller as normally it points to a
49 virtual wxFDIOManager
*GetFDIOManager();
50 #endif // wxUSE_SOCKETS
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();
57 // Wait for the process termination by running the given event loop until
60 // This is used by the public WaitForChild() after creating the event loop
61 // of the appropriate kind.
62 int RunLoopUntilChildExit(wxExecuteData
& execData
, wxEventLoopBase
& loop
);
65 #endif // _WX_UNIX_APPTBASE_H_