]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/app.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxApp class
4 // Author: David Webster
8 // Copyright: (c) David Webster
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
17 #include <sys/ioctl.h>
18 #include <sys/select.h>
23 #include <sys/types.h>
39 class WXDLLEXPORT wxFrame
;
40 class WXDLLEXPORT wxWindow
;
41 class WXDLLEXPORT wxApp
;
42 class WXDLLEXPORT wxKeyEvent
;
43 class WXDLLEXPORT wxLog
;
45 WXDLLEXPORT_DATA(extern wxApp
*) wxTheApp
;
46 WXDLLEXPORT_DATA(extern HAB
) vHabmain
;
48 // Force an exit from main loop
49 void WXDLLEXPORT
wxExit(void);
51 // Yield to other apps/messages
52 bool WXDLLEXPORT
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 WXDLLEXPORT 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 bool Yield(bool onlyIfNeeded
= FALSE
);
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 DECLARE_NO_COPY_CLASS(wxApp
)