]>
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 | ||
5a9b5934 | 15 | struct wxExecuteData; |
e2478fde VZ |
16 | class wxPipe; |
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 | ||
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 | |
2804f77d VZ |
51 | |
52 | #if wxUSE_SOCKETS | |
53 | // returns the select()-based socket manager for console applications which | |
54 | // is also used by some ports (wxX11, wxDFB) in the GUI build (hence it is | |
55 | // here and not in wxConsoleAppTraits) | |
56 | virtual GSocketManager *GetSocketManager(); | |
57 | #endif | |
e2478fde VZ |
58 | }; |
59 | ||
60 | #endif // _WX_UNIX_APPTBASE_H_ | |
61 |