]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/dynlib.h
set wxUSE_WIZARD to 1 by default now that it works (patch 663321)
[wxWidgets.git] / include / wx / dynlib.h
index e7b65cfd0525325bcd7f2382a7570423d67d3585..6dd60bf12f377744daf1d4f59fc27cbdd1722010 100644 (file)
 #ifndef _WX_DYNLIB_H__
 #define _WX_DYNLIB_H__
 
-#ifdef __GNUG__
-#   pragma interface
+#if defined(__GNUG__) && !defined(__APPLE__)
+#   pragma interface "dynlib.h"
 #endif
 
 #include "wx/setup.h"
 
-#if wxUSE_DYNLIB_CLASS
+#if wxUSE_DYNAMIC_LOADER
+
+#include "wx/dynload.h"  // Use the new (version of) wxDynamicLibrary instead
+
+#elif wxUSE_DYNLIB_CLASS
 
 #include "wx/string.h"
 #include "wx/list.h"
@@ -51,7 +55,7 @@
 #elif defined(__DARWIN__)
     typedef void *wxDllType;
 #elif defined(__WXMAC__)
-    typedef CFragConnectionID wxDllType;
+    typedef void *wxDllType;
 #else
 #   error "wxLibrary can't be compiled on this platform, sorry."
 #endif // OS
@@ -85,7 +89,7 @@ public:
       if success pointer is not NULL, it will be filled with TRUE if everything
       went ok and FALSE otherwise
      */
-    static wxDllType LoadLibrary(const wxString& libname, bool *success = NULL);
+    static wxDllType LoadLibrary(const wxString& libname, bool *success = 0);
 
     /*
       This function unloads the shared library previously loaded with
@@ -109,14 +113,17 @@ public:
 
        Returns the pointer to the symbol or NULL on error.
      */
-    static void * GetSymbol(wxDllType dllHandle, const wxString &name);
+    static void *GetSymbol(wxDllType dllHandle,
+                           const wxString &name,
+                           bool *success = NULL);
 
     // return the standard DLL extension (with leading dot) for this platform
-    static wxString GetDllExt();
+    static const wxString &GetDllExt() { return ms_dllext; }
 
 private:
     // forbid construction of objects
     wxDllLoader();
+    static const wxString   ms_dllext;
 };
 
 // ----------------------------------------------------------------------------
@@ -222,7 +229,7 @@ protected:
 // Global variables
 // ----------------------------------------------------------------------------
 
-extern wxLibraries wxTheLibraries;
+extern WXDLLEXPORT_DATA(wxLibraries) wxTheLibraries;
 
 // ----------------------------------------------------------------------------
 // Interesting defines