py: add DumbFb properties
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Fri, 10 Feb 2017 05:24:11 +0000 (07:24 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Fri, 10 Feb 2017 08:55:12 +0000 (10:55 +0200)
py/pykms/pykmsbase.cpp

index 2f568254240d0aec95e0741a72db2b52a9c53070..3f0f61084ebec6fdea5deaf3e3e7c832338d386f 100644 (file)
@@ -103,6 +103,11 @@ void init_pykmsbase(py::module &m)
                             py::keep_alive<1, 2>())    // Keep Card alive until this is destructed
                        .def(py::init<Card&, uint32_t, uint32_t, PixelFormat>(),
                             py::keep_alive<1, 2>())    // Keep Card alive until this is destructed
+                       .def_property_readonly("format", &DumbFramebuffer::format)
+                       .def_property_readonly("num_planes", &DumbFramebuffer::num_planes)
+                       .def("fd", &DumbFramebuffer::prime_fd)
+                       .def("stride", &DumbFramebuffer::stride)
+                       .def("offset", &DumbFramebuffer::offset)
                        ;
 
        py::enum_<PixelFormat>(m, "PixelFormat")