File: glwin_base_proxy.hh

package info (click to toggle)
openstructure 2.11.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 206,240 kB
  • sloc: cpp: 188,571; python: 36,686; ansic: 34,298; fortran: 3,275; sh: 312; xml: 146; makefile: 29
file content (41 lines) | stat: -rw-r--r-- 797 bytes parent folder | download | duplicates (4)
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