add Card::get_connector(id)
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Wed, 14 Oct 2015 14:23:27 +0000 (17:23 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Mon, 26 Oct 2015 18:09:39 +0000 (20:09 +0200)
libkms++/card.cpp
libkms++/card.h

index 3a0f2701d8e5ba2138646041cbafa30094e2be44..63a068a71953b06590cd2b8f441079054f2eaa07 100644 (file)
@@ -211,6 +211,7 @@ Crtc* Card::get_crtc_by_index(uint32_t idx) const
        throw invalid_argument(string("Crtc #") + to_string(idx) + " not found");
 }
 
+Connector* Card::get_connector(uint32_t id) const { return dynamic_cast<Connector*>(get_object(id)); }
 Crtc* Card::get_crtc(uint32_t id) const { return dynamic_cast<Crtc*>(get_object(id)); }
 Encoder* Card::get_encoder(uint32_t id) const { return dynamic_cast<Encoder*>(get_object(id)); }
 Property* Card::get_prop(uint32_t id) const { return dynamic_cast<Property*>(get_object(id)); }
index e692dac40633cd389763a274110111e289f5c9fb..f35ba60e47427ae750f9a8e26fdb8acb3360ffb6 100644 (file)
@@ -23,6 +23,7 @@ public:
        Connector* get_first_connected_connector() const;
 
        DrmObject* get_object(uint32_t id) const;
+       Connector* get_connector(uint32_t id) const;
        Crtc* get_crtc(uint32_t id) const;
        Crtc* get_crtc_by_index(uint32_t idx) const;
        Encoder* get_encoder(uint32_t id) const;