diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2015-10-14 17:23:27 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2015-10-26 20:09:39 +0200 |
commit | f7a79dcadf81a9ac82bff243c2a48d38fc3e302b (patch) | |
tree | 3cf6db732264938299e226f286c5b11d06186b8e | |
parent | 4a9274d0ebc6a35e479302b6f1e83bfb7cb97ba0 (diff) |
add Card::get_connector(id)
-rw-r--r-- | libkms++/card.cpp | 1 | ||||
-rw-r--r-- | libkms++/card.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/libkms++/card.cpp b/libkms++/card.cpp index 3a0f270..63a068a 100644 --- a/libkms++/card.cpp +++ b/libkms++/card.cpp @@ -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)); } diff --git a/libkms++/card.h b/libkms++/card.h index e692dac..f35ba60 100644 --- a/libkms++/card.h +++ b/libkms++/card.h @@ -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; |