X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b2644cc3ccb41de07e2160857f1cc0c2a2069d79..25b0e7c89788b36fe415a4fc707fa5bc22b3e9dc:/include/wx/display.h?ds=inline diff --git a/include/wx/display.h b/include/wx/display.h index a63376b6c7..b85a04471c 100644 --- a/include/wx/display.h +++ b/include/wx/display.h @@ -5,7 +5,7 @@ // Modified by: Vadim Zeitlin (resolution changes, display modes, ...) // Created: 06/21/02 // RCS-ID: $Id$ -// Copyright: (c) 2002-2003 wxWindows team +// Copyright: (c) 2002-2003 wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -14,61 +14,17 @@ #if wxUSE_DISPLAY -#if defined(__GNUG__) && !defined(__APPLE__) +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma interface "displaybase.h" #endif #include "wx/dynarray.h" +#include "wx/vidmode.h" class WXDLLEXPORT wxWindow; - -// ---------------------------------------------------------------------------- -// wxVideoMode: contains video mode parameters for a display -// ---------------------------------------------------------------------------- - -struct WXDLLEXPORT wxVideoMode -{ - wxVideoMode(int width = 0, int height = 0, int depth = 0, int freq = 0) - { - w = width; - h = height; - - bpp = depth; - - refresh = freq; - } - - // default copy ctor and assignment operator are ok - - bool operator==(const wxVideoMode& m) const - { - return w == m.w && h == m.h && bpp == m.bpp && refresh == m.refresh; - } - bool operator!=(const wxVideoMode& mode) const - { - return !operator==(mode); - } - - // returns true if this mode matches the other one in the sense that all - // non zero fields of the other mode have the same value in this one - // (except for refresh which is allowed to have a greater value) - bool Matches(const wxVideoMode& other) const - { - return (!other.w || w == other.w) && - (!other.h || h == other.h) && - (!other.bpp || bpp == other.bpp) && - (!other.refresh || refresh >= other.refresh); - } - - // the screen size in pixels (e.g. 640*480), 0 means unspecified - int w, 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; -}; +class WXDLLEXPORT wxPoint; +class WXDLLEXPORT wxRect; +class WXDLLEXPORT wxString; WX_DECLARE_EXPORTED_OBJARRAY(wxVideoMode, wxArrayVideoModes); @@ -111,8 +67,8 @@ public: // name may be empty virtual wxString GetName() const = 0; - // display 0 is always the primary display - bool IsPrimary() const { return m_index == 0; } + // display 0 is usually the primary display + virtual bool IsPrimary() const { return m_index == 0; } // enumerate all video modes supported by this display matching the given @@ -150,9 +106,13 @@ protected: #if defined(__WXMSW__) #include "wx/msw/display.h" #elif defined(__WXMOTIF__) - #include "wx/motif/display.h" + #include "wx/unix/displayx11.h" #elif defined(__WXGTK__) #include "wx/unix/displayx11.h" +#elif defined(__WXX11__) + #include "wx/unix/displayx11.h" +#elif defined(__WXCOCOA__) + #include "wx/cocoa/display.h" #elif defined(__WXMAC__) #include "wx/mac/display.h" #elif defined(__WXPM__)