X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8bb6b2c057edbcc5b87f00a8af6ac70f6fd69727..715ce94da9634504ecaaa3aaf54091743b1b058c:/include/wx/apptrait.h diff --git a/include/wx/apptrait.h b/include/wx/apptrait.h index 12d9dba4ac..1513596cc7 100644 --- a/include/wx/apptrait.h +++ b/include/wx/apptrait.h @@ -110,10 +110,24 @@ 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; + + // return the name of the Desktop Environment such as + // "KDE" or "GNOME". May return an empty string. + virtual wxString GetDesktopEnvironment() const { return wxEmptyString; } + +protected: +#if wxUSE_STACKWALKER && defined( __WXDEBUG__ ) + // utility function: returns the stack frame as a plain wxString + virtual wxString GetAssertStackTrace(); +#endif }; // ---------------------------------------------------------------------------- @@ -172,7 +186,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 +195,8 @@ public: if (verMin) *verMin = 0; return wxPORT_BASE; } + + virtual bool IsUsingUniversalWidgets() const { return false; } }; // ---------------------------------------------------------------------------- @@ -211,6 +227,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 @@ -224,12 +249,14 @@ public: #include "wx/palmos/apptrait.h" #elif defined(__WIN32__) #include "wx/msw/apptrait.h" -#elif defined(__UNIX__) && !defined(__EMX__) +#elif defined(__OS2__) + #include "wx/os2/apptrait.h" +#elif defined(__UNIX__) #include "wx/unix/apptrait.h" #elif defined(__WXMAC__) #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