X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8bb6b2c057edbcc5b87f00a8af6ac70f6fd69727..d18868bb9b22d6f0fd1010779ddab14a6ab398d8:/include/wx/apptrait.h diff --git a/include/wx/apptrait.h b/include/wx/apptrait.h index 12d9dba4ac..3aa0e293ab 100644 --- a/include/wx/apptrait.h +++ b/include/wx/apptrait.h @@ -110,10 +110,14 @@ public: virtual GSocketGUIFunctionsTable* GetSocketGUIFunctionsTable() = 0; #endif - // return information about the (native) toolkit currently used; + // return information about the (native) toolkit currently used and its + // runtime (not compile-time) version. // returns wxPORT_BASE for console applications and one of the remaining // wxPORT_* values for GUI applications. virtual wxPortId GetToolkitVersion(int *majVer, int *minVer) const = 0; + + // return true if the port is using wxUniversal for the GUI, false if not + virtual bool IsUsingUniversalWidgets() const = 0; }; // ---------------------------------------------------------------------------- @@ -172,7 +176,7 @@ public: virtual void RemoveFromPendingDelete(wxObject *object); // the GetToolkitVersion for console application is always the same - wxPortId GetToolkitVersion(int *verMaj, int *verMin) const + virtual wxPortId GetToolkitVersion(int *verMaj, int *verMin) const { // no toolkits (wxBase is for console applications without GUI support) // NB: zero means "no toolkit", -1 means "not initialized yet" @@ -181,6 +185,8 @@ public: if (verMin) *verMin = 0; return wxPORT_BASE; } + + virtual bool IsUsingUniversalWidgets() const { return false; } }; // ---------------------------------------------------------------------------- @@ -211,6 +217,15 @@ public: virtual void ScheduleForDestroy(wxObject *object); virtual void RemoveFromPendingDelete(wxObject *object); + + virtual bool IsUsingUniversalWidgets() const + { + #ifdef __WXUNIVERSAL__ + return true; + #else + return false; + #endif + } }; #endif // wxUSE_GUI @@ -230,6 +245,8 @@ public: #include "wx/mac/apptrait.h" #elif defined(__WXPM__) #include "wx/os2/apptrait.h" +#elif defined(__DOS__) + #include "wx/msdos/apptrait.h" #else #if wxUSE_GUI class wxGUIAppTraits : public wxGUIAppTraitsBase