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 struct wxEndProcessData
;
19 // ----------------------------------------------------------------------------
20 // wxAppTraits: the Unix version adds extra hooks needed by Unix code
21 // ----------------------------------------------------------------------------
23 class WXDLLIMPEXP_BASE wxAppTraits
: public wxAppTraitsBase
26 // wxExecute() support methods
27 // ---------------------------
29 // wait for the process termination, return whatever wxExecute() must
32 // base class implementation handles all cases except wxEXEC_SYNC without
33 // wxEXEC_NOEVENTS one which is implemented at the GUI level
34 virtual int WaitForChild(wxExecuteData
& execData
);
36 // integrate the monitoring of the given fd with the port-specific event
37 // loop: when this fd, which corresponds to a dummy pipe opened between the
38 // parent and child processes, is closed by the child, the parent is
39 // notified about this via a call to wxHandleProcessTermination() function
41 // the default implementation uses wxFDIODispatcher and so is suitable for
42 // the console applications or ports which don't have any specific event
44 virtual int AddProcessCallback(wxEndProcessData
*data
, int fd
);
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();
60 // a helper for the implementation of WaitForChild() in wxGUIAppTraits:
61 // checks the streams used for redirected IO in execData and returns true
62 // if there is any activity in them
63 bool CheckForRedirectedIO(wxExecuteData
& execData
);
66 #endif // _WX_UNIX_APPTBASE_H_