]>
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 /////////////////////////////////////////////////////////////////////////////
18 #include <sys/ioctl.h>
19 #include <sys/select.h>
24 #include <sys/types.h>
40 class WXDLLEXPORT wxFrame
;
41 class WXDLLEXPORT wxWindow
;
42 class WXDLLEXPORT wxApp
;
43 class WXDLLEXPORT wxKeyEvent
;
44 class WXDLLEXPORT wxLog
;
46 WXDLLEXPORT_DATA(extern wxApp
*) wxTheApp
;
47 WXDLLEXPORT_DATA(extern HAB
) vHabmain
;
49 // Force an exit from main loop
50 void WXDLLEXPORT
wxExit(void);
52 // Yield to other apps/messages
53 bool WXDLLEXPORT
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 WXDLLEXPORT 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 bool Yield(bool onlyIfNeeded
= false);
79 virtual void WakeUpIdle(void);
81 virtual void SetPrintMode(int mode
) { m_nPrintMode
= mode
; }
82 virtual int GetPrintMode(void) const { return m_nPrintMode
; }
84 // implementation only
85 void OnIdle(wxIdleEvent
& rEvent
);
86 void OnEndSession(wxCloseEvent
& rEvent
);
87 void OnQueryEndSession(wxCloseEvent
& rEvent
);
89 int AddSocketHandler(int handle
, int mask
,
90 void (*callback
)(void*), void * gsock
);
91 void RemoveSocketHandler(int handle
);
96 int m_nPrintMode
; // wxPRINT_WINDOWS, wxPRINT_POSTSCRIPT
99 // PM-specific wxApp definitions */
102 int m_maxSocketHandles
;
104 int m_lastUsedHandle
;
107 void* m_sockCallbackInfo
;
112 static bool RegisterWindowClasses(HAB vHab
);
119 DECLARE_EVENT_TABLE()
120 DECLARE_NO_COPY_CLASS(wxApp
)