]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/utils.cpp
calculating vis regions as rects (faster for Quartz) and caching the results for...
[wxWidgets.git] / src / os2 / utils.cpp
index 678f7c0edc033fc05bd1319a52c97bea197bd113..f29aafc86b204b42f4e658b23a64a4744bc9b190 100644 (file)
@@ -204,21 +204,39 @@ 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()
 {
     void*                           pMemptr = NULL;
-    ULONG                           lSize;
+    LONG                            lSize;
     ULONG                           lMemFlags;
     APIRET                          rc;
 
     lMemFlags = PAG_FREE;
-    rc = ::DosQueryMem(pMemptr, &lSize, &lMemFlags);
+    rc = ::DosQueryMem(pMemptr, (PULONG)&lSize, &lMemFlags);
     if (rc != 0)
         lSize = -1L;
     return (wxMemorySize)lSize;
 }
 
+// Get Process ID
+unsigned long wxGetProcessId()
+{
+    return (unsigned long)getpid();
+}
+
 // ----------------------------------------------------------------------------
 // env vars
 // ----------------------------------------------------------------------------
@@ -419,7 +437,7 @@ wxChar* wxGetUserHome (
 
     char *wxBuffer = new wxChar[256];
 #ifndef __EMX__
-    if (sUser1 != _T(""))
+    if (!sUser1.empty())
     {
         wxChar                      zTmp[64];
 
@@ -441,7 +459,7 @@ wxChar* wxGetUserHome (
         }
     }
 #endif
-    if (sUser1 == _T(""))
+    if (sUser1.empty())
     {
         if ((zHome = wxGetenv(_T("HOME"))) != NULL)
         {
@@ -456,13 +474,6 @@ wxChar* wxGetUserHome (
     return NULL; // No home known!
 }
 
-bool wxDirExists(
-  const wxString&                   rDir
-)
-{
-    return (::DosSetCurrentDir(WXSTRINGCAST rDir));
-}
-
 wxString WXDLLEXPORT wxPMErrorToStr(
   ERRORID                           vError
 )