]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - android/external-libkmsxx.git/blob - libkms++/property.cpp
add TODO
[android/external-libkmsxx.git] / libkms++ / property.cpp
1 #include <xf86drm.h>
2 #include <xf86drmMode.h>
4 #include "kms++.h"
6 namespace kms
7 {
9 struct PropertyPriv
10 {
11         drmModePropertyPtr drm_prop;
12 };
14 Property::Property(Card& card, uint32_t id)
15         : DrmObject(card, id, DRM_MODE_OBJECT_PROPERTY)
16 {
17         m_priv = new PropertyPriv();
18         m_priv->drm_prop = drmModeGetProperty(card.fd(), id);
19 }
21 Property::~Property()
22 {
23         drmModeFreeProperty(m_priv->drm_prop);
24         delete m_priv;
25 }
27 void Property::print_short() const
28 {
29         printf("Property %d, %s\n", id(), name());
30 }
32 const char *Property::name() const
33 {
34         return m_priv->drm_prop->name;
35 }
36 }