omapfb: add constructor with fourcc
[android/external-libkmsxx.git] / py / pykms / pykmsomap.cpp
1 #include <pybind11/pybind11.h>
2 #include <pybind11/stl.h>
3 #include <kms++/kms++.h>
4 #include <kms++/omap/omapkms++.h>
6 namespace py = pybind11;
8 using namespace kms;
9 using namespace std;
11 void init_pykmsomap(py::module &m)
12 {
13         py::class_<OmapCard>(m, "OmapCard", py::base<Card>())
14                         .def(py::init<>())
15                         ;
17         py::class_<OmapFramebuffer>(m, "OmapFramebuffer", py::base<MappedFramebuffer>())
18                         .def(py::init<OmapCard&, uint32_t, uint32_t, const string&>(),
19                              py::keep_alive<1, 2>())    // Keep Card alive until this is destructed
20                         .def(py::init<OmapCard&, uint32_t, uint32_t, PixelFormat>(),
21                              py::keep_alive<1, 2>())    // Keep OmapCard alive until this is destructed
22                         ;
23 }