]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/app.cpp
Move constant strings to .rodata/.data.rel.ro ELF segment from .data by making them...
[wxWidgets.git] / src / os2 / app.cpp
index 52aebcb4b8958e34fb1e971f5cb6481c30188a24..55c540bcd58aeae0c2db31a31cdcf96432a2d1cb 100644 (file)
@@ -9,10 +9,6 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
-    #pragma implementation "app.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
 
 #endif //
 
-#ifndef __EMX__
+#if defined(__WATCOMC__)
+
+#include <tcpustd.h>
+
+#elif !defined(__EMX__)
 
 #define select(a,b,c,d,e) bsdselect(a,b,c,d,e)
 extern "C" int _System bsdselect(int,
@@ -82,7 +82,6 @@ extern "C" int _System bsdselect(int,
 // ---------------------------------------------------------------------------
 
 extern wxChar*                      wxBuffer;
-extern wxList*                      wxWinHandleList;
 extern wxList WXDLLEXPORT           wxPendingDelete;
 extern wxCursor*                    g_globalCursor;
 
@@ -240,7 +239,7 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
     //    wxRedirectIOToConsole();
 #endif
 
-    wxWinHandleList = new wxList(wxKEY_INTEGER);
+    wxWinHandleHash = new wxWinHashTable(wxKEY_INTEGER, 100);
 
     // This is to foil optimizations in Visual C++ that throw out dummy.obj.
     // PLEASE DO NOT ALTER THIS.
@@ -269,7 +268,7 @@ bool wxApp::RegisterWindowClasses(
     wxString                        sError;
 
     if (!::WinRegisterClass( vHab
-                            ,wxFrameClassName
+                            ,(PSZ)wxFrameClassName
                             ,wxFrameWndProc
                             ,CS_SIZEREDRAW | CS_SYNCPAINT
                             ,sizeof(ULONG)
@@ -282,7 +281,7 @@ bool wxApp::RegisterWindowClasses(
     }
 
     if (!::WinRegisterClass( vHab
-                            ,wxFrameClassNameNoRedraw
+                            ,(PSZ)wxFrameClassNameNoRedraw
                             ,wxWndProc
                             ,0
                             ,sizeof(ULONG)
@@ -295,7 +294,7 @@ bool wxApp::RegisterWindowClasses(
     }
 
     if (!::WinRegisterClass( vHab
-                            ,wxMDIFrameClassName
+                            ,(PSZ)wxMDIFrameClassName
                             ,wxWndProc
                             ,CS_SIZEREDRAW | CS_MOVENOTIFY | CS_SYNCPAINT
                             ,sizeof(ULONG)
@@ -308,7 +307,7 @@ bool wxApp::RegisterWindowClasses(
     }
 
     if (!::WinRegisterClass( vHab
-                            ,wxMDIFrameClassNameNoRedraw
+                            ,(PSZ)wxMDIFrameClassNameNoRedraw
                             ,wxWndProc
                             ,0
                             ,sizeof(ULONG)
@@ -321,7 +320,7 @@ bool wxApp::RegisterWindowClasses(
     }
 
     if (!::WinRegisterClass( vHab
-                            ,wxMDIChildFrameClassName
+                            ,(PSZ)wxMDIChildFrameClassName
                             ,wxWndProc
                             ,CS_MOVENOTIFY | CS_SIZEREDRAW | CS_SYNCPAINT | CS_HITTEST
                             ,sizeof(ULONG)
@@ -334,7 +333,7 @@ bool wxApp::RegisterWindowClasses(
     }
 
     if (!::WinRegisterClass( vHab
-                            ,wxMDIChildFrameClassNameNoRedraw
+                            ,(PSZ)wxMDIChildFrameClassNameNoRedraw
                             ,wxWndProc
                             ,CS_HITTEST
                             ,sizeof(ULONG)
@@ -347,7 +346,7 @@ bool wxApp::RegisterWindowClasses(
     }
 
     if (!::WinRegisterClass( vHab
-                            ,wxPanelClassName
+                            ,(PSZ)wxPanelClassName
                             ,wxWndProc
                             ,CS_MOVENOTIFY | CS_SIZEREDRAW | CS_HITTEST | CS_SAVEBITS | CS_SYNCPAINT
                             ,sizeof(ULONG)
@@ -360,7 +359,7 @@ bool wxApp::RegisterWindowClasses(
     }
 
     if (!::WinRegisterClass( vHab
-                            ,wxCanvasClassName
+                            ,(PSZ)wxCanvasClassName
                             ,wxWndProc
                             ,CS_SIZEREDRAW | CS_HITTEST | CS_SYNCPAINT
                             ,sizeof(ULONG)
@@ -372,7 +371,7 @@ bool wxApp::RegisterWindowClasses(
         return FALSE;
     }
     if (!::WinRegisterClass( vHab
-                            ,wxCanvasClassNameNR
+                            ,(PSZ)wxCanvasClassNameNR
                             ,wxWndProc
                             ,CS_HITTEST | CS_SYNCPAINT
                             ,sizeof(ULONG)
@@ -419,8 +418,8 @@ void wxApp::CleanUp()
 // TODO:        ::DeleteObject( wxDisableButtonBrush );
     }
 
-    if (wxWinHandleList)
-        delete wxWinHandleList;
+    delete wxWinHandleHash;
+    wxWinHandleHash = NULL;
 
     // Delete Message queue
     if (wxTheApp->m_hMq)
@@ -489,8 +488,8 @@ void wxApp::OnIdle(
     if (gbInOnIdle)
         return;
 
-    gbInOnIdle = TRUE;
-    
+    gbInOnIdle = true;
+
     wxAppBase::OnIdle(rEvent);
 
 #if wxUSE_DC_CACHEING
@@ -652,7 +651,7 @@ void wxApp::WakeUpIdle()
             //
             // Should never happen
             //
-            wxLogLastError("PostMessage(WM_NULL)");
+            wxLogLastError(wxT("PostMessage(WM_NULL)"));
         }
     }
 } // end of wxWakeUpIdle
@@ -662,10 +661,7 @@ HAB wxGetInstance()
     return vHabmain;
 }
 
-void wxSetInstance(
-  HAB                               vHab
-)
+void wxSetInstance( HAB vHab )
 {
     vHabmain = vHab;
 }
-