X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/13e51f3a55bf033b788c8a1d006e201f5b28d3cb..f2cc8cbbbd6fffea122a5f8a6f73ac3f524c7283:/include/wx/dynlib.h diff --git a/include/wx/dynlib.h b/include/wx/dynlib.h index d718cb6b9a..32b569ccdb 100644 --- a/include/wx/dynlib.h +++ b/include/wx/dynlib.h @@ -12,7 +12,7 @@ #ifndef _WX_DYNLIB_H__ #define _WX_DYNLIB_H__ -#if defined(__GNUG__) && !defined(__APPLE__) +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) # pragma interface "dynlib.h" #endif @@ -49,6 +49,7 @@ #elif defined(__DARWIN__) typedef void *wxDllType; #elif defined(__WXMAC__) + #include typedef CFragConnectionID wxDllType; #else #error "Dynamic Loading classes can't be compiled on this platform, sorry." @@ -141,8 +142,11 @@ public: // doing this wxDllType Detach() { wxDllType h = m_handle; m_handle = 0; return h; } + // unload the given library handle (presumably returned by Detach() before) + static void Unload(wxDllType handle); + // unload the library, also done automatically in dtor - void Unload(); + void Unload() { if ( IsLoaded() ) { Unload(m_handle); m_handle = 0; } } // Return the raw handle from dlopen and friends. wxDllType GetLibHandle() const { return m_handle; } @@ -168,8 +172,9 @@ public: // return name of wxWindows plugin (adds compiler and version info // to the filename): - static wxString CanonicalizePluginName(const wxString& name, - wxPluginCategory cat); + static wxString + CanonicalizePluginName(const wxString& name, + wxPluginCategory cat = wxDL_PLUGIN_GUI); // return plugin directory on platforms where it makes sense and empty // string on others: