X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/23a59c2cbe8489445b9c26dee4a77e2d20a999c2..aee12bfb80fb63b82552f59127d5e66b7f056ff2:/src/palmos/utils.cpp diff --git a/src/palmos/utils.cpp b/src/palmos/utils.cpp index e32477f327..3185ed3ea6 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,12 +107,7 @@ wxChar *wxGetUserHome(const wxString& WXUNUSED(user)) return NULL; } -bool wxDirExists(const wxString& dir) -{ - return false; -} - -bool wxGetDiskSpace(const wxString& path, wxLongLong *pTotal, wxLongLong *pFree) +bool wxGetDiskSpace(const wxString& path, wxDiskspaceSize_t *pTotal, wxDiskspaceSize_t *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"); + + char *version = SysGetOSVersionString(); + if(version) + { + wxString str = wxString::FromAscii(version); + MemPtrFree(version); + if(!str.empty()) + { + strOS << _(" ") << str; + } + } - return str; + return strOS; } wxToolkitInfo& wxAppTraits::GetToolkitInfo() { static wxToolkitInfo info; + info.os = wxPALMOS; info.name = _T("wxBase"); return info; }