MythTV master
mythxdisplay.h
Go to the documentation of this file.
1#ifndef MYTHXDISPLAY_X_
2#define MYTHXDISPLAY_X_
3
4// Qt
5#include <QString>
6#include <QRecursiveMutex>
7
8// MythTV
10
11// X11
12#include <X11/Xlib.h>
13
15{
16 public:
17
18 static MythXDisplay* OpenMythXDisplay(bool Warn = true);
19 static void SetQtX11Display (const QString &DisplayStr);
20 static bool DisplayIsRemote ();
21
22 MythXDisplay() = default;
24 Display* GetDisplay() { return m_disp; }
25 int GetScreen() const { return m_screenNum; }
26 void Lock() { m_lock.lock(); }
27 void Unlock() { m_lock.unlock(); }
28 Window GetRoot() const { return m_root; }
29 bool Open();
30 void Sync(bool Flush = false);
31
32 private:
33 static inline QString s_QtX11Display;
34
35 Display* m_disp { nullptr };
36 int m_screenNum { 0 };
37 Window m_root { 0 };
38 QRecursiveMutex m_lock;
39};
40
41#endif
int GetScreen() const
Definition: mythxdisplay.h:25
Window GetRoot() const
Definition: mythxdisplay.h:28
MythXDisplay()=default
void Unlock()
Definition: mythxdisplay.h:27
QRecursiveMutex m_lock
Definition: mythxdisplay.h:38
static QString s_QtX11Display
Definition: mythxdisplay.h:33
Display * GetDisplay()
Definition: mythxdisplay.h:24
#define MUI_PUBLIC
Definition: mythuiexp.h:9