X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fd3f2efe791cf99c2e4944cd615f02a5502ed93e..4263de1e0586d20cb49d0dde23f0d227c5ef25cb:/wxPython/src/_artprov.i?ds=sidebyside diff --git a/wxPython/src/_artprov.i b/wxPython/src/_artprov.i index 70f1de40a9..1f6fe34cf3 100644 --- a/wxPython/src/_artprov.i +++ b/wxPython/src/_artprov.i @@ -75,7 +75,7 @@ public: const wxArtClient& client, const wxSize& size) { wxBitmap rval = wxNullBitmap; - wxPyBeginBlockThreads(); + bool blocked = wxPyBeginBlockThreads(); if ((wxPyCBH_findCallback(m_myInst, "CreateBitmap"))) { PyObject* so = wxPyConstructObject((void*)&size, wxT("wxSize"), 0); PyObject* ro; @@ -93,7 +93,7 @@ public: Py_DECREF(ro); } } - wxPyEndBlockThreads(); + wxPyEndBlockThreads(blocked); return rval; } @@ -106,34 +106,37 @@ public: { public: - %addtofunc wxPyArtProvider "self._setCallbackInfo(self, ArtProvider)" + %pythonAppend wxPyArtProvider "self._setCallbackInfo(self, ArtProvider)" wxPyArtProvider(); -// ~wxPyArtProvider(); void _setCallbackInfo(PyObject* self, PyObject* _class); - // Add new provider to the top of providers stack. + DocStr(PushProvider, "Add new provider to the top of providers stack."); static void PushProvider(wxPyArtProvider *provider); - // Remove latest added provider and delete it. + DocStr(PopProvider, "Remove latest added provider and delete it."); static bool PopProvider(); - // Remove provider. The provider must have been added previously! - // The provider is _not_ deleted. + DocStr(RemoveProvider, + "Remove provider. The provider must have been added previously!\n" + "The provider is _not_ deleted."); static bool RemoveProvider(wxPyArtProvider *provider); - // Query the providers for bitmap with given ID and return it. Return - // wxNullBitmap if no provider provides it. + DocStr(GetBitmap, + "Query the providers for bitmap with given ID and return it. Return\n" + "wx.NullBitmap if no provider provides it."); static wxBitmap GetBitmap(const wxString& id, const wxString& client = wxPyART_OTHER, const wxSize& size = wxDefaultSize); - // Query the providers for icon with given ID and return it. Return - // wxNullIcon if no provider provides it. + DocStr(GetIcon, + "Query the providers for icon with given ID and return it. Return\n" + "wx.NullIcon if no provider provides it."); static wxIcon GetIcon(const wxString& id, const wxString& client = wxPyART_OTHER, const wxSize& size = wxDefaultSize); + %extend { void Destroy() { delete self; }} };