Add Connector.connected to pykmsbase
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Fri, 7 Apr 2017 10:26:12 +0000 (13:26 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Wed, 26 Apr 2017 08:04:08 +0000 (11:04 +0300)
It can be used to check if the connector is connected or not

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
py/pykms/pykmsbase.cpp

index 4d4559d693a8126b436d324c305237a0222d1955..c371a0b76accf503c072d2459b91a2969cf87b06 100644 (file)
@@ -43,6 +43,7 @@ void init_pykmsbase(py::module &m)
                        .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, float refresh, bool ilace) const)&Connector::get_mode)
+                       .def("connected", &Connector::connected)
                        .def("__repr__", [](const Connector& o) { return "<pykms.Connector " + to_string(o.id()) + ">"; })
                        .def("refresh", &Connector::refresh)
                        ;