1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
#ifndef OST_GFX_GLWIN_BASE_PROXY_HH
#define OST_GFX_GLWIN_BASE_PROXY_HH
#include <boost/python.hpp>
#include <boost/python/register_ptr_to_python.hpp>
using namespace boost::python;
#include <ost/gfx/glwin_base.hh>
using namespace ost;
using namespace ost::gfx;
namespace {
class GLWinBaseProxy: public GLWinBase {
public:
GLWinBaseProxy(PyObject *p) :
self(p) {
}
virtual void DoRefresh() {
call_method<void>(self, "DoRefresh");
}
virtual bool HasStereo() const {
return call_method<bool>(self,"HasStereo");
}
virtual void StatusMessage(const String& m) {
call_method<void, const String>(self, "StatusMessage", m);
}
virtual bool HasMultisample() const {
return call_method<bool>(self,"HasMultisample");
}
private:
PyObject* self;
};
}
#endif
|