py: add ExtFramebuffer
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Fri, 10 Feb 2017 09:15:19 +0000 (11:15 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Fri, 10 Feb 2017 09:15:19 +0000 (11:15 +0200)
py/pykms/pykmsbase.cpp

index 3f0f61084ebec6fdea5deaf3e3e7c832338d386f..e45b99699f4a9086b8734869735414566009dcb1 100644 (file)
@@ -110,6 +110,11 @@ void init_pykmsbase(py::module &m)
                        .def("offset", &DumbFramebuffer::offset)
                        ;
 
+       py::class_<ExtFramebuffer>(m, "ExtFramebuffer", py::base<MappedFramebuffer>())
+                       .def(py::init<Card&, uint32_t, uint32_t, PixelFormat, vector<int>, vector<uint32_t>, vector<uint32_t>>(),
+                            py::keep_alive<1, 2>())    // Keep Card alive until this is destructed
+                       ;
+
        py::enum_<PixelFormat>(m, "PixelFormat")
                        .value("Undefined", PixelFormat::Undefined)