X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b00f16c865f5d8b2b2d4387f7991afcab726a38a..f2e64141685959602737941d25da7fa9c6254bb4:/wxPython/src/_display.i?ds=sidebyside diff --git a/wxPython/src/_display.i b/wxPython/src/_display.i index db32d011a8..259d1a92cd 100644 --- a/wxPython/src/_display.i +++ b/wxPython/src/_display.i @@ -16,7 +16,7 @@ //--------------------------------------------------------------------------- %{ -#include "wx/display.h" +#include %} @@ -84,10 +84,55 @@ const wxVideoMode wxDefaultVideoMode; //--------------------------------------------------------------------------- -DocStr(wxDisplay, - "Represents a display/monitor attached to the system", ""); +%{ +// dummy version of wxDisplay for when it is not enabled in the wxWidgets build +#if !wxUSE_DISPLAY +#include +#include + +WX_DECLARE_OBJARRAY(wxVideoMode, wxArrayVideoModes); +#include "wx/arrimpl.cpp" +WX_DEFINE_OBJARRAY(wxArrayVideoModes); +const wxVideoMode wxDefaultVideoMode; + +class wxDisplay +{ +public: + wxDisplay(size_t index = 0) { wxPyRaiseNotImplemented(); } + ~wxDisplay() {} + + static size_t GetCount() + { wxPyRaiseNotImplemented(); return 0; } + + static int GetFromPoint(const wxPoint& pt) + { wxPyRaiseNotImplemented(); return wxNOT_FOUND; } + static int GetFromWindow(wxWindow *window) + { wxPyRaiseNotImplemented(); return wxNOT_FOUND; } + + virtual bool IsOk() const { return false; } + virtual wxRect GetGeometry() const { wxRect r; return r; } + virtual wxString GetName() const { return wxEmptyString; } + bool IsPrimary() const { return false; } + + wxArrayVideoModes GetModes(const wxVideoMode& mode = wxDefaultVideoMode) + { wxArrayVideoModes a; return a; } + virtual wxVideoMode GetCurrentMode() const + { return wxDefaultVideoMode; } + + virtual bool ChangeMode(const wxVideoMode& mode = wxDefaultVideoMode) + { return false; } + + void ResetMode() {} +}; +#endif +%} + + + +DocStr(wxDisplay, + "Represents a display/monitor attached to the system", ""); class wxDisplay { public: