]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - android/external-libkmsxx.git/blob - libkms++/connector.h
dumbfb: add offset
[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         friend class Card;
28 public:
29         void print_short() const;
31         Videomode get_default_mode() const;
33         Videomode get_mode(const std::string& mode) const;
35         Crtc* get_current_crtc() const;
36         std::vector<Crtc*> get_possible_crtcs() const;
38         bool connected() const;
40         const std::string& fullname() const { return m_fullname; }
41         uint32_t connector_type() const;
42         uint32_t connector_type_id() const;
43         uint32_t mmWidth() const;
44         uint32_t mmHeight() const;
45         uint32_t subpixel() const;
46         const std::string& subpixel_str() const;
47         std::vector<Videomode> get_modes() const;
48         std::vector<Encoder*> get_encoders() const;
49 private:
50         Connector(Card& card, uint32_t id, uint32_t idx);
51         ~Connector();
53         void setup();
54         void restore_mode();
56         ConnectorPriv* m_priv;
58         std::string m_fullname;
60         Encoder* m_current_encoder;
62         Crtc* m_saved_crtc;
63 };
64 }