#include <boost/python.hpp>
#include "Publisher.hh"
#include <QDesktopServices>
+#include <QWebHistory>
+#include "Viewer.hh"
//#include "PythonPublisher.mpp"
#define prefix_
;
}
+namespace {
+
+ bool canGoBack()
+ {
+ return pykit::Viewer::instance()->page()->history()->canGoBack();
+ }
+
+ bool canGoForward()
+ {
+ return pykit::Viewer::instance()->page()->history()->canGoForward();
+ }
+
+}
+
BOOST_PYTHON_MODULE(_pykit)
{
py::class_<pykit::Request>("Request", py::no_init)
;
py::def("openUrl", &QDesktopServices::openUrl);
+
+ py::def("canGoBack", &canGoBack);
+ py::def("canGoForward", &canGoForward);
}
PYTHON_EXTERN_MODULE(_httpapi);