summaryrefslogtreecommitdiff
path: root/py/pykms/pykmsomap.cpp
blob: 0cdbbc23f709b24a2614520ff96fa56c83854465 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include <kms++/kms++.h>
#include <kms++/omap/omapkms++.h>

namespace py = pybind11;

using namespace kms;
using namespace std;

void init_pykmsomap(py::module &m)
{
	py::class_<OmapCard, Card>(m, "OmapCard")
			.def(py::init<>())
			;

	py::class_<OmapFramebuffer, MappedFramebuffer>(m, "OmapFramebuffer")
			.def(py::init<OmapCard&, uint32_t, uint32_t, const string&>(),
			     py::keep_alive<1, 2>())	// Keep Card alive until this is destructed
			.def(py::init<OmapCard&, uint32_t, uint32_t, PixelFormat>(),
			     py::keep_alive<1, 2>())	// Keep OmapCard alive until this is destructed
			;
}