Wx files working
This commit is contained in:
parent
c417beda6d
commit
30cb0f8f63
54 changed files with 3157 additions and 5197 deletions
|
|
@ -546,69 +546,74 @@ protected:
|
|||
};
|
||||
|
||||
#if defined(__UNIX__) && !defined(__WINDOWS__)
|
||||
#include <signal.h>
|
||||
#ifndef __CPPAST__
|
||||
#include "wx/unix/app.h"
|
||||
#else
|
||||
#include <signal.h>
|
||||
|
||||
class wxFDIODispatcher;
|
||||
class wxFDIOHandler;
|
||||
class wxWakeUpPipe;
|
||||
class wxFDIODispatcher;
|
||||
class wxFDIOHandler;
|
||||
class wxWakeUpPipe;
|
||||
|
||||
// wxApp subclass implementing event processing for console applications
|
||||
class WXDLLIMPEXP_BASE wxAppConsole : public wxAppConsoleBase
|
||||
{
|
||||
public:
|
||||
wxAppConsole();
|
||||
virtual ~wxAppConsole();
|
||||
// wxApp subclass implementing event processing for console applications
|
||||
class WXDLLIMPEXP_BASE wxAppConsole : public wxAppConsoleBase
|
||||
{
|
||||
public:
|
||||
wxAppConsole();
|
||||
virtual ~wxAppConsole();
|
||||
|
||||
// override base class initialization
|
||||
virtual bool Initialize(int& argc, wxChar** argv) wxOVERRIDE;
|
||||
// override base class initialization
|
||||
virtual bool Initialize(int& argc, wxChar** argv) wxOVERRIDE;
|
||||
|
||||
|
||||
// Unix-specific: Unix signal handling
|
||||
// -----------------------------------
|
||||
// Unix-specific: Unix signal handling
|
||||
// -----------------------------------
|
||||
|
||||
// type of the function which can be registered as signal handler: notice
|
||||
// that it isn't really a signal handler, i.e. it's not subject to the
|
||||
// usual signal handlers constraints, because it is called later from
|
||||
// CheckSignal() and not when the signal really occurs
|
||||
typedef void (*SignalHandler)(int);
|
||||
// type of the function which can be registered as signal handler: notice
|
||||
// that it isn't really a signal handler, i.e. it's not subject to the
|
||||
// usual signal handlers constraints, because it is called later from
|
||||
// CheckSignal() and not when the signal really occurs
|
||||
typedef void (*SignalHandler)(int);
|
||||
|
||||
// Set signal handler for the given signal, SIG_DFL or SIG_IGN can be used
|
||||
// instead of a function pointer
|
||||
//
|
||||
// Return true if handler was installed, false on error
|
||||
bool SetSignalHandler(int signal, SignalHandler handler);
|
||||
// Set signal handler for the given signal, SIG_DFL or SIG_IGN can be used
|
||||
// instead of a function pointer
|
||||
//
|
||||
// Return true if handler was installed, false on error
|
||||
bool SetSignalHandler(int signal, SignalHandler handler);
|
||||
|
||||
// Check if any Unix signals arrived since the last call and execute
|
||||
// handlers for them
|
||||
void CheckSignal();
|
||||
// Check if any Unix signals arrived since the last call and execute
|
||||
// handlers for them
|
||||
void CheckSignal();
|
||||
|
||||
// Register the signal wake up pipe with the given dispatcher.
|
||||
//
|
||||
// This is used by wxExecute(wxEXEC_NOEVENTS) implementation only.
|
||||
//
|
||||
// The pointer to the handler used for processing events on this descriptor
|
||||
// is returned so that it can be deleted when we no longer needed it.
|
||||
wxFDIOHandler* RegisterSignalWakeUpPipe(wxFDIODispatcher& dispatcher);
|
||||
// Register the signal wake up pipe with the given dispatcher.
|
||||
//
|
||||
// This is used by wxExecute(wxEXEC_NOEVENTS) implementation only.
|
||||
//
|
||||
// The pointer to the handler used for processing events on this descriptor
|
||||
// is returned so that it can be deleted when we no longer needed it.
|
||||
wxFDIOHandler* RegisterSignalWakeUpPipe(wxFDIODispatcher& dispatcher);
|
||||
|
||||
private:
|
||||
// signal handler set up by SetSignalHandler() for all signals we handle,
|
||||
// it just adds the signal to m_signalsCaught -- the real processing is
|
||||
// done later, when CheckSignal() is called
|
||||
static void HandleSignal(int signal);
|
||||
private:
|
||||
// signal handler set up by SetSignalHandler() for all signals we handle,
|
||||
// it just adds the signal to m_signalsCaught -- the real processing is
|
||||
// done later, when CheckSignal() is called
|
||||
static void HandleSignal(int signal);
|
||||
|
||||
|
||||
// signals for which HandleSignal() had been called (reset from
|
||||
// CheckSignal())
|
||||
sigset_t m_signalsCaught;
|
||||
// signals for which HandleSignal() had been called (reset from
|
||||
// CheckSignal())
|
||||
sigset_t m_signalsCaught;
|
||||
|
||||
// the signal handlers
|
||||
/* WX_DECLARE_HASH_MAP(int, SignalHandler, wxIntegerHash, wxIntegerEqual, SignalHandlerHash); */
|
||||
/* SignalHandlerHash m_signalHandlerHash; */
|
||||
// the signal handlers
|
||||
WX_DECLARE_HASH_MAP(int, SignalHandler, wxIntegerHash, wxIntegerEqual, SignalHandlerHash);
|
||||
SignalHandlerHash m_signalHandlerHash;
|
||||
|
||||
// pipe used for wake up signal handling: if a signal arrives while we're
|
||||
// blocking for input, writing to this pipe triggers a call to our CheckSignal()
|
||||
wxWakeUpPipe *m_signalWakeUpPipe;
|
||||
};
|
||||
#endif
|
||||
|
||||
// pipe used for wake up signal handling: if a signal arrives while we're
|
||||
// blocking for input, writing to this pipe triggers a call to our CheckSignal()
|
||||
wxWakeUpPipe *m_signalWakeUpPipe;
|
||||
};
|
||||
#else
|
||||
// this has to be a class and not a typedef as we forward declare it
|
||||
class wxAppConsole : public wxAppConsoleBase { };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue