2003-06-23 20:56:19 -04:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/unix/apptbase.h
|
|
|
|
// Purpose: declaration of wxAppTraits for Unix systems
|
|
|
|
// Author: Vadim Zeitlin
|
|
|
|
// Modified by:
|
|
|
|
// Created: 23.06.2003
|
|
|
|
// RCS-ID: $Id$
|
2004-05-23 10:56:36 -04:00
|
|
|
// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org>
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
2003-06-23 20:56:19 -04:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_UNIX_APPTBASE_H_
|
|
|
|
#define _WX_UNIX_APPTBASE_H_
|
|
|
|
|
2008-03-21 20:07:13 -04:00
|
|
|
struct wxEndProcessData;
|
2004-09-26 12:28:51 -04:00
|
|
|
struct wxExecuteData;
|
2003-06-23 20:56:19 -04:00
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxAppTraits: the Unix version adds extra hooks needed by Unix code
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
2007-12-11 20:35:53 -05:00
|
|
|
class WXDLLIMPEXP_BASE wxAppTraits : public wxAppTraitsBase
|
2003-06-23 20:56:19 -04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
// wxExecute() support methods
|
|
|
|
// ---------------------------
|
|
|
|
|
|
|
|
// wait for the process termination, return whatever wxExecute() must
|
|
|
|
// return
|
2008-03-21 20:07:13 -04:00
|
|
|
//
|
|
|
|
// base class implementation handles all cases except wxEXEC_SYNC without
|
|
|
|
// wxEXEC_NOEVENTS one which is implemented at the GUI level
|
|
|
|
virtual int WaitForChild(wxExecuteData& execData);
|
|
|
|
|
|
|
|
// integrate the monitoring of the given fd with the port-specific event
|
|
|
|
// loop: when this fd, which corresponds to a dummy pipe opened between the
|
|
|
|
// parent and child processes, is closed by the child, the parent is
|
|
|
|
// notified about this via a call to wxHandleProcessTermination() function
|
|
|
|
//
|
|
|
|
// the default implementation uses wxFDIODispatcher and so is suitable for
|
|
|
|
// the console applications or ports which don't have any specific event
|
|
|
|
// loop
|
|
|
|
virtual int AddProcessCallback(wxEndProcessData *data, int fd);
|
2003-06-23 20:56:19 -04:00
|
|
|
|
|
|
|
|
2008-03-21 23:46:04 -04:00
|
|
|
protected:
|
|
|
|
// a helper for the implementation of WaitForChild() in wxGUIAppTraits:
|
|
|
|
// checks the streams used for redirected IO in execData and returns true
|
|
|
|
// if there is any activity in them
|
|
|
|
bool CheckForRedirectedIO(wxExecuteData& execData);
|
2003-06-23 20:56:19 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _WX_UNIX_APPTBASE_H_
|
|
|
|
|