MythTV  master
Public Member Functions | Private Member Functions | Private Attributes | List of all members
MythXDisplay Class Reference

This file is intended to hold X11 specific utility functions. More...

#include <mythxdisplay.h>

Public Member Functions

 MythXDisplay ()=default
 
 ~MythXDisplay ()
 
Display * GetDisplay (void)
 
int GetScreen (void) const
 
void Lock (void)
 
void Unlock (void)
 
int GetDepth (void) const
 
Window GetRoot (void) const
 
GC GetGC (void) const
 
unsigned long GetBlack (void) const
 
bool Open (void)
 
bool CreateGC (Window win)
 
void SetForeground (unsigned long color)
 
void FillRectangle (Window win, const QRect &rect)
 
void MoveResizeWin (Window win, const QRect &rect)
 
QSize GetDisplaySize (void)
 Return the size of the X Display in pixels. More...
 
QSize GetDisplayDimensions (void)
 Return the size of the X Display in millimeters. More...
 
float GetRefreshRate (void)
 
void Sync (bool flush=false)
 
void StartLog (void)
 
bool StopLog (void)
 

Private Member Functions

bool CheckErrors (Display *disp=nullptr)
 
void CheckOrphanedErrors (void)
 

Private Attributes

Display * m_disp {nullptr}
 
int m_screen_num {0}
 
Screen * m_screen {nullptr}
 
int m_depth {0}
 
unsigned long m_black {0}
 
GC m_gc {nullptr}
 
Window m_root {0}
 
QMutex m_lock {QMutex::Recursive}
 

Detailed Description

This file is intended to hold X11 specific utility functions.

Definition at line 16 of file mythxdisplay.h.

Constructor & Destructor Documentation

◆ MythXDisplay()

MythXDisplay::MythXDisplay ( )
default

◆ ~MythXDisplay()

MythXDisplay::~MythXDisplay ( )

Definition at line 70 of file mythxdisplay.cpp.

Member Function Documentation

◆ GetDisplay()

Display* MythXDisplay::GetDisplay ( void  )
inline

◆ GetScreen()

int MythXDisplay::GetScreen ( void  ) const
inline

◆ Lock()

void MythXDisplay::Lock ( void  )
inline

◆ Unlock()

void MythXDisplay::Unlock ( void  )
inline

◆ GetDepth()

int MythXDisplay::GetDepth ( void  ) const
inline

◆ GetRoot()

Window MythXDisplay::GetRoot ( void  ) const
inline

◆ GetGC()

GC MythXDisplay::GetGC ( void  ) const
inline

◆ GetBlack()

unsigned long MythXDisplay::GetBlack ( void  ) const
inline

◆ Open()

bool MythXDisplay::Open ( void  )

Definition at line 85 of file mythxdisplay.cpp.

Referenced by OpenMythXDisplay().

◆ CreateGC()

bool MythXDisplay::CreateGC ( Window  win)

Definition at line 108 of file mythxdisplay.cpp.

Referenced by MythRenderVDPAU::Create(), and VideoOutputXv::Init().

◆ SetForeground()

void MythXDisplay::SetForeground ( unsigned long  color)

◆ FillRectangle()

void MythXDisplay::FillRectangle ( Window  win,
const QRect &  rect 
)

◆ MoveResizeWin()

void MythXDisplay::MoveResizeWin ( Window  win,
const QRect &  rect 
)

◆ GetDisplaySize()

QSize MythXDisplay::GetDisplaySize ( void  )

Return the size of the X Display in pixels.

This corresponds to the size of the desktop, not necessarily to the size of single screen.

Definition at line 143 of file mythxdisplay.cpp.

Referenced by MythDisplay::GetDisplayInfo().

◆ GetDisplayDimensions()

QSize MythXDisplay::GetDisplayDimensions ( void  )

Return the size of the X Display in millimeters.

This corresponds to the size of the desktop, not necessarily to the size of single screen.

Definition at line 156 of file mythxdisplay.cpp.

Referenced by MythDisplay::GetDisplayInfo().

◆ GetRefreshRate()

float MythXDisplay::GetRefreshRate ( void  )

Definition at line 164 of file mythxdisplay.cpp.

Referenced by MythDisplay::GetDisplayInfo().

◆ Sync()

void MythXDisplay::Sync ( bool  flush = false)

◆ StartLog()

void MythXDisplay::StartLog ( void  )

◆ StopLog()

bool MythXDisplay::StopLog ( void  )

◆ CheckErrors()

bool MythXDisplay::CheckErrors ( Display *  disp = nullptr)
private

Definition at line 224 of file mythxdisplay.cpp.

Referenced by CheckOrphanedErrors(), and StopLog().

◆ CheckOrphanedErrors()

void MythXDisplay::CheckOrphanedErrors ( void  )
private

Definition at line 266 of file mythxdisplay.cpp.

Referenced by CheckErrors().

Member Data Documentation

◆ m_disp

Display* MythXDisplay::m_disp {nullptr}
private

◆ m_screen_num

int MythXDisplay::m_screen_num {0}
private

Definition at line 46 of file mythxdisplay.h.

Referenced by GetDisplayDimensions(), GetDisplaySize(), GetRefreshRate(), and Open().

◆ m_screen

Screen* MythXDisplay::m_screen {nullptr}
private

Definition at line 47 of file mythxdisplay.h.

Referenced by Open().

◆ m_depth

int MythXDisplay::m_depth {0}
private

Definition at line 48 of file mythxdisplay.h.

Referenced by Open().

◆ m_black

unsigned long MythXDisplay::m_black {0}
private

Definition at line 49 of file mythxdisplay.h.

Referenced by Open().

◆ m_gc

GC MythXDisplay::m_gc {nullptr}
private

Definition at line 50 of file mythxdisplay.h.

Referenced by CreateGC(), FillRectangle(), SetForeground(), and ~MythXDisplay().

◆ m_root

Window MythXDisplay::m_root {0}
private

Definition at line 51 of file mythxdisplay.h.

Referenced by Open().

◆ m_lock

QMutex MythXDisplay::m_lock {QMutex::Recursive}
private

Definition at line 52 of file mythxdisplay.h.


The documentation for this class was generated from the following files: