X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d07d2bc9d05408c58b76c53a0a291915b88e5064..c437fde9f90fc7dfcac79053d214fc9146d7be21:/wxPython/src/_app.i diff --git a/wxPython/src/_app.i b/wxPython/src/_app.i index d28c88992c..5628f0242b 100644 --- a/wxPython/src/_app.i +++ b/wxPython/src/_app.i @@ -50,6 +50,7 @@ public: %pythonAppend wxPyApp "self._setCallbackInfo(self, PyApp) self._setOORInfo(self)"; + %typemap(out) wxPyApp*; // turn off this typemap DocStr(wxPyApp, "Create a new application object, starting the bootstrap process.", ""); @@ -62,6 +63,10 @@ public: ~wxPyApp(); + // Turn it back on again + %typemap(out) wxPyApp* { $result = wxPyMake_wxObject($1, $owner); } + + void _setCallbackInfo(PyObject* self, PyObject* _class); @@ -110,7 +115,7 @@ during each event loop iteration.", ""); DocDeclStr( - virtual bool, Yield(bool onlyIfNeeded = False), + virtual bool, Yield(bool onlyIfNeeded = false), "Process all currently pending events right now, instead of waiting until return to the event loop. It is an error to call ``Yield`` recursively unless the value of ``onlyIfNeeded`` is True. @@ -129,6 +134,12 @@ recursively unless the value of ``onlyIfNeeded`` is True. "Make sure that idle events are sent again. :see: `wx.WakeUpIdle`", ""); + + DocDeclStr( + static bool , IsMainLoopRunning() const, + "Returns True if we're running the main loop, i.e. if the events can +currently be dispatched.", ""); + DocDeclStr( virtual int, MainLoop(), @@ -302,7 +313,7 @@ DocDeclStr( DocDeclStr( - bool, wxSafeYield(wxWindow* win=NULL, bool onlyIfNeeded=False), + bool, wxSafeYield(wxWindow* win=NULL, bool onlyIfNeeded=false), "This function is similar to `wx.Yield`, except that it disables the user input to all program windows before calling `wx.Yield` and re-enables it again afterwards. If ``win`` is not None, this window @@ -334,15 +345,37 @@ Python shuts down.", ""); %} -DocStr(wxGetApp, - "Return a reference to the current wx.App object.", ""); -%inline %{ - wxPyApp* wxGetApp() { - return (wxPyApp*)wxTheApp; - } +DocDeclStrName( + wxPyApp* , wxPyGetApp(), + "Return a reference to the current wx.App object.", "", + GetApp); +%{ + wxPyApp* wxPyGetApp() { return (wxPyApp*)wxTheApp; } %} + + + +DocDeclAStr( + void , wxSetDefaultPyEncoding(const char* encoding), + "SetDefaultPyEncoding(string encoding)", + "Sets the encoding that wxPython will use when it needs to convert a +Python string or unicode object to or from a wxString. + +The default encoding is the value of ``locale.getdefaultlocale()[1]`` +but please be aware that the default encoding within the same locale +may be slightly different on different platforms. For example, please +see http://www.alanwood.net/demos/charsetdiffs.html for differences +between the common latin/roman encodings.", ""); + +DocDeclAStr( + const char* , wxGetDefaultPyEncoding(), + "GetDefaultPyEncoding() -> string", + "Gets the current encoding that wxPython will use when it needs to +convert a Python string or unicode object to or from a wxString.", ""); + + //--------------------------------------------------------------------------- // Include some extra wxApp related python code here