// Copyright (C) 2002-2003 Brett Hartshorn (bhartsho@yahoo.com) // Copyright (C) 2005 Gideon May // // Permission to copy, use, sell and distribute this software is granted // provided this copyright notice appears in all copies. // Permission to modify the code and to distribute modified code is granted // provided this copyright notice appears in all copies, and a notice // that the code was modified is included with the copyright notice. // // This software is provided "as is" without express or implied warranty, // and with no claim as to its suitability for any purpose. // // NOTES: don't know why, but Event or anything from the Events file is not in the Producer name space? #include #include #include using namespace boost::python; namespace PyProd { void init_Events() { /* class_, boost::noncopyable> ("Event", no_init) .def("type", &Producer::Event::type) .def("window", &Producer::Event::window) ; */ /* class_, boost::noncopyable> ("EventQueue", no_init) .def("empty", &Producer::EventQueue::empty) .def("waitWhileEmpty", &Producer::EventQueue::waitWhileEmpty) //.def("front", &Producer::EventQueue::front) .def("pop_front", &Producer::EventQueue::pop_front) .def("push_back", &Producer::EventQueue::push_back) ; class_, boost::noncopyable> ("KeyPressEvent", no_init) .def("key", &Producer::KeyPressEvent::key) ; class_, boost::noncopyable> ("KeyReleaseEvent", no_init) .def("key", &Producer::KeyReleaseEvent::key) ; class_, boost::noncopyable> ("ButtonPressEvent", no_init) .def("mx", &Producer::ButtonPressEvent::mx) .def("my", &Producer::ButtonPressEvent::my) .def("button", &Producer::ButtonPressEvent::button) ; class_, boost::noncopyable> ("ButtonReleaseEvent", no_init) .def("mx", &Producer::ButtonReleaseEvent::mx) .def("my", &Producer::ButtonReleaseEvent::my) .def("button", &Producer::ButtonReleaseEvent::button) ; class_, boost::noncopyable> ("DoubleButtonPressEvent", no_init) .def("mx", &Producer::DoubleButtonPressEvent::mx) .def("my", &Producer::DoubleButtonPressEvent::my) .def("button", &Producer::DoubleButtonPressEvent::button) ; class_, boost::noncopyable> ("MouseMotionEvent", no_init) .def("mx", &Producer::MouseMotionEvent::mx) .def("my", &Producer::MouseMotionEvent::my) ; class_, boost::noncopyable> ("MouseScrollEvent", no_init) .def("scrollingMotion", &Producer::MouseScrollEvent::scrollingMotion, return_internal_reference<>()) ; class_, boost::noncopyable> ("WindowConfigEvent", no_init) .def("x", &Producer::WindowConfigEvent::x) .def("y", &Producer::WindowConfigEvent::y) .def("winWidth", &Producer::WindowConfigEvent::winWidth) .def("winHeight", &Producer::WindowConfigEvent::winHeight) ; class_, boost::noncopyable> ("TimerEvent", no_init) .def("id", &Producer::TimerEvent::id) ; //class_, boost::noncopyable> // ("ShutdownEvent", no_init) // .def("", &Producer::) // ; */ } }