From d47d70dcf4bdb2ae34ec27ba65db5bfdcb64b480 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Fri, 10 Feb 2017 07:24:11 +0200 Subject: py: add DumbFb properties --- py/pykms/pykmsbase.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/py/pykms/pykmsbase.cpp b/py/pykms/pykmsbase.cpp index 2f56825..3f0f610 100644 --- a/py/pykms/pykmsbase.cpp +++ b/py/pykms/pykmsbase.cpp @@ -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(), 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_(m, "PixelFormat") -- cgit v1.2.3