]> git.saurik.com Git - wxWidgets.git/blob - include/wx/unix/app.h
Remove unneeded wxTLW child inserter function.
[wxWidgets.git] / include / wx / unix / app.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/unix/app.h
3 // Purpose: wxAppConsole implementation for Unix
4 // Author: Lukasz Michalski
5 // Created: 28/01/2005
6 // RCS-ID: $Id$
7 // Copyright: (c) Lukasz Michalski
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 // wxApp subclass implementing event processing for console applications
12 class WXDLLIMPEXP_BASE wxAppConsoleUnix : public wxAppConsole
13 {
14 public:
15 // override base class initialization
16 virtual bool Initialize(int& argc, wxChar** argv);
17
18
19 // Unix-specific: Unix signal handling
20 // -----------------------------------
21
22 // type of the function which can be registered as signal handler: notice
23 // that it isn't really a signal handler, i.e. it's not subject to the
24 // usual signal handlers constraints, because it is called later from
25 // CheckSignal() and not when the signal really occurs
26 typedef void (*SignalHandler)(int);
27
28 // Set signal handler for the given signal, SIG_DFL or SIG_IGN can be used
29 // instead of a function pointer
30 //
31 // Return true if handler was installed, false on error
32 bool SetSignalHandler(int signal, SignalHandler handler);
33
34 // Check if any Unix signals arrived since the last call and execute
35 // handlers for them
36 void CheckSignal();
37
38 private:
39 // signal handler set up by SetSignalHandler() for all signals we handle,
40 // it just adds the signal to m_signalsCaught -- the real processing is
41 // done later, when CheckSignal() is called
42 static void HandleSignal(int signal);
43
44
45 // signals for which HandleSignal() had been called (reset from
46 // CheckSignal())
47 sigset_t m_signalsCaught;
48
49 // the signal handlers
50 WX_DECLARE_HASH_MAP(int, SignalHandler, wxIntegerHash, wxIntegerEqual, SignalHandlerHash);
51 SignalHandlerHash m_signalHandlerHash;
52
53 friend class GSocketGUIFunctionsTableBase;
54 };