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