X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dd9f7fea29e3f8bb61861f52984b7943512346ac..5cd7ab8dd8af0c17ce9dad88830a8d7aefd4f73b:/wxPython/src/_functions.i diff --git a/wxPython/src/_functions.i b/wxPython/src/_functions.i index c4395b6a74..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; @@ -33,12 +31,20 @@ void wxBell(); void wxEndBusyCursor(); long wxGetElapsedTime(bool resetTimer = True); -void wxGetMousePosition(int* OUTPUT, int* OUTPUT); + +DocDeclA( + void, wxGetMousePosition(int* OUTPUT, int* OUTPUT), + "GetMousePosition() -> (x,y)"); + bool wxIsBusy(); wxString wxNow(); bool wxShell(const wxString& command = wxPyEmptyString); void wxStartTimer(); -int wxGetOsVersion(int *OUTPUT, int *OUTPUT); + +DocDeclA( + int, wxGetOsVersion(int *OUTPUT, int *OUTPUT), + "GetOsVersion() -> (platform, major, minor)"); + wxString wxGetOsDescription(); #if defined(__WXMSW__) || defined(__WXMAC__) @@ -46,7 +52,7 @@ long wxGetFreeMemory(); #else %inline %{ long wxGetFreeMemory() - { PyErr_SetNone(PyExc_NotImplementedError); return 0; } + { wxPyRaiseNotImplemented(); return 0; } %} #endif @@ -170,13 +176,19 @@ bool wxColourDisplay(); int wxDisplayDepth(); int wxGetDisplayDepth(); -void wxDisplaySize(int* OUTPUT, int* OUTPUT); +DocDeclA( + void, wxDisplaySize(int* OUTPUT, int* OUTPUT), + "DisplaySize() -> (width, height)"); wxSize wxGetDisplaySize(); -void wxDisplaySizeMM(int* OUTPUT, int* OUTPUT); +DocDeclA( + void, wxDisplaySizeMM(int* OUTPUT, int* OUTPUT), + "DisplaySizeMM() -> (width, height)"); wxSize wxGetDisplaySizeMM(); -void wxClientDisplayRect(int *OUTPUT, int *OUTPUT, int *OUTPUT, int *OUTPUT); +DocDeclA( + void, wxClientDisplayRect(int *OUTPUT, int *OUTPUT, int *OUTPUT, int *OUTPUT), + "ClientDisplayRect() -> (x, y, width, height)"); wxRect wxGetClientDisplayRect(); void wxSetCursor(wxCursor& cursor); @@ -197,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__)