1998-07-01 17:26:46 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: process.h
|
|
|
|
// Purpose: wxProcess class
|
|
|
|
// Author: Guilhem Lavaux
|
|
|
|
// Modified by:
|
|
|
|
// Created: 24/06/98
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) 1998 Guilhem Lavaux
|
|
|
|
// Licence: wxWindows license
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
1998-08-15 00:23:28 +00:00
|
|
|
#ifndef _WX_PROCESSH__
|
|
|
|
#define _WX_PROCESSH__
|
1998-07-01 17:26:46 +00:00
|
|
|
|
|
|
|
#ifdef __GNUG__
|
1998-07-03 16:36:10 +00:00
|
|
|
#pragma interface "process.h"
|
1998-07-01 17:26:46 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "wx/defs.h"
|
|
|
|
#include "wx/object.h"
|
|
|
|
#include "wx/event.h"
|
|
|
|
|
|
|
|
class WXDLLEXPORT wxProcess: public wxEvtHandler
|
|
|
|
{
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxProcess)
|
|
|
|
public:
|
|
|
|
|
1998-08-23 03:22:56 +00:00
|
|
|
wxProcess(wxEvtHandler *parent = (wxEvtHandler *) NULL, int id = -1);
|
1998-07-01 17:26:46 +00:00
|
|
|
virtual ~wxProcess();
|
|
|
|
|
|
|
|
virtual void OnTerminate(int pid);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
int m_id;
|
|
|
|
};
|
|
|
|
|
|
|
|
// Process Event handling
|
|
|
|
|
|
|
|
class WXDLLEXPORT wxProcessEvent: public wxEvent
|
|
|
|
{
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxProcessEvent)
|
|
|
|
public:
|
|
|
|
|
|
|
|
wxProcessEvent(int id = 0, int pid = -1);
|
|
|
|
|
|
|
|
inline int GetPid() { return m_pid; }
|
|
|
|
inline void SetPid(int pid) { m_pid = pid; }
|
|
|
|
|
|
|
|
public:
|
|
|
|
int m_pid;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef void (wxObject::*wxProcessEventFunction)(wxProcessEvent&);
|
|
|
|
|
1998-09-06 14:52:16 +00:00
|
|
|
#define EVT_END_PROCESS(id, func) { wxEVT_END_PROCESS, id, -1, (wxObjectEvent) (wxEventFunction) (wxProcessEventFunction) & fn, NULL},
|
1998-07-01 17:26:46 +00:00
|
|
|
|
|
|
|
#endif
|
1998-08-15 00:23:28 +00:00
|
|
|
// _WX_PROCESSH__
|