1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxApp class
4 // Author: David Webster
8 // Copyright: (c) David Webster
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
18 #include <sys/ioctl.h>
19 #include <sys/select.h>
24 #include <sys/types.h>
40 class WXDLLIMPEXP_FWD_CORE wxFrame
;
41 class WXDLLIMPEXP_FWD_CORE wxWindow
;
42 class WXDLLIMPEXP_FWD_CORE wxApp
;
43 class WXDLLIMPEXP_FWD_CORE wxKeyEvent
;
44 class WXDLLIMPEXP_FWD_BASE wxLog
;
46 WXDLLIMPEXP_DATA_CORE(extern wxApp
*) wxTheApp
;
47 WXDLLIMPEXP_DATA_CORE(extern HAB
) vHabmain
;
49 // Force an exit from main loop
50 void WXDLLIMPEXP_CORE
wxExit(void);
52 // Yield to other apps/messages
53 bool WXDLLIMPEXP_CORE
wxYield(void);
55 extern MRESULT EXPENTRY
wxWndProc( HWND
62 // Represents the application. Derive OnInit and declare
63 // a new App object to start application
64 class WXDLLIMPEXP_CORE wxApp
: public wxAppBase
66 DECLARE_DYNAMIC_CLASS(wxApp
)
72 // override base class (pure) virtuals
73 virtual bool Initialize(int& argc
, wxChar
**argv
);
74 virtual void CleanUp(void);
76 virtual bool OnInitGui(void);
78 virtual void WakeUpIdle(void);
80 virtual void SetPrintMode(int mode
) { m_nPrintMode
= mode
; }
81 virtual int GetPrintMode(void) const { return m_nPrintMode
; }
83 // implementation only
84 void OnIdle(wxIdleEvent
& rEvent
);
85 void OnEndSession(wxCloseEvent
& rEvent
);
86 void OnQueryEndSession(wxCloseEvent
& rEvent
);
88 int AddSocketHandler(int handle
, int mask
,
89 void (*callback
)(void*), void * gsock
);
90 void RemoveSocketHandler(int handle
);
95 int m_nPrintMode
; // wxPRINT_WINDOWS, wxPRINT_POSTSCRIPT
98 // PM-specific wxApp definitions */
101 int m_maxSocketHandles
;
103 int m_lastUsedHandle
;
106 void* m_sockCallbackInfo
;
111 static bool RegisterWindowClasses(HAB vHab
);
118 DECLARE_EVENT_TABLE()
119 wxDECLARE_NO_COPY_CLASS(wxApp
);