#endif // wxPyUSE_EXPORTED_API
-#define wxPyBLOCK_THREADS(stmt) wxPyBeginBlockThreads(); stmt; wxPyEndBlockThreads()
+#define wxPyBLOCK_THREADS(stmt) { wxPyBeginBlockThreads(); stmt; wxPyEndBlockThreads(); }
+#define wxPyRaiseNotImplemented() wxPyBLOCK_THREADS(PyErr_SetNone(PyExc_NotImplementedError))
//---------------------------------------------------------------------------
// These are helpers used by the typemaps
#else
%extend {
static int GetComCtl32Version()
- { PyErr_SetNone(PyExc_NotImplementedError); return 0; }
+ { wxPyRaiseNotImplemented(); return 0; }
}
#endif
};
class wxMetafileDataObject : public wxDataObjectSimple
{
public:
- wxMetafileDataObject() { PyErr_SetNone(PyExc_NotImplementedError); }
+ wxMetafileDataObject() { wxPyRaiseNotImplemented(); }
};
%}
class wxMetaFile : public wxObject {
public:
wxMetaFile(const wxString&)
- { PyErr_SetNone(PyExc_NotImplementedError); }
+ { wxPyRaiseNotImplemented(); }
};
class wxMetaFileDC : public wxClientDC {
public:
wxMetaFileDC(const wxString&, int, int, const wxString&)
- { PyErr_SetNone(PyExc_NotImplementedError); }
+ { wxPyRaiseNotImplemented(); }
};
%}
class wxPrinterDC : public wxClientDC {
public:
wxPrinterDC(const wxPrintData&)
- { PyErr_SetNone(PyExc_NotImplementedError); }
+ { wxPyRaiseNotImplemented(); }
// wxPrinterDC(const wxString&, const wxString&, const wxString&, bool, int)
-// { PyErr_SetNone(PyExc_NotImplementedError); }
+// { wxPyRaiseNotImplemented(); }
};
%}
%inline %{
wxNativeEncodingInfo* wxGetNativeFontEncoding(wxFontEncoding encoding)
- { PyErr_SetNone(PyExc_NotImplementedError); return NULL; }
+ { wxPyRaiseNotImplemented(); return NULL; }
bool wxTestFontEncoding(const wxNativeEncodingInfo& info)
- { PyErr_SetNone(PyExc_NotImplementedError); return False; }
+ { wxPyRaiseNotImplemented(); return False; }
%}
#endif
#else
%inline %{
long wxGetFreeMemory()
- { PyErr_SetNone(PyExc_NotImplementedError); return 0; }
+ { wxPyRaiseNotImplemented(); return 0; }
%}
#endif
// This is generally most useful getting the state of
// Caps Lock, Num Lock and Scroll Lock...
bool wxGetKeyState(wxKeyCode key);
+#else
+%inline %{
+ bool wxGetKeyState(wxKeyCode key)
+ { wxPyRaiseNotImplemented(); return False; }
+%}
#endif
public:
wxJoystick(int joystick = wxJOYSTICK1) {
wxPyBeginBlockThreads();
- PyErr_SetString(PyExc_NotImplementedError, "wxJoystick is not available on this platform.");
+ PyErr_SetString(PyExc_NotImplementedError,
+ "wxJoystick is not available on this platform.");
wxPyEndBlockThreads();
}
wxPoint GetPosition() { return wxPoint(-1,-1); }
%{
class wxPopupWindow : public wxWindow {
public:
- wxPopupWindow(wxWindow *, int) { PyErr_SetNone(PyExc_NotImplementedError); }
- wxPopupWindow() { PyErr_SetNone(PyExc_NotImplementedError); }
+ wxPopupWindow(wxWindow *, int) { wxPyRaiseNotImplemented(); }
+ wxPopupWindow() { wxPyRaiseNotImplemented(); }
};
class wxPyPopupTransientWindow : public wxPopupWindow
{
public:
- wxPyPopupTransientWindow(wxWindow *, int) { PyErr_SetNone(PyExc_NotImplementedError); }
- wxPyPopupTransientWindow() { PyErr_SetNone(PyExc_NotImplementedError); }
+ wxPyPopupTransientWindow(wxWindow *, int) { wxPyRaiseNotImplemented(); }
+ wxPyPopupTransientWindow() { wxPyRaiseNotImplemented(); }
};
%}
%extend {
%name(RegionFromPoints)wxRegion(int points, wxPoint* points_array,
int fillStyle = wxWINDING_RULE) {
- PyErr_SetNone(PyExc_NotImplementedError);
+ wxPyRaiseNotImplemented();
return NULL;
}
}
class wxTaskBarIcon : public wxEvtHandler
{
public:
- wxTaskBarIcon() { PyErr_SetNone(PyExc_NotImplementedError); }
+ wxTaskBarIcon() { wxPyRaiseNotImplemented(); }
};
{
public:
wxTaskBarIconEvent(wxEventType, wxTaskBarIcon *)
- { PyErr_SetNone(PyExc_NotImplementedError); }
+ { wxPyRaiseNotImplemented(); }
virtual wxEvent* Clone() const { return NULL; }
};
wxToggleButton(wxWindow *, wxWindowID, const wxString&,
const wxPoint&, const wxSize&, long,
const wxValidator&, const wxString&)
- { PyErr_SetNone(PyExc_NotImplementedError); }
+ { wxPyRaiseNotImplemented(); }
wxToggleButton()
- { PyErr_SetNone(PyExc_NotImplementedError); }
+ { wxPyRaiseNotImplemented(); }
};
#endif
%}
public:
wxWave(const wxString& fileName, bool isResource = False) {
wxPyBeginBlockThreads();
- PyErr_SetString(PyExc_NotImplementedError, "wxWave is not available on this platform.");
+ PyErr_SetString(PyExc_NotImplementedError,
+ "wxWave is not available on this platform.");
wxPyEndBlockThreads();
}
wxWave(int size, const wxByte* data) {
wxPyBeginBlockThreads();
- PyErr_SetString(PyExc_NotImplementedError, "wxWave is not available on this platform.");
+ PyErr_SetString(PyExc_NotImplementedError,
+ "wxWave is not available on this platform.");
wxPyEndBlockThreads();
}
win->SubclassWin(hWnd);
return win;
#else
- PyErr_SetNone(PyExc_NotImplementedError);
+ wxPyRaiseNotImplemented();
return NULL;
#endif
}