]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - android/external-libkmsxx.git/blob - libkms++/atomicreq.h
py: fix scripts when there's no current crtc
[android/external-libkmsxx.git] / libkms++ / atomicreq.h
1 #pragma once
3 #include <cstdint>
4 #include <string>
5 #include <map>
7 struct _drmModeAtomicReq;
9 #include "decls.h"
11 namespace kms
12 {
13 class AtomicReq
14 {
15 public:
16         AtomicReq(Card& card);
17         ~AtomicReq();
19         AtomicReq(const AtomicReq& other) = delete;
20         AtomicReq& operator=(const AtomicReq& other) = delete;
22         void add(uint32_t ob_id, uint32_t prop_id, uint64_t value);
23         void add(DrmObject *ob, Property *prop, uint64_t value);
24         void add(DrmObject *ob, const std::string& prop, uint64_t value);
25         void add(DrmObject *ob, const std::map<std::string, uint64_t>& values);
27         int test(bool allow_modeset = false);
28         int commit(void* data, bool allow_modeset = false);
29         int commit_sync(bool allow_modeset = false);
31 private:
32         Card& m_card;
33         _drmModeAtomicReq* m_req;
34 };
36 }