b7d975c16858d4624d1ca95e5096a549b0b9774f
[android/external-libkmsxx.git] / libkms++ / connector.h
1 #pragma once
3 #include <vector>
5 #include "drmobject.h"
7 namespace kms
8 {
10 struct ConnectorPriv;
12 struct Videomode
13 {
14         uint32_t clock;
15         uint16_t hdisplay, hsync_start, hsync_end, htotal, hskew;
16         uint16_t vdisplay, vsync_start, vsync_end, vtotal, vscan;
18         uint32_t vrefresh;
20         uint32_t flags;
21         uint32_t type;
22         char name[32]; // XXX
23 };
25 class Connector : public DrmObject
26 {
27 public:
28         Connector(Card& card, uint32_t id, uint32_t idx);
29         ~Connector();
31         void setup();
33         void print_short() const;
35         Videomode get_default_mode() const;
37         Crtc* get_current_crtc() const { return m_current_crtc; }
38         std::vector<Crtc*> get_possible_crtcs() const;
40         bool connected();
42 private:
43         ConnectorPriv* m_priv;
45         std::string m_fullname;
47         Crtc* m_current_crtc;
48 };
49 }