]>
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 | |
7 | // RCS-ID: $Id$ | |
77ffb593 | 8 | // Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org> |
65571936 | 9 | // Licence: wxWindows licence |
e2478fde VZ |
10 | /////////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #ifndef _WX_UNIX_APPTBASE_H_ | |
13 | #define _WX_UNIX_APPTBASE_H_ | |
14 | ||
1d043598 | 15 | struct wxEndProcessData; |
5a9b5934 | 16 | struct wxExecuteData; |
e2478fde VZ |
17 | |
18 | // ---------------------------------------------------------------------------- | |
19 | // wxAppTraits: the Unix version adds extra hooks needed by Unix code | |
20 | // ---------------------------------------------------------------------------- | |
21 | ||
163b3ad7 | 22 | class WXDLLIMPEXP_BASE wxAppTraits : public wxAppTraitsBase |
e2478fde VZ |
23 | { |
24 | public: | |
25 | // wxExecute() support methods | |
26 | // --------------------------- | |
27 | ||
e2478fde VZ |
28 | // wait for the process termination, return whatever wxExecute() must |
29 | // return | |
1d043598 VZ |
30 | // |
31 | // base class implementation handles all cases except wxEXEC_SYNC without | |
32 | // wxEXEC_NOEVENTS one which is implemented at the GUI level | |
33 | virtual int WaitForChild(wxExecuteData& execData); | |
34 | ||
35 | // integrate the monitoring of the given fd with the port-specific event | |
36 | // loop: when this fd, which corresponds to a dummy pipe opened between the | |
37 | // parent and child processes, is closed by the child, the parent is | |
38 | // notified about this via a call to wxHandleProcessTermination() function | |
39 | // | |
40 | // the default implementation uses wxFDIODispatcher and so is suitable for | |
41 | // the console applications or ports which don't have any specific event | |
42 | // loop | |
43 | virtual int AddProcessCallback(wxEndProcessData *data, int fd); | |
e2478fde VZ |
44 | |
45 | ||
46 | // wxThread helpers | |
47 | // ---------------- | |
48 | ||
49 | // TODO | |
2804f77d VZ |
50 | |
51 | #if wxUSE_SOCKETS | |
52 | // returns the select()-based socket manager for console applications which | |
53 | // is also used by some ports (wxX11, wxDFB) in the GUI build (hence it is | |
54 | // here and not in wxConsoleAppTraits) | |
55 | virtual GSocketManager *GetSocketManager(); | |
56 | #endif | |
9d3845e8 VZ |
57 | |
58 | protected: | |
59 | // a helper for the implementation of WaitForChild() in wxGUIAppTraits: | |
60 | // checks the streams used for redirected IO in execData and returns true | |
61 | // if there is any activity in them | |
62 | bool CheckForRedirectedIO(wxExecuteData& execData); | |
e2478fde VZ |
63 | }; |
64 | ||
65 | #endif // _WX_UNIX_APPTBASE_H_ | |
66 |