]>
Commit | Line | Data |
---|---|---|
e2478fde VZ |
1 | /////////////////////////////////////////////////////////////////////////////// |
2 | // Name: wx/unix/apptbase.h | |
3 | // Purpose: declaration of wxAppTraits for Unix systems | |
4 | // Author: Vadim Zeitlin | |
5 | // Modified by: | |
6 | // Created: 23.06.2003 | |
77ffb593 | 7 | // Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org> |
65571936 | 8 | // Licence: wxWindows licence |
e2478fde VZ |
9 | /////////////////////////////////////////////////////////////////////////////// |
10 | ||
11 | #ifndef _WX_UNIX_APPTBASE_H_ | |
12 | #define _WX_UNIX_APPTBASE_H_ | |
13 | ||
821d856a VZ |
14 | #include "wx/evtloop.h" |
15 | #include "wx/evtloopsrc.h" | |
16 | ||
17 | class wxExecuteData; | |
6bcc1145 | 18 | class wxFDIOManager; |
71e9885b | 19 | class wxEventLoopSourcesManagerBase; |
e2478fde VZ |
20 | |
21 | // ---------------------------------------------------------------------------- | |
22 | // wxAppTraits: the Unix version adds extra hooks needed by Unix code | |
23 | // ---------------------------------------------------------------------------- | |
24 | ||
163b3ad7 | 25 | class WXDLLIMPEXP_BASE wxAppTraits : public wxAppTraitsBase |
e2478fde VZ |
26 | { |
27 | public: | |
28 | // wxExecute() support methods | |
29 | // --------------------------- | |
30 | ||
821d856a | 31 | // Wait for the process termination and return its exit code or -1 on error. |
1d043598 | 32 | // |
821d856a VZ |
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. | |
1d043598 VZ |
36 | virtual int WaitForChild(wxExecuteData& execData); |
37 | ||
6bcc1145 VZ |
38 | #if wxUSE_SOCKETS |
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) | |
43 | // | |
44 | // this object may be different for the console and GUI applications | |
45 | // | |
46 | // the pointer is not deleted by the caller as normally it points to a | |
47 | // static variable | |
48 | virtual wxFDIOManager *GetFDIOManager(); | |
49 | #endif // wxUSE_SOCKETS | |
e2478fde | 50 | |
ccf8bf20 | 51 | #if wxUSE_CONSOLE_EVENTLOOP |
71e9885b VZ |
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(); | |
ccf8bf20 | 55 | #endif // wxUSE_CONSOLE_EVENTLOOP |
71e9885b | 56 | |
9d3845e8 | 57 | protected: |
821d856a VZ |
58 | // Wait for the process termination by running the given event loop until |
59 | // this happens. | |
60 | // | |
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); | |
e2478fde VZ |
64 | }; |
65 | ||
66 | #endif // _WX_UNIX_APPTBASE_H_ | |
67 |