public:
%pythonAppend wxPyApp
- "self._setCallbackInfo(self, PyApp)
- self._setOORInfo(self)";
+ "self._setCallbackInfo(self, PyApp, False)
+ self._setOORInfo(self, False)";
%typemap(out) wxPyApp*; // turn off this typemap
DocStr(wxPyApp,
%typemap(out) wxPyApp* { $result = wxPyMake_wxObject($1, $owner); }
- void _setCallbackInfo(PyObject* self, PyObject* _class);
+ void _setCallbackInfo(PyObject* self, PyObject* _class, bool incref);
DocDeclStr(
"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(),
{ wxPyRaiseNotImplemented(); return 0; }
}
#endif
+
+ %extend {
+ DocStr(DisplayAvailable,
+ "Tests if it is possible to create a GUI in the current environment.
+This will mean different things on the different platforms.
+
+ * On X Windows systems this function will return ``False`` if it is
+ not able to open a connection to the X display, which can happen
+ if $DISPLAY is not set, or is not set correctly.
+
+ * On Mac OS X a ``False`` return value will mean that wx is not
+ able to access the window manager, which can happen if logged in
+ remotely or if running from the normal version of python instead
+ of the framework version, (i.e., pythonw.)
+
+ * On MS Windows...
+", "");
+ static bool DisplayAvailable() {
+ return wxPyTestDisplayAvailable();
+ }
+ }
};
+
+
+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