X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e7ecb7be084f5815051682b2a5809090ebb2706..873fb06d2abb91b5ab9168d9ba333b2423d12c14:/wxPython/src/misc2.i diff --git a/wxPython/src/misc2.i b/wxPython/src/misc2.i index 68ed499ae7..35608d3bba 100644 --- a/wxPython/src/misc2.i +++ b/wxPython/src/misc2.i @@ -38,6 +38,10 @@ %import events.i %import streams.i +%{ + static wxString wxPyEmptyStr(""); +%} + //--------------------------------------------------------------------------- // Dialog Functions @@ -57,6 +61,11 @@ wxString wxGetTextFromUser(const wxString& message, int x = -1, int y = -1, bool centre = TRUE); +wxString wxGetPasswordFromUser(const wxString& message, + const wxString& caption = wxPyEmptyStr, + const wxString& default_value = wxPyEmptyStr, + wxWindow *parent = NULL); + // TODO: Need to custom wrap this one... // int wxGetMultipleChoice(char* message, char* caption, @@ -93,7 +102,7 @@ long wxGetNumberFromUser(const wxString& message, long value, long min = 0, long max = 100, wxWindow *parent = NULL, - const wxPoint& pos = wxPyDefaultPosition); + const wxPoint& pos = wxDefaultPosition); //--------------------------------------------------------------------------- // GDI Functions @@ -105,6 +114,7 @@ int wxGetDisplayDepth(); void wxDisplaySize(int* OUTPUT, int* OUTPUT); wxSize wxGetDisplaySize(); + void wxDisplaySizeMM(int* OUTPUT, int* OUTPUT); wxSize wxGetDisplaySizeMM(); @@ -372,10 +382,28 @@ public: //---------------------------------------------------------------------- +bool wxSafeYield(wxWindow* win=NULL); void wxPostEvent(wxEvtHandler *dest, wxEvent& event); void wxWakeUpIdle(); -bool wxSafeYield(wxWindow* win=NULL); + +void wxWakeUpMainThread(); +void wxMutexGuiEnter(); +void wxMutexGuiLeave(); + + +class wxMutexGuiLocker { +public: + wxMutexGuiLocker(); + ~wxMutexGuiLocker(); +}; + + +%inline %{ + bool wxThread_IsMain() { + return wxThread::IsMain(); + } +%} //---------------------------------------------------------------------- @@ -621,6 +649,13 @@ void wxLogSysError(const char *szFormat); //---------------------------------------------------------------------- + +enum { + /* event type */ + wxEVT_END_PROCESS +}; + + class wxProcessEvent : public wxEvent { public: wxProcessEvent(int id = 0, int pid = 0, int exitcode = 0);