X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9b5f1895643cf94b38ac19a4c1151e259310852e..1cd9779fce63b081d875de7a901c8eb6120d0b8a:/src/motif/utils.cpp diff --git a/src/motif/utils.cpp b/src/motif/utils.cpp index d4322fe7cc..84bc1a6d9a 100644 --- a/src/motif/utils.cpp +++ b/src/motif/utils.cpp @@ -25,10 +25,14 @@ #endif #include "wx/utils.h" + +#ifndef WX_PRECOMP + #include "wx/app.h" + #include "wx/dcmemory.h" + #include "wx/bitmap.h" +#endif + #include "wx/apptrait.h" -#include "wx/app.h" -#include "wx/dcmemory.h" -#include "wx/bitmap.h" #include "wx/evtloop.h" #include @@ -139,30 +143,18 @@ void wxBell() } #endif -wxToolkitInfo& wxGUIAppTraits::GetToolkitInfo() +wxPortId wxGUIAppTraits::GetToolkitVersion(int *verMaj, int *verMin) const { - static wxToolkitInfo info; + // XmVERSION and XmREVISION are defined in Xm/Xm.h + if ( verMaj ) + *verMaj = XmVERSION; + if ( verMin ) + *verMin = XmREVISION; - info.shortName = _T("motif"); - info.name = _T("wxMotif"); -#ifdef __WXUNIVERSAL__ - info.shortName << _T("univ"); - info.name << _T("/wxUniversal"); -#endif - // FIXME TODO - // This code is WRONG!! Does NOT return the - // Motif version of the libs but the X protocol - // version! - Display *display = wxGlobalDisplay(); - if (display) - { - info.versionMajor = ProtocolVersion (display); - info.versionMinor = ProtocolRevision (display); - } - info.os = wxMOTIF_X; - return info; + return wxPORT_MOTIF; } + // ---------------------------------------------------------------------------- // Reading and writing resources (eg WIN.INI, .Xdefaults) // ---------------------------------------------------------------------------- @@ -909,7 +901,7 @@ void wxDoChangeForegroundColour(WXWidget widget, wxColour& foregroundColour) NULL); } -void wxDoChangeBackgroundColour(WXWidget widget, wxColour& backgroundColour, bool changeArmColour) +void wxDoChangeBackgroundColour(WXWidget widget, const wxColour& backgroundColour, bool changeArmColour) { wxComputeColours (XtDisplay((Widget) widget), & backgroundColour, (wxColour*) NULL);