+ bool Create(const wxString& fileName/*, bool isResource = false*/);
+
+ %extend {
+ bool CreateFromData(PyObject* data) {
+ %#ifndef __WXMAC__
+ unsigned char* buffer;
+ int size;
+ bool rv = false;
+
+ bool blocked = wxPyBeginBlockThreads();
+ if (!PyArg_Parse(data, "t#", &buffer, &size))
+ goto done;
+ rv = self->Create(size, buffer);
+ done:
+ wxPyEndBlockThreads(blocked);
+ return rv;
+ %#else
+ bool blocked = wxPyBeginBlockThreads();
+ PyErr_SetString(PyExc_NotImplementedError,
+ "Create from data is not available on this platform.");
+ wxPyEndBlockThreads(blocked);
+ return false;
+ %#endif
+ }
+ }