]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/unix/apptbase.h
Document wxKill(wxSIGTERM) reliance on having an open window in wxMSW.
[wxWidgets.git] / include / wx / unix / apptbase.h
... / ...
CommitLineData
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#include "wx/evtloop.h"
16#include "wx/evtloopsrc.h"
17
18class wxExecuteData;
19class wxFDIOManager;
20class wxEventLoopSourcesManagerBase;
21
22// ----------------------------------------------------------------------------
23// wxAppTraits: the Unix version adds extra hooks needed by Unix code
24// ----------------------------------------------------------------------------
25
26class WXDLLIMPEXP_BASE wxAppTraits : public wxAppTraitsBase
27{
28public:
29 // wxExecute() support methods
30 // ---------------------------
31
32 // Wait for the process termination and return its exit code or -1 on error.
33 //
34 // Notice that this is only used when execData.flags contains wxEXEC_SYNC
35 // and does not contain wxEXEC_NOEVENTS, i.e. when we need to really wait
36 // until the child process exit and dispatch the events while doing it.
37 virtual int WaitForChild(wxExecuteData& execData);
38
39#if wxUSE_SOCKETS
40 // return a pointer to the object which should be used to integrate
41 // monitoring of the file descriptors to the event loop (currently this is
42 // used for the sockets only but should be used for arbitrary event loop
43 // sources in the future)
44 //
45 // this object may be different for the console and GUI applications
46 //
47 // the pointer is not deleted by the caller as normally it points to a
48 // static variable
49 virtual wxFDIOManager *GetFDIOManager();
50#endif // wxUSE_SOCKETS
51
52#if wxUSE_CONSOLE_EVENTLOOP
53 // Return a non-NULL pointer to the object responsible for managing the
54 // event loop sources in this kind of application.
55 virtual wxEventLoopSourcesManagerBase* GetEventLoopSourcesManager();
56#endif // wxUSE_CONSOLE_EVENTLOOP
57
58protected:
59 // Wait for the process termination by running the given event loop until
60 // this happens.
61 //
62 // This is used by the public WaitForChild() after creating the event loop
63 // of the appropriate kind.
64 int RunLoopUntilChildExit(wxExecuteData& execData, wxEventLoopBase& loop);
65};
66
67#endif // _WX_UNIX_APPTBASE_H_
68