static const int wxPRINT_WINDOWS = 1;
static const int wxPRINT_POSTSCRIPT = 2;
+// ----------------------------------------------------------------------------
+// support for framebuffer ports
+// ----------------------------------------------------------------------------
+
+#if wxUSE_GUI
+// VS: Fullscreen/framebuffer application needs to choose display mode prior
+// to wxWindows initialization. This class holds information about display
+// mode. An instance of it is returned by virtual wxApp::GetDisplayMode.
+class WXDLLEXPORT wxDisplayModeInfo
+{
+public:
+ wxDisplayModeInfo() : m_ok(FALSE) {}
+ wxDisplayModeInfo(const wxSize& size, unsigned depth)
+ : m_size(size), m_depth(depth), m_ok(TRUE) {}
+
+ const wxSize& GetScreenSize() const { return m_size; }
+ unsigned GetDepth() const { return m_depth; }
+ bool IsOk() const { return m_ok; }
+
+private:
+ wxSize m_size;
+ unsigned m_depth;
+ bool m_ok;
+};
+#endif
+
// ----------------------------------------------------------------------------
// the common part of wxApp implementations for all platforms
// ----------------------------------------------------------------------------
// process the first event in the event queue (blocks until an event
// apperas if there are none currently)
virtual void Dispatch() = 0;
+
+ // process all currently pending events right now
+ //
+ // it is an error to call Yield() recursively unless the value of
+ // onlyIfNeeded is TRUE
+ //
+ // WARNING: this function is dangerous as it can lead to unexpected
+ // reentrancies (i.e. when called from an event handler it
+ // may result in calling the same event handler again), use
+ // with _extreme_ care or, better, don't use at all!
+ virtual bool Yield(bool onlyIfNeeded = FALSE) = 0;
#endif // wxUSE_GUI
// application info: name, description, vendor
// wxICON_XXX values
virtual wxIcon GetStdIcon(int which) const = 0;
+ // get display mode to use. This is only used in framebuffer wxWin ports
+ // (such as wxMGL). This method is called early in wxWin initialization
+ // process and is supposed to be overriden in derived classes.
+ virtual wxDisplayModeInfo GetDisplayMode() const { return wxDisplayModeInfo(); }
+
// VZ: what does this do exactly?
void SetWantDebugOutput( bool flag ) { m_wantDebugOutput = flag; }
bool GetWantDebugOutput() const { return m_wantDebugOutput; }
static wxAppInitializerFunction GetInitializerFunction()
{ return m_appInitFn; }
+ // needed to avoid link errors
+#ifdef __DARWIN__
+ virtual ~wxAppBase() { }
+#endif
+
// process all events in the wxPendingEvents list
virtual void ProcessPendingEvents();
// does any of our windows has focus?
bool m_isActive;
#endif // wxUSE_GUI
-
-#ifdef __WXMAC_X__
-public:
- virtual ~wxAppBase() {} // Added min for Mac X
-#endif
};
// ----------------------------------------------------------------------------
#include "wx/motif/app.h"
#elif defined(__WXMGL__)
#include "wx/mgl/app.h"
- #elif defined(__WXQT__)
- #include "wx/qt/app.h"
#elif defined(__WXGTK__)
#include "wx/gtk/app.h"
#elif defined(__WXMAC__)
// be in your main program (e.g. hello.cpp). Now IMPLEMENT_APP should add this
// code if required.
-#if !wxUSE_GUI || defined(__WXMOTIF__) || defined(__WXGTK__) || defined(__WXPM__)
+#if !wxUSE_GUI || defined(__WXMOTIF__) || defined(__WXGTK__) || defined(__WXPM__) || defined(__WXMGL__)
#define IMPLEMENT_WXWIN_MAIN \
extern int wxEntry( int argc, char *argv[] ); \
int main(int argc, char *argv[]) { return wxEntry(argc, argv); }