X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9d8aca4832f9052729d2fc51d25c23f6d7006cab..39406a5d051fdcc372367c4dfedc6d711fdf51fd:/src/mac/classic/utils.cpp?ds=sidebyside diff --git a/src/mac/classic/utils.cpp b/src/mac/classic/utils.cpp index e290dc06e5..3e5d68a185 100644 --- a/src/mac/classic/utils.cpp +++ b/src/mac/classic/utils.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: utils.cpp +// Name: src/mac/classic/utils.cpp // Purpose: Various utilities // Author: Stefan Csomor // Modified by: @@ -9,12 +9,8 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -// Note: this is done in utilscmn.cpp now. -// #pragma implementation "utils.h" -#endif +#include "wx/wxprec.h" -#include "wx/setup.h" #include "wx/utils.h" #include "wx/app.h" #include "wx/apptrait.h" @@ -190,6 +186,18 @@ bool wxShutdown(wxShutdownFlags wFlags) return false; } +wxPowerType wxGetPowerType() +{ + // TODO + return wxPOWER_UNKNOWN; +} + +wxBatteryState wxGetBatteryState() +{ + // TODO + return wxBATTERY_UNKNOWN_STATE; +} + // Get free memory in bytes, or -1 if cannot determine amount (e.g. on UNIX) wxMemorySize wxGetFreeMemory() { @@ -521,7 +529,7 @@ wxChar *wxGetUserHome (const wxString& user) return NULL; } -bool wxGetDiskSpace(const wxString& path, wxLongLong *pTotal, wxLongLong *pFree) +bool wxGetDiskSpace(const wxString& path, wxDiskspaceSize_t *pTotal, wxDiskspaceSize_t *pFree) { if ( path.empty() ) return false; @@ -545,10 +553,10 @@ bool wxGetDiskSpace(const wxString& path, wxLongLong *pTotal, wxLongLong *pFree) OSErr err = XGetVolumeInfoNoName( volumeName , 0 , &pb ) ; if ( err == noErr ) { if ( pTotal ) { - (*pTotal) = wxLongLong( pb.ioVTotalBytes ) ; + (*pTotal) = wxDiskspaceSize_t( pb.ioVTotalBytes ) ; } if ( pFree ) { - (*pFree) = wxLongLong( pb.ioVFreeBytes ) ; + (*pFree) = wxDiskspaceSize_t( pb.ioVFreeBytes ) ; } } @@ -1392,4 +1400,3 @@ extern bool WXDLLEXPORT wxIsDebuggerRunning() #endif // defined(__WXMAC__) && !defined(__DARWIN__) && (__MWERKS__ >= 0x2400) #endif // wxUSE_GUI -