diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2016-06-22 03:10:21 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2016-06-22 08:47:47 +0300 |
commit | 0e064e295ef03b24b96ca3787493ac15c4928610 (patch) | |
tree | 497afb00f5efe57f02cc476fd62337fc726422e3 | |
parent | c1138d9e30a3426a1d734c1de28218102bcb05d4 (diff) |
py: Expose the Connector::get_mode methods
Those methods are useful in Python scripts, expose them through the
bindings.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r-- | py/pykmsbase.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/py/pykmsbase.cpp b/py/pykmsbase.cpp index f1e0c5c..b279de3 100644 --- a/py/pykmsbase.cpp +++ b/py/pykmsbase.cpp @@ -42,6 +42,8 @@ void init_pykmsbase(py::module &m) .def("get_current_crtc", &Connector::get_current_crtc) .def("get_possible_crtcs", &Connector::get_possible_crtcs) .def("get_modes", &Connector::get_modes) + .def("get_mode", (Videomode (Connector::*)(const string& mode) const)&Connector::get_mode) + .def("get_mode", (Videomode (Connector::*)(unsigned xres, unsigned yres, unsigned refresh, bool ilace) const)&Connector::get_mode) .def("__repr__", [](const Connector& o) { return "<pykms.Connector " + to_string(o.id()) + ">"; }) ; |