summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2017-02-10 07:24:11 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2017-02-10 10:55:12 +0200
commitd47d70dcf4bdb2ae34ec27ba65db5bfdcb64b480 (patch)
treec1b8f766901f9d1000f1e8b1b7197be1cdd82456
parentaa00f229637653ca07b9c4ec177208893eef4c9d (diff)
py: add DumbFb properties
-rw-r--r--py/pykms/pykmsbase.cpp5
1 files changed, 5 insertions, 0 deletions
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<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")