]> git.saurik.com Git - wxWidgets.git/blob - include/wx/process.h
Added #pragmas for gcc.
[wxWidgets.git] / include / wx / process.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: process.h
3 // Purpose: wxProcess class
4 // Author: Guilhem Lavaux
5 // Modified by:
6 // Created: 24/06/98
7 // RCS-ID: $Id$
8 // Copyright: (c) 1998 Guilhem Lavaux
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef __PROCESSH__
13 #define __PROCESSH__
14
15 #ifdef __GNUG__
16 #pragma interface "process.h"
17 #endif
18
19 #include "wx/defs.h"
20 #include "wx/object.h"
21 #include "wx/event.h"
22
23 class WXDLLEXPORT wxProcess: public wxEvtHandler
24 {
25 DECLARE_DYNAMIC_CLASS(wxProcess)
26 public:
27
28 wxProcess(wxEvtHandler *parent = NULL, int id = -1);
29 virtual ~wxProcess();
30
31 virtual void OnTerminate(int pid);
32
33 protected:
34 int m_id;
35 };
36
37 // Process Event handling
38
39 class WXDLLEXPORT wxProcessEvent: public wxEvent
40 {
41 DECLARE_DYNAMIC_CLASS(wxProcessEvent)
42 public:
43
44 wxProcessEvent(int id = 0, int pid = -1);
45
46 inline int GetPid() { return m_pid; }
47 inline void SetPid(int pid) { m_pid = pid; }
48
49 public:
50 int m_pid;
51 };
52
53 typedef void (wxObject::*wxProcessEventFunction)(wxProcessEvent&);
54
55 #define EVT_END_PROCESS(id, func) { wxEVT_END_TERMINATE, id, -1, (wxObjectEvent) (wxEventFunction) (wxProcessEventFunction) & fn, NULL},
56
57 #endif
58 // __PROCESSH__