struct GSocketGUIFunctionsTable;
}
+// FIXME: Eventually unify Mac OS 9
+class GSocketBSD;
+
// ----------------------------------------------------------------------------
// toolkit information
// ----------------------------------------------------------------------------
#if wxUSE_SOCKETS
// return table of GUI callbacks for GSocket code or NULL in wxBase
virtual GSocketGUIFunctionsTable* GetSocketGUIFunctionsTable() = 0;
+
+ // return a new GSocket with the EventLoop_* stuff implemented.
+ // or at least stubbed (i.e. wxBase)
+ virtual GSocketBSD* CreateGSocket() = 0;
#endif
virtual wxRendererNative *CreateRenderer();
#if wxUSE_SOCKETS
virtual GSocketGUIFunctionsTable* GetSocketGUIFunctionsTable();
+ virtual GSocketBSD* CreateGSocket();
#endif
#ifdef __WXDEBUG__
virtual wxRendererNative *CreateRenderer();
#if wxUSE_SOCKETS
virtual GSocketGUIFunctionsTable* GetSocketGUIFunctionsTable();
+ // return a new GSocket with the EventLoop_* stuff implemented.
+ // TODO: Remove this because each GUI should implement it separately
+ virtual GSocketBSD* CreateGSocket();
#endif
#ifdef __WXDEBUG__
#include "wx/fontmap.h"
#endif // wxUSE_FONTMAP
+#if wxUSE_SOCKETS
+ #include "wx/gsocket.h"
+#endif // wxUSE_SOCKETS
+
#if defined(__WXMAC__)
// VZ: MacTypes.h is enough under Mac OS X (where I could test it) but
// I don't know which headers are needed under earlier systems so
{
return NULL;
}
+
+// TODO: Use a different class that only stubs out the event loop functions
+GSocketBSD* wxConsoleAppTraitsBase::CreateGSocket()
+{
+#ifdef wxUSE_GSOCKET_CPLUSPLUS
+ return new GSocketBSDGUIShim();
+#else
+ return NULL;
+#endif
+}
#endif
// ----------------------------------------------------------------------------
#endif // !__WXMAC__ || __DARWIN__
}
+GSocketBSD* wxGUIAppTraitsBase::CreateGSocket()
+{
+#ifdef wxUSE_GSOCKET_CPLUSPLUS
+ return new GSocketBSDGUIShim();
+#else
+ return NULL;
+#endif
+}
+
#endif