reverted wxVideoMode API breakage by r53049, finished documentation for it
authorVáclav Slavík <vslavik@fastmail.fm>
Fri, 11 Apr 2008 09:52:04 +0000 (09:52 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Fri, 11 Apr 2008 09:52:04 +0000 (09:52 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53124 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/vidmode.h
interface/vidmode.h

index c999eb7d86562c0940dcfe77b2711e1cdd442cc8..713beaeb3f29071a14e549498becff5007cfd25b 100644 (file)
 #define _WX_VMODE_H_
 
 // ----------------------------------------------------------------------------
-// wxVideoMode: a simple class containing video mode parameters for a display
+// wxVideoMode: a simple struct containing video mode parameters for a display
 // ----------------------------------------------------------------------------
 
-class WXDLLIMPEXP_CORE wxVideoMode
+struct WXDLLIMPEXP_CORE wxVideoMode
 {
-public:
     wxVideoMode(int width = 0, int height = 0, int depth = 0, int freq = 0)
     {
         w = width;
@@ -61,8 +60,6 @@ public:
     bool IsOk() const { return w && h; }
 
 
-protected:
-
     // the screen size in pixels (e.g. 640*480), 0 means unspecified
     int w, h;
 
index 2fcfa70c286a6244325b32965cd1c7f8cf73e4dc..43215eb0fd32b2c1fea840fbaaf05ee118d75997 100644 (file)
@@ -7,7 +7,7 @@
 /////////////////////////////////////////////////////////////////////////////
 
 /**
-    @class wxVideoMode
+    @struct wxVideoMode
     @wxheader{display.h}
 
     Determines the sizes and locations of displays connected to the system.
@@ -20,7 +20,7 @@
 
     @see wxClientDisplayRect(), wxDisplaySize(), wxDisplaySizeMM()
 */
-class wxVideoMode
+struct wxVideoMode
 {
 public:
     /**
@@ -38,14 +38,38 @@ public:
     */
     bool Matches(const wxVideoMode& other) const;
 
+    /**
+        Returns the screen width in pixels (e.g. 640), 0 means unspecified.
+    */
     int GetWidth() const;
+
+    /**
+        Returns the screen height in pixels (e.g. 480), 0 means unspecified.
+    */
     int GetHeight() const;
+
+    /**
+        Returns bits per pixel (e.g. 32), 1 is monochrome and 0 means
+        unspecified/known.
+    */
     int GetDepth() const;
 
     /**
         Returns true if the object has been initialized
     */
     bool IsOk() const;
+
+    /// The screen width in pixels (e.g. 640), 0 means unspecified.
+    int w;
+
+    /// The screen height in pixels (e.g. 480), 0 means unspecified.
+    int h;
+
+    /// Bits per pixel (e.g. 32), 1 is monochrome and 0 means unspecified/known.
+    int bpp;
+
+    /// Refresh frequency in Hz, 0 means unspecified/unknown.
+    int refresh;
 };
 
 /**