X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a536e411022b21280532c9daadc806a437fbb4c6..4a6b1d2872542582c0eee36d5c53ce56d52719a0:/include/wx/msw/display.h diff --git a/include/wx/msw/display.h b/include/wx/msw/display.h index 766e4e3401..a001fda4ae 100644 --- a/include/wx/msw/display.h +++ b/include/wx/msw/display.h @@ -2,10 +2,10 @@ // Name: display.h // Purpose: wxDisplay class customization for WXMSW // Author: Royce Mitchell III -// Modified by: +// Modified by: // Created: 06/21/02 // RCS-ID: $Id$ -// Copyright: (c) wxWindows team +// Copyright: (c) wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -15,13 +15,40 @@ class WXDLLEXPORT wxDisplay : public wxDisplayBase { public: - wxDisplay ( size_t index = 0 ); + // this function may be called *before* using any other wxDisplay methods + // to tell it to use DirectX functions instead of the standard Windows ones + static void UseDirectX(bool useDX); + // create the display object for the given physical display + wxDisplay(size_t index = 0); + + virtual ~wxDisplay(); + + // implement base class pure virtuals + virtual bool IsOk() const; virtual wxRect GetGeometry() const; - virtual int GetDepth() const; virtual wxString GetName() const; - DECLARE_NO_COPY_CLASS(wxDisplay); + virtual wxArrayVideoModes + GetModes(const wxVideoMode& mode = wxVideoMode()) const; + virtual wxVideoMode GetCurrentMode() const; + virtual bool ChangeMode(const wxVideoMode& mode = wxVideoMode()); + + virtual bool IsPrimary() const; + +private: + // get the display name to use with EnumDisplaySettings() + wxString GetNameForEnumSettings() const; + + // we have different implementations using DirectDraw and without it + wxArrayVideoModes DoGetModesDirectX(const wxVideoMode& modeMatch) const; + bool DoChangeModeDirectX(const wxVideoMode& mode); + + wxArrayVideoModes DoGetModesWindows(const wxVideoMode& modeMatch) const; + bool DoChangeModeWindows(const wxVideoMode& mode); + + + DECLARE_NO_COPY_CLASS(wxDisplay) }; #endif // _WX_MSW_DISPLAY_H_