summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6cad07d)
raw | patch | inline | side by side (parent: 6cad07d)
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | |
Mon, 2 Jan 2017 14:42:07 +0000 (16:42 +0200) | ||
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | |
Tue, 3 Jan 2017 08:46:42 +0000 (10:46 +0200) |
The property getters are defined as pure virtual functions in the
MappedFramebuffer class. Expose the Python properties as part of the
bindings for that class to make them available for all classes
inheriting from MappedFramebuffer.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
MappedFramebuffer class. Expose the Python properties as part of the
bindings for that class to make them available for all classes
inheriting from MappedFramebuffer.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
py/pykmsbase.cpp | patch | blob | history |
diff --git a/py/pykmsbase.cpp b/py/pykmsbase.cpp
index 9f20fdb66caa3ec9817d5661032f82fa4ba03237..5247158d7bd4d794733b28136024dca6aa665610 100644 (file)
--- a/py/pykmsbase.cpp
+++ b/py/pykmsbase.cpp
;
py::class_<MappedFramebuffer>(m, "MappedFramebuffer", py::base<Framebuffer>())
+ .def_property_readonly("width", &MappedFramebuffer::width)
+ .def_property_readonly("height", &MappedFramebuffer::height)
;
py::class_<DumbFramebuffer>(m, "DumbFramebuffer", py::base<MappedFramebuffer>())
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("width", &DumbFramebuffer::width)
- .def_property_readonly("height", &DumbFramebuffer::height)
;
py::enum_<PixelFormat>(m, "PixelFormat")