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