X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9d8aca4832f9052729d2fc51d25c23f6d7006cab..68df211faedeabdf4259858109d1bd7385fdccf5:/src/palmos/utils.cpp diff --git a/src/palmos/utils.cpp b/src/palmos/utils.cpp index db8ce72357..845aae1033 100644 --- a/src/palmos/utils.cpp +++ b/src/palmos/utils.cpp @@ -1,11 +1,11 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: palmos/utils.cpp +// Name: src/palmos/utils.cpp // Purpose: Various utilities -// Author: William Osborne -// Modified by: +// Author: William Osborne - minimal working wxPalmOS port +// Modified by: Wlodzimierz ABX Skiba - real functionality // Created: 10/13/04 -// RCS-ID: $Id: -// Copyright: (c) William Osborne +// RCS-ID: $Id$ +// Copyright: (c) William Osborne, Wlodzimierz Skiba // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -39,6 +39,7 @@ #include #include #include +#include // ============================================================================ // implementation @@ -106,11 +107,6 @@ wxChar *wxGetUserHome(const wxString& WXUNUSED(user)) return NULL; } -bool wxDirExists(const wxString& dir) -{ - return false; -} - bool wxGetDiskSpace(const wxString& path, wxLongLong *pTotal, wxLongLong *pFree) { return false; @@ -151,6 +147,17 @@ bool wxShutdown(wxShutdownFlags wFlags) return false; } +wxPowerType wxGetPowerType() +{ + return wxPOWER_BATTERY; +} + +wxBatteryState wxGetBatteryState() +{ + // TODO + return wxBATTERY_UNKNOWN_STATE; +} + // ---------------------------------------------------------------------------- // misc // ---------------------------------------------------------------------------- @@ -187,14 +194,26 @@ void wxBell() wxString wxGetOsDescription() { - wxString str; + wxString strOS = _T("PalmOS"); - return str; + char *version = SysGetOSVersionString(); + if(version) + { + wxString str = wxString::FromAscii(version); + MemPtrFree(version); + if(!str.empty()) + { + strOS << _(" ") << str; + } + } + + return strOS; } wxToolkitInfo& wxAppTraits::GetToolkitInfo() { static wxToolkitInfo info; + info.os = wxPALMOS; info.name = _T("wxBase"); return info; } @@ -244,8 +263,6 @@ extern long wxCharsetToCodepage(const wxChar *name) #else // !wxUSE_FONTMAP -#include "wx/palmos/registry.h" - // this should work if Internet Exploiter is installed extern long wxCharsetToCodepage(const wxChar *name) {