X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1b733817348952323671603271a93d394e8f0e36..9c64071583c62026eb8f25638aec9f3843209d4d:/include/wx/dynlib.h?ds=sidebyside diff --git a/include/wx/dynlib.h b/include/wx/dynlib.h index c9eb6d36af..7870ed3fe8 100644 --- a/include/wx/dynlib.h +++ b/include/wx/dynlib.h @@ -6,19 +6,23 @@ // Created: 20/07/98 // RCS-ID: $Id$ // Copyright: (c) 1998 Guilhem Lavaux -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #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 @@ -72,7 +76,7 @@ DLLs and the resolving of symbols in them. There are no instances of this class, it simply serves as a namespace for its static member functions. */ -class WXDLLEXPORT wxDllLoader +class WXDLLIMPEXP_BASE wxDllLoader { public: /* @@ -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,21 +113,24 @@ 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; }; // ---------------------------------------------------------------------------- // wxDynamicLibrary - friendly interface to wxDllLoader // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxDynamicLibrary +class WXDLLIMPEXP_BASE wxDynamicLibrary { public: // ctors @@ -178,7 +185,7 @@ private: // wxLibrary // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxLibrary : public wxObject +class WXDLLIMPEXP_BASE wxLibrary : public wxObject { public: wxLibrary(wxDllType handle); @@ -203,7 +210,7 @@ public: // wxLibraries // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxLibraries +class WXDLLIMPEXP_BASE wxLibraries { public: wxLibraries(); @@ -222,14 +229,14 @@ protected: // Global variables // ---------------------------------------------------------------------------- -extern wxLibraries wxTheLibraries; +extern WXDLLIMPEXP_DATA_BASE(wxLibraries) wxTheLibraries; // ---------------------------------------------------------------------------- // Interesting defines // ---------------------------------------------------------------------------- #define WXDLL_ENTRY_FUNCTION() \ -extern "C" WXEXPORT wxClassInfo *wxGetClassFirst(); \ +extern "C" WXEXPORT const wxClassInfo *wxGetClassFirst(); \ const wxClassInfo *wxGetClassFirst() { \ return wxClassInfo::GetFirst(); \ }