]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/dynlib.h
added default parameter values to the overloaded Show() and Enable() versions
[wxWidgets.git] / include / wx / dynlib.h
index 8b3aacdfa26d6a742e9337996ca97668b4ec018f..a3c4f2d98b0fd9ed06bf9982cf1cb17897894cbf 100644 (file)
 
 #include "wx/setup.h"
 
 
 #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"
 
 #include "wx/string.h"
 #include "wx/list.h"
 #elif defined(__WINDOWS__)
 #   include <windows.h>         // needed to get HMODULE
     typedef HMODULE wxDllType;
 #elif defined(__WINDOWS__)
 #   include <windows.h>         // needed to get HMODULE
     typedef HMODULE wxDllType;
-#elif defined(__APPLE__) && defined(__UNIX__)
+#elif defined(__DARWIN__)
     typedef void *wxDllType;
 #elif defined(__WXMAC__)
     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
 #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
      */
       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
 
     /*
       This function unloads the shared library previously loaded with
@@ -109,14 +113,17 @@ public:
 
        Returns the pointer to the symbol or NULL on error.
      */
 
        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
 
     // 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();
 
 private:
     // forbid construction of objects
     wxDllLoader();
+    static const wxString   ms_dllext;
 };
 
 // ----------------------------------------------------------------------------
 };
 
 // ----------------------------------------------------------------------------
@@ -171,7 +178,7 @@ private:
 
     // no copy ctor/assignment operators (or we'd try to unload the library
     // twice)
 
     // no copy ctor/assignment operators (or we'd try to unload the library
     // twice)
-    DECLARE_NO_COPY_CLASS(wxDynamicLibrary);
+    DECLARE_NO_COPY_CLASS(wxDynamicLibrary)
 };
 
 // ----------------------------------------------------------------------------
 };
 
 // ----------------------------------------------------------------------------
@@ -222,15 +229,15 @@ protected:
 // Global variables
 // ----------------------------------------------------------------------------
 
 // Global variables
 // ----------------------------------------------------------------------------
 
-extern wxLibraries wxTheLibraries;
+extern WXDLLEXPORT_DATA(wxLibraries) wxTheLibraries;
 
 // ----------------------------------------------------------------------------
 // Interesting defines
 // ----------------------------------------------------------------------------
 
 #define WXDLL_ENTRY_FUNCTION() \
 
 // ----------------------------------------------------------------------------
 // Interesting defines
 // ----------------------------------------------------------------------------
 
 #define WXDLL_ENTRY_FUNCTION() \
-extern "C" wxClassInfo *wxGetClassFirst(); \
-wxClassInfo *wxGetClassFirst() { \
+extern "C" WXEXPORT const wxClassInfo *wxGetClassFirst(); \
+const wxClassInfo *wxGetClassFirst() { \
   return wxClassInfo::GetFirst(); \
 }
 
   return wxClassInfo::GetFirst(); \
 }