diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2017-02-10 07:24:11 +0200 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2017-02-10 10:55:12 +0200 |
commit | d47d70dcf4bdb2ae34ec27ba65db5bfdcb64b480 (patch) | |
tree | c1b8f766901f9d1000f1e8b1b7197be1cdd82456 /py/pykms | |
parent | aa00f229637653ca07b9c4ec177208893eef4c9d (diff) |
py: add DumbFb properties
Diffstat (limited to 'py/pykms')
-rw-r--r-- | py/pykms/pykmsbase.cpp | 5 |
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") |