]> git.saurik.com Git - wxWidgets.git/blame - include/wx/unix/apptbase.h
Add wxStreamTempInputBuffer::ReadAll() helper.
[wxWidgets.git] / include / wx / unix / apptbase.h
CommitLineData
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 15struct wxEndProcessData;
5a9b5934 16struct wxExecuteData;
6bcc1145 17class wxFDIOManager;
71e9885b 18class wxEventLoopSourcesManagerBase;
e2478fde
VZ
19
20// ----------------------------------------------------------------------------
21// wxAppTraits: the Unix version adds extra hooks needed by Unix code
22// ----------------------------------------------------------------------------
23
163b3ad7 24class WXDLLIMPEXP_BASE wxAppTraits : public wxAppTraitsBase
e2478fde
VZ
25{
26public:
27 // wxExecute() support methods
28 // ---------------------------
29
e2478fde
VZ
30 // wait for the process termination, return whatever wxExecute() must
31 // return
1d043598
VZ
32 //
33 // base class implementation handles all cases except wxEXEC_SYNC without
34 // wxEXEC_NOEVENTS one which is implemented at the GUI level
35 virtual int WaitForChild(wxExecuteData& execData);
36
37 // integrate the monitoring of the given fd with the port-specific event
38 // loop: when this fd, which corresponds to a dummy pipe opened between the
39 // parent and child processes, is closed by the child, the parent is
40 // notified about this via a call to wxHandleProcessTermination() function
41 //
42 // the default implementation uses wxFDIODispatcher and so is suitable for
43 // the console applications or ports which don't have any specific event
44 // loop
45 virtual int AddProcessCallback(wxEndProcessData *data, int fd);
e2478fde 46
6bcc1145
VZ
47#if wxUSE_SOCKETS
48 // return a pointer to the object which should be used to integrate
49 // monitoring of the file descriptors to the event loop (currently this is
50 // used for the sockets only but should be used for arbitrary event loop
51 // sources in the future)
52 //
53 // this object may be different for the console and GUI applications
54 //
55 // the pointer is not deleted by the caller as normally it points to a
56 // static variable
57 virtual wxFDIOManager *GetFDIOManager();
58#endif // wxUSE_SOCKETS
e2478fde 59
71e9885b
VZ
60 // Return a non-NULL pointer to the object responsible for managing the
61 // event loop sources in this kind of application.
62 virtual wxEventLoopSourcesManagerBase* GetEventLoopSourcesManager();
63
9d3845e8
VZ
64protected:
65 // a helper for the implementation of WaitForChild() in wxGUIAppTraits:
66 // checks the streams used for redirected IO in execData and returns true
67 // if there is any activity in them
68 bool CheckForRedirectedIO(wxExecuteData& execData);
e2478fde
VZ
69};
70
71#endif // _WX_UNIX_APPTBASE_H_
72