]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/appcmn.cpp
macro naming changes, delegate api calls getting property info, object info exposed...
[wxWidgets.git] / src / common / appcmn.cpp
index d70ff7bc23fbdb0ca37bebdd3878558f540a5ebb..5c19be543e65f930cc18374b375d8a608ec45893 100644 (file)
@@ -17,7 +17,7 @@
 // headers
 // ---------------------------------------------------------------------------
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
     #pragma implementation "appbase.h"
 #endif
 
     #include "wx/fontmap.h"
 #endif // wxUSE_FONTMAP
 
+// DLL options compatibility check:
+#include "wx/build.h"
+WX_CHECK_BUILD_OPTIONS("wxCore")
+
 // ============================================================================
 // wxAppBase implementation
 // ============================================================================
@@ -147,6 +151,9 @@ void wxAppBase::CleanUp()
 
 void wxAppBase::OnInitCmdLine(wxCmdLineParser& parser)
 {
+    // first add the standard non GUI options
+    wxAppConsole::OnInitCmdLine(parser);
+
     // the standard command line options
     static const wxCmdLineEntryDesc cmdLineGUIDesc[] =
     {
@@ -316,7 +323,6 @@ bool wxAppBase::ProcessIdle()
     wxIdleEvent event;
     bool needMore = FALSE;
     wxWindowList::compatibility_iterator node = wxTopLevelWindows.GetFirst();
-    node = wxTopLevelWindows.GetFirst();
     while (node)
     {
         wxWindow* win = node->GetData();
@@ -490,3 +496,47 @@ void wxGUIAppTraitsBase::RemoveFromPendingDelete(wxObject *object)
     wxPendingDelete.DeleteObject(object);
 }
 
+#if wxUSE_SOCKETS
+
+#if defined(__UNIX__) || defined(__DARWIN__) || defined(__OS2__)
+    #include "wx/unix/gsockunx.h"
+#elif defined(__WINDOWS__)
+    #include "wx/msw/gsockmsw.h"
+#elif defined(__WXMAC__)
+  #include <MacHeaders.c>
+  #define OTUNIXERRORS 1
+  #include <OpenTransport.h>
+  #include <OpenTransportProviders.h>
+  #include <OpenTptInternet.h>
+
+  #include "wx/mac/gsockmac.h"
+#else
+    #error "Must include correct GSocket header here"
+#endif
+
+GSocketGUIFunctionsTable* wxGUIAppTraitsBase::GetSocketGUIFunctionsTable()
+{
+#ifdef __WXMAC__
+    // NB: wxMac does not have any GUI-specific functions in gsocket.c and
+    //     so it doesn't need this table at all
+    return NULL;
+#else // !__WXMAC__
+    static GSocketGUIFunctionsTable table =
+    {
+        _GSocket_GUI_Init,
+        _GSocket_GUI_Cleanup,
+        _GSocket_GUI_Init_Socket,
+        _GSocket_GUI_Destroy_Socket,
+#ifndef __WINDOWS__
+        _GSocket_Install_Callback,
+        _GSocket_Uninstall_Callback,
+#endif
+        _GSocket_Enable_Events,
+        _GSocket_Disable_Events
+    };
+    return &table;
+#endif // __WXMAC__/!__WXMAC__
+}
+
+#endif
+