1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxApp class
4 // Author: David Webster
7 // Copyright: (c) David Webster
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
17 #include <sys/ioctl.h>
18 #include <sys/select.h>
23 #include <sys/types.h>
39 class WXDLLIMPEXP_FWD_CORE wxFrame
;
40 class WXDLLIMPEXP_FWD_CORE wxWindow
;
41 class WXDLLIMPEXP_FWD_CORE wxApp
;
42 class WXDLLIMPEXP_FWD_CORE wxKeyEvent
;
43 class WXDLLIMPEXP_FWD_BASE wxLog
;
45 WXDLLIMPEXP_DATA_CORE(extern wxApp
*) wxTheApp
;
46 WXDLLIMPEXP_DATA_CORE(extern HAB
) vHabmain
;
48 // Force an exit from main loop
49 void WXDLLIMPEXP_CORE
wxExit(void);
51 // Yield to other apps/messages
52 bool WXDLLIMPEXP_CORE
wxYield(void);
54 extern MRESULT EXPENTRY
wxWndProc( HWND
61 // Represents the application. Derive OnInit and declare
62 // a new App object to start application
63 class WXDLLIMPEXP_CORE wxApp
: public wxAppBase
65 DECLARE_DYNAMIC_CLASS(wxApp
)
71 // override base class (pure) virtuals
72 virtual bool Initialize(int& argc
, wxChar
**argv
);
73 virtual void CleanUp(void);
75 virtual bool OnInitGui(void);
77 virtual void WakeUpIdle(void);
79 virtual void SetPrintMode(int mode
) { m_nPrintMode
= mode
; }
80 virtual int GetPrintMode(void) const { return m_nPrintMode
; }
82 // implementation only
83 void OnIdle(wxIdleEvent
& rEvent
);
84 void OnEndSession(wxCloseEvent
& rEvent
);
85 void OnQueryEndSession(wxCloseEvent
& rEvent
);
87 int AddSocketHandler(int handle
, int mask
,
88 void (*callback
)(void*), void * gsock
);
89 void RemoveSocketHandler(int handle
);
94 int m_nPrintMode
; // wxPRINT_WINDOWS, wxPRINT_POSTSCRIPT
97 // PM-specific wxApp definitions */
100 int m_maxSocketHandles
;
102 int m_lastUsedHandle
;
105 void* m_sockCallbackInfo
;
110 static bool RegisterWindowClasses(HAB vHab
);
117 DECLARE_EVENT_TABLE()
118 wxDECLARE_NO_COPY_CLASS(wxApp
);