#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
enum wxDynamicLibraryCategory
{
wxDL_LIBRARY, // standard library
- wxDL_MODULE, // loadable module/plugin
+ wxDL_MODULE // loadable module/plugin
};
enum wxPluginCategory
{
wxDL_PLUGIN_GUI, // plugin that uses GUI classes
- wxDL_PLUGIN_BASE, // wxBase-only plugin
+ wxDL_PLUGIN_BASE // wxBase-only plugin
};
// ----------------------------------------------------------------------------
// 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; }
// 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: