X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/322913cef36b156a4a9722ce6a68845e3219e615..dcc1aa238271267e92069d834781ee8fd15007bd:/wxPython/src/_functions.i?ds=sidebyside diff --git a/wxPython/src/_functions.i b/wxPython/src/_functions.i index 1d85f1a864..aa33a105b9 100644 --- a/wxPython/src/_functions.i +++ b/wxPython/src/_functions.i @@ -15,11 +15,9 @@ //--------------------------------------------------------------------------- -%{ - DECLARE_DEF_STRING(FileSelectorPromptStr); - DECLARE_DEF_STRING(FileSelectorDefaultWildcardStr); - DECLARE_DEF_STRING(DirSelectorPromptStr); -%} +MAKE_CONST_WXSTRING(FileSelectorPromptStr); +MAKE_CONST_WXSTRING(FileSelectorDefaultWildcardStr); +MAKE_CONST_WXSTRING(DirSelectorPromptStr); //--------------------------------------------------------------------------- %newgroup; @@ -54,7 +52,7 @@ long wxGetFreeMemory(); #else %inline %{ long wxGetFreeMemory() - { PyErr_SetNone(PyExc_NotImplementedError); return 0; } + { wxPyRaiseNotImplemented(); return 0; } %} #endif @@ -211,6 +209,19 @@ wxWindow* wxGetTopLevelParent(wxWindow *win); +#if defined(__WXMSW__) || defined(__WXMAC__) +// Get the state of a key (true if pressed, false if not) +// 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 + + //--------------------------------------------------------------------------- #if defined(__WXMSW__) || defined(__WXMAC__)