libthinkpad  1.3
https://github.com/libthinkpad
Public Member Functions | List of all members
ThinkPad::DisplayManagement::Monitor Class Reference

The monitor management interface. More...

#include <libthinkpad.h>

Public Member Functions

 Monitor (VideoOutput *, ScreenResources *pResources)
 construct a new monitor from a VideoOutput (RROutput) More...
 
void turnOff ()
 turns off the monitor. This does NOT release the controller.
 
bool isOff () const
 check if the monitor is off More...
 
bool isConnected ()
 check if the monitor is physically connected to the output device More...
 
string getInterfaceName () const
 get the physical interface name of the monitor. For example: LVDS-1, DP-1, eDP-1 etc. More...
 
point getPosition () const
 get the monitor position on the virtual screen More...
 
VideoOutputMode getPreferredOutputMode () const
 returns the preferred output mode for the monitor. This is usually the native resolution. More...
 
bool applyConfiguration ()
 apply the pending configurations. this method is cascading, which means that you do NOT need to apply config manually to the child screens More...
 
void release ()
 this releases a controller back and makes the screen invalid, to use the screen again you need to call reconfigure()
 
bool reconfigure ()
 this requests a controller from the resources and configures the screen to be used again More...
 
void setPosition (point position)
 sets the position on the virtual screen More...
 
void setPrimary (bool i)
 sets this monitor as the primary monitor More...
 
void setRotation (Rotation i)
 sets the rotation of the monitor More...
 
void setLeftMonitor (Monitor *)
 set the left monitor respectively to the parent
 
void setRightMonitor (Monitor *)
 set the right monitor respectively to the parent
 
void setTopMonitor (Monitor *)
 set the top monitor respectively to the parent
 
void setBottomMonitor (Monitor *)
 set the bottom monitor respectively to the parent
 
void setMirror (Monitor *pMonitor)
 mirror this output to the parameter More...
 
void setOutputMode (VideoOutputMode mode)
 sets the output mode for the monitor More...
 
bool isOutputModeSupported (VideoOutputMode mode)
 

Detailed Description

The monitor management interface.

This class is used to manage the X11 monitor configuration and position using the RandR extension.

Constructor & Destructor Documentation

ThinkPad::DisplayManagement::Monitor::Monitor ( VideoOutput *  videoOutput,
ScreenResources pResources 
)

construct a new monitor from a VideoOutput (RROutput)

Parameters
pResourcesthe screen resources

Member Function Documentation

bool ThinkPad::DisplayManagement::Monitor::applyConfiguration ( )

apply the pending configurations. this method is cascading, which means that you do NOT need to apply config manually to the child screens

Returns
string ThinkPad::DisplayManagement::Monitor::getInterfaceName ( ) const

get the physical interface name of the monitor. For example: LVDS-1, DP-1, eDP-1 etc.

Returns
the string representing the interface name
DisplayManagement::point ThinkPad::DisplayManagement::Monitor::getPosition ( ) const

get the monitor position on the virtual screen

Returns
the position on the screen
VideoOutputMode ThinkPad::DisplayManagement::Monitor::getPreferredOutputMode ( ) const

returns the preferred output mode for the monitor. This is usually the native resolution.

Returns
the preferred output mode
bool ThinkPad::DisplayManagement::Monitor::isConnected ( )

check if the monitor is physically connected to the output device

Returns
true if the monitor is connected
bool ThinkPad::DisplayManagement::Monitor::isOff ( ) const

check if the monitor is off

Returns
true if the monitor is off
bool ThinkPad::DisplayManagement::Monitor::reconfigure ( )

this requests a controller from the resources and configures the screen to be used again

If there is no controller available, the monitor WILL NOT and CAN NOT be used.

Returns
true if there is a controller available, false otherwise
void ThinkPad::DisplayManagement::Monitor::setMirror ( DisplayManagement::Monitor pMonitor)

mirror this output to the parameter

Parameters
themonitor to mirror to
void ThinkPad::DisplayManagement::Monitor::setOutputMode ( VideoOutputMode  mode)

sets the output mode for the monitor

Parameters
modethe mode to set
void ThinkPad::DisplayManagement::Monitor::setPosition ( DisplayManagement::point  position)

sets the position on the virtual screen

Parameters
positionthe position to set
void ThinkPad::DisplayManagement::Monitor::setPrimary ( bool  i)

sets this monitor as the primary monitor

Parameters
thestate to set
void ThinkPad::DisplayManagement::Monitor::setRotation ( Rotation  i)

sets the rotation of the monitor

Parameters
therotation to set

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