]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/evtloopconsole.h
Don't create multiple parent-less top level frames in layout sample.
[wxWidgets.git] / include / wx / msw / evtloopconsole.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/evtloopconsole.h
3 // Purpose: wxConsoleEventLoop class for Windows
4 // Author: Vadim Zeitlin
5 // Modified by:
6 // Created: 2004-07-31
7 // RCS-ID: $Id$
8 // Copyright: (c) 2003-2004 Vadim Zeitlin <vadim@wxwindows.org>
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_MSW_EVTLOOPCONSOLE_H_
13 #define _WX_MSW_EVTLOOPCONSOLE_H_
14
15 class WXDLLIMPEXP_BASE wxMSWEventLoopBase : public wxEventLoopManual
16 {
17 public:
18 wxMSWEventLoopBase();
19
20 // implement base class pure virtuals
21 virtual bool Pending() const;
22
23 protected:
24 // get the next message from queue and return true or return false if we
25 // got WM_QUIT or an error occurred
26 bool GetNextMessage(WXMSG *msg);
27
28 // same as above but with a timeout and return value can be -1 meaning that
29 // time out expired in addition to
30 int GetNextMessageTimeout(WXMSG *msg, unsigned long timeout);
31 };
32
33 #if wxUSE_CONSOLE_EVENTLOOP
34
35 class WXDLLIMPEXP_BASE wxConsoleEventLoop : public wxMSWEventLoopBase
36 {
37 public:
38 wxConsoleEventLoop() { }
39
40 // override/implement base class virtuals
41 virtual bool Dispatch();
42 virtual int DispatchTimeout(unsigned long timeout);
43 virtual void WakeUp();
44 virtual bool YieldFor(long WXUNUSED(eventsToProcess)) { return true; }
45
46 // Windows-specific function to process a single message
47 virtual void ProcessMessage(WXMSG *msg);
48 };
49
50 #endif // wxUSE_CONSOLE_EVENTLOOP
51
52 #endif // _WX_MSW_EVTLOOPCONSOLE_H_