From b11baff09f78a4a383f817ec35208ae8966ab832 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 2 Jan 2017 16:42:08 +0200 Subject: py: Reorganize source directory Separate the Python bindings sources from the test scripts. While at it, remove the unneeded run.sh script. Signed-off-by: Laurent Pinchart --- py/pykms/pykmsomap.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 py/pykms/pykmsomap.cpp (limited to 'py/pykms/pykmsomap.cpp') diff --git a/py/pykms/pykmsomap.cpp b/py/pykms/pykmsomap.cpp new file mode 100644 index 0000000..525834b --- /dev/null +++ b/py/pykms/pykmsomap.cpp @@ -0,0 +1,21 @@ +#include +#include +#include +#include + +namespace py = pybind11; + +using namespace kms; +using namespace std; + +void init_pykmsomap(py::module &m) +{ + py::class_(m, "OmapCard", py::base()) + .def(py::init<>()) + ; + + py::class_(m, "OmapFramebuffer", py::base()) + .def(py::init(), + py::keep_alive<1, 2>()) // Keep OmapCard alive until this is destructed + ; +} -- cgit v1.2.3