]>
Commit | Line | Data |
---|---|---|
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$ | |
8 | // Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org> | |
9 | // Licence: wxWindows licence | |
10 | /////////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifndef _WX_UNIX_APPTBASE_H_ | |
13 | #define _WX_UNIX_APPTBASE_H_ | |
14 | ||
15 | class wxExecuteData; | |
16 | class wxPipe; | |
17 | ||
18 | // ---------------------------------------------------------------------------- | |
19 | // wxAppTraits: the Unix version adds extra hooks needed by Unix code | |
20 | // ---------------------------------------------------------------------------- | |
21 | ||
22 | class WXDLLEXPORT wxAppTraits : public wxAppTraitsBase | |
23 | { | |
24 | public: | |
25 | // wxExecute() support methods | |
26 | // --------------------------- | |
27 | ||
28 | // called before starting the child process and creates the pipe used for | |
29 | // detecting the process termination asynchronously in GUI, does nothing in | |
30 | // wxBase | |
31 | // | |
32 | // if it returns false, we should return from wxExecute() with an error | |
33 | virtual bool CreateEndProcessPipe(wxExecuteData& execData) = 0; | |
34 | ||
35 | // test if the given descriptor is the end of the pipe create by the | |
36 | // function above | |
37 | virtual bool IsWriteFDOfEndProcessPipe(wxExecuteData& execData, int fd) = 0; | |
38 | ||
39 | // ensure that the write end of the pipe is not closed by wxPipe dtor | |
40 | virtual void DetachWriteFDOfEndProcessPipe(wxExecuteData& execData) = 0; | |
41 | ||
42 | // wait for the process termination, return whatever wxExecute() must | |
43 | // return | |
44 | virtual int WaitForChild(wxExecuteData& execData) = 0; | |
45 | ||
46 | ||
47 | // wxThread helpers | |
48 | // ---------------- | |
49 | ||
50 | // TODO | |
51 | }; | |
52 | ||
53 | #endif // _WX_UNIX_APPTBASE_H_ | |
54 |