X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4f89dbc48e4ffdec4ea55b5444c6df87df2d642d..ab0d42f76d5594bd28fdcad35bedeb380902f3ea:/include/wx/dynload.h?ds=sidebyside diff --git a/include/wx/dynload.h b/include/wx/dynload.h index 683cd67ac2..4e5c5c09fc 100644 --- a/include/wx/dynload.h +++ b/include/wx/dynload.h @@ -87,6 +87,10 @@ enum wxDLFlags wxDL_VERBATIM = 0x00000008, // Attempt to load the supplied library // name without appending the usual dll // filename extension. + + wxDL_NOSHARE = 0x00000010, // load new DLL, don't reuse already loaded + + // FIXME: why? (VZ) #ifdef __osf__ wxDL_DEFAULT = wxDL_LAZY #else @@ -106,10 +110,10 @@ public: // return the platform standard DLL extension (with leading dot) - static const wxString &GetDllExt() { return ms_dllext; } + static const wxChar *GetDllExt() { return ms_dllext; } wxDynamicLibrary() : m_handle(0) {} - wxDynamicLibrary(wxString libname, wxDLFlags flags = wxDL_DEFAULT) + wxDynamicLibrary(wxString libname, int flags = wxDL_DEFAULT) : m_handle(0) { Load(libname, flags); @@ -123,7 +127,7 @@ public: // load the library with the given name // (full or not), return TRUE on success - bool Load(wxString libname, wxDLFlags flags = wxDL_DEFAULT); + bool Load(wxString libname, int flags = wxDL_DEFAULT); // unload the library, also done automatically in dtor @@ -155,7 +159,7 @@ protected: // Platform specific shared lib suffix. - static const wxString ms_dllext; + static const wxChar *ms_dllext; // the handle to DLL or NULL @@ -184,12 +188,12 @@ class WXDLLEXPORT wxPluginLibrary : public wxDynamicLibrary { public: - static wxDLImports ms_classes; // Static hash of all imported classes. + static wxDLImports* ms_classes; // Static hash of all imported classes. - wxPluginLibrary( const wxString &libname, wxDLFlags flags = wxDL_DEFAULT ); + wxPluginLibrary( const wxString &libname, int flags = wxDL_DEFAULT ); ~wxPluginLibrary(); - wxPluginLibrary *RefLib() { ++m_linkcount; return this; } + wxPluginLibrary *RefLib(); bool UnrefLib(); // These two are called by the PluginSentinel on (PLUGGABLE) object @@ -241,7 +245,7 @@ public: // Static accessors. static wxPluginLibrary *LoadLibrary( const wxString &libname, - wxDLFlags flags = wxDL_DEFAULT ); + int flags = wxDL_DEFAULT ); static bool UnloadLibrary(const wxString &libname); // This is used by wxDllLoader. It's wrapped in the compatibility @@ -254,13 +258,13 @@ public: // Instance methods. wxPluginManager() : m_entry(0) {}; - wxPluginManager(const wxString &libname, wxDLFlags flags = wxDL_DEFAULT) + wxPluginManager(const wxString &libname, int flags = wxDL_DEFAULT) { Load(libname, flags); } ~wxPluginManager() { Unload(); } - bool Load(const wxString &libname, wxDLFlags flags = wxDL_DEFAULT); + bool Load(const wxString &libname, int flags = wxDL_DEFAULT); void Unload(); bool IsLoaded() const { return m_entry && m_entry->IsLoaded(); } @@ -269,10 +273,13 @@ public: return m_entry->GetSymbol( symbol, success ); } + static void CreateManifest() { ms_manifest = new wxDLManifest(wxKEY_STRING); } + static void ClearManifest() { delete ms_manifest; ms_manifest = NULL; } + private: - static wxDLManifest ms_manifest; // Static hash of loaded libs. - wxPluginLibrary *m_entry; // Cache our entry in the manifest. + static wxDLManifest* ms_manifest; // Static hash of loaded libs. + wxPluginLibrary* m_entry; // Cache our entry in the manifest. // We could allow this class to be copied if we really // wanted to, but not without modification. @@ -301,7 +308,7 @@ public: static void *GetSymbol(wxDllType dllHandle, const wxString &name, bool *success = 0); - static const wxString &GetDllExt() { return wxDynamicLibrary::GetDllExt(); } + static wxString GetDllExt() { return wxDynamicLibrary::GetDllExt(); } private: @@ -309,8 +316,6 @@ private: }; #endif - #endif // wxUSE_DYNAMIC_LOADER #endif // _WX_DYNAMICLOADER_H__ -// vi:sts=4:sw=4:et