]> git.saurik.com Git - wxWidgets.git/commitdiff
added wxApp::GetDisplayMode function for fullscreen ports
authorVáclav Slavík <vslavik@fastmail.fm>
Sat, 3 Nov 2001 21:36:15 +0000 (21:36 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sat, 3 Nov 2001 21:36:15 +0000 (21:36 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12293 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/app.h

index d30e19cd8dd8768398075f16c7ff8043dd3112af..8f631cccf22053799f447eb62dffa780696daf90 100644 (file)
@@ -54,6 +54,32 @@ class WXDLLEXPORT wxCmdLineParser;
 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
 // ----------------------------------------------------------------------------
@@ -253,6 +279,11 @@ public:
         // 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; }